Recommendation method and device

By constructing a heterogeneous spatiotemporal map in POI recommendation and using the HestGCL framework to extract and fuse node representation vectors under the time view and spatial view, the problem of underutilizing spatiotemporal information and heterogeneity in the prior art is solved, and the problem of underutilization of spatiotemporal information and heterogeneity in the prior art is realized More accurate and efficient recommendations of interest points.

CN119441586AActive Publication Date: 2025-02-14HUAWEI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202310991058.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-07
Publication Date
2025-02-14
Estimated Expiration
2043-08-07

AI Technical Summary

Technical Problem

The existing POI recommendation algorithms fail to fully consider spatio-temporal information and heterogeneity, resulting in insufficient accuracy of recommendation results.

Method used

By constructing a heterogeneous spatiotemporal graph, using the dual-view graph neural network framework HestGCL, the node representation vectors under the time view and spatial view are extracted, and fused, to generate the final node representation including spatiotemporal information to improve the accuracy of the recommended results.

Benefits of technology

It improves the accuracy of the recommendation results, enhances the user experience, effectively overcomes the problems of data sparsity and heterogeneity, and provides higher quality node representations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119441586A_ABST
    Figure CN119441586A_ABST
Patent Text Reader

Abstract

The invention provides a recommendation method, and the method comprises the steps: obtaining a space-time heterogeneous graph, splitting the space-time heterogeneous graph to obtain a time view comprising interaction time information and a space view comprising space information, and inputting the time view and the space view into respective corresponding graph neural networks, obtaining a group of node representation vectors under the time view and a group of node representation vectors under the space view, and fusing the node representation vectors under the time view and the node representation vectors under the space view to obtain final user node representation and interest point node representation. And inputting the user node representation and the interest node representation into a recommendation sub-network to obtain a recommendation result. According to the recommendation method provided by the invention, heterogeneity in interest point recommendation is modeled through graph representation, spatio-temporal information is considered, higher-order information representation of the nodes is extracted through the graph neural network, and the accuracy of a recommendation result is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a recommendation method and device. Background Art

[0002] With the rise of location-based social networks, users record and share their visits to points of interest on the Internet, which has brought about a new recommendation task, namely point-of-interest (POI) recommendation. Since the user's check-in data includes the location of the visited POI and the check-in time, the POI recommendation algorithm often relies on this spatiotemporal information, which is the biggest difference between POI recommendation and other recommendation tasks. Figure 1 This is an example of a POI recommendation scenario. However, the traditional POI recommendation algorithm models the POI recommendation scenario as a User-POI bipartite graph, modeling the simple interaction between the two. But in fact, Location, as a geographical location point, has a more complex interaction with the user and POI, and affects the POI recommendation. Summary of the invention

[0003] An embodiment of the present application provides a recommendation method, in which a graph representation models the heterogeneity in POI recommendation, takes into account spatiotemporal information, and extracts higher-order information representation of nodes through a graph neural network, thereby improving the accuracy of recommendation results.

[0004] In a first aspect, the present application provides a recommendation method, including obtaining a time view and a space view, wherein the time view includes a user node, a point of interest node and a first connection edge, the first connection edge is used to connect the user node and the interest node, the user node represents user information, the point of interest node represents point of interest information, and the connection edge includes time information; the spatial view includes a user node, a point of interest node, a geographic location node, a second connection edge, a third connection edge and a fourth connection edge, the geographic location node represents geographic location information, the second connection edge is used to connect the user node and the point of interest node, the third connection edge is used to connect the point of interest node and the geographic location node, and the fourth connection edge is used to connect the two Different geographical location nodes; using the time view as the input of the first graph neural network, outputting the first node representation vector of the user node and the first node representation vector of the point of interest node; using the spatial view as the input of the second graph neural network, outputting the second node representation vector of the user node and the second node representation vector of the point of interest node; based on the first node representation vector of the user node and the second node representation vector of the user node, obtaining the node representation of the point of interest node; based on the first node representation vector of the point of interest node and the second node representation vector of the point of interest node, obtaining the node representation of the point of interest node; determining the recommendation result based on the node representation of the user node and the node representation of the point of interest node.

[0005] The recommendation method provided in the present application models a visual view including interactive time information and a spatial view including spatial information, extracts node representation vectors under the time view through a first graph neural network, extracts node representation vectors under the spatial view through a second graph neural network, fuses the node representation vectors under the time view and the node representation vectors under the spatial view to obtain a final node representation including spatiotemporal information, determines the recommendation result based on the final node representation, recommends points of interest to the user, improves the accuracy of the recommendation result, and enhances the user experience.

[0006] In one possible implementation, a specific implementation of taking the time view as the input of the first graph neural network and outputting the first node representation vector of the user node and the first node representation vector of the point of interest node is as follows: the first graph neural network includes a first multi-layer neural network layer, and after the time view is input into the first graph neural network, it is processed by the first multi-layer neural network layer to obtain the first node representation vector of the user node and the first node representation vector of the point of interest node.

[0007] Each neural network layer in the first multi-layer neural network layer performs the following operations on each node in the time view: aggregate the time information on the first connection edge connected to each node in the time view to obtain a first aggregation result; aggregate the node representation vectors of the previous layer of neighbor nodes of each node in the time view to obtain a second aggregation result; weightedly fuse the first aggregation result and the second aggregation result to obtain the node representation vector of each node in the time view in the current layer; wherein the node representation vector of the user node output by the last neural network layer in the first multi-layer neural network layer is the first node representation vector of the user node, and the node representation vector of the point of interest node is the first node representation vector of the point of interest node.

[0008] In this possible implementation, time-aware node representation can be learned through the first graph neural network, such as aggregating the time information on the connection edges connected to the nodes, obtaining a node representation vector including time information, and improving the high-order information representation of the node representation.

[0009] In one possible implementation, the weight of the first aggregation result is determined based on the attention coefficient of the first aggregation result, and the weight of the second aggregation result is determined based on the attention coefficient of the second aggregation result.

[0010] Through the attention mechanism, the first aggregation result and the second aggregation result are fused to learn which information of the first aggregation result and the second aggregation result is more important, and the weighted fusion weight of important information is increased, so that important information can be focused with high weight and the speed of reasoning learning can be accelerated.

[0011] In another possible implementation, the spatial view is used as the input of the second graph neural network, and a specific implementation of outputting the second node representation vector of the user node and the second node representation vector of the point of interest node is as follows: the second graph neural network includes a second multi-layer neural network layer, and after the spatial view is input into the second graph neural network, it is processed by the second multi-layer neural network layer to obtain the second node representation vector of the user node and the second node representation vector of the point of interest node.

[0012] Each neural network layer in the second multi-layer neural network layer performs the following operations on each node in the spatial view: aggregate the node representation vectors of the previous layer of neighbor nodes of the same type of each node in the spatial view to obtain the aggregation results of each type of neighbor nodes; perform weighted fusion on the aggregation results of each type of neighbor nodes to obtain the node representation vector of each node in the spatial view in the current layer; wherein the node representation vector of the user node output by the last neural network layer in the second multi-layer neural network layer is the second node representation vector of the user node, and the node representation vector of the point of interest node is the second node representation vector of the point of interest node.

[0013] In this possible implementation, spatially aware node representations can be learned through the second graph neural network, such as aggregating spatial neighbors of a node (such as geographic location nodes) to obtain a node representation vector that includes spatial location information, thereby improving the high-order information representation of the node representation.

[0014] Optionally, the weight of the aggregation result of each type of neighbor node is determined based on the attention coefficient of each type of neighbor node.

[0015] Through the attention mechanism, the attention coefficient of the aggregation result of each type of neighbor nodes is determined, and the attention coefficient is used as the aggregation result of each type of neighbor nodes to fuse the aggregation results of each type of neighbor nodes.

[0016] Through the attention mechanism, we can learn which type of neighbor nodes are more important, increase the weighted fusion weight of important neighbor nodes, reduce the weighted fusion weight of unimportant neighbor nodes, focus on important information with high weight, ignore less important information with low weight, and speed up reasoning learning.

[0017] In another possible implementation, a specific implementation of obtaining the node representation of the user node based on the first node representation vector of the user node and the second node representation vector of the user node is: weighted fusion of the first node representation vector of the user node and the second node representation vector of the user node to obtain the node representation of the user node; wherein the weight of the first node representation vector of the user node is determined based on the attention coefficient of the first node representation vector of the user node, and the weight of the second node representation vector of the user node is determined based on the attention coefficient of the second node representation vector of the user node.

[0018] In another possible implementation, a specific implementation of obtaining the node representation of the point of interest node based on the first node representation vector of the point of interest node and the second node representation vector of the point of interest node is: weighted fusion of the first node representation vector of the point of interest node and the second node representation vector of the point of interest node to obtain the node representation of the point of interest node; wherein the weight of the first node representation vector of the point of interest node is determined based on the attention coefficient of the first node representation vector of the point of interest node, and the weight of the second node representation vector of the point of interest node is determined based on the attention coefficient of the second node representation vector of the point of interest node.

[0019] Through the double-layer attention mechanism, the neighbor nodes of the target node are aggregated to further accelerate the reasoning learning speed.

[0020] In another possible implementation, a specific implementation of determining the recommendation result based on the node representation of the user node and the node representation of the point of interest node is: calculating the similarity between the node representation of the user node and the node representation of the point of interest node to obtain a similarity result; based on the similarity result, determining the prediction score of each point of interest node; based on the prediction score, determining N points of interest recommended to the user, the prediction scores corresponding to the N points of interest are higher than the prediction scores corresponding to other points of interest, and N is a positive integer greater than 1.

[0021] For example, the prediction scores of multiple interest nodes are sorted from large to small, and the first N interest nodes are recommended to the user in the sorted order, with the one with the highest prediction score being recommended to the user first.

[0022] In one example, the similarity between the node representation of the user node and the node representation of the point of interest node is also related to the time information between the user node and the point of interest node. Considering the influence of the interaction time between the user and the point of interest, the prediction score is made more accurate.

[0023] In another possible implementation, the first graph neural network and the second graph neural network are obtained by adjusting parameters of the first graph neural network and parameters of the second graph neural network based on minimizing the target loss function; wherein the target loss function is determined based on the sum of a Bayesian personalized ranking (BPR) loss function and a contrast loss function, and the contrast loss function is used to maximize the mutual information between positive examples and minimize the mutual information between negative examples, the same node in the time view and the space view is used as a positive example, and different nodes of the same type in the time view and the space view are used as negative examples.

[0024] Through dual-view comparative learning of spatiotemporal views and spatial views, rich supervision information can be effectively provided, effectively overcoming the problem that graph neural networks are difficult to learn high-quality node representations due to data sparsity.

[0025] In another possible implementation, a specific implementation of obtaining the time view and the spatial view is: obtaining a heterogeneous space-time graph, the heterogeneous space-time graph including the user node, the point of interest node, the geographic location node, the first connection edge, the third connection edge and the fourth connection edge; splitting the heterogeneous space-time graph to obtain the space-time view and the spatial view.

[0026] In a second aspect, the present application also provides a recommendation device, including an acquisition module, a time view node representation extraction module, a space view node representation extraction module and a recommendation module, wherein the acquisition module is used to acquire a time view and a space view, wherein the time view includes a user node, an interest point node and a first connection edge, the first connection edge is used to connect the user node and the interest node, the user node represents user information, the interest point node represents interest point information, and the connection edge includes time information; the space view includes a user node, an interest point node, a geographic location node, a second connection edge, a third connection edge and a fourth connection edge, the geographic location node represents geographic location information, the second connection edge is used to connect the user node and the interest point node, the third connection edge is used to connect the interest point node and the geographic location node, and the fourth connection edge is used Connect two different geographical location nodes; the time view node representation extraction module is used to use the time view as the input of the first graph neural network, and output the first node representation vector of the user node and the first node representation vector of the point of interest node; the spatial view node representation extraction module is used to use the spatial view as the input of the second graph neural network, and output the second node representation vector of the user node and the second node representation vector of the point of interest node; the recommendation module is used to obtain the node representation of the user node based on the first node representation vector of the user node and the second node representation vector of the user node; obtain the node representation of the point of interest node based on the first node representation vector of the point of interest node and the second node representation vector of the point of interest node; determine the recommendation result based on the node representation of the user node and the node representation of the point of interest node.

[0027] In one possible implementation, the time view node representation extraction module is specifically used for: the first graph neural network includes a first multi-layer neural network layer, and each neural network layer in the first multi-layer neural network layer performs the following operations on each node in the time view: aggregating the time information on the first connecting edge connected to each node in the time view to obtain a first aggregation result; aggregating the node representation vectors of the previous layer of the neighbor nodes of each node in the time view to obtain a second aggregation result; weightedly fusing the first aggregation result and the second aggregation result to obtain the node representation vector of each node in the time view at the current layer; wherein the node representation vector of the user node output by the last neural network layer in the first multi-layer neural network layer is the first node representation vector of the user node, and the node representation vector of the point of interest node is the first node representation vector of the point of interest node.

[0028] In another possible implementation, the weight of the first aggregation result is determined based on the attention coefficient of the first aggregation result, and the weight of the second aggregation result is determined based on the attention coefficient of the second aggregation result.

[0029] In another possible implementation, the spatial view node representation extraction module is specifically used for: the second graph neural network includes a second multi-layer neural network layer, and each neural network layer in the second multi-layer neural network layer performs the following operations on each node in the spatial view: aggregating the node representation vectors of the previous layer of neighbor nodes of the same type of each node in the spatial view to obtain the aggregation results of each type of neighbor nodes; weighted fusion of the aggregation results of each type of neighbor nodes to obtain the node representation vector of each node in the spatial view in the current layer; wherein the node representation vector of the user node output by the last neural network layer in the second multi-layer neural network layer is the second node representation vector of the user node, and the node representation vector of the point of interest node is the second node representation vector of the point of interest node.

[0030] In another possible implementation, the weight of the aggregation result of each type of neighbor node is determined based on the attention coefficient of each type of neighbor node.

[0031] In another possible implementation, the recommendation module is specifically used to: perform weighted fusion on the first node representation vector of the user node and the second node representation vector of the user node to obtain a node representation of the user node; wherein the weight of the first node representation vector of the user node is determined based on the attention coefficient of the first node representation vector of the user node, and the weight of the second node representation vector of the user node is determined based on the attention coefficient of the second node representation vector of the user node.

[0032] In another possible implementation, the recommendation module is also specifically used to: perform weighted fusion on the first node representation vector of the point of interest node and the second node representation vector of the point of interest node to obtain a node representation of the point of interest node; wherein the weight of the first node representation vector of the point of interest node is determined based on the attention coefficient of the first node representation vector of the point of interest node, and the weight of the second node representation vector of the point of interest node is determined based on the attention coefficient of the second node representation vector of the point of interest node.

[0033] In another possible implementation, the recommendation module is further specifically used to: calculate the similarity between the node representation of the user node and the node representation of the interest point node to obtain a similarity result; based on the similarity result, determine the prediction score of each of the interest point nodes; based on the prediction score, determine N interest points recommended to the user, the prediction scores corresponding to the N interest points are higher than the prediction scores corresponding to other interest points, and N is a positive integer greater than 1.

[0034] In another possible implementation, the similarity between the node representation of the user node and the node representation of the point of interest node is also related to the time information between the user node and the point of interest node.

[0035] In another possible implementation, the first graph neural network and the second graph neural network are obtained by adjusting parameters of the first graph neural network and parameters of the second graph neural network based on minimizing the objective loss function; wherein the objective loss function is determined based on the sum of the BPR loss function and the contrast loss function, and the contrast loss function is used to maximize the mutual information between positive examples and minimize the mutual information between negative examples, the same node in the time view and the space view is used as a positive example, and different nodes of the same type in the time view and the space view are used as negative examples.

[0036] In another possible implementation, the acquisition module is specifically used to: obtain a heterogeneous space-time graph, the heterogeneous space-time graph including user nodes, point of interest nodes, geographic location nodes, first connecting edges, third connecting edges and fourth connecting edges; split the heterogeneous space-time graph to obtain a space-time view and a space view.

[0037] In a third aspect, an embodiment of the present application provides a computing device, including a memory and a processor, wherein the memory stores instructions, and when the instructions are executed by the processor, the method described in the first aspect is implemented.

[0038] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method described in the first aspect is implemented.

[0039] In a fifth aspect, an embodiment of the present application further provides a computer program or a computer program product, wherein the computer program or the computer program product comprises instructions, which, when executed, cause a computer to execute the method described in the first aspect.

[0040] In a sixth aspect, an embodiment of the present application further provides a chip, comprising at least one processor and a communication interface, wherein the processor is used to execute the method described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 A schematic diagram showing a point of interest recommendation scenario;

[0042] Figure 2 A schematic diagram showing an exemplary system in which various methods and apparatuses described herein may be implemented according to an embodiment disclosed in the present application;

[0043] Figure 3 A schematic diagram showing another exemplary system in which various methods and apparatuses described herein may be implemented according to an embodiment disclosed in the present application;

[0044] Figure 4 A flowchart of a recommended method provided in an embodiment of the present application;

[0045] Figure 5 A schematic diagram of a heterogeneous spatiotemporal graph comparison learning method provided in an embodiment of the present application is shown;

[0046] Figure 6 A schematic diagram showing the performance of the HestGCL model in different representation vector dimensions provided in the embodiment of the present application;

[0047] Figure 7 A schematic diagram of a recommended device provided in an embodiment of the present application;

[0048] Figure 8 A schematic diagram of the structure of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0049] The technical solution of the present application is further described in detail below through the accompanying drawings and embodiments.

[0050] In recommender systems, the main challenge is to learn effective user / item representations from interactions and auxiliary information. Graph neural network (GNN) technology has been widely used in recommender systems for the following three reasons: (1) Most of the information in recommender systems has a graph structure in nature, and GNN has advantages in graph representation learning; (2) From the perspective of graph structure, different data types of information can be modeled using a unified framework; (3) GNN transmits information through a multi-layer network and can explicitly encode high-order signals in user interaction behaviors.

[0051] The GNN recommendation algorithm in related technologies can model the POI recommendation scenario as a User-POI bipartite graph, modeling the simple interaction between the two. But in fact, Location, as a geographical location point, has a more complex interaction with users and POIs, and affects POI recommendations.

[0052] For recommendation, representation learning of user-item graphs has evolved from using a single ID or interaction history to leveraging high-order neighbors, which has led to successful recommendations using graph convolutional networks (GCNs), such as PinSage and LightGCN. Although effective, they have two limitations: (1) popular items have a greater impact on representation learning, deteriorating the recommendation of unpopular (long-tail) items; (2) neighborhood aggregation schemes further amplify the influence of observed edges, so the representation is susceptible to noisy interactions.

[0053] In order to improve the accuracy and robustness of GNN recommendation, some works have designed GNN recommendation combined with self-supervised learning. Self-supervised learning is to set an auxiliary task to extract additional signals from the input data itself, especially by utilizing the unlabeled data space. Compared with supervised learning, self-supervised learning allows the unlabeled data space to be utilized by making changes to the input data, thereby improving the performance of downstream tasks. Although GNN recommendation combined with self-supervised learning can alleviate the data sparsity problem in POI recommendation, none of these methods take into account spatiotemporal information.

[0054] For example, one recommendation scheme is GPR, which is a POI recommendation algorithm based on graph neural network. It considers two types of influence: incoming influence and outgoing influence. Based on graph autoencoder, the latent representation of incoming and outgoing influence is trained, and the trained geographic latent representation of input and output influence is used to estimate user preferences. The specific implementation steps are as follows:

[0055] Step S11: construct a POI-POI bipartite graph, where the edge weight represents the frequency of two POIs being visited adjacently within a period of time. Then construct a User-POI interaction graph.

[0056] Step S12: Use GGLR (GAE variant) to learn POI embeddings. First, calculate the similarity between POI embeddings based on GNN, and then calculate the physical distance embedding between POIs. Then, multiply the physical distance embedding by the POI embedding similarity to obtain the predicted probability between POIs. Use this probability to reconstruct the POI-POI graph.

[0057] Step S13: Use GCN to learn user embedding. Considering the different feature dimensions of user and POI, different W matrices are used. Finally, multiple layers of user embedding are concatenated, multiple layers of POI embedding are concatenated, and the inner product is calculated as the similarity.

[0058] However, applying the recommendation scheme to POI recommendation has the following drawbacks:

[0059] 1. The coarse granularity of modeling the heterogeneity in POI recommendation data. Only a bipartite graph of users and POIs, and a homogeneous graph of POIs and POIs are constructed to model the simple interactions between them. But in fact, as a geographical point, the location has a more complex interactive relationship with users and POIs, which is ignored by GPR.

[0060] 2. The sparsity of interactions is not fully considered. Recommendation systems are often affected by data sparsity, which may make it difficult for GPR models to learn high-quality node representations or be easily affected by interaction noise.

[0061] Another recommendation solution is SGL, which is a model based on graph self-supervised learning. It designs three data enhancement mechanisms and combines contrastive learning technology to improve the performance of the recommendation algorithm based on graph neural network. The main implementation steps are as follows:

[0062] Step S21, data enhancement, generates multiple views for each node, including three operators: node dropping, edge dropping and random walk.

[0063] Step S22: Use LightGCN to learn node representations of users and POIs.

[0064] Step S23: using contrastive learning to maximize the consistency between different views of the same node and different views of other nodes

[0065] However, applying the recommendation scheme to POI recommendation has the following drawbacks:

[0066] 1. Not applicable to heterogeneous spatiotemporal graphs: SGL only considers simple bipartite graphs and does not consider the high-order semantic information and spatiotemporal information unique to different types of nodes in heterogeneous spatiotemporal graphs.

[0067] 2. Not designed for POI recommendation: Spatiotemporal information modeling is very important for POI recommendation, but SGL does not consider spatiotemporal information and can only be applied to non-spatial-temporal recommendation scenarios.

[0068] In order to solve the above problems, the embodiments of the present application propose a recommendation method and device to model the heterogeneity and sparsity problems in POI recommendation, so that the graph neural network can learn high-quality node representations and improve the recommendation effect. Technically, considering the heterogeneity and sparsity problems in POI recommendation, a graph neural network framework HestGCL for POI recommendation is proposed by using heterogeneous spatiotemporal graph modeling.

[0069] The graph neural network framework HestGCL for POI recommendation proposed in the embodiment of the present application designs a heterogeneous graph neural network module to enhance node representation in order to solve the data sparsity and heterogeneity problems in POI recommendation. Simply put, by introducing a time-aware graph neural network (which may be referred to as the first graph neural network) and a space-aware graph neural network (which may be referred to as the second graph neural network), time-aware node representation and space-aware node representation can be learned, and comparing the two can provide additional supervisory information. The GNN method in the related art ignores the modeling of heterogeneity and sparsity, resulting in poor quality of node representation learned by GNN. Therefore, the embodiment of the present application proposes heterogeneous spatiotemporal graph comparative learning based on dual views to aggregate temporal neighbors and spatial neighbors respectively. At the same time, compared with the original use of only historical interaction behaviors as supervisory information, this dual-view operation can effectively provide rich supervisory information.

[0070] The recommendation method provided in the embodiment of the present application aims to better utilize the heterogeneous graph neural network of spatiotemporal information to solve the shortcomings of the GNN-based recommendation method in the related art in the point of interest recommendation scenario.

[0071] The recommendation method provided in the embodiment of the present application can be applied to various POI recommendation scenarios and problems using graph modeling, such as restaurant recommendations, takeaway recommendations, tourist attractions recommendations, and other POI recommendation scenarios.

[0072] For example, in a restaurant recommendation scenario, a restaurant can be defined as a point of interest, and the user's dining behavior in the restaurant can be used as interaction data. Using the recommendation method provided in the embodiment of the present application, the user's dining preferences and the influence of time and space factors on the dining preferences can be captured.

[0073] In the takeaway recommendation scenario, takeaway can be defined as a point of interest, and the user's behavior of ordering takeaway can be used as interaction data. The recommendation method provided in the embodiment of the present application is used to capture the user's preference for ordering takeaway, as well as the influence of time and space factors on the preference for ordering takeaway.

[0074] In the tourist attraction recommendation scenario, tourist attractions can be defined as points of interest, and the user's behavior of visiting the tourist attractions can be used as interaction data. The recommendation method provided in the embodiment of the present application is used to capture the user's preference for visiting tourist attractions, as well as the influence of time and space factors on the preference for visiting tourist attractions.

[0075] In the POI recommendation scenario, general GNN can achieve certain results, but the effect is not good because the heterogeneity and sparsity of the data are not taken into account. Therefore, the above example can solve the data heterogeneity and sparsity problems in actual business scenarios by using the graph neural network framework HestGCL for POI recommendation proposed in the embodiment of the present application, so as to achieve better performance.

[0076] Figure 2 A schematic diagram is shown of an exemplary system in which various methods and apparatuses described herein may be implemented according to an embodiment disclosed herein.

[0077] like Figure 2 As shown, the system 200 includes a terminal 210, a server 230, and a network 220 that connects the terminal 210 and the server 230. The terminal 210 can run one or more services or software applications that can execute the recommendation method. The server 230 can run one or more services or software applications that can execute the training method of the neural network model involved in the embodiment of the present application.

[0078] In some embodiments, server 230 can also provide other services or software applications including non-virtual environments and virtual environments. In some embodiments, these services can be provided as web-based services or cloud services, such as provided to users of terminals under a software as a service (SaaS) model.

[0079] exist Figure 2 In the system shown, the server 230 may include one or more components that implement the functions performed by the server 230. These components may include software components, hardware components, or a combination thereof that may be executed by one or more processors.

[0080] In one example, the graph neural network framework HestGCL for POI recommendation proposed in the embodiment of the present application can be deployed in the server 230 for inference to obtain recommendation results. The terminal 210 collects the interaction data between the user and the POI (such as check-in data). The terminal 210 sends the interaction data between the user and the POI to the server 230. The server 230 models the heterogeneous spatiotemporal graph of the POI recommendation scene based on the interaction data, inputs the heterogeneous spatiotemporal graph into the HestGCL model (also referred to as the HestGCL POI recommendation model), obtains the recommendation result, feeds the recommendation result back to the terminal 210, and the terminal 210 displays the recommendation result to the user. The HestGCL model is deployed in the server 230, and the inference and training of the recommendation model are completed in the server, saving the storage overhead and computing power overhead of the terminal 210.

[0081] In another example, the graph neural network framework HestGCL for POI recommendation proposed in the embodiment of the present application can be deployed in the terminal 210 for inference to obtain recommendation results. The terminal 210 collects the interaction data between the user and the POI (such as check-in data). The terminal 210 models the heterogeneous spatiotemporal graph of the POI recommendation scenario based on the interaction data, inputs the heterogeneous spatiotemporal graph into the HestGCL model, obtains the recommendation result, and the terminal 210 displays the recommendation result to the user. The server 230 is used to train the HestGCL model, and the parameters of the trained HestGCL model are updated in the terminal 210 through the network 220. The HestGCL model is deployed in the terminal 210, the reasoning process is completed in the terminal 230, the data does not leave the user's terminal, and the privacy and security of the user data are protected.

[0082] It should be understood that Figure 2 This is only an example of a system for implementing the various methods described in the embodiments of the present application. There may be other different configurations, and the embodiments of the present application are not limited to this.

[0083] Terminal 210 may include various types of computer devices, such as portable handheld devices, general-purpose computers (such as personal computers or laptop computers), workstation computers, wearable devices, etc. These computer devices may run various types and versions of software applications and operating systems, such as Microsoft Windows, Apple IOS, UNIX-like operating systems, Linux or Linux-like operating systems (such as Google Chrome OS); or various mobile operating systems, such as Microsoft Windows Mobile OS, Windows phone, Android, iPhone OS, etc. Portable handheld devices may include cellular phones, smart phones, tablet computers, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays and smart watches, etc.

[0084] The network 220 may be any type of network known to those skilled in the art, and may support data communications using any of a variety of available protocols, including but not limited to TCP / IP, SNA, IPX, 3G, 4G, 5G, etc. Exemplarily, the one or more networks 220 may be a local area network (LAN), an Ethernet-based network, a token ring, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, WIFI), and / or any combination of these and / or other networks.

[0085] Server 230 may include one or more general purpose computers, dedicated server computers (e.g., personal computer servers, UNIX servers, terminal servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement or combination. Server 230 may include one or more virtual machines running virtual operating systems, or other computing architectures involving virtualization, such as one or more flexible pools of logical storage devices that may be virtualized to maintain a server's virtual storage device. In various embodiments, server 230 may run one or more services or software applications that provide the functionality described below.

[0086] The computing units in the server 230 may run one or more operating systems including any of the above operating systems and any commercially available server operating systems. The server 230 may also run any of a variety of additional server applications and / or middle-tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, etc.

[0087] In some embodiments, server 230 may include one or more applications to analyze and consolidate data feeds and / or event updates received from users of terminal 210. Server 230 may also include one or more applications to display data feeds and / or real-time events via one or more display devices of terminal 210.

[0088] In some embodiments, server 230 may be a server of a distributed system or a server combined with a blockchain. Server 230 may also be a cloud server or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. A cloud server is a host product in a cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and virtual private servers (VPS) services.

[0089] In another example, Figure 3 As shown, model training can also be deployed in the cloud, using a specific cloud service (model training service) to complete the model training, and then the trained model updates the model parameters to the terminal through the network.

[0090] Figure 4 The following is a flowchart of a recommendation method provided in an embodiment of the present application. The recommendation method provided in an embodiment of the present application can be executed by any device, equipment, computing platform, or computing cluster with computing and processing capabilities. Figure 2 The terminal device shown, or the server, or the terminal device and the server cooperate to complete. Figure 4 As shown, the recommendation method provided in the embodiment of the present application at least includes steps S401 to S406.

[0091] In step S401, a time view and a space view are acquired.

[0092] The interaction data between the user and the point of interest is obtained. For example, if the point of interest is a restaurant, the interaction data between the user and the point of interest may include the user's check-in data, which includes the geographical location data of the restaurant visited, the check-in time data, and the number of check-ins. In some other examples, the interaction data between the user and the point of interest may also include the user's comments on the restaurant, dining expenses, and other data.

[0093] Based on the interaction data between users and POIs, a heterogeneous spatio-temporal graph for POI recommendation task is constructed. The heterogeneous spatio-temporal graph includes multiple types of nodes such as user nodes, POI nodes and geographic location nodes, and multiple types of connection edges. The multiple types of connection edges include connection edges connecting user nodes and POI nodes, connection edges connecting POI nodes and geographic location nodes, and connection edges connecting geographic location nodes and geographic location nodes. Among them, user nodes represent user information, POI nodes represent POI information, geographic location nodes represent geographic location information, and the connection edges between user nodes and POI nodes have time information, which represents the interaction time information between users and POI nodes.

[0094] Taking restaurants as points of interest as an example, obtain the user information, restaurant information and dining information of users in a certain area (such as a city), and construct a heterogeneous spatiotemporal graph. User nodes represent users, point of interest nodes represent restaurants, and geographic location nodes represent the geographic locations of restaurants. Connect each node based on the interaction data between users and points of interest. For example, if a user has visited the restaurant, connect the user node corresponding to the user and the point of interest node corresponding to the restaurant with a connecting edge, and connect each point of interest node with the geographic location node corresponding to each point of interest node (that is, connect each restaurant with the geographic location where each restaurant is located), and connect adjacent geographic location nodes, for example, connect geographic locations less than 5km away.

[0095] After obtaining the heterogeneous spatiotemporal graph, the heterogeneous spatiotemporal graph is split into a temporal view including time information and a spatial view including spatial information. The temporal view includes a user node, a point of interest node, and a first connection edge. The first connection edge is used to connect the user node and the point of interest node, and the first connection edge has a time attribute. The spatial view includes a user node, a point of interest node, a geographic location node, a second connection edge, a third connection edge, and a fourth connection edge. The second connection edge is used to connect the user node and the point of interest node, and the second connection edge does not have a time attribute. The third connection edge is used to connect the point of interest node and the geographic location node, and the fourth connection edge is used to connect two different geographic location nodes.

[0096] Exemplarily, a complete heterogeneous spatiotemporal graph can be defined as: G = (V, E, L, T). Where V is a set of nodes, E is a set of edges, L is a set of locations, and T is a set of timestamps. L and T need to be mapped to nodes or edges. In the embodiment of the present application, L (location) is considered as a node together with user and POI, and T is considered as an attribute on the edge connecting user and POI.

[0097] View splitting: For subsequent modeling, the complete heterogeneous spatiotemporal graph is split into a time view and a spatial view. The definitions of the two views are as follows:

[0098] Time view: only includes user, POI nodes, and the edges between them based on historical interactions, and considers T on the edges.

[0099] Spatial view: Contains three types of nodes: user, POI, and Location, and three types of edges: user-POI, POI-location, and location-location. The POI-location edge represents the location of the POI, and the edges between locations represent the proximity of geographical locations. The user-POI edge does not consider T.

[0100] In step S402, the time view is used as the input of the first graph neural network, and the first node representation vector of the user node and the first node representation vector of the point of interest node are output.

[0101] The first graph neural network can be called a time-aware graph neural network.

[0102] It has a multi-layer neural network layer, through which the representation vector of each node is updated, and the node representation vector output by the last layer is the first node representation vector. In the multi-layer neural network layer of the time-aware graph neural network, each neural network layer performs the following operations on each node in the time view: aggregate the time information on the first connection edge connected to each node in the time view to obtain a first aggregation result; aggregate the node representation vectors of the previous layer of the neighboring nodes of each node in the time view to obtain a second aggregation result; perform weighted fusion of the first aggregation result and the second aggregation result to obtain the node representation vector of each node in the time view at the current layer; wherein the node representation vector of the user node output by the last neural network layer in the multi-layer neural network layer of the time-aware graph neural network is the first node representation vector of the user node, and the node representation vector of the point of interest node is the first node representation vector of the point of interest node.

[0103] Optionally, the weight of the first aggregation result is determined based on the attention coefficient of the first aggregation result, and the weight of the second aggregation result is determined based on the attention coefficient of the second aggregation result.

[0104] Exemplarily, for the time view, the embodiment of the present application designs a time-aware graph neural network as follows:

[0105] For user i and point of interest j∈N i , first their interaction time t ij Hour-level coding is performed to obtain

[0106]

[0107] Where σ is the Sigmoid function and N is the number of hours (N=24). Then Participate in learning the representation x of user i i The specific formula is as follows:

[0108]

[0109]

[0110] Note that here we give each node x i Learned two representations and in Represents the timestamp t on the aggregation edge ij The resulting node representation is the same for each layer, and represents the node representation obtained by aggregating neighbor nodes (related to the number of layers l). Finally, we use the following formula to fuse the time information with the neighbor information to obtain the node representation of the next layer:

[0111]

[0112] This process is repeated for L layers until the final node representation is obtained.

[0113] The processing of POI nodes in the time-aware graph neural network is similar to that of user nodes, and will not be repeated here for the sake of brevity.

[0114] The time view is processed by the multi-layer neural network layers in the time-aware graph neural network, and the node representation vector of the user node output by the last layer is the first node representation vector of the user node, and the node representation vector of the point of interest node is the first node representation vector of the point of interest node.

[0115] In step S403, the spatial view is used as the input of the second graph neural network, and the second node representation vector of the user node and the second node representation vector of the point of interest node are output.

[0116] The second graph neural network can be called a spatially aware graph neural network. The spatially aware graph neural network has a multi-layer neural network layer, through which the representation vector of each node is updated. The node representation vector output by the last layer is the second node representation vector. In the multi-layer neural network layer of the spatially aware graph neural network, each neural network layer performs the following operations on each node in the spatial view:

[0117] The node representation vectors of the previous layer of neighbor nodes of the same type of each node in the spatial view are aggregated to obtain the aggregation results of neighbor nodes of each type; the aggregation results of neighbor nodes of each type are weighted fused to obtain the node representation vector of each node in the spatial view at the current layer; wherein the node representation vector of the user node output by the last neural network layer in the multi-layer neural network layer of the spatially aware graph neural network is the second node representation vector of the user node, and the node representation vector of the point of interest node is the second node representation vector of the point of interest node.

[0118] Optionally, the weight of the aggregation result of each type of neighbor node is determined based on the attention coefficient of each type of neighbor node.

[0119] Exemplarily, for the spatial view, the embodiment of the present application designs a spatially-aware graph neural network as follows: for node i, different types of neighbors are distinguished, neighbors of a specific type are aggregated first, and then all types are fused using the attention coefficient b.

[0120]

[0121] Where R is the total number of all types, is the node-specific attention coefficient.

[0122] The spatial view is processed by multiple layers of neural network layers in the spatially aware graph neural network, and the node representation vector of the user node output by the last layer is the second node representation vector of the user node, and the node representation vector of the point of interest node is the second node representation vector of the point of interest node.

[0123] In step S404, a node representation of the user node is obtained based on the first node representation vector of the user node and the second node representation vector of the user node.

[0124] In step S405, a node representation of the point of interest node is obtained based on the first node representation vector of the point of interest node and the second node representation vector of the point of interest node.

[0125] In the time view and space view, after being processed by the time-aware graph neural network and the space-aware graph neural network respectively, two groups of node representation vectors are obtained, one group is the first node representation vector of the user node and the first node representation vector of the point of interest node, and the other group is the second node representation vector of the user node and the second node representation vector of the point of interest node.

[0126] Then the two groups of node representation vectors are fused to obtain the final node representation, that is, the first node representation vector of the user node and the second node representation vector of the user node are fused to obtain the node representation of the user node, and the first node representation vector of the point of interest node and the second node representation vector of the point of interest node are fused to obtain the node representation of the point of interest node.

[0127] For example, we design the following time-aware prediction module: First, the user and POI representations in the two views are weighted fused.

[0128] X F =aX S +(1-a)X T

[0129] Where a is the attention coefficient of spatiotemporal fusion.

[0130] In step S406, a recommendation result is determined based on the node representation of the user node and the node representation of the point of interest node.

[0131] The similarity between the user node and the point of interest node is calculated through the node representation of the user node and the node representation of the point of interest node, and the prediction score of each point of interest is determined based on the similarity. The similarity is positively correlated with the prediction score. For example, the higher the similarity between the point of interest node and the target user node, the higher the prediction score of the point of interest, and the more likely it is to be recommended to the user, or the higher the ranking recommended to the user.

[0132] In another example, the calculation of the similarity between the user node and the point of interest node is also related to time information, for example: calculating the similarity considering time perception as the prediction score.

[0133]

[0134] Where · is the inner product and ⊙ is the Hadamard product.

[0135] The following describes a training and learning method for the HestGCL POI recommendation model mentioned in an embodiment of the present application.

[0136] In order to solve the sparsity of training data, an embodiment of the present application proposes a heterogeneous spatiotemporal graph comparative learning method, which aggregates temporal neighbors and spatial neighbors separately through heterogeneous spatiotemporal graph comparative learning based on dual views. Compared with the original use of only historical interaction behaviors as supervisory information, this dual-view operation can effectively provide rich supervisory information.

[0137] Specifically, the HestGCL point of interest recommendation model is based on minimizing the target loss function and adjusting the parameters of the HestGCL point of interest recommendation model, including adjusting the parameters of the time-aware graph neural network and the parameters of the space-aware graph neural network; wherein, the target loss function is determined by the sum of the BPR loss function and the contrast loss function, and the contrast loss function is used to maximize the mutual information between positive examples and minimize the mutual information between negative examples. The same node in the time view and the space view is used as a positive example, and different nodes of the same type in the time view and the space view are used as negative examples.

[0138] For example, BPR is used as the loss function for the recommendation task:

[0139]

[0140] Where σ is the Sigmoid function.

[0141] In addition, the embodiment of the present application designs a cross-view contrast learning module, which uses the same node in different views as a positive example and different nodes as a negative example, maximizes the mutual information between positive examples, and minimizes the mutual information between negative examples. The formula is as follows:

[0142]

[0143] Where f is the cosine similarity function, X represents the node representation X6 in the spatial view or the node representation X in the temporal view. T .

[0144] Finally, we use multi-task learning to jointly optimize BPR loss and contrastive learning loss. The total loss function is as follows:

[0145] L=L BPR +βL CL

[0146] Here, β is a balancing hyperparameter.

[0147] Figure 5 A schematic diagram of a heterogeneous spatiotemporal graph comparative learning method provided in an embodiment of the present application is shown.

[0148] The recommendation method provided in the embodiment of this application has a complete prototype implementation for the application of HestGCL in practical problems. Since the embodiment of this application focuses on the modeling of heterogeneity in the GNN method, the recommendation effect can be improved through the dual-view comparison mechanism. At present, through experimental tests in actual data sets, the expected advantages and beneficial effects have been preliminarily verified. For example:

[0149] Improved recommendation effect: This is mainly due to the dual-view aggregation and contrastive learning module designed in the embodiment of the present application. By introducing prior knowledge, the learned node representation is improved, and self-supervision signals are provided through contrastive learning, thereby providing additional self-supervision information.

[0150] Robustness: This is because the architecture of the embodiment of the present application is based on a graph comparison learning method and is robust to hyperparameters.

[0151] Compared with related technologies (including solutions GPR and SGL): The embodiments of the present application can be applied to heterogeneous spatiotemporal graphs, thereby better modeling data sparsity and heterogeneity problems. The above effects can be achieved mainly because a time-space dual-view aggregation mechanism is proposed and a cross-view contrast learning strategy is adopted. Specifically, the differences from related technologies can be shown in Table 1:

[0152]

[0153] Table 1

[0154] The beneficial effects of the recommendation method provided in the embodiment of the present application are verified by conducting experiments on real data sets, which are specifically described from the following aspects:

[0155] Baseline selection: Since there is currently no POI recommendation method based on comparative learning of heterogeneous spatiotemporal graphs, the HestGCL method proposed in the embodiment of the present application is compared with these baselines: 1) non-GNN recommendation algorithm: NeuMF; 2) GNN recommendation algorithm: NGCF, LightGCN; 3) self-supervised GNN recommendation algorithm: SGL, NCL; 4) GNN POI recommendation algorithm: GPR.

[0156] Evaluation metrics: Recall@K, MAP@K, where K=5, 10, 20, 50.

[0157] Effect description: The effectiveness of the key technical points of the present invention was evaluated on three real data sets (Foursquare data set, Gowalla data set, and Meituan data set). The overall results are shown in Table 2, and the bold represents the best results.

[0158]

[0159] Table 2

[0160] According to Table 2, the following conclusions can be drawn:

[0161] The model HestGCL of this application example outperforms other baselines in all indicators.

[0162] For the Foursquare and Gowalla datasets, GNN-based methods usually outperform NeuMF methods, which shows that GNN-based methods can obtain better node representations by aggregating high-order information. For the Meituan dataset, NeuMF can also achieve similar results as GNN-based methods, which may be because the sparsity of the Meituan dataset is the lowest.

[0163] Compared to GNN-like methods (LightGCN, NGCF), self-supervised GNN models (SGL, NCL) can improve the results in some cases, but they are not stable. In contrast, the HestGCL model can consistently achieve better results, which may be because it is specially designed for spatiotemporal data and thus provides a more effective self-supervision signal.

[0164] Robustness: In order to prove the robustness of the HestGCL model proposed in the embodiment of this application, we designed a hyperparameter experiment. Specifically, we used the embedding dimension d = {64, 12, 256} to evaluate the robustness of HestGCL under different hyperparameter settings. Figure 6 It can be seen that HestGCL has high robustness on the Foursquare and Gowalla datasets, while on the Meituan dataset, as the embedding dimension increases, the recommendation effect also improves. The reason may be that the sparsity of the Meituan dataset is low, so a larger embedding dimension is needed to store more information.

[0165] Based on the same concept as the above-mentioned recommendation method embodiment, the present application embodiment further provides a recommendation device 700, which can be deployed on any device or platform with computing capabilities, such as Figure 2 The terminal 210 shown in FIG. 2 is used to improve the recommendation effect. The recommendation device 700 includes a Figure 4-6 The units or modules of each step in the recommended method are shown.

[0166] Figure 7 This is a schematic diagram of a recommended device provided in an embodiment of the present application. Figure 7As shown, the recommendation device 700 at least includes an acquisition module 701, a time view node representation extraction module 702, a space view node representation extraction module 703 and a recommendation module 704, wherein the acquisition module 701 is used to acquire a time view and a space view, wherein the time view includes a user node, an interest point node and a first connection edge, the first connection edge is used to connect the user node and the interest node, the user node represents user information, the interest point node represents interest point information, and the connection edge includes time information; the space view includes a user node, an interest point node, a geographic location node, a second connection edge, a third connection edge and a fourth connection edge, the geographic location node represents geographic location information, the second connection edge is used to connect the user node and the interest point node, the third connection edge is used to connect the interest point node and the geographic location node, and the fourth connection edge is used to connect the user node and the interest point node. The time view node representation extraction module 702 is used to connect two different geographical location nodes; the time view node representation extraction module 702 is used to use the time view as the input of the first graph neural network, and output the first node representation vector of the user node and the first node representation vector of the point of interest node; the spatial view node representation extraction module 703 is used to use the spatial view as the input of the second graph neural network, and output the second node representation vector of the user node and the second node representation vector of the point of interest node; the recommendation module 704 is used to obtain the node representation of the user node based on the first node representation vector of the user node and the second node representation vector of the user node; obtain the node representation of the point of interest node based on the first node representation vector of the point of interest node and the second node representation vector of the point of interest node; determine the recommendation result based on the node representation of the user node and the node representation of the point of interest node.

[0167] In one possible implementation, the time view node representation extraction module 702 is specifically used for: the first graph neural network includes a first multi-layer neural network layer, and each neural network layer in the first multi-layer neural network layer performs the following operations on each node in the time view: aggregating the time information on the first connecting edge connected to each node in the time view to obtain a first aggregation result; aggregating the node representation vectors of the previous layer of the neighboring nodes of each node in the time view to obtain a second aggregation result; weightedly fusion the first aggregation result and the second aggregation result to obtain the node representation vector of each node in the time view at the current layer; wherein the node representation vector of the user node output by the last neural network layer in the first multi-layer neural network layer is the first node representation vector of the user node, and the node representation vector of the point of interest node is the first node representation vector of the point of interest node.

[0168] In another possible implementation, the weight of the first aggregation result is determined based on the attention coefficient of the first aggregation result, and the weight of the second aggregation result is determined based on the attention coefficient of the second aggregation result.

[0169] In another possible implementation, the spatial view node representation extraction module 703 is specifically used to: the second graph neural network includes a second multi-layer neural network layer, and each neural network layer in the second multi-layer neural network layer performs the following operations on each node in the spatial view: aggregate the node representation vectors of the previous layer of neighbor nodes of the same type of each node in the spatial view to obtain aggregation results of neighbor nodes of each type;

[0170] The aggregation results of each type of neighbor nodes are weightedly fused to obtain the node representation vector of each node in the spatial view at the current layer; wherein the node representation vector of the user node output by the last neural network layer in the second multi-layer neural network layer is the second node representation vector of the user node, and the node representation vector of the point of interest node is the second node representation vector of the point of interest node.

[0171] In another possible implementation, the weight of the aggregation result of each type of neighbor node is determined based on the attention coefficient of each type of neighbor node.

[0172] In another possible implementation, the recommendation module 704 is specifically used to: perform weighted fusion on the first node representation vector of the user node and the second node representation vector of the user node to obtain a node representation of the user node; wherein the weight of the first node representation vector of the user node is determined based on the attention coefficient of the first node representation vector of the user node, and the weight of the second node representation vector of the user node is determined based on the attention coefficient of the second node representation vector of the user node.

[0173] In another possible implementation, the recommendation module 704 is also specifically used to: perform weighted fusion on the first node representation vector of the point of interest node and the second node representation vector of the point of interest node to obtain a node representation of the point of interest node; wherein the weight of the first node representation vector of the point of interest node is determined based on the attention coefficient of the first node representation vector of the point of interest node, and the weight of the second node representation vector of the point of interest node is determined based on the attention coefficient of the second node representation vector of the point of interest node.

[0174] In another possible implementation, the recommendation module 704 is further specifically used to: calculate the similarity between the node representation of the user node and the node representation of the point of interest node to obtain a similarity result; based on the similarity result, determine the prediction score of each of the point of interest nodes; based on the prediction score, determine N points of interest recommended to the user, the prediction scores corresponding to the N points of interest are higher than the prediction scores corresponding to other points of interest, and N is a positive integer greater than 1.

[0175] In another possible implementation, the similarity between the node representation of the user node and the node representation of the point of interest node is also related to the time information between the user node and the point of interest node.

[0176] In another possible implementation, the first graph neural network and the second graph neural network are obtained by adjusting parameters of the first graph neural network and parameters of the second graph neural network based on minimizing the objective loss function; wherein the objective loss function is determined based on the sum of the BPR loss function and the contrast loss function, and the contrast loss function is used to maximize the mutual information between positive examples and minimize the mutual information between negative examples, the same node in the time view and the space view is used as a positive example, and different nodes of the same type in the time view and the space view are used as negative examples.

[0177] In another possible implementation, the acquisition module 701 is specifically used to: obtain a heterogeneous space-time graph, the heterogeneous space-time graph including user nodes, point of interest nodes, geographic location nodes, first connecting edges, third connecting edges and fourth connecting edges; split the heterogeneous space-time graph to obtain a space-time view and a spatial view.

[0178] The recommendation device 700 according to the embodiment of the present application may correspond to executing the method described in the embodiment of the present application, and the above and other operations and / or functions of each module in the recommendation device 700 are respectively to implement Figure 4-6 For the sake of brevity, the corresponding processes of each method in are not repeated here.

[0179] The present application also provides a computing device, including at least one processor, a memory and a communication interface, wherein the processor is used to execute Figure 4-6 The method described.

[0180] Figure 8 A schematic diagram of the structure of a computing device provided in an embodiment of the present application.

[0181] like Figure 8 As shown, the terminal device 800 includes at least one processor 801, a memory 802 and a communication interface 803. The processor 801, the memory 802 and the communication interface 803 are connected in communication, and the communication connection can be achieved by wired means (such as a bus) or by wireless means. The communication interface 803 is used to send and / or receive data sent by other devices; the memory 802 stores computer instructions, and the processor 801 executes the computer instructions to execute the recommendation method in the aforementioned method embodiment to improve the recommendation effect.

[0182] It should be understood that in the embodiment of the present application, the processor 801 may be a central processing unit CPU, and the processor 801 may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0183] The memory 802 may include a read-only memory and a random access memory, and provides instructions and data to the processor 801. The memory 802 may also include a nonvolatile random access memory.

[0184] The memory 802 may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. Among them, the nonvolatile memory may be a read-only memory (ROM), a programmable ROM (PROM), an erasable programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0185] It should be understood that the computing device 800 according to the embodiment of the present application can execute the implementation of the embodiment of the present application. Figure 4-6 The method shown, the detailed description of the implementation of this method can be found above, for the sake of brevity, it will not be repeated here.

[0186] An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer instructions are executed by a processor, the above-mentioned method is implemented.

[0187] An embodiment of the present application provides a chip, which includes at least one processor and an interface, wherein the at least one processor determines program instructions or data through the interface; the at least one processor is used to execute the program instructions to implement the method mentioned above.

[0188] An embodiment of the present application provides a computer program or a computer program product, wherein the computer program or the computer program product comprises instructions, and when the instructions are executed, the computer is caused to execute the above-mentioned method.

[0189] Those of ordinary skill in the art should further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those of ordinary skill in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0190] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented by hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0191] The specific implementation methods described above further illustrate the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only the specific implementation method of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.

Claims

1. A recommendation method, characterized in that: include: Acquire a time view and a space view, wherein the time view includes a user node, a point of interest node, and a first connection edge, the first connection edge is used to connect the user node and the point of interest, the user node represents user information, the point of interest node represents point of interest information, and the connection edge includes time information; the space view includes the user node, the point of interest node, a geographic location node, a second connection edge, a third connection edge, and a fourth connection edge, the geographic location node represents geographic location information, the second connection edge is used to connect the user node and the point of interest node, the third connection edge is used to connect the point of interest node and the geographic location node, and the fourth connection edge is used to connect two different geographic location nodes; Using the time view as an input of a first graph neural network, and outputting a first node representation vector of the user node and a first node representation vector of the point of interest node; Using the spatial view as an input of a second graph neural network, and outputting a second node representation vector of the user node and a second node representation vector of the point of interest node; Obtaining a node representation of the user node based on a first node representation vector of the user node and a second node representation vector of the user node; Obtaining a node representation of the point of interest node based on a first node representation vector of the point of interest node and a second node representation vector of the point of interest node; A recommendation result is determined based on the node representation of the user node and the node representation of the point of interest node.

2. The method according to claim 1, characterized in that The step of taking the time view as an input of a first graph neural network and outputting a first node representation vector of the user node and a first node representation vector of the point of interest node includes: The first graph neural network includes a first multi-layer neural network layer, and each neural network layer in the first multi-layer neural network layer performs the following operation on each node in the time view: Aggregating time information on a first connection edge connected to each node in the time view to obtain a first aggregation result; Aggregating the upper-layer node representation vectors of the neighboring nodes of each node in the time view to obtain a second aggregation result; Performing weighted fusion on the first aggregation result and the second aggregation result to obtain a node representation vector of each node in the time view at the current layer; Among them, the node representation vector of the user node output by the last neural network layer in the first multi-layer neural network layer is the first node representation vector of the user node, and the node representation vector of the point of interest node is the first node representation vector of the point of interest node.

3. The method according to claim 2, characterized in that The weight of the first aggregation result is determined based on the attention coefficient of the first aggregation result, and the weight of the second aggregation result is determined based on the attention coefficient of the second aggregation result.

4. The method according to any one of claims 1 to 3, characterized in that: The step of taking the spatial view as an input of a second graph neural network and outputting a second node representation vector of the user node and a second node representation vector of the point of interest node includes: The second graph neural network includes a second multi-layer neural network layer, and each neural network layer in the second multi-layer neural network layer performs the following operation on each node in the spatial view: Aggregating the upper layer node representation vectors of neighbor nodes of the same type of each node in the spatial view to obtain aggregation results of neighbor nodes of each type; Performing weighted fusion on the aggregation results of neighbor nodes of each type to obtain a node representation vector of each node in the spatial view at the current layer; Among them, the node representation vector of the user node output by the last neural network layer in the second multi-layer neural network layer is the second node representation vector of the user node, and the node representation vector of the point of interest node is the second node representation vector of the point of interest node.

5. The method according to claim 4, characterized in that The weights of the aggregation results of the neighbor nodes of each type are determined based on the attention coefficients of the neighbor nodes of each type.

6. The method according to any one of claims 1 to 5, characterized in that: The obtaining the node representation of the user node based on the first node representation vector of the user node and the second node representation vector of the user node includes: Performing weighted fusion on the first node representation vector of the user node and the second node representation vector of the user node to obtain a node representation of the user node; Among them, the weight of the first node representation vector of the user node is determined based on the attention coefficient of the first node representation vector of the user node, and the weight of the second node representation vector of the user node is determined based on the attention coefficient of the second node representation vector of the user node.

7. The method according to any one of claims 1 to 6, characterized in that: The obtaining the node representation of the point of interest node based on the first node representation vector of the point of interest node and the second node representation vector of the point of interest node comprises: Performing weighted fusion on the first node representation vector of the point of interest node and the second node representation vector of the point of interest node to obtain a node representation of the point of interest node; Among them, the weight of the first node representation vector of the interest point node is determined based on the attention coefficient of the first node representation vector of the interest point node, and the weight of the second node representation vector of the interest point node is determined based on the attention coefficient of the second node representation vector of the interest point node.

8. The method according to any one of claims 1 to 7, characterized in that: The determining of the recommendation result based on the node representation of the user node and the node representation of the point of interest node includes: Calculating the similarity between the node representation of the user node and the node representation of the point of interest node to obtain a similarity result; Based on the similarity results, determining the prediction score of each of the interest point nodes; Based on the prediction scores, N points of interest recommended to the user are determined, the prediction scores corresponding to the N points of interest being higher than the prediction scores corresponding to other points of interest, and N being a positive integer greater than 1.

9. The method according to claim 8, characterized in that The similarity between the node representation of the user node and the node representation of the point of interest node is also related to the time information between the user node and the point of interest node.

10. The method according to any one of claims 1 to 9, characterized in that: The first graph neural network and the second graph neural network are obtained by adjusting parameters of the first graph neural network and parameters of the second graph neural network based on minimizing the objective loss function; The target loss function is determined based on the sum of a Bayesian personalized ranking loss function and a contrast loss function, the contrast loss function is used to maximize the mutual information between positive examples and minimize the mutual information between negative examples, the same node in the time view and the spatial view is used as a positive example, and different nodes of the same type in the time view and the spatial view are used as negative examples.

11. The method according to any one of claims 1 to 10, characterized in that: The acquiring the time view and the space view includes: Acquire a heterogeneous space-time graph, wherein the heterogeneous space-time graph includes the user node, the point of interest node, the geographic location node, the first connection edge, the third connection edge, and the fourth connection edge; The heterogeneous space-time graph is split to obtain the space-time view and the spatial view.

12. A recommendation device, characterized in that: include: an acquisition module, configured to acquire a time view and a space view, wherein the time view includes a user node, a point of interest node, and a first connection edge, wherein the first connection edge is used to connect the user node and the point of interest node, the user node represents user information, the point of interest node represents point of interest information, and the connection edge includes time information; the space view includes the user node, the point of interest node, a geographic location node, a second connection edge, a third connection edge, and a fourth connection edge, wherein the geographic location node represents geographic location information, the second connection edge is used to connect the user node and the point of interest node, the third connection edge is used to connect the point of interest node and the geographic location node, and the fourth connection edge is used to connect two different geographic location nodes; A time view node representation extraction module, configured to use the time view as an input of a first graph neural network, and output a first node representation vector of the user node and a first node representation vector of the point of interest node; A spatial view node representation extraction module, configured to use the spatial view as an input of a second graph neural network, and output a second node representation vector of the user node and a second node representation vector of the point of interest node; A recommendation module, configured to obtain a node representation of the user node based on a first node representation vector of the user node and a second node representation vector of the user node; Obtaining a node representation of the point of interest node based on a first node representation vector of the point of interest node and a second node representation vector of the point of interest node; A recommendation result is determined based on the node representation of the user node and the node representation of the point of interest node.

13. The device according to claim 12, characterized in that The time view node representation extraction module is specifically used for: The first graph neural network includes a first multi-layer neural network layer, and each neural network layer in the first multi-layer neural network layer performs the following operation on each node in the time view: Aggregating time information on a first connection edge connected to each node in the time view to obtain a first aggregation result; Aggregating the upper-layer node representation vectors of the neighboring nodes of each node in the time view to obtain a second aggregation result; Performing weighted fusion on the first aggregation result and the second aggregation result to obtain a node representation vector of each node in the time view at the current layer; Among them, the node representation vector of the user node output by the last neural network layer in the first multi-layer neural network layer is the first node representation vector of the user node, and the node representation vector of the point of interest node is the first node representation vector of the point of interest node.

14. The device according to claim 13, characterized in that The weight of the first aggregation result is determined based on the attention coefficient of the first aggregation result, and the weight of the second aggregation result is determined based on the attention coefficient of the second aggregation result.

15. The device according to any one of claims 12 to 14, characterized in that: The spatial view node representation extraction module is specifically used for: The second graph neural network includes a second multi-layer neural network layer, and each neural network layer in the second multi-layer neural network layer performs the following operation on each node in the spatial view: Aggregating the upper layer node representation vectors of neighbor nodes of the same type of each node in the spatial view to obtain aggregation results of neighbor nodes of each type; Performing weighted fusion on the aggregation results of neighbor nodes of each type to obtain a node representation vector of each node in the spatial view at the current layer; Among them, the node representation vector of the user node output by the last neural network layer in the second multi-layer neural network layer is the second node representation vector of the user node, and the node representation vector of the point of interest node is the second node representation vector of the point of interest node.

16. The device according to claim 15, characterized in that The weights of the aggregation results of the neighbor nodes of each type are determined based on the attention coefficients of the neighbor nodes of each type.

17. The device according to any one of claims 12 to 16, characterized in that: The recommendation module is specifically used for: Performing weighted fusion on the first node representation vector of the user node and the second node representation vector of the user node to obtain a node representation of the user node; Among them, the weight of the first node representation vector of the user node is determined based on the attention coefficient of the first node representation vector of the user node, and the weight of the second node representation vector of the user node is determined based on the attention coefficient of the second node representation vector of the user node.

18. The device according to any one of claims 12 to 17, characterized in that: The recommendation module is also specifically used for: Performing weighted fusion on the first node representation vector of the point of interest node and the second node representation vector of the point of interest node to obtain a node representation of the point of interest node; Among them, the weight of the first node representation vector of the interest point node is determined based on the attention coefficient of the first node representation vector of the interest point node, and the weight of the second node representation vector of the interest point node is determined based on the attention coefficient of the second node representation vector of the interest point node.

19. The device according to any one of claims 12 to 18, characterized in that: The recommendation module is also specifically used for: Calculating the similarity between the node representation of the user node and the node representation of the point of interest node to obtain a similarity result; Based on the similarity results, determining the prediction score of each of the interest point nodes; Based on the prediction scores, N points of interest recommended to the user are determined, the prediction scores corresponding to the N points of interest being higher than the prediction scores corresponding to other points of interest, and N being a positive integer greater than 1.

20. The device according to claim 19, characterized in that The similarity between the node representation of the user node and the node representation of the point of interest node is also related to the time information between the user node and the point of interest node.

21. The device according to any one of claims 12 to 20, characterized in that: The first graph neural network and the second graph neural network are obtained by adjusting parameters of the first graph neural network and parameters of the second graph neural network based on minimizing the objective loss function; The target loss function is determined based on the sum of a Bayesian personalized ranking loss function and a contrast loss function, the contrast loss function is used to maximize the mutual information between positive examples and minimize the mutual information between negative examples, the same node in the time view and the spatial view is used as a positive example, and different nodes of the same type in the time view and the spatial view are used as negative examples.

22. The device according to any one of claims 12 to 21, characterized in that The acquisition module is specifically used for: Acquire a heterogeneous space-time graph, wherein the heterogeneous space-time graph includes the user node, the point of interest node, the geographic location node, the first connection edge, the third connection edge, and the fourth connection edge; The heterogeneous space-time graph is split to obtain the space-time view and the spatial view.

23. A computing device comprising a memory and a processor, characterized in that: Instructions are stored in the memory, and when the instructions are executed by the processor, the method according to any one of claims 1 to 11 is implemented.

24. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.

Citation Information

Patent Citations

  • Session recommendation method and system based on user interests

    CN112115352A

  • Interest point recommendation method and system based on brain-like space-time perception representation

    CN113590971A

  • Friend and interest point recommendation method and terminal

    CN115146180A

  • Next interest point recommendation method and device based on space-time contrast learning

    CN115630233A

  • Point of interest recommendation method and system based on brain-inspired spatiotemporal perceptual representation

    WO2023015658A1