Random group next POI recommendation method and system based on space-time heterogeneous graph
By constructing a spatiotemporal heterogeneous graph and a spatiotemporal convolutional network, the problem of preference fusion and real-time decision-making in random group POI recommendation is solved, accurate POI recommendation is achieved, and the accuracy and personalization of the recommendation system are improved.
Patent Information
- Application Number
- CN202510764133.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-10
- Publication Date
- 2025-09-05
AI Technical Summary
Existing POI recommendation methods cannot effectively capture the multi-dimensional preferences of members in random group scenarios, find it difficult to balance the differences in members' preferences, and lack systematic modeling of spatiotemporal factors and POI transfer behavior, resulting in inaccurate recommendation results.
A spatiotemporal heterogeneous graph is constructed, and embedding learning is performed through the heterogeneous Node2Vec method. Combining the spatiotemporal convolutional network and the edge-enhanced bipartite graph neural network, the spatiotemporal interaction relationship between users and POIs is captured, generating accurate group fitting representations and POI scores.
It achieves accurate recommendation of the next POI for a random group, improves the accuracy and personalization of the recommendation system, solves the modeling difficulties of cold start and spatiotemporal transfer modes, and enhances the performance of the model in dynamic social scenarios.
Smart Images

Figure CN120596750A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of point of interest recommendation, and in particular to a method and system for recommending the next POI in a random group based on a spatiotemporal heterogeneous graph. Background Art
[0002] With the development of location-aware technology and the mobile internet, location-based social networks are increasingly being used in tourism, travel, and social networking scenarios. Point-of-interest (POI) recommendation systems based on user check-in behavior have become an important tool for improving user experience and service quality. Currently, a significant amount of research has focused on POI (Point of Interest) recommendation for individual users or fixed groups, and some progress has been achieved. However, random groups, as temporary, non-fixed, and dynamic user collections, lack stable social relationships and historical interaction data among their members, making traditional recommendation algorithms difficult to apply to such scenarios. Random groups are widely used in real-world applications such as temporary meetings, urban micro-tourism, and social gatherings. They have several significant characteristics: First, members are randomly sourced and lack historical social connections, resulting in sparse behavioral data and difficulty in modeling preference correlations between users. Second, group behavior is instantaneous, requiring recommendation systems to respond quickly and generate effective recommendations. Third, group member preferences may conflict significantly, making it crucial to balance individual preferences and enhance group satisfaction.
[0003] Traditional methods often rely on modeling personalized preferences based on long-term historical user behavior. Methods such as matrix factorization, Markov chains, and deep sequence modeling have shown good performance in fixed-user scenarios. However, these methods struggle to handle cold-start and sparse behavior, and generally lack the ability to handle individual differences, temporary decisions, and group dynamics within a group. Furthermore, research on group recommendations has largely focused on fixed groups, often achieving recommendations through score aggregation or modeling stable group preferences. These methods assume stable relationships and long-term preferences among members, making them unsuitable for random group scenarios.
[0004] In recent years, graph neural networks (GNNs) have been introduced into POI recommendation systems due to their expertise in modeling the relationship structure between entities. GNNs can effectively capture high-order interactions between users and POIs, enhancing recommendation accuracy. However, existing GNN models primarily focus on modeling the interaction graph between users and POIs, rarely considering scenarios where users lack interaction. This is particularly true in dynamically constructed groups, where recommendation systems often struggle to capture group behavior patterns. Furthermore, POI recommendation is inherently a problem with distinct spatiotemporal characteristics. User visit behavior varies with time and location. Traditional models often fail to fully integrate spatial proximity and temporal dependencies, resulting in a lack of contextual adaptability in recommendation results. Furthermore, existing methods rarely address the modeling of complex transition relationships between POIs. In real-world applications, the path a user takes from one POI to another is influenced by multiple factors, such as geographic distance, time interval, and user preferences. Ignoring these spatiotemporal transition patterns can lead to irrational recommendations and decreased user satisfaction.
[0005] In summary, existing POI recommendation methods have the following shortcomings when facing the highly uncertain and dynamic scenario of random groups: (1) they cannot effectively deal with the cold start problem and lack a mechanism to utilize the potential preferences of users without social relationships; (2) they have difficulty in handling the diversity and conflict of preferences of group members, and the recommendation results are often biased towards certain types of users; (3) they lack systematic modeling of spatiotemporal factors and POI transfer behavior, making it difficult to generate recommendation results that fit the actual travel path. Therefore, it is urgent to propose a new recommendation method that integrates group modeling, graph neural networks, and spatiotemporal information to address the multiple challenges in random group POI recommendation. Summary of the Invention
[0006] To address the existing challenges of random group next POI recommendation, which lacks comprehensive capture of members' multidimensional preferences, difficulty balancing differences in preferences, and effectively capturing spatiotemporal transition patterns, this paper provides a random group next POI recommendation method and system based on spatiotemporal heterogeneous graphs. This approach achieves precise recommendations by constructing a spatiotemporal heterogeneous graph collaborative embedding, balanced preference-aware group fitting representation, and spatiotemporal graph convolutional network learning.
[0007] In a first aspect, the present invention provides a method for recommending the next POI in a random group based on a spatiotemporal heterogeneous graph, which adopts the following technical solution: A random group next POI recommendation method based on spatiotemporal heterogeneous graphs, comprising: Get user and POI data information; Construct a spatiotemporal heterogeneous graph based on the acquired user and POI data information; Embedding learning of users and POI nodes in spatiotemporal heterogeneous graphs based on heterogeneous Node2Vec method; Calculate the spatiotemporal weights of user group members based on the embedding learning results; Construct a user-POI interaction graph based on user and POI interaction data, and enhance the user-POI interaction graph using spatiotemporal weights; Based on the interaction data between users and POIs, a POI transfer directed graph is constructed, and the spatiotemporal weights are used to enhance the POI transfer directed graph. The spatiotemporal dependencies in the POI transfer directed graph are modeled using a spatiotemporal convolutional network. Calculate the POI score based on the modeling results, and make accurate recommendations based on the POI score.
[0008] Furthermore, the spatiotemporal heterogeneous graph is constructed based on the acquired user and POI data information, including defining the spatiotemporal heterogeneous graph ,in, Represents a set of POI nodes, representing all points of interest, each with a unique identifier and its geographic location information; Represents the set of user nodes, representing all users, and each node corresponds to an independent user; Represents a set of location nodes, indicating the geographical area to which the POI belongs. It is generated through Geohash encoding and is used to represent regional-level spatial information. represents the user-POI interaction edge; Represents the location-POI mapping edge; Represents a location-location proximity edge. If the geographical distance between two location nodes is A threshold value for light rain , then a proximity relationship is established between the two nodes.
[0009] Furthermore, the heterogeneous Node2Vec method is used to embed the user and POI nodes of the spatiotemporal heterogeneous graph, including first generating a node sequence from the spatiotemporal heterogeneous graph through a heterogeneous random walk. During the random walk, the transition probability of the random walk is jointly determined by the edge weight and edge type, and the transition probability of the node is affected by the edge weight and edge type. Then, the generated node sequence is embedded and optimized using the Word2Vec model. By maximizing the co-occurrence probability of the node and its context node, a high-dimensional vector representation that can characterize the node relationship is learned. The Skip-Gram model is used to embed and optimize the node sequence. At the same time, in order to improve computational efficiency and enhance semantic differentiation ability, the objective function is set by combining the maximization of the positive example co-occurrence probability and the negative example sampling, which is expressed as: , in, Representation node The context node set is composed of adjacent nodes in the sliding window. and Node and its context node The embedding vector of is the dimension of the embedding vector, Represents the dot product between vectors, which is used to measure the similarity between two nodes. represents the Sigmoid function, Indicates the number of negative samples, indicating the distribution of noise Random sampling Negative nodes , Represents the noise distribution and suppresses the dominant role of high-frequency nodes.
[0010] Furthermore, the spatiotemporal weights of user group members are calculated based on the embedding learning results, including calculating the preference similarity between members based on the embedding vectors of user group members, and adjusting the embedding representation of members based on the similarity weight, thereby generating an accurate group fitting representation; wherein, in group recommendation, the random group fitting method is used to fuse the preferences of other group members and Target POI The relative vector is generated by comparing the embedding representation differences between members and combining the POI embedding information to generate a personalized representation for each member for a specific POI; finally, the absolute weight of the member is calculated for all POIs, which is expressed as: , in, Indicates members The absolute weight of Indicates connection For the fused relative vectors of all POIs, represents the activation function used in the hidden layer, The function limits the weights to the range (0, 1). The concatenated representation of the relative vectors of the fused members is passed as input to the MLP model to obtain the relative weights of the members. .
[0011] Furthermore, the user-POI interaction graph is constructed based on the user and POI interaction data, including constructing a user-POI interaction bipartite graph enhanced with spatiotemporal information based on the user and POI interaction data, assuming represents a symbolic interaction bipartite graph, where and Represents a collection of members and POIs, express The set of connecting edges between midpoint nodes, ,in and represent positive and negative edges respectively, Represents the spatiotemporal weight set of edges, where the weight of each edge is .
[0012] Furthermore, the method of enhancing the user-POI interaction graph by using spatiotemporal weights includes: As the input of the edge-enhanced bipartite graph neural network, the message propagation, message aggregation and update mechanism of the edge-enhanced bipartite graph neural network is used to learn the representation of POI by aggregating the information of positive and negative neighbors. The output sequence of the edge-enhanced bipartite graph neural network is expressed as ,in Indicates POI The expression means that members Interaction preference representation.
[0013] Furthermore, the POI transfer directed graph is constructed based on the user and POI interaction data, and the POI transfer directed graph is enhanced by using the spatiotemporal weight, including constructing the POI transfer directed graph ,in Represents a collection of POIs, Representation diagram The set of connected edges in Indicates members In the POI sequence In, visited Afterwards, I visited , in order to enhance the spatiotemporal information of the graph, each edge Assigned space-time transfer weight , to quantify The time and space transfer relationship between them is constructed by constructing a spatial adjacency matrix and the time adjacency matrix , respectively capturing the connection relationship in space and time, through the Hadamard product operation of the two matrices, the spatiotemporal adjacency matrix Capture both spatial and temporal dependencies between POIs: , in, Represents the spatiotemporal transfer weight of all edges, including the combined influence of time and space. If the connection relationship between If there is a space-time transfer relationship between ,otherwise .
[0014] Furthermore, the spatiotemporal convolutional network is used to model the spatiotemporal dependency relationship in the POI transfer directed graph, including the POI spatiotemporal transfer graph. , using the spatiotemporal graph convolutional network to convolve the spatiotemporal relationship between POI nodes and obtain the feature representation of each layer node In order to further enhance the learning of spatiotemporal dependencies, this paper introduces a gating mechanism to fuse the current state and the historical state: , , in represents the update gate, Represents the reset gate, W, U and denote the trainable weights and biases, respectively. Represents the activation function.
[0015] Furthermore, the POI score is calculated based on the modeling results, and accurate recommendation is performed based on the POI score, including fusing the fitted representation of the random group with the two spatiotemporal enhanced POI representations, wherein the two groups of POI representations are first summed to generate the final POI representation ( ), each POI score The final POI is represented by ( ) and based on The vector product of the fitted representation ( )calculate, The ranking of is compressed in the range of (0, 1) using the sigmoid function. Finally, Sort the scores of all POIs in descending order and recommend the top K POIs to , the calculation process is expressed as: , in, is the fitted representation vector of the random group RG, is the final representation vector of POI, which integrates the interaction preference and spatiotemporal transfer preference of POI. Sigmoid is the activation function that maps the dot product result to the range of (0,1), indicating the possibility of POI i being visited by group members.
[0016] The second aspect is a random group next POI recommendation system based on spatiotemporal heterogeneous graphs, including: The data acquisition module is configured to acquire user and POI data information; The heterogeneous graph module is configured to construct a spatiotemporal heterogeneous graph based on the acquired user and POI data information; The embedding learning module is configured to perform embedding learning on users and POI nodes of the spatiotemporal heterogeneous graph based on the heterogeneous Node2Vec method; A weight module is configured to calculate the spatiotemporal weights of user group members based on the embedding learning results; The enhancement module is configured to construct a user-POI interaction graph based on the user-POI interaction data and enhance the user-POI interaction graph using spatiotemporal weights; construct a POI transfer directed graph based on the user-POI interaction data and enhance the POI transfer directed graph using spatiotemporal weights, and model the spatiotemporal dependencies in the POI transfer directed graph using a spatiotemporal convolutional network; The recommendation module is configured to calculate the POI score based on the modeling results and make accurate recommendations based on the POI score.
[0017] In a third aspect, the present invention provides a computer-readable storage medium storing a plurality of instructions, wherein the instructions are suitable for being loaded and executed by a processor of a terminal device, a method for recommending the next POI of a random group based on a spatiotemporal heterogeneous graph.
[0018] In a fourth aspect, the present invention provides a terminal device comprising a processor and a computer-readable storage medium, wherein the processor is used to implement various instructions; and the computer-readable storage medium is used to store multiple instructions, wherein the instructions are suitable for being loaded and executed by the processor. The method for recommending the next POI of a random group based on a spatiotemporal heterogeneous graph is described.
[0019] In summary, the present invention has the following beneficial technical effects: (1) This paper introduces artificial intelligence and machine learning algorithms to deeply integrate POI recommendation in random group scenarios with graph neural network technology. By constructing a spatiotemporal heterogeneous graph and applying a series of innovative technical means such as a spatiotemporal heterogeneous graph collaborative embedding method, a group fitting representation method integrating balanced preference perception, an edge-enhanced bipartite graph neural network, and a spatiotemporal graph convolutional network, it achieves accurate and efficient prediction of the next POI recommendation for a random group, effectively solving the problem of preference fusion and real-time decision-making in traditional recommendation systems in random group scenarios.
[0020] (2) This paper proposes a multi-source information integration solution based on a spatiotemporal heterogeneous graph collaborative embedding method. This solution can comprehensively capture multi-dimensional information such as users, POIs, time, and geographic location. It also uses the heterogeneous Node2Vec algorithm to learn the embedded representations of users and POIs, and mines the complex relationships between users and POIs from multi-source data information. This not only provides a richer feature representation for the recommendation system, but also significantly enhances the model's performance in random group cold start scenarios, effectively alleviating the recommendation difficulties caused by the lack of historical interaction data in random groups.
[0021] (3) This invention innovatively introduces spatiotemporal heterogeneous graphs into the field of POI recommendation in random groups. Through the spatiotemporal graph convolutional network, it fully learns the spatiotemporal POI transfer preferences of members and accurately captures the spatiotemporal dependencies and transfer patterns in user behavior. This innovative technology integration not only effectively improves the accuracy and personalization of recommendation results, but also provides new research directions and methodological guidance for the development of random group recommendation systems, and promotes the application and expansion of recommendation technology in dynamic social scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 1 is a schematic diagram of a method for recommending the next POI in a random group based on a spatiotemporal heterogeneous graph according to embodiment 1 of the present invention; Figure 2 3. It is a schematic diagram comparing the recommendation effects of the NPRRG-STHG model under different data sets and group sizes according to Example 1 of the present invention; Figure 3 3 is a schematic diagram of the performance comparison results of the NPRRG-STHG model of Example 1 of the present invention and the baseline model on the Foursquare dataset. DETAILED DESCRIPTION
[0023] The present invention will be further described in detail below with reference to the accompanying drawings.
[0024] Example 1 Reference Figure 1 In this embodiment, a random group next POI recommendation method based on a spatiotemporal heterogeneous graph includes: S1: By constructing a spatiotemporal heterogeneous graph, we comprehensively capture the complex spatiotemporal interactions between users and POIs, as well as the associations between POIs. Then, based on the heterogeneous Node2Vec method, we embed the user and POI nodes in the spatiotemporal heterogeneous graph to generate a high-dimensional vector representation that can characterize the spatiotemporal preferences of users and the spatiotemporal characteristics of POIs.
[0025] S2: The embedded representations of members and POIs learned from the spatiotemporal heterogeneous graph are used as the initial representations for generating group fitting. These embedded representations help capture member preferences in both spatiotemporal and temporal dimensions. Spatiotemporal weighted cosine similarity is then used to measure differences in preferences between members and adjust the similarities between members to optimize the representation of group members. Finally, fitting representations of random groups are generated based on the relative and absolute weights of the members.
[0026] S3: First, we construct a user-POI interaction graph using user-POI interaction data. We then enhance the user-POI interaction graph using spatiotemporal weights learned from the spatiotemporal heterogeneous graph. Secondly, we use an edge-enhanced bipartite graph neural network to learn POI representations that reflect users' POI interaction preferences.
[0027] S4: First, a POI transition directed graph is constructed from user check-in records. The spatiotemporal transition weights are learned through a spatiotemporal heterogeneous graph to enhance the POI transition graph, thereby capturing dynamic transition behaviors in both spatial and temporal dimensions. The present invention then uses a spatiotemporal graph convolutional network to model the spatiotemporal dependencies in the graph.
[0028] S5: Fuse the fitted representation of the random group with the spatiotemporally enhanced POI representation, calculate the score of each POI, and recommend the top-ranked POIs to the random group to achieve accurate recommendation.
[0029] Specifically: Step S1 specifically includes: S1.1: First, construct a spatiotemporal heterogeneous graph based on the relevant data information of users and POIs, that is, ,in, Represents a set of POI nodes, representing all points of interest, each with a unique identifier and its geographic location information; Represents the set of user nodes, representing all users, and each node corresponds to an independent user; Represents a set of location nodes, indicating the geographical area to which the POI belongs. It is generated through Geohash encoding and is used to represent regional-level spatial information. represents the user-POI interaction edge; Represents the location-POI mapping edge; Represents a location-location proximity edge. If the geographical distance between two location nodes is A threshold value for light rain , then a neighbor relationship is established between the two nodes.
[0030] S1.2: To more accurately characterize the strength of the relationship between users and POIs, we defined spatiotemporal weights on edges. We combined check-in time and geographic distance to calculate the spatiotemporal weights and spatiotemporal transfer weights as edge weights for the spatiotemporal heterogeneous graph, and enhanced the user-POI interaction graph and POI transfer graph, respectively. The temporal weights measure the relative proximity of user check-in times: , , , in, is a user Check-in time, It is the timestamp of the user visiting the POI. The smaller the time interval, the greater the weight. is a user With POI The geographical distance between is a hyperparameter used to adjust the relative importance of temporal and spatial weights.
[0031] In order to model the transfer pattern between POIs, the present invention defines spatiotemporal transfer weights that combine time interval and geographical proximity: , in, Indicates the visit time interval between two POIs, Indicates the geographical proximity between two POIs, is a hyperparameter.
[0032] S1.3: Building on the traditional HNode2Vec approach, this paper significantly improves semantic capture and model generalization in spatiotemporal scenarios through implicit edge type modeling, spatiotemporal dynamic weight fusion, and heterogeneous node coexistence walks. HNode2Vec aims to learn high-dimensional vector representations from node interactions through spatiotemporal semantically guided random walks and dynamic weight optimization, capturing the spatiotemporal characteristics of user preferences and POIs. First, a heterogeneous random walk is used to generate a node sequence from a spatiotemporal heterogeneous graph. During the random walk, the transition probability is determined by both edge weights and edge types. The node transition probability is influenced not only by edge weights but also by edge types (e.g., user-POI interaction edges, POI sequence edges, or location proximity edges).
[0033] Specifically, the current node Transfer to its neighbor node The probability of is defined as follows: , in, Indicates the current node The set of neighbor nodes of It is calculated based on the type of edge. Edge Type Through multiple random walks, multiple node sequences can be generated. Each sequence is composed of nodes in the graph arranged in the order of random walks, in the form of ,These sequences can effectively model the semantic relationships between nodes in the graph.
[0034] S1.4: Next, this paper uses the Word2Vec model to optimize the embedding of the generated node sequence. The goal of Word2Vec is to maximize the co-occurrence probability of a node with its context node, thereby learning a high-dimensional vector representation that can characterize the node relationship. Therefore, this study uses the Skip-Gram model to optimize the embedding of the node sequence. To improve computational efficiency and enhance semantic differentiation, the objective function of this paper combines the maximization of the positive example co-occurrence probability with the negative example sampling technique: , in, Representation node The context node set is composed of adjacent nodes in the sliding window (window size is 10). and Node and its context node The embedding vector of is the dimension of the embedding vector, Represents the dot product between vectors, which is used to measure the similarity between two nodes. represents the Sigmoid function, Indicates the number of negative samples, indicating the distribution of noise Random sampling Negative nodes , Represents the noise distribution and suppresses the dominant role of high-frequency nodes.
[0035] Through the above process, HNode2Vec learns the high-dimensional embedding representation of each node. , whose embedding vector is expressed as , fully captures the user's dynamic preferences; for POI nodes , whose embedding vector is expressed as ,characterizes the spatiotemporal characteristics of POIs, including geographical location, user access patterns, and transfer relationships between POIs.,Through the HNode2Vec method, the generated node embedding vector,provides a rich and effective feature representation for subsequent,recommendation tasks and user behavior modeling.
[0036] Step S2 specifically includes: S2.1: In group recommendation, in order to better model the relationship between group members, it is necessary to consider the consistency and difference of preferences between members. Each member in the group is not completely independent, and the similarity of preferences between them plays a key role in generating group representation. In order to balance the preference differences between members, it is first necessary to calculate the preference similarity between members, and then adjust the embedded representation of members based on the similarity weight to generate a more accurate group fitting representation. In this invention, the preference similarity between members is calculated based on the member embedding vectors and then the cosine similarity: , in, and Represents members respectively and members The embedding vector of and Represents the norm of the embedding vector. Then, the preference similarity weight is calculated based on the similarity: , in, Indicates members To members The relative preference is the normalized similarity, which is used to adjust the relationship between members. Then, based on the preference similarity weight The formula for generating a new member embedding representation by weighted summing of the embeddings of other members in the group and combining it with the group's own embedding information is as follows: , in, It is a balance parameter used to adjust the ratio of a member's own information to the information of other members in the group. Represents the initial embedding representation of a member. Dynamically generated member embedding By integrating the relationships between members, preference differences are balanced, which can more comprehensively reflect the members' personalized preferences and the overall relationships in the group.
[0037] S2.2: In order to obtain the comprehensive dynamic preferences of members, the balanced preference-aware group fitting representation method is integrated by combining the embedded representations of users and POIs learned from the spatiotemporal heterogeneous graph to fully capture the dynamic preferences of members. First, for any two group members , random group fitting method calculation Target POI The relative vector of : , in, express and Target POI The relative vector of and Respectively The dynamic embedding representation of express The dynamic vector representation of these embedding vectors contains semantic information such as behavior, interest, spatiotemporal relationship, etc. It represents the element-wise multiplication (Hadamard product).
[0038] S2.3: In group recommendation, this relative knowledge can help identify which member is more familiar with the target POI and thus has greater influence in the group. Then, the random group fitting method integrates the knowledge of other group members and Target POI Comparison of produces relative vectors: , in, express Target POI The fusion relative vector of all other group members Target POI By comparing the differences in embedding representations between members and combining them with POI embedding information, a personalized representation for each member is generated for a specific POI.
[0039] S2.4: Next, the present invention calculates the weights of members for all POIs. The calculation process is as follows: , in, Indicates members The relative weight of Indicates connection For the fused relative vectors of all POIs, represents the activation function used in the hidden layer, The function limits the weights to the range (0, 1). Represents the concatenated representation of the relative vectors of the fused members, which is then passed as input to the MLP model to obtain the relative weights of the members. .
[0040] S2.5: After obtaining the absolute weight of each member, the balanced preference-aware group fitting representation method is integrated to generate a fitting representation of the random group based on the absolute weights and embedded representations of the members: , in The fitted representation of a random group not only incorporates the preference differences between members but also fully reflects the influence of members on the target POI. Therefore, the fitted representation of a random group generated by the group fitting representation method that integrates balanced preference perception will be more accurate.
[0041] Step S3 specifically includes: To achieve efficient next POI recommendations, interaction preferences between users and POIs are crucial. POI interaction preferences reflect users' propensity to visit POIs at different times and locations, including visit frequency and dwell time. Therefore, we first compute spatiotemporal weights based on a spatiotemporal heterogeneous graph and enhance the user-POI interaction bipartite graph to improve its expressiveness. Furthermore, we utilize an edge-augmented bipartite graph neural network to learn a representation of group members' POI interaction preferences.
[0042] S3.1: First, construct a bipartite graph of user-POI interaction enhanced with spatiotemporal information. Assume represents a random group, express The set of POIs that the member has visited, and Denotes the POI interaction record of the members. The temporal and spatial information enhanced <user-POI> interaction bipartite graph is constructed as follows: if Visited ,but construct a positive edge between them, otherwise, construct a negative edge between them. exist There are connections with the same symbol on construct a positive edge between the two members; otherwise, construct a negative edge between the two members. represents a symbolic interaction bipartite graph, where and Represents a collection of members and POIs, express The set of connecting edges between midpoint nodes, ,in and represent positive and negative edges respectively, Represents the spatiotemporal weight set of edges, where the weight of each edge is .
[0043] S3.2: Secondly, the present invention is based on As the input of the edge-augmented bipartite graph neural network, the message propagation, message aggregation, and update mechanism of the edge-augmented bipartite graph neural network are used to learn the representation of POIs by aggregating the information of positive and negative neighbors. The details are described below.
[0044] News spread. represents a node set including both members and POIs, Represents a set of nodes of the same type (e.g., a set of only members or a set of POIs). For the / th layer of the edge-enhanced bipartite graph neural network, and It is based on the positive and negative edges to send messages from Spread to The message propagation process is defined as follows: , , in and express Neighbors of positive and negative edges, and , express Similarly, we use the spatiotemporal weights between and Send message from Spread to : , , in and express Neighbors of positive and negative edges, and , express The space-time weight between them.
[0045] Since only the representation of POI is used here, refers to the POI set. Therefore, we only pass the messages with positive and negative edges from Spread to , respectively use and . The message passing propagation is defined as follows: , , in and express Neighbors of positive and negative edges, and .
[0046] Message aggregation. After obtaining information from neighboring nodes, information aggregation is performed. The graph attention function is used to aggregate information from neighboring nodes, and the weight coefficient between two nodes is calculated to reflect the correlation between them: , in, For nodes The expression, represents the learnable weight matrix, Indicates cascade operation, represents the learnable parameter vector, represents the activation matrix, is a node neighbors, and exp(·) is the Softmax function used to normalize the weight coefficients, express Then, based on the comprehensive popularity weighting coefficient Aggregate messages from neighbors: , , in represents the neighbor set of node i. We can transform attention aggregation into a function with a learnable weighted average mechanism. , its news is through For neighbor nodes News For the node , its news Same thing.
[0047] Update mechanism. After the message propagation aggregation, each Get four sets of information from neighbors, namely , , . Each Four sets of information are also obtained from neighbors, namely , , Then, the edge-enhanced bipartite graph neural network aggregates the information of the four groups of neighbor nodes onto the node 𝑖, and obtains the final representation of the node 𝑖 through multi-layer mapping: , , in represents a representation of a membership set, Representation of the POI set. Represents a cascade operation, and MLP represents a neural network model consisting of two fully connected neural layers stacked with dropout and activation mechanisms. MLP is defined as follows: , in and , express The learnable parameters of is the activation function, It is used to prevent overfitting.
[0048] The output sequence of the edge-enhanced bipartite graph neural network is expressed as ,in Indicates POI The expression means that members Interaction preference representation.
[0049] Step S4 specifically includes: POI transfer preference refers to the characteristic that users' preferences change over time or spatial location when visiting POIs in different geographical locations. This change in preference reflects the different needs and interests of users for POIs in different time periods or different geographical locations. Traditionally, researchers have used SRGNNs to model users' POI transfer preferences. When learning POI transfer preferences, the spatiotemporal graph convolutional network is able to not only capture users' visit patterns in different time periods but also reflect the spatial correlations between POIs. Specifically, when processing spatiotemporal data, the spatiotemporal graph convolutional network can better model complex spatiotemporal dependencies, thereby more accurately representing users' POI transfer preferences.
[0050] S4.1: In order to effectively learn users’ POI transfer preferences using the spatiotemporal graph convolutional network model, this method first needs to construct a spatiotemporal transfer graph of POIs. This spatiotemporal transfer graph considers both the user’s POI access sequence and spatiotemporal information. Define the POI set as , the user's access sequence to POI is ,in Represents a user No. access sequences, and , For users Currently visited POI. Based on the visit sequence , we can construct a directed POI transfer graph ,in Represents a collection of POIs, Representation diagram The set of connected edges in Indicates members In the POI sequence In, visited Afterwards, I visited To build the adjacency matrix, each edge Assigned space-time transfer weight , to quantify By constructing the spatial adjacency matrix and the time adjacency matrix , which are used to capture the spatial and temporal connection relationships respectively. Through the Hadamard product operation of the two matrices ( represents element-wise product), the spatiotemporal adjacency matrix Capture both spatial and temporal dependencies between POIs: , in, Represents the spatiotemporal transfer weight of all edges, including the combined influence of time and space. If the connection relationship between If there is a space-time transfer relationship between ,otherwise .
[0051] S4.2: Spatiotemporal transition diagram for POI The spatiotemporal graph convolutional network gradually convolves the spatiotemporal relationship between POI nodes to obtain the feature representation of each layer node. : , in, node At time step The characteristics of The representation obtained after the layer is updated, Representation node Neighbor nodes At time step After the The feature representation obtained after the layer is updated, is the normalization coefficient. Usually it is the inverse of the node degree. Representation node The set of neighbor nodes of represents the linear transformation weight of neighbor feature aggregation, represents the linear transformation weight of the self-loop feature, is the weight in the spatiotemporal adjacency matrix, representing the node and nodes The space-time relationship between is the activation function.
[0052] S4.3: Secondly, to further enhance the learning of spatiotemporal dependencies, this paper introduces a gating mechanism to fuse the current state and the historical state: ,
[0053] in represents the update gate, Represents the reset gate, W, U and denote the trainable weights and biases, respectively. Represents the activation function.
[0054] S4.4: In addition, the node Candidate status According to its previous state , current status and reset gate status The calculation process is as follows:
[0055] in, is the weight matrix used to transform the current state Learn the features of candidate states. is the weight matrix used to control the previous state after passing through the reset gate Learn the features of candidate states. is a bias term used to adjust the output of the candidate state. It is an activation function that limits the output value to the range of (-1, 1) and is used to introduce nonlinearity. Represents element-wise multiplication.
[0056] S4.5: Finally, the node The final state is based on the previous hidden state and candidate status Determined, under updated control door status Calculation process: , in, is the output of the update gate, indicating the degree to which the previous state is retained. It is a candidate state, which represents the possible new state value under the current state. It is the previous state, that is, the state value at the previous moment. Represents element-wise multiplication.
[0057] The spatiotemporal graph convolutional network model transmits and updates POI features layer by layer through multiple layers of spatiotemporal convolution, and the final output sequence generated is ,in A feature vector representing each POI.
[0058] Step S5 specifically includes: S5.1: From the above, the present invention can be obtained ( ) and two sets of POI representations ( and ). Based on the above learning results, the present invention calculates The score on each POI is then reported to Recommended ranking The details are as follows. First, by representing two groups of POIs ( and ) and sum to generate the final POI representation ( ) , in, and Belong to the set and , It is a POI representation learned through an edge-enhanced bipartite graph neural network, reflecting the interaction preferences of group members with POIs. It is the POI representation learned through the spatiotemporal graph convolutional network, reflecting the spatiotemporal transfer preference of POI.
[0059] S5.2: Each POI Rating (expressed as ) is represented by the final POI ( ) and based on The vector product of the fitted representation ( ) is calculated, in order to make relative, The ranking of is compressed in the range of (0, 1) using the sigmoid function. The calculation process is shown in formula (30). Sort the scores of all POIs in descending order and recommend the top K POIs to .
[0060] , in, is the fitted representation vector of the random group RG, is the final representation vector of the POI, integrating its interaction preference and spatiotemporal transfer preference. Sigmoid is an activation function that maps the dot product result to the (0, 1) range, allowing the result to be interpreted as a probability value, indicating the likelihood that POI i will be visited by group members.
[0061] As shown in Figure 2, on the three public datasets (Foursquare, Gowalla, and Yelp), HG-NPRRG's performance fluctuates with increasing group size. Specifically, on the Foursquare dataset, HG-NPRRG achieves optimal recommendation performance, reaching its peak value, when the group size is set to 50. On the Gowalla dataset, HG-NPRRG reaches its maximum value at a group size of 90. Furthermore, on the Yelp dataset, HG-NPRRG reaches its maximum value at a group size of 50, demonstrating that the model can also demonstrate excellent recommendation capabilities in small groups.
[0062] from Figure 3As can be seen from the table, HG-NPRRG achieved an excellent Precision@K score of 0.9667 when K=2. As K increased from 5 to 15, the score first dropped to 0.87, then rebounded to 0.9556, and finally reached 0.8467 when K=20. For the NDCG@K score, HG-NPRRG achieved a high score of 0.9591 when K=2, but gradually decreased to 0.8665 as K increased from 5 to 20. Compared to the baseline model, HG-NPRRG demonstrated significant advantages in comprehensive multi-dimensional information fusion. Comparing the data in the table, we can calculate that HG-NPRRG achieved an average improvement of 42.38% in Precision@K and 57.84% in NDCG@K compared to the baseline model. HG-NPRRG can more accurately capture user behavior patterns and preference characteristics, providing a more efficient and accurate solution for the recommendation system, thus outperforming the baseline model in most indicators.
[0063] Example 2 This embodiment provides a random group next POI recommendation system based on a spatiotemporal heterogeneous graph, including: The data acquisition module is configured as follows: A computer-readable storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded and executed by a processor of a terminal device, for recommending the next POI of a random group based on a spatiotemporal heterogeneous graph.
[0064] A terminal device includes a processor and a computer-readable storage medium, wherein the processor is used to implement various instructions; the computer-readable storage medium is used to store multiple instructions, wherein the instructions are suitable for being loaded and executed by the processor. A method for recommending the next POI of a random group based on a spatiotemporal heterogeneous graph is provided.
[0065] The above are all preferred embodiments of the present invention, and are not intended to limit the scope of protection of the present invention. Therefore, any equivalent changes made based on the structure, shape, and principle of the present invention should be included in the scope of protection of the present invention.
Claims
1. A random group next POI recommendation method based on spatiotemporal heterogeneous graph, characterized by: include: Get user and POI data information; Construct a spatiotemporal heterogeneous graph based on the acquired user and POI data information; Embedding learning of users and POI nodes in spatiotemporal heterogeneous graphs based on heterogeneous Node2Vec method; Calculate the spatiotemporal weights of user group members based on the embedding learning results; Construct a user-POI interaction graph based on user and POI interaction data, and enhance the user-POI interaction graph using spatiotemporal weights; Based on the interaction data between users and POIs, a POI transfer directed graph is constructed, and the spatiotemporal weights are used to enhance the POI transfer directed graph. The spatiotemporal dependencies in the POI transfer directed graph are modeled using a spatiotemporal convolutional network. Calculate the POI score based on the modeling results, and make accurate recommendations based on the POI score.
2. The method for recommending the next POI in a random group based on a spatiotemporal heterogeneous graph according to claim 1, characterized in that: The spatiotemporal heterogeneous graph is constructed based on the acquired user and POI data information, including defining the spatiotemporal heterogeneous graph ,in, Represents a set of POI nodes, representing all points of interest, each with a unique identifier and its geographic location information; Represents the set of user nodes, representing all users, and each node corresponds to an independent user; Represents a set of location nodes, indicating the geographical area to which the POI belongs. It is generated through Geohash encoding and is used to represent regional-level spatial information. represents the user-POI interaction edge; Represents the location-POI mapping edge; Represents a location-location proximity edge. If the geographical distance between two location nodes is A threshold value for light rain , then a proximity relationship is established between the two nodes.
3. The method for recommending the next POI in a random group based on a spatiotemporal heterogeneous graph according to claim 2, characterized in that: The heterogeneous Node2Vec method is used to embed user and POI nodes in a spatiotemporal heterogeneous graph. The method includes first generating a node sequence from the spatiotemporal heterogeneous graph through a heterogeneous random walk. During the random walk, the transition probability of the random walk is determined by the edge weight and edge type, and the node transition probability is affected by the edge weight and edge type. Then, the generated node sequence is embedded and optimized using the Word2Vec model. By maximizing the co-occurrence probability of the node and its context node, a high-dimensional vector representation that can characterize the node relationship is learned. The Skip-Gram model is used to embed and optimize the node sequence. At the same time, in order to improve computational efficiency and enhance semantic differentiation ability, the objective function is set by combining the maximization of the positive example co-occurrence probability and the negative example sampling, which is expressed as: , in, Representation node The context node set is composed of adjacent nodes in the sliding window. and Node and its context node The embedding vector of is the dimension of the embedding vector, Represents the dot product between vectors, which is used to measure the similarity between two nodes. represents the Sigmoid function, Indicates the number of negative samples, indicating the distribution of noise Random sampling Negative nodes , Represents the noise distribution and suppresses the dominant role of high-frequency nodes.
4. The method for recommending the next POI in a random group based on a spatiotemporal heterogeneous graph according to claim 3, characterized in that: The spatiotemporal weights of user group members are calculated based on the embedding learning results, including calculating the preference similarity between members based on the embedding vectors of user group members, and adjusting the embedded representations of members based on the similarity weights, thereby generating an accurate group fitting representation; wherein, in group recommendation, the random group fitting method is used to fuse the preferences of other group members and Target POI The relative vector is generated by comparing the embedding representation differences between members and combining the POI embedding information to generate a personalized representation for each member for a specific POI; finally, the absolute weight of the member is calculated for all POIs, which is expressed as: , in, Indicates members The absolute weight of Indicates connection For the fused relative vectors of all POIs, represents the activation function used in the hidden layer, The function limits the weights to the range (0, 1). The concatenated representation of the relative vectors of the fused members is passed as input to the MLP model to obtain the relative weights of the members. .
5. The method for recommending the next POI in a random group based on a spatiotemporal heterogeneous graph according to claim 4, characterized in that: The method of constructing a user-POI interaction graph based on user and POI interaction data includes constructing a user-POI interaction bipartite graph enhanced with spatiotemporal information based on user and POI interaction data. represents a symbolic interaction bipartite graph, where and Represents a collection of members and POIs, express The set of connecting edges between midpoint nodes, ,in and represent positive and negative edges respectively, Represents the spatiotemporal weight set of edges, where the weight of each edge is .
6. The method for recommending the next POI in a random group based on a spatiotemporal heterogeneous graph according to claim 5, characterized in that: The method of enhancing the user-POI interaction graph by using spatiotemporal weights includes: As the input of the edge-enhanced bipartite graph neural network, the message propagation, message aggregation and update mechanism of the edge-enhanced bipartite graph neural network is used to learn the representation of POI by aggregating the information of positive and negative neighbors. The output sequence of the edge-enhanced bipartite graph neural network is expressed as ,in Indicates POI The expression means that members Interaction preference representation.
7. The method for recommending the next POI in a random group based on a spatiotemporal heterogeneous graph according to claim 6, characterized in that: The method constructs a POI transfer directed graph based on user and POI interaction data, and enhances the POI transfer directed graph using spatiotemporal weights, including constructing a POI transfer directed graph. ,in Represents a collection of POIs, Representation diagram The set of connected edges in Indicates members In the POI sequence In, visited Afterwards, I visited , in order to enhance the spatiotemporal information of the graph, each edge Assigned space-time transfer weight , to quantify and The time and space transfer relationship between them is constructed by constructing a spatial adjacency matrix and the time adjacency matrix , respectively capturing the connection relationship in space and time, through the Hadamard product operation of the two matrices, the spatiotemporal adjacency matrix Capture both spatial and temporal dependencies between POIs: , in, Represents the spatiotemporal transfer weight of all edges, including the combined influence of time and space. and If the connection relationship between and If there is a space-time transfer relationship between ,otherwise .
8. The method for recommending the next POI in a random group based on a spatiotemporal heterogeneous graph according to claim 7, characterized in that: The spatiotemporal convolutional network is used to model the spatiotemporal dependency relationship in the POI transfer directed graph, including the POI spatiotemporal transfer graph. , using the spatiotemporal graph convolutional network to convolve the spatiotemporal relationship between POI nodes and obtain the feature representation of each layer node In order to further enhance the learning of spatiotemporal dependencies, this paper introduces a gating mechanism to fuse the current state and the historical state: , , in represents the update gate, Represents the reset gate, W, U and denote the trainable weights and biases, respectively. Represents the activation function.
9. The method for recommending the next POI in a random group based on a spatiotemporal heterogeneous graph according to claim 8, characterized in that: The method of calculating POI scores based on the modeling results and making accurate recommendations based on the POI scores includes fusing the fitted representation of the random group with the two spatiotemporal enhanced POI representations, wherein the two groups of POI representations are first summed to generate the final POI representation ( ), each POI score The final POI is represented by ( ) and based on The vector product of the fitted representation ( )calculate, The ranking of is compressed in the range of (0, 1) using the sigmoid function. Finally, Sort the scores of all POIs in descending order and recommend the top K POIs to , the calculation process is expressed as: , in, Is a random group RG The fitting representation vector of It is the final representation vector of POI, which integrates the interaction preference and spatiotemporal transfer preference of POI. Sigmoid is the activation function, which maps the dot product result to the range of (0,1) to represent POI. i The likelihood of being visited by group members.
10. A random group next POI recommendation system based on spatiotemporal heterogeneous graph, characterized by: include: The data acquisition module is configured to acquire user and POI data information; The heterogeneous graph module is configured to construct a spatiotemporal heterogeneous graph based on the acquired user and POI data information; The embedding learning module is configured to perform embedding learning on user and POI nodes of the spatiotemporal heterogeneous graph based on the heterogeneous Node2Vec method; A weight module is configured to calculate the spatiotemporal weights of user group members based on the embedding learning results; The enhancement module is configured to construct a user-POI interaction graph based on the user-POI interaction data and enhance the user-POI interaction graph using spatiotemporal weights; construct a POI transfer directed graph based on the user-POI interaction data and enhance the POI transfer directed graph using spatiotemporal weights, and model the spatiotemporal dependencies in the POI transfer directed graph using a spatiotemporal convolutional network; The recommendation module is configured to calculate the POI score based on the modeling results and make accurate recommendations based on the POI score.
Citation Information
Patent Citations
Random group POI recommendation method, system and device and storage medium
CN116244513A
Interest point recommendation method based on space-time perception
CN117271899A
Destination recommendation method and system based on multi-source heterogeneous information network
WO2023178608A1