Graph contrast recommendation method and system based on local and global collaborative relationship

By transforming the user-item interaction graph into undirected edges and utilizing PageRank and lightweight graph convolution, the robustness and global-local relationship capture problems of existing recommendation algorithms under sparse data and noise are solved, thereby improving the performance of the recommendation system.

CN119807532BActive Publication Date: 2025-11-07CHONGQING UNIV
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411889741.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-11-07
Estimated Expiration
2044-12-20

AI Technical Summary

Technical Problem

Existing collaborative filtering recommendation algorithms based on graph neural networks rely on the integrity of the user-item interaction graph structure, are easily affected by sparse data and noise, have difficulty balancing the comparison between global and local collaborative relationships, and lack the ability to capture remote dependencies.

Method used

By changing the directed edges of the original user-item interaction graph to undirected edges, using the PageRank algorithm to calculate node importance, and combining lightweight graph convolution to perform message propagation on the undirected interaction graph, we can capture local and global collaborative relationships and optimize recommendation performance.

Benefits of technology

It effectively alleviates the data sparsity problem, improves the model's robustness to noise and disturbances, and can better capture global structural differences and local key points, thereby improving the performance of the recommendation system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119807532B_ABST
    Figure CN119807532B_ABST
Patent Text Reader

Abstract

The application discloses a kind of graph comparison recommendation method and system based on local and global collaborative relationship, which comprises the following steps: collecting the original data set of user item interaction, the directed edge in original graph of original data set is changed into undirected edge, and undirected interaction graph is obtained, the PageRank value of user node and item node is calculated, and enhanced global undirected interaction graph is obtained;Message propagation is carried out on undirected interaction graph, and the local collaborative relationship of user node and item node is obtained, message propagation is carried out on enhanced global undirected interaction graph, and the global collaborative relationship of user node and item node is obtained;Based on the local collaborative relationship and global collaborative relationship of user node and item node, the target function is calculated to recommend.Using this technical solution, the global collaborative enhanced view of principal component reinforcement and noise filtering is reconstructed, the local collaborative relationship and global collaborative relationship are effectively captured, and the recommendation performance is optimized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of recommendation systems, and relates to a graph comparison recommendation method and system based on local and global collaborative relationships. BACKGROUND

[0002] In today's information explosion era, recommendation systems have become a key tool to help users obtain personalized content from massive data. The mainstream recommendation systems can be divided into four categories: content-based recommendation, collaborative filtering recommendation, knowledge-based recommendation and combined recommendation. Among them, the collaborative filtering algorithm is one of the most commonly used technologies in recommendation systems, and its core idea is to mine the association between users and items based on user behavior data (such as ratings, clicks, purchase records, etc.) to recommend potential items of interest to users.

[0003] For example, patent CN202110677869 uses a backfill strategy to complete the rating scores of un-rated items in the neighborhood users, and proposes a collaborative filtering recommendation algorithm based on improved user similarity. Patent CN202010401624 designs an improved collaborative filtering recommendation system combining popular rankings, user registration information and friend information of user social websites. However, these traditional collaborative filtering algorithms often face challenges such as data sparsity, cold start and difficulty in capturing complex relationships.

[0004] To solve these problems, researchers began to use graph structures to represent users, items and their interaction relationships. As a powerful tool for processing graph data, graph neural networks can effectively capture high-order relationships between nodes and are widely used in recommendation systems. LightGCN designs a lightweight graph convolutional network for recommendation systems, which significantly improves the recommendation performance. Patent CN202311754335 proposes a social recommendation method and system based on graph neural networks, which effectively obtains user latent factors and item latent factors by using a multi-layer perceptron and attention mechanism, thereby effectively enhancing the accuracy and generalization ability of social recommendation. Patent CN202010934802 proposes a collaborative filtering recommendation method that fuses graph neural networks and attention mechanisms to improve the flexibility and nonlinear modeling capabilities of the model.

[0005] However, most traditional graph neural network-based collaborative filtering recommendation algorithms rely on the integrity of the user-item interaction graph structure and are easily affected by sparse data and noise.

[0006] In recent years, self-supervised learning, especially graph contrastive learning, has received extensive attention. Its core idea is to maximize the similarity of the same node representation in different graphs and minimize the similarity of different node representations by generating different graphs through graph augmentation. This method has achieved remarkable results in graph representation learning, which can improve the model's robustness and noise resistance while enhancing its adaptability to sparse graph data. The graph generator plays a key role in generating accurate contrastive samples as the core of graph data augmentation.

[0007] Graph augmentation methods can be divided into node augmentation, edge augmentation, subgraph augmentation, and multi-modal augmentation according to their nature and purpose. Many past works have made significant progress in the application of graph contrastive learning in recommendation systems and the improvement of graph augmentation methods. To construct augmented graphs, SGL proposes to destroy the structural information of the user-item interaction graph by using random augmentation strategies such as node deletion and edge perturbation to generate graph positive node pairs. To improve graph contrastive learning in recommendation systems, XSimGCL provides a method to enhance embedding representation by random noise perturbation. To identify the semantic neighbors of nodes, HCCF (Hypergraph Contrastive Collaborative Filtering, a recommendation system model that combines hypergraph structure and contrastive learning) and NCL (Node Clustering, a recommendation system model that performs local-global contrastive learning through node clustering) are introduced to pursue consistent representation between structurally adjacent nodes and semantic neighbors. LightGCL uses a non-generative graph augmentation method, singular value decomposition, to generate augmented graphs.

[0008] Although these methods are effective, they still have some limitations:

[0009] 1. Graph augmentation based on random perturbation may lose important structural information, leading to misleading representation learning. Non-generative graph augmentation methods such as singular value decomposition may be disturbed by the presence of noisy user-item interaction graphs, resulting in a decline in the quality of augmented graphs.

[0010] 2. Traditional graph contrastive learning methods may have difficulty balancing the contrast of global and local collaborative relationships and may not fully model global collaborative relationships.

[0011] 3. GCN in the original user-item graph can only capture local structural information of nodes, lacking the capture of long-range dependencies, leading to limited representation of recommendations. SUMMARY

[0012] The purpose of the present application is to provide a graph contrastive recommendation method and system based on local and global collaborative relationships, which effectively captures local and global collaborative relationships and optimizes recommendation performance.

[0013] To achieve the above object, the basic scheme of the present application is: a graph contrast recommendation method based on local and global collaborative relationship, comprising the following steps:

[0014] Collecting a raw data set of user-item interaction, changing the directed edges in the raw graph of the raw data set into undirected edges to obtain an undirected interaction graph;

[0015] According to the adjacency matrix of the undirected interaction graph Calculating the PageRank value of the user node and the item node;

[0016] Based on the PageRank value of the user node and the item node, an enhanced global undirected interaction graph is obtained;

[0017] Performing message propagation on the undirected interaction graph to obtain the local collaborative relationship of the user node and the item node, and performing message propagation on the enhanced global undirected interaction graph to obtain the global collaborative relationship of the user node and the item node;

[0018] Based on the local collaborative relationship and the global collaborative relationship of the user node and the item node, a target function is calculated for recommendation.

[0019] The working principle and beneficial effects of the basic scheme are that the recommendation model based on graph contrast learning effectively combines local collaborative relationship and global collaborative relationship, and by changing the directed edges of the original user-item interaction graph into undirected edges and lightweight graph convolution for the undirected interaction graph, the modeling of local collaborative relationship is realized.

[0020] Through the user-item undirected interaction graph, the model can understand the evaluation of the user on the item and the influence of the item on the user. Through lightweight graph convolution, the model can focus on the local collaborative relationship between the node and its direct neighbor, thereby helping the model to capture the local interaction relationship of the user and the item.

[0021] As for the modeling of global collaborative relationship, it is mainly realized through PageRank-based global collaborative relationship graph enhancement and lightweight graph convolution for the enhanced graph. The PageRank algorithm is applied in the graph enhancement module, and the PageRank value of the node is used to redefine the edge weight. On the one hand, the influence of low importance nodes and edges can be weakened, and important high PageRank areas can be focused, thereby improving the robustness of the model to graph noise and disturbance and the tolerance to structural disturbance. On the other hand, more attention can be paid to the "important" edges connected by core nodes from a global perspective, better capturing global structural differences and supporting in-depth analysis of local key points and edges.

[0022] Since PageRank re-evaluates the user-item interaction relationship from a global perspective and adds weight and global structure information, lightweight graph convolution can carry more global collaborative information during information aggregation, and thus learn the potential global collaborative relationship between nodes.

[0023] The graph enhancement method modeling global collaborative relationship can reconstruct the global collaborative enhancement view of principal component reinforcement and noise filtering, which solves the data sparsity problem while fully modeling the global collaborative relationship. The self-supervised collaborative filtering recommendation effectively captures the local collaborative relationship and global collaborative relationship, and achieves excellent performance on the widely used Gowalla public dataset in the recommendation system.

[0024] Further, the method for changing the directed edges of the original graph in the original dataset to undirected edges to obtain the undirected interaction graph is:

[0025] Change the directed edges of the original graph to undirected edges, use the mutual dependence relationship between users and items to alleviate the sparsity problem, and construct the undirected interaction graph by matrix splicing Obtain the adjacency matrix

[0026]

[0027] Wherein, A represents the adjacency matrix of the original user-item interaction graph, A T represents the transpose of the adjacency matrix A; represents the adjacency matrix of the undirected interaction graph , |U| represents the number of user nodes, and |I| represents the number of item nodes.

[0028] Because the characteristics of users will affect their choice of items, while the characteristics of items will also affect the preferences of users. Therefore, by changing the directed edges to undirected edges, the mutual dependence relationship between users and items can be fully utilized, and the sparsity problem can be alleviated.

[0029] Further, the step of calculating the PageRank value of the user node and the item node of the original graph is:

[0030] According to the adjacency matrix , the PageRank value of the node is calculated, wherein the PageRank value of the user node represents the importance of the user in the user-item interaction network, and the PageRank value of the item node represents the importance or popularity of the item; the PageRank value of each item and user node is initialized to 1 / (|U|+|I|), and the PageRank value of the item and user node is calculated in an iterative updating manner until convergence:

[0031]

[0032] where PR(x) represents the current PageRank value of node x, PR(y) represents the current PageRank value of node y, y e In(x) represents that node y has an edge pointing to node x, d is a damping factor for controlling the probability of random jumping, In(x) represents the set of nodes pointing to node x, and Out(y) represents the out-degree of node y, i.e., the number of edges starting from node y.

[0033] Applying the PageRank algorithm to the graph enhancement module, the edge weight is redefined using the PageRank value of the node, which can reduce the influence of low importance nodes and edges, and focus on important high PageRank regions, thereby improving the robustness of the model to graph noise and disturbance and the tolerance to structural disturbance.

[0034] Further, based on the PageRank values of the user nodes and the item nodes, an enhanced global undirected interaction graph is obtained, and the specific steps are as follows:

[0035] The edge weight of the enhanced graph is reconstructed by the product of the PageRank values of two nodes, and the edges with a weight less than a preset threshold are filtered out to denoise the enhanced graph, thereby obtaining a global interaction graph i.e., the enhanced user-item adjacency matrix:

[0036]

[0037] where the threshold t is a hyperparameter, and its setting rule is to ensure that the number of edges of the enhanced graph increases by 30% to 50% compared with that before enhancement, and w(x, y) represents the edge weight connecting node x and node y in the reconstructed global interaction graph PR(x) represents the current PageRank value of node x, and PR(y) represents the current PageRank value of node y.

[0038] In order to effectively utilize the global network structure information, the edge weight of the enhanced graph is reconstructed by the product of the PageRank values of two nodes, and the edges with a weight less than a preset threshold are filtered out to denoise the enhanced graph, thereby obtaining a global interaction graph i.e., the enhanced user-item adjacency matrix.

[0039] Further, the specific steps of obtaining the local collaborative relationship of the user nodes and the item nodes are as follows:

[0040] The lightweight graph convolution operator in LightGCN is used to perform message propagation on the undirected interaction graph to obtain the local collaborative relationship of the user and the item, and the formula of the message propagation is as follows:

[0041]

[0042] wherein, denote the embedding representation of item and user nodes after the l-th layer convolution on the original graph, respectively, d is the dimension of the embedding representation; |U| denotes the number of user nodes, |I| denotes the number of item nodes; denote the adjacency matrix of the regularized undirected interaction graph denote the adjacency matrix of the regularized undirected interaction graph denote the edge weight between node x and node y in the adjacency matrix N x and N y denote the degree of node x and y, respectively;

[0043] sum the intermediate embedding of each layer of convolution to obtain the final embedding representation of the local relationship learning of user nodes and item nodes and

[0044]

[0045] wherein, L denotes the number of convolution layers.

[0046] In order to enable the graph encoder to effectively capture the local connection and information transmission between the nodes and their neighbor nodes, so as to obtain more rich local structure features.

[0047] Further, the steps of obtaining the global collaborative relationship of user nodes and item nodes are as follows:

[0048] use lightweight convolution to perform message propagation on the enhanced global interaction graph, wherein the global interaction graph The formula of the message propagation is as follows:

[0049]

[0050] wherein, and denote the embedding representation of user and item nodes after the l-th layer convolution on the global interaction graph, respectively; denote the adjacency matrix of the global interaction graph denote the concatenation of matrices;

[0051] sum the intermediate embedding of each layer of convolution to obtain the final embedding representation of the global collaborative relationship learning of user nodes and item nodes u and Z′ i :

[0052]

[0053]

[0054] ​Since PageRank re-evaluates the user-item interaction relationship from a global perspective and increases the weight and global structure information, lightweight graph convolution can carry more global collaborative information in the information aggregation process, and then learn the potential global collaborative relationship between nodes.

[0055] Further, the objective function is:

[0056] The joint loss function L after weighted summation of the contrast loss L cl , the recommendation loss L rec and the regularization loss L reg is used as the optimization objective of the model:

[0057] L=λ1L cl +λ2L rec +λ3.L reg

[0058] Wherein, λ1, λ2 and λ3 represent the weights of the contrast loss, the recommendation loss and the regularization loss, respectively;

[0059] Wherein, the InfoNCE loss is used as the objective function of the contrast learning, and the contrast losses of the user nodes and the item nodes are calculated respectively and their sum is used as the total contrast loss L cl :

[0060]

[0061] Wherein, B represents a set of node samples on the original graph G, u and u' are users in the original graph G, i and i' are items in the original graph G, and τ is a temperature coefficient representing the smoothness of the similarity distribution; is the contrast loss of the user node, is the contrast loss of the item node; Z′ u and Z′ i represent the final embedding of the global collaborative relationship learning of the user nodes and the item nodes; and represent the transpose of the final embedding matrix of the local collaborative relationship learning of the user nodes and the item nodes;

[0062] The BPR loss L rec is used as the recommendation loss:

[0063]

[0064] Wherein, σ is the sigmoid function, i is the item interacting with the user u in the user-item interaction graph G, i' is the randomly sampled item; Z i is the final embedding of the local collaborative relationship learning of the item nodes, and Z i′Final embedding of item node global collaborative relationship learning;

[0065] L2 regularization is introduced, the complexity of the model is controlled by penalizing the size of the model parameters, as a regularization loss L reg :

[0066]

[0067] Wherein, L reg , theta represents all the learnable weight parameters in the model.

[0068] In order to comprehensively improve the performance of the model, the target function is optimized from multiple aspects, including global and local contrast learning, recommendation performance evaluation and parameter regularization strategies.

[0069] The application also provides a graph contrast recommendation system based on local and global collaborative relationships, comprising a data acquisition module and a processing module, the data acquisition module is used to acquire the original data set of user item interaction, the output end of the data acquisition module is connected with the input end of the processing module;

[0070] The processing module executes the method of the application to perform graph contrast recommendation.

[0071] The system effectively captures local collaborative relationships and global collaborative relationships by using the data acquisition module and the processing module, and achieves excellent recommendation performance. BRIEF DESCRIPTION OF DRAWINGS

[0072] Figure 1 It is the flowchart of the graph contrast recommendation method based on local and global collaborative relationships of the application. DETAILED DESCRIPTION

[0073] The embodiments of the application will be described in detail below, examples of which are shown in the drawings, wherein the same or similar reference signs represent the same or similar elements or elements with the same or similar functions throughout. The embodiments described below by referring to the drawings are exemplary, only for explaining the application, and cannot be understood as limiting the application.

[0074] In the description of the application, it should be understood that the terms "longitudinal", "transverse", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, only for the convenience of describing the application and simplifying the description, and do not indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, therefore cannot be understood as limiting the application.

[0075] In the description of the present application, unless otherwise specified and limited, it is necessary to explain that the terms "mounting", "connection", "connection" should be understood broadly, for example, it can be mechanical connection or electrical connection, it can be the communication between the two elements, it can be direct connection or indirect connection through intermediate medium, and the specific meaning of the above terms can be understood by the person skilled in the art according to the specific circumstances.

[0076] The application discloses a Local and Global Collaborative Relation based Graph Contrastive Learning (LGCR-GCL) method, which effectively combines local collaborative relationship and global collaborative relationship based on a recommendation model of graph contrastive learning.

[0077] Because in the traditional directed interaction graph, only the interaction from the user to the item (such as score, click, etc.) is usually recorded, and the reverse relationship, that is, the influence of the item on the user, is ignored. In some scenarios, the attributes of the item may affect the user, thereby affecting the recommendation effect. Through the user-item undirected interaction graph, the model can understand the evaluation of the user on the item and the influence of the item on the user.

[0078] In addition, through the lightweight graph convolution, the model can focus on the local collaborative relationship between the node and its direct neighbor, thereby helping the model to capture the local interaction relationship of the user and the item.

[0079] And for the modeling of global collaborative relationship, it is mainly realized through the PageRank-based global collaborative relationship graph enhancement and the lightweight graph convolution for the enhanced graph.

[0080] The PageRank algorithm is originally used by Google to measure the relative importance of web pages, and the basic idea is to calculate the importance of each node through the link relationship between nodes. Applying the PageRank algorithm to the graph enhancement module, the edge weight is redefined by the PageRank value of the node, which can weaken the influence of low importance nodes and edges and focus on important high PageRank areas, thereby improving the robustness of the model to graph noise and disturbance and the tolerance to structural disturbance. On the other hand, it can pay more attention to the "important" edges connected by core nodes from a global perspective, better capture global structural differences and support in-depth analysis of local key points and edges.

[0081] In addition, since PageRank re-evaluates the user-item interaction relationship from a global perspective and increases the weight and global structure information, lightweight graph convolution can carry more global collaborative information in the information aggregation process, thereby learning the potential global collaborative relationship between nodes.

[0082] The method of the application proposes a graph enhancement method for modeling global collaborative relationship, which can reconstruct a global collaborative enhancement view with principal component reinforcement and noise filtering, solve the data sparsity problem, and fully model the global collaborative relationship. A self-supervised collaborative filtering recommendation method suitable for the graph enhancement method is designed, which effectively captures local collaborative relationship and global collaborative relationship. The recommendation method achieves excellent performance on the widely used Gowalla public data set in the recommendation system.

[0083] As shown in Figure 1 The graph-based recommendation method based on local and global collaborative relationship includes the following steps:

[0084] Collect the original data set of user-item interaction, change the directed edges in the original graph (i.e. user-item interaction graph) of the original data set to undirected edges, and obtain an undirected interaction graph;

[0085] According to the adjacency matrix of the undirected interaction graph Calculate the PageRank value of the user node and the item node;

[0086] Based on the PageRank value of the user node and the item node, an enhanced global undirected interaction graph is obtained;

[0087] Message propagation is performed on the undirected interaction graph to obtain the local collaborative relationship of the user node and the item node, and message propagation is performed on the enhanced global undirected interaction graph to obtain the global collaborative relationship of the user node and the item node;

[0088] Based on the local collaborative relationship and the global collaborative relationship of the user node and the item node, a target function is calculated for recommendation.

[0089] In a preferred scheme of the application, the method for changing the directed edges of the original graph in the original data set to undirected edges to obtain the undirected interaction graph is:

[0090] Because the characteristics of users will affect their choice of items, and the characteristics of items will also affect the preferences of users. Change the directed edges of the original graph to undirected edges, use the mutual dependence relationship between users and items to alleviate the sparsity problem, and construct the undirected interaction graph by matrix splicing Obtain the adjacency matrix

[0091]

[0092] wherein A represents an adjacency matrix of the original user-item interaction graph, A T denotes the transpose of the adjacency matrix A; denotes an adjacency matrix of the undirected interaction graph , |U| represents the number of user nodes, and |I| represents the number of item nodes.

[0093] In a preferred scheme of the present application, the step of calculating the PageRank values of the user nodes and the item nodes of the original graph is as follows:

[0094] According to the adjacency matrix , the PageRank values of the nodes are calculated, wherein the PageRank value of a user node represents the importance of the user in the user-item interaction network, and the PageRank value of an item node represents the importance or popularity of the item; the PageRank values of each item and user node are initialized as 1 / (|U|+|I|), and the PageRank values of the item and user nodes are calculated in an iterative updating manner until convergence:

[0095]

[0096] wherein PR(x) represents the current PageRank value of node x, PR(y) represents the current PageRank value of node y, y∈In(x) represents that node y has an edge pointing to node x; d is a damping factor for controlling the probability of random jumping, In(x) represents the set of nodes pointing to node x, and Out(y) represents the out-degree of node y, i.e., the number of edges starting from node y.

[0097] In a preferred scheme of the present application, based on the PageRank values of the user nodes and the item nodes, an enhanced global undirected interaction graph is obtained, and the specific steps are as follows:

[0098] In order to effectively utilize the global network structure information, the edge weight of the enhanced graph is reconstructed by the product of the PageRank values of two nodes, and the edges with a weight less than a preset threshold are filtered out to denoise the enhanced graph, and a global interaction graph , i.e., an enhanced user-item adjacency matrix, is obtained:

[0099]

[0100] wherein the threshold t is a hyperparameter, and the setting rule is to ensure that the number of edges of the enhanced graph increases by 30% to 50% compared with that before enhancement, and w(x, y) represents the edge weight of the reconstructed global interaction graph Edge weight between node x and node y connected in the original graph, PR(x) represents the current PageRank value of node x, and PR(y) represents the current PageRank value of node y.

[0101] In a preferred scheme of the present application, the specific steps of obtaining the local collaborative relationship of the user node and the item node are as follows:

[0102] In order to enable the graph encoder to effectively capture the local connection and information transmission between the node and its neighbor node, so as to obtain more rich local structure features. The lightweight graph convolution operator in LightGCN is used to perform message propagation on the undirected interaction graph , to obtain the local collaborative relationship of the user and the item, and the formula of the message propagation is as follows:

[0103]

[0104]

[0105] Wherein, respectively represent the embedding representation of the item and the user node after the lth layer convolution on the original graph, d is the dimension of the embedding representation, |U| represents the number of user nodes, and |I| represents the number of item nodes. The adjacency matrix of the regularized undirected interaction graph , is represented as The edge weight between node x and node y connected on the adjacency matrix , is represented as N x and N y respectively represent the degrees of nodes x and y.

[0106] The intermediate embedding of each layer of convolution is summed to obtain the final embedding representation of the local relationship learning of the user node and the item node and

[0107]

[0108] Wherein, L represents the number of convolution layers.

[0109] In a preferred scheme of the present application, the steps of obtaining the global collaborative relationship of the user node and the item node are as follows:

[0110] The lightweight convolution is used to perform message propagation on the enhanced global interaction graph, and the global interaction graph The formula of the message propagation on the global interaction graph is as follows:

[0111]

[0112] Wherein, and respectively represent the embedding representation of the user and item nodes after the l-th layer convolution on the global interaction graph; represent the adjacency matrix of the global interaction graph , || represents the concatenation of matrices;

[0113] sum the intermediate embedding of each layer of convolution to obtain the final embedding representation Z' of the user node and item node global collaborative relationship learning u and Z' i :

[0114]

[0115] In a preferred scheme of the present application, in order to comprehensively improve the performance of the model, the objective function is optimized from multiple aspects, including global and local contrastive learning, recommendation performance evaluation and parameter regularization strategies. The objective function is:

[0116] The joint loss function L is weighted and summed after using the contrastive loss L cl , the recommendation loss L rec and the regularization loss L reg :

[0117] L = λ1L cl + λ2L rec + λ3.L reg

[0118] Wherein, λ1, λ2 and λ3 represent the weights of the contrastive loss, the recommendation loss and the regularization loss, respectively;

[0119] Wherein, in order to capture the shared semantic features of the global interaction graph and the local interaction graph, the InfoNCE loss is used as the objective function of the contrastive learning, the contrastive loss of the user node and the item node is calculated respectively, and their sum is taken as the total contrastive loss L cl :

[0120]

[0121] Wherein, B represents a set of node samples on the original graph G, u and u' are users in the original graph G, i and i' are items in the original graph G, and τ is a temperature coefficient representing the smoothness of the similarity distribution for controlling the smoothness; is the contrastive loss of the user node, is the contrastive loss of the item node; Z' u and Z' i represent the final embedding of the user node and the item node global collaborative relationship learning; and represent the transpose of the final embedding matrix of the user node and the item node local collaborative relationship learning;

[0122] To optimize the user's ranking preference for the item, capture the user's interest and preference, use the BPR loss L rec As the recommendation loss:

[0123]

[0124] Where, sigma is a sigmoid function, i is an item interacting with the user u in the user-item interaction graph G, i' is a randomly sampled item; Z i is the final embedding of the item node local collaborative relationship learning, Z i′ is the final embedding of the item node global collaborative relationship learning.

[0125] In order to prevent overfitting and improve the generalization ability of the model, L2 regularization is introduced, the complexity of the model is controlled by punishing the size of the parameters of the model, as a regularization loss L reg :

[0126]

[0127] Where, L reg , theta represents all learnable weight parameters in the model.

[0128] The application also provides a graph contrast recommendation system based on local and global collaborative relationships, comprising a data acquisition module and a processing module, the data acquisition module is used to acquire an original data set of user-item interaction, and an output end of the data acquisition module is electrically connected with an input end of the processing module.

[0129] The processing module executes the method described in the application to perform graph contrast recommendation.

[0130] In the description of the present specification, the description of the terms "one embodiment", "some embodiments", "example", "specific example" or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the application. In the present specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0131] Although the embodiments of the application have been shown and described, those skilled in the art can understand that various changes, modifications, replacements and variations can be made to the embodiments without departing from the principles and purposes of the application, and the scope of the application is defined by the claims and their equivalents.

Claims

1. A graph contrast recommendation method based on local and global collaborative relationships, characterized in that, The method comprises the following steps: Collecting an original data set of user-item interaction, changing the directed edges in the original graph of the original data set into undirected edges to obtain an undirected interaction graph; According to the adjacency matrix of the undirected interaction graph Calculate PageRank values of the user nodes and the item nodes; Based on the PageRank values of the user nodes and the item nodes, an enhanced global undirected interaction graph is obtained; Message propagation is performed on the undirected interaction graph to obtain the local collaborative relationship of the user nodes and the item nodes, and message propagation is performed on the enhanced global undirected interaction graph to obtain the global collaborative relationship of the user nodes and the item nodes; Based on the local collaborative relationship and the global collaborative relationship of the user nodes and the item nodes, a target function is calculated to perform recommendation; The specific steps of obtaining the local collaborative relationship of the user nodes and the item nodes are as follows: Using lightweight graph convolution operators in light gcn on undirected interaction graphs The local collaborative relationship of the user and the item is obtained by message propagation on the upper graph, and a formula of the message propagation is as follows: wherein, respectively represent the embedding representation of item and user nodes after the l-th layer convolution on the original graph, d is the dimension of the embedding representation; |U| represents the number of user nodes, and |I| represents the number of item nodes; represent the adjacency matrix of the regularized undirected interaction graph represent the edge weight between the node x and the node y connected on the adjacency matrix N x and N y respectively represent the degrees of the nodes x and y;​ summing the intermediate embeddings of each layer of convolution to obtain the final embedding representation of the user node and the item node local relation learning and Wherein, L represents the number of convolution layer; The steps of obtaining the global collaborative relationship of the user nodes and the item nodes are as follows: Message propagation is performed on the enhanced global interaction graph using light-weight convolution, global interaction graph The formula for the message propagation is as follows: wherein, and respectively represent the embedding representation of the user and item nodes after the convolution of the l-th layer on the global interaction graph; denotes the adjacency matrix of the global interaction graph , and || denotes the concatenation of matrices. summing the intermediate embeddings of each layer of convolution to obtain the final embedding representation Z' of the user node and the item node global collaborative relationship learning u and Z' i : The target function is: The joint loss function L after weighted summation of the contrast loss L cl , the recommendation loss L rec and the regularization loss L reg is used as the optimization objective of the model: L = λ1L cl + λ2L rec + λ3L reg Wherein, λ1, λ2 and λ3 represent the weights of the contrast loss, the recommendation loss and the regularization loss respectively. Wherein, using InfoNCE loss as the objective function of contrast learning, the contrast loss of the user node and the item node is calculated respectively, and their sum is taken as the total contrast loss L cl : Wherein, B represents a set of node samples on the original graph G, u and u' are users in the original graph G, i and i' are items in the original graph G, and τ is a temperature coefficient representing the smoothness of the similarity distribution for control; The contrast loss for the user node is The contrast loss for the item node is Z'; u and Z' i The final embedding of the global collaborative relationship learning of the user node and the item node is represented by and The final embedding matrix of the local collaborative relationship learning of the user node and the item node is represented by the transpose of Using BPR loss L rec As recommendation loss: where σ is a sigmoid function, i is an item that interacts with user u in the user-item interaction graph G, i' is a randomly sampled item; Z i is the final embedding of the item node local collaborative relationship learning, Z i is the final embedding of the item node global collaborative relationship learning; The L2 regularization is introduced to control the complexity of the model by penalizing the size of the model parameters as a regularization loss L reg : where L reg denotes all learnable weight parameters in the model. 2.The method of claim 1, wherein, The method for changing the directed edges of the original graph in the original data set into undirected edges to obtain the undirected interaction graph is: The directed edges of the original graph are changed to undirected edges, the interdependence relationship between users and items is utilized to alleviate the sparsity problem, and an undirected interaction graph is constructed in a matrix splicing manner An adjacency matrix is obtained where A denotes the adjacency matrix of the original user-item interaction graph, A T denotes the transpose of the adjacency matrix A; denotes the adjacency matrix of the undirected interaction graph , |U| denotes the number of user nodes, and |I| denotes the number of item nodes. 3.The method of claim 1, wherein, The steps of calculating the PageRank values of the user nodes and the item nodes of the original graph are: According to the adjacency matrix calculating PageRank values of the nodes, wherein the PageRank value of a user node represents the importance of the user in the user-item interaction network, and the PageRank value of an item node represents the importance or popularity of the item; initializing the PageRank value of each item and user node as 1 / (|U|+|I|), and calculating the PageRank values of the item and user nodes in an iterative updating manner until convergence: Wherein, PR(x) represents the current PageRank value of node x, PR(y) represents the current PageRank value of node y, y In(x) represents that node y has an edge pointing to node x; d is a damping factor for controlling the probability of random jump, In(x) represents the node set pointing to node x, and Out(y) represents the out-degree of node y, that is, the number of edges starting from node y. 4.The method of claim 1, wherein, Based on the PageRank values of the user nodes and the item nodes, the enhanced global undirected interaction graph is obtained, and the specific steps are as follows: The edge weight of the enhanced graph is reconstructed by the product of the PageRank values of two nodes, and the edges with weights less than a preset threshold are filtered out to denoise the enhanced graph and obtain a global interaction graph That is, the enhanced user-item adjacency matrix: wherein the threshold t is a hyper-parameter, and its setting rule is to ensure that the number of edges of the enhanced graph is increased by 30% to 50% before enhancement, and w(x, y) represents the global interaction graph reconstructed the edge weight of the connection between the node x and the node y; PR(x) represents the current PageRank value of the node x, and PR(y) represents the current PageRank value of the node y.

5. A graph contrast recommendation system based on local and global co-relations, characterized in that, The data acquisition module is used for collecting an original data set of user-item interaction, and the output end of the data acquisition module is connected with the input end of the processing module; The processing module performs the method in any one of claims 1-4 to perform graph contrast recommendation.

Citation Information

Patent Citations

  • A Recommendation System with Improved Collaborative Filtering Recommendation Algorithm

    CN111582992B

  • A collaborative filtering recommendation method integrating graph neural network and attention mechanism

    CN112084407B

  • A collaborative filtering recommendation algorithm based on improved user similarity

    CN113297496B

  • Social recommendation method and system based on graph neural network

    CN117909595A

  • Continuous time sequence interaction diagram representation method

    CN115510277A