A point of interest recommendation method based on a time sequence gated graph neural network
By constructing a user long-term preference model using a temporally gated graph neural network, the problem of failing to effectively utilize temporal information in existing technologies is solved, and the effect of accurately recommending points of interest in complex check-in sequences is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHONGQING UNIV OF POSTS & TELECOMM
- Filing Date
- 2023-02-17
- Publication Date
- 2026-06-26
AI Technical Summary
Existing POI recommendation algorithms fail to effectively utilize the time information in user check-in behavior data, making it difficult to capture users' sequential behavior patterns and preferences, especially in complex check-in sequences.
A long-term user preference model based on a temporally gated graph neural network is constructed. By combining a check-in sequence graph construction module, a TGGNN module, an attention mechanism module, and a probability prediction module, the state representation of the location node is dynamically updated in conjunction with the temporal relationship to capture the user's long-term preferences.
It effectively captures users' sequential behavior patterns and preferences, enabling accurate recommendations of points of interest in complex check-in sequences, making full use of time information, and improving the accuracy of recommendations.
Smart Images

Figure CN116049578B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of graph neural networks, deep learning, and recommendation systems, and particularly to an interest point recommendation method based on a temporally gated graph neural network. Background Technology
[0002] With the widespread use of smartphones and the rapid development of the Global Positioning System (GPS), the positioning capabilities provided by smart devices have become increasingly accurate. Against this backdrop, location-based social networking (LBSN) services such as Gowalla, Yelp, and Facebook Places have rapidly developed and gained popularity among many users.
[0003] Compared to traditional social networks, LBSNs offer the advantage of allowing users to post their geographical check-ins and share their experiences with friends, providing a unique social opportunity. These advantages have led to the rapid expansion of LBSN platforms' user base and the generation of a large amount of usability data. This has created new opportunities for Point of Interest (POI) recommendations, a dynamic and independent subfield within recommendation systems that has garnered significant attention from both users and businesses in recent years.
[0004] In Geographic Information Systems (GIS), a Point of Interest (POI) can be a building, a shop, a bus stop, etc. POI recommendation utilizes a user's historical check-ins and other relevant information to suggest the next set of POIs that might interest them. POI recommendation helps users find information of interest within the vast data of location-based social networks and access new geographic locations, making their lives more convenient. While research on POIs is abundant, several questions remain:
[0005] In many existing methods, user check-in behavior data is typically modeled as a sequence. User check-in behavior often contains many useful characteristics that are not yet fully utilized. When check-in sequences become quite complex, especially when a large number of Points of Interest (POIs) are available, it is difficult to directly capture users' sequential behavioral patterns and preferences from the user check-in sequences.
[0006] Existing POI recommendation algorithms update nodes in the sequence graph using gated graph neural networks (GGNNs) to obtain complex transitions between different check-in points. However, this method has a drawback: it does not consider the temporal relationships between nodes in the sequence graph. Nevertheless, research shows that temporal information is crucial for POI recommendation. Summary of the Invention
[0007] To address the aforementioned problems, this invention provides an interest point recommendation method based on a temporally gated graph neural network. This method constructs and trains a user long-term preference model, and uses the trained user long-term preference model to recommend interest points to users. The user long-term preference model includes a check-in sequence graph construction module, a TGGNN module, an attention mechanism module, and a probability prediction module.
[0008] The training process for a user long-term preference model includes the following steps:
[0009] S1. Obtain the user's check-in activity sequence, wherein the check-in activity sequence includes feature vectors of each position sorted by time;
[0010] S2. The sign-in sequence diagram construction module generates a POI sign-in sequence diagram based on the user's sign-in activity sequence;
[0011] S3. Obtain the output state representation of each node in the POI check-in sequence graph using the TGGNN module;
[0012] S4. The attention mechanism module combines the output state representation of each location node to calculate the final vector of the POI check-in sequence graph;
[0013] S5. The probability prediction module calculates the probability of each candidate POI using the softmax function, calculates the loss using the cross-entropy loss function, and backpropagates to train the model until the model converges.
[0014] Furthermore, the user's check-in activity sequence is represented as follows: This indicates that user u is at time point t. i The feature vector of the visited location; Step S2 constructs the POI check-in sequence graph G = (Q, E) based on the user's check-in activity sequence. For a set of location nodes, Let E be the vector representing the i-th node, and let E be the set of edges.
[0015] Furthermore, the process of obtaining the output state representation of each location node in the POI check-in sequence graph through the TGGNN module is as follows:
[0016] S31. Calculate the time weight of each edge in the POI check-in sequence graph when it is used as an input edge and an output edge, respectively, to obtain the POI check-in sequence graph with time information;
[0017] S32. Convert the POI check-in sequence graph with time information into an adjacency matrix and a time connection matrix;
[0018] S33. Transform the vector of each location node in the POI check-in sequence graph using the adjacency matrix and the time connection matrix to obtain the graph input vector and graph time input vector corresponding to each location node;
[0019] S34. Based on the graph input vector and graph time input vector corresponding to each location node, the improved update function is used to dynamically update the POI check-in sequence graph to obtain the output state representation of each location node.
[0020] Furthermore, step S31 calculates the time weight of each edge in the POI check-in sequence graph when it is used as an input edge and an output edge, respectively, using the following formula:
[0021]
[0022]
[0023] in, This represents the input edge in the POI check-in sequence graph. Time weighting This represents the output edge in the POI check-in sequence graph. Time weight, W T (v j ,v i ) represents the location node v j With position node v i The weight of the time interval between W T (v k ,v i ) represents the location node v k With position node v i The weight of the time interval between N in (i) represents the location node v i The set of forward nodes, N out (i) represents the location node v i The set of backward nodes.
[0024] Furthermore, the location node v j With position node v i The formula for calculating the weight of the time interval is:
[0025]
[0026] Where, Δt j,i Represents the location node v j With position node v i The time interval between them, tt represents the time scaling factor.
[0027] Furthermore, step S33 calculates the graph input vector and graph time input vector for each location node using the following formula:
[0028]
[0029]
[0030] in, This represents the graph input vector at position i. This represents a list of node vectors in the POI check-in sequence graph. Represents the in-degree adjacency matrix A in The i-th row, Represent the out-degree adjacency matrix A out The i-th row, Let represent the graph time input vector of the i-th position node. This represents the i-th row of the in-degree time connectivity matrix. Represent the i-th row of the out-degree time connectivity matrix; W in and W out They are all parameter matrices.
[0031] Furthermore, the improved update function used in step S34 is expressed as follows:
[0032]
[0033]
[0034]
[0035]
[0036] in, This represents the result of the i-th position node passing through the reset gate. This represents the graph input vector at position i. Let represent the graph time input vector of the i-th position node. Let represent the hidden state of the i-th node at time t-1. Let represent the hidden state of the i-th node at time t. This represents the result of updating the i-th position node through the update gate. Let b represent the candidate hidden state of the i-th node at time t. r b z b q Both are bias vectors, W ra W time_ra W za W time_za W hr W qa W time_qaBoth are parameter matrices, and σ is the sigmoid function.
[0037] Furthermore, step S4, which calculates the final vector of the POI check-in sequence graph, includes:
[0038] S41. Calculate the weight of each node in the POI check-in sequence graph and multiply it by its corresponding output state representation. Sum all the multiplication results to obtain the global vector S of the sequence graph. g ;
[0039] S42. Use the output state representation of the last node in the POI check-in sequence graph as the sequence graph output vector S. last ;
[0040] S43. Transfer the global vector S of the sequence graph g and sequence diagram output vector S last The final vector S of the POI check-in sequence graph obtained by fusion is h .
[0041] The beneficial effects of this invention are:
[0042] This invention provides a Point of Interest (POI) recommendation method based on a temporally gated graph neural network. By constructing a POI check-in sequence graph to represent user check-in activities, it achieves the propagation of effective features. Even when the user's check-in activity sequence becomes quite complex, the constructed POI check-in sequence graph can easily capture the user's sequential behavior patterns and preferences. Furthermore, a temporally gated graph neural network (TGGNN) is designed to dynamically update the node vectors of the POI check-in sequence graph by incorporating temporal context information. This fully considers the temporal relationships between nodes in the POI check-in sequence graph and also captures complex transformations between nodes at different positions. Finally, an attention mechanism is used to capture users' long-term preferences, enabling the model to focus on important information within large amounts of data. Attached Figure Description
[0043] Figure 1 The flowchart below shows the interest point recommendation method based on a temporally gated graph neural network of the present invention.
[0044] Figure 2 This is a structural diagram of the user long-term preference model of the present invention. Detailed Implementation
[0045] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0046] This invention provides an interest point recommendation method based on a temporally gated graph neural network. The method first constructs and trains a user long-term preference model, and then uses the trained user long-term preference model to recommend interest points to users. The user long-term preference model includes a check-in sequence graph construction module, a TGGNN module, an attention mechanism module, and a probability prediction module.
[0047] like Figure 1 As shown, the training process of the user long-term preference model includes the following steps:
[0048] S1. Obtain the user's check-in activity sequence, wherein the check-in activity sequence includes feature vectors of each position sorted by time;
[0049] S2. The sign-in sequence diagram construction module generates a POI sign-in sequence diagram based on the user's sign-in activity sequence;
[0050] S3. Obtain the output state representation of each node in the POI check-in sequence graph using the TGGNN module;
[0051] S4. The attention mechanism module combines the output state representation of each location node to calculate the final vector of the POI check-in sequence graph;
[0052] S5. The probability prediction module calculates the probability of each candidate POI using the softmax function, calculates the loss using the cross-entropy loss function, and backpropagates to train the model until the model converges.
[0053] In one embodiment, the specific structure and operation flow of the user long-term preference model are as follows: Figure 2 As shown, this embodiment adopts Figure 2 A detailed explanation of the interest point recommendation method based on temporally gated graph neural networks is provided, including:
[0054] STEP 1. Obtain two location-based real-world datasets, such as Foursquare and Gowalla. These datasets contain basic user information, check-in information, check-in location information, and check-in time information. Preprocess the two datasets to obtain the user check-in data required for this implementation. Preprocessing involves deleting users with fewer than 10 check-ins and locations with fewer than 10 visits from the two datasets.
[0055] STEP 2. Obtain the check-in activity sequence of multiple users based on user check-in data. The check-in activity sequence includes feature vectors for each position sorted by time; such as... Figure 2In this sequence, v1→v2→v4→v3 represents a user's check-in activity sequence. The user first checks in at location v1, then goes to location v2 and checks in again. In this embodiment, the user's check-in activity sequence is represented as follows: This indicates that user u is at time point t. i The feature vector of the visited location.
[0056] STEP 3. The sign-in sequence graph construction module generates a POI sign-in sequence graph based on a user's sign-in activity sequence. The key to the POI recommendation problem based on graph neural networks is to obtain the transitive relationships between sign-in data in the sign-in activity sequence and learn the embedding representation of the graph structure. The standard GGNN (Gated Graph Neural Network) can automatically extract features from the sequence graph; therefore, this implementation uses GGNN to construct the POI sign-in sequence graph G = (Q, E). For a set of location nodes, Let E be the vector representing the i-th node, and let E be the set of edges.
[0057] Using GGNN to construct a POI check-in sequence graph to represent user check-in activities has several advantages. First, since the graph structure can represent the entire behavior sequence (check-in activity sequence), it eliminates the need to truncate the user's behavior sequence to a fixed length. Second, representing user check-in activities with a graph structure not only enables the propagation of effective features but also retains more important sequential information useful for prediction and recommendation tasks. Finally, the graph structure can greatly mine the potential information in user check-in activities, and even if the check-in activity sequence becomes quite complex, it can still easily capture the user's sequential behavior patterns and preferences.
[0058] Specifically, the graph node update function used by GGNN is defined as follows:
[0059]
[0060]
[0061]
[0062]
[0063]
[0064] in, This represents the graph input vector at position i. This represents the sequence of check-in activities for user u. This represents the result of the i-th position node passing through the reset gate. This represents the result of updating the i-th position node through the update gate. This represents the vector after adding reset information to the i-th position node. Let σ represent the hidden state of the i-th node at time t-1, and let σ represent the sigmoid function. b r b z b q Both are bias vectors, W in W out W ra W rq W za W zq W hr W qa They are all parameter matrices; Represents the in-degree adjacency matrix A in The i-th row, Represent the out-degree adjacency matrix A out The i-th row, and the adjacency matrix A = [A in A out ]; Location node v in the POI check-in sequence graph i There are input edges There is also an output edge Their respective weights are expressed as follows:
[0065]
[0066]
[0067] in, Represents the location node v i input edge The weight, exist(v) j ,v i ) represents the location node v j With position node v i Does the space have an edge? Represents the location node v i Output edge The weights, N in (i) represents the location node v i The set of forward nodes, N out (i) represents the location node v i The set of backward nodes.
[0068] STEP 4. Considering the impact of time information on the check-in activity, the standard GGNN is further improved to obtain the Temporal Gated Graph Neural Network (TGGNN). By using TGGNN to fuse time context information to dynamically update node vectors, the temporal relationship between position nodes in the POI check-in sequence graph can be fully considered, and the complex transformations between different check-in points (position nodes) can also be obtained. Therefore, in the TGGNN module, the vector of each position node in the POI check-in sequence graph is dynamically updated through TGGNN to obtain the output state representation of each position node in the POI check-in sequence graph.
[0069] Specifically, the process of obtaining the output state representation of each location node in the POI check-in sequence graph through the TGGNN module is as follows:
[0070] S31. Improve the weights of the input and output edges of each node in the POI check-in sequence graph by calculating the time weights of each edge in the POI check-in sequence graph as an input and output edge based on the time interval, and obtain the POI check-in sequence graph with time information.
[0071] Specifically, the formulas for the time weights of the input and output edges are as follows:
[0072]
[0073]
[0074] in, This represents the input edge in the POI check-in sequence graph. Time weighting This represents the output edge in the POI check-in sequence graph. Time weight, W T (v j ,v i ) represents the location node v j With position node v i The weight of the time interval between W T (v k ,v i ) represents the location node v k With position node v i The weight of the time interval between N in (i) represents the location node v i The set of forward nodes, N out (i) represents the location node v i The set of backward nodes. Position node v j With position node v i The formula for calculating the weight of the time interval is:
[0075]
[0076] Where, Δt j,i Represents the location node v j With position node v i The time interval between them, tt represents the time scaling factor.
[0077] S32. In the above operation, the POI check-in sequence diagram obtained by the check-in sequence diagram construction module can yield the transition matrix A = [A in A out A in Let A be the in-degree neighbor matrix. out The out-degree adjacency matrix is used; then, the POI check-in sequence graph with time information can be transformed into a time connectivity matrix.
[0078] A T =[T_A in ,T_A out ];T_A in T_A represents the in-degree time connection matrix. out Represent the out-degree time connection matrix.
[0079] S33. In order to combine the time information in the dynamic update process of the location nodes, the vector of each location node in the POI check-in sequence graph is transformed by the adjacency matrix and the time connection matrix to obtain the graph input vector and graph time input vector corresponding to each location node;
[0080] Specifically, the graph input vector corresponding to each location node is obtained by transforming the adjacency matrix using formula (1), and then the graph time input vector corresponding to each location node is obtained by transforming the time connectivity matrix using the following formula:
[0081]
[0082] in, Let represent the graph time input vector of the i-th position node. This represents the i-th row of the in-degree time connectivity matrix. Represent the i-th row of the out-degree time connectivity matrix; They are all parameter matrices.
[0083] S34.TGGNN improves upon the standard GGNN by incorporating temporal information between location nodes. Therefore, it further improves the graph node update function used by GGNN. Based on the graph input vector and graph time input vector corresponding to each location node, the improved update function dynamically updates the POI check-in sequence graph to obtain the output state representation of each location node.
[0084] Specifically, by further improving formulas (2)-(4) in the graph node update function used by GGNN, the improved update function is expressed as follows:
[0085]
[0086]
[0087]
[0088] in, This represents the result of the i-th position node passing through the reset gate. This represents the graph input vector at position i. Let represent the graph time input vector of the i-th position node. Let represent the hidden state of the i-th node at time t-1. Let represent the hidden state of the i-th node at time t. This represents the result of updating the i-th position node through the update gate. Let b represent the candidate hidden state of the i-th node at time t. r b z b q Both are bias vectors, W ra W time_ra W za W time_za W hr W qa W time_qa Both are parameter matrices, and σ is the sigmoid function.
[0089] STEP 5. If a general sequence recommendation algorithm is used, it's common practice to use the output state representation of the last node in the check-in activity sequence as the vector representation of the entire sequence. This approach fails to effectively utilize information from distant nodes. While the temporally gated graph neural network designed in this embodiment can model complex transitions between nodes, using the output state representation of the last node as the vector representation of the entire sequence still suffers from long-sequence dependencies. Therefore, this embodiment primarily uses a temporally gated graph neural network to update the output state representation of each node through sequence propagation. Then, an attention network is used to combine the output state representations of all nodes in the sequence with the vector representation of the entire sequence to calculate the final vector of the entire sequence.
[0090] The concept of the attention mechanism originates from the human brain's image processing logic. The main logic is that the human brain first scans the entire image transmitted by the eyes and then focuses on the part that interests it. This mechanism can increase the attention to key information and reduce interference from irrelevant information. The design of attention mechanisms in deep learning draws on this idea. Because the attention mechanism enables the model to focus on important information in large amounts of data, it can be used to capture long-term user preferences from sequence vectors.
[0091] Let S be the output state of the last node in the POI check-in sequence graph after passing through a temporally gated graph neural network. last The output state obtained after passing through the temporally gated graph neural network at each position node before the last position node is represented as x. i The process of calculating the final vector of the POI check-in sequence graph includes:
[0092] S41. Calculate the weight of each node in the POI check-in sequence graph and multiply it by its corresponding output state representation. Sum all the multiplication results to obtain the global vector S of the sequence graph. g ;
[0093]
[0094] Where |Q| represents the total number of location nodes in the POI check-in sequence graph, α i The weight of the node at position i is represented by the following formula:
[0095] α i =q T σ(W α x i (16)
[0096] q T W α These are parameters representing the output state of the control node.
[0097] S42. Use the output state representation of the last node in the POI check-in sequence graph as the sequence graph output vector S. last ;
[0098] S43. Transfer the global vector S of the sequence graph g and sequence diagram output vector S last The final vector S of the POI check-in sequence graph obtained by fusion is h The public notice indicates that:
[0099] s h =Concat(s last ,s g (17)
[0100] Specifically, in the probability prediction module, the final vector of the POI check-in sequence graph and the output state representation of each location node are used to calculate the candidate score for each POI, expressed as:
[0101]
[0102] Then, the probability of each candidate POI is calculated using the softmax function, expressed as:
[0103]
[0104] Specifically, the loss is calculated using the cross-entropy loss function:
[0105]
[0106] Where |Q| represents the total number of location nodes in the POI check-in sequence graph, y i This represents the actual label for each POI.
[0107] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "setting," "connection," "fixing," "rotation," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal connection of two components or the interaction between two components. Unless otherwise explicitly limited, those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0108] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. An interest point recommendation method based on a temporally gated graph neural network, characterized in that, A user long-term preference model is constructed and trained, and the trained user long-term preference model is used to recommend points of interest to users; the user long-term preference model includes a check-in sequence graph construction module, a TGGNN module, an attention mechanism module, and a probability prediction module. The training process for a user long-term preference model includes the following steps: S1. Obtain the user's check-in activity sequence, wherein the check-in activity sequence includes feature vectors of each position sorted by time; S2. The sign-in sequence diagram construction module generates a POI sign-in sequence diagram based on the user's sign-in activity sequence; S3. Obtain the output state representation of each node in the POI check-in sequence graph using the TGGNN module; The process of obtaining the output state representation of each node in the POI check-in sequence graph using the TGGNN module: S31. Calculate the time weight of each edge in the POI check-in sequence graph when it is used as an input edge and an output edge, respectively, to obtain the POI check-in sequence graph with time information; S32. Convert the POI check-in sequence graph with time information into an adjacency matrix and a time connection matrix; S33. Transform the vector of each location node in the POI check-in sequence graph using the adjacency matrix and the time connection matrix to obtain the graph input vector and graph time input vector corresponding to each location node; S34. Based on the graph input vector and graph time input vector corresponding to each location node, the improved update function is used to dynamically update the POI check-in sequence graph to obtain the output state representation of each location node; Step S33: The formula for calculating the graph input vector and graph time input vector for each location node is as follows: in, This represents the graph input vector of the i-th node. This represents a list of node vectors in the POI check-in sequence graph. Represents the in-degree adjacency matrix The i-th row, Represent the out-degree adjacency matrix The i-th row, Let represent the graph time input vector of the i-th node. This represents the i-th row of the in-degree time connectivity matrix. Represent the i-th row of the out-degree time connectivity matrix; , , and They are all parameter matrices; The improved update function used in step S34 is expressed as follows: in, This represents the result of the i-th position node passing through the reset gate. This represents the graph input vector at position i. Let represent the graph time input vector of the i-th position node. Let represent the hidden state of the i-th node at time t-1. Let represent the hidden state of the i-th node at time t. This represents the result of updating the i-th position node through the update gate. Let represent the candidate hidden state of the i-th node at time t. , , They are all bias vectors. , , , , , , They are all parameter matrices. It is the sigmoid function; S4. The attention mechanism module combines the output state representation of each location node to calculate the final vector of the POI check-in sequence graph; S5. The probability prediction module calculates the probability of each candidate POI using the softmax function, calculates the loss using the cross-entropy loss function, and backpropagates to train the model until the model converges.
2. The interest point recommendation method based on a temporally gated graph neural network according to claim 1, characterized in that, The user's check-in activity sequence is represented as follows , This indicates that user u is at time point t. i The feature vector of the visited location; Step S2 constructs a POI check-in sequence graph G=(Q,E) based on the user's check-in activity sequence. For a set of location nodes, Let E be the vector representing the i-th node, and let E be the set of edges.
3. The interest point recommendation method based on a temporally gated graph neural network according to claim 1, characterized in that, Step S31: The formula for calculating the time weight of each edge in the POI check-in sequence graph when it is used as an input edge and an output edge is as follows: in, This represents the input edge in the POI check-in sequence graph. Time weighting This represents the output edge in the POI check-in sequence graph. Time weighting Represents the location node v j With position node v i Weight of time intervals Represents the location node v k With position node v i Weight of time intervals Represents the location node v i The set of forward nodes, Represents the location node v i The set of backward nodes.
4. The interest point recommendation method based on a temporally gated graph neural network according to claim 3, characterized in that, Location node v j With position node v i The formula for calculating the weight of the time interval is: in, Represents the location node v j With position node v i The time interval between them, tt represents the time scaling factor.
5. The interest point recommendation method based on a temporally gated graph neural network according to claim 1, characterized in that, Step S4, calculating the final vector of the POI check-in sequence graph, includes: S41. Calculate the weight of each node in the POI check-in sequence graph and multiply it by its corresponding output state representation. Sum all the multiplication results to obtain the global vector S of the sequence graph. g ; S42. Use the output state representation of the last node in the POI check-in sequence graph as the sequence graph output vector S. last ; S43. Transfer the global vector S of the sequence graph g and sequence diagram output vector S last The final vector S of the POI check-in sequence graph is obtained by fusion. h .