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

By changing the directed edges of the user-item interaction graph to undirected edges, and reconstructing the global graph using PageRank values, combining lightweight graph convolution to capture local and global synergistic relationships, the traditional recommendation algorithm is solved inadequate performance in sparse data and noise environments, and better recommendation performance and robustness are achieved.

CN119807532AActive Publication Date: 2025-04-11CHONGQING UNIV
View PDF 9 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The traditional collaborative filtering recommendation algorithm based on graph neural networks relies on the integrity of the user-item interaction graph, is susceptible to sparse data and noise, is difficult to balance the comparison of global and local synergistic relationships, and lacks the capture of remote dependencies.

Method used

By changing the directed edges of the original user-item interaction graph to undirected edges, calculating the PageRank values ​​of the user and item, reconstructing the global undirected interaction graph, and spreading messages on the local and global graphs, capturing local and global synergistic relationships, and optimizing recommended performance.

Benefits of technology

Effectively capture local and global synergies, improve the robustness of the model to graph noise and perturbation, and enhance the performance and generalization capabilities of the recommendation system, especially in the case of sparse data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119807532A_ABST
    Figure CN119807532A_ABST
Patent Text Reader

Abstract

The invention discloses a graph comparison recommendation method and system based on a local and global cooperative relationship, and the method comprises the following steps: collecting an original data set of user article interaction, changing a directed edge in an original graph of the original data set into an undirected edge, obtaining an undirected interaction graph, calculating PageRank values of user nodes and article nodes, and carrying out the calculation of the PageRank values of the user nodes and the article nodes. Obtaining an enhanced global undirected interaction graph; performing message propagation on the undirected interaction graph to obtain a local cooperative relationship between the user nodes and the article nodes, and performing message propagation on the enhanced global undirected interaction graph to obtain a global cooperative relationship between the user nodes and the article nodes; and based on the local cooperative relationship and the global cooperative relationship between the user nodes and the article nodes, calculating a target function for recommendation. By adopting the technical scheme, the global collaborative enhancement view of principal component enhancement and noise filtering is reconstructed, the local collaborative relationship and the 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 present invention 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 Art

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

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

[0004] In order to solve these problems, researchers began to use graph structures to represent users, items and their interactions. As a powerful graph data processing tool, graph neural networks can effectively capture high-order relationships between nodes and are widely used in recommendation systems. LightGCN designed a lightweight graph convolutional network for recommendation systems, which significantly improved the recommendation performance. Patent CN202311754335 proposed a social recommendation method and system based on graph neural networks. By using multi-layer perceptrons and attention mechanisms to effectively obtain user latent factors and project latent factors, the accuracy and generalization of social recommendations can be effectively enhanced. Patent CN202010934802 proposed a collaborative filtering recommendation method that integrates graph neural networks and attention mechanisms to improve the flexibility and nonlinear modeling capabilities of the model.

[0005] However, most traditional collaborative filtering recommendation algorithms based on graph neural networks 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 widespread attention. Its core idea is to generate different graphs through graph enhancement, maximizing the similarity of the representation of the same node in different graphs, while minimizing the similarity of the representation of different nodes. This method has achieved remarkable results in graph representation learning. It can enhance the adaptability to sparse graph data while improving the model's robustness and noise resistance. Among them, the graph generator, as the core of graph data enhancement, plays a key role by generating accurate contrast samples.

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

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

[0009] 1. Random perturbation-based graph enhancement may lose important structural information, thus misleading representation learning. Non-generative graph enhancement methods, such as singular value decomposition, may be disturbed by user-item interaction graphs with a lot of noise, resulting in a decrease in the quality of the enhanced graph;

[0010] 2. Traditional graph contrast learning methods may have difficulty balancing the contrast between global and local synergy relationships and insufficiently model global synergy relationships;

[0011] 3. The GCN in the original user-item graph can only capture the local structural information of the nodes and lacks the capture of long-range dependencies, resulting in a limited representation of recommendations. Summary of the invention

[0012] The purpose of the present invention is to provide a graph comparison recommendation method and system based on local and global collaborative relationships, which can effectively capture local collaborative relationships and global collaborative relationships and optimize recommendation performance.

[0013] In order to achieve the above object, the basic scheme of the present invention is: a graph comparison recommendation method based on local and global collaborative relationships, comprising the following steps:

[0014] Collect the original data set of user-item interactions, change the directed edges in the original graph of the original data set to undirected edges, and obtain an undirected interaction graph;

[0015] According to the adjacency matrix of the undirected interaction graph Calculate the PageRank values ​​of user nodes and item nodes;

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

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

[0018] Based on the local and global collaborative relationships between user nodes and item nodes, the objective function is calculated for recommendation.

[0019] The working principle and beneficial effects of this basic solution are as follows: This technical solution effectively combines local collaborative relationships with global collaborative relationships based on the recommendation model of graph contrastive learning, and realizes modeling of local collaborative relationships by changing the directed edges of the original user-item interaction graph into undirected edges and lightweight graph convolution for the undirected interaction graph.

[0020] The user-item undirected interaction graph can help the model understand the user's evaluation of the item and the impact of the item on the user. Lightweight graph convolution allows the model to focus on the local collaborative relationship between the node and its direct neighbors, thereby helping the model capture the local interaction relationship between users and items.

[0021] The modeling of global collaborative relationships is mainly achieved through PageRank-based global collaborative relationship graph enhancement and lightweight graph convolution for the enhanced graph. Applying the PageRank algorithm to the graph enhancement module and redefining the edge weights with the node's PageRank value can, on the one hand, weaken the influence of low-importance nodes and edges, and focus on important high PageRank areas, thereby improving the model's robustness to graph noise and disturbances and tolerance to structural disturbances. On the other hand, it can pay more attention to those "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.

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

[0023] The graph enhancement method for modeling global collaborative relationships can reconstruct a global collaborative enhancement view of principal component enhancement and noise filtering, which can fully model the global collaborative relationship while solving the data sparsity problem. Self-supervised collaborative filtering recommendation effectively captures local and global collaborative relationships. This recommendation method has achieved excellent performance on the Gowalla public dataset widely used in recommendation systems.

[0024] Furthermore, the method of changing the directed edges of the original graph in the original data set into undirected edges and obtaining an undirected interaction graph is as follows:

[0025] The directed edges of the original graph are changed to undirected edges, the interdependence between users and items is utilized to alleviate the sparsity problem, and an undirected interaction graph is constructed by matrix splicing. Get the adjacency matrix

[0026]

[0027] Among them, A represents the adjacency matrix of the original user-item interaction graph, A T represents the transpose of the adjacency matrix A; Represents an undirected interaction graph The adjacency matrix of , |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 in turn affect users' preferences, by changing directed edges to undirected edges, we can fully utilize the mutual dependence between users and items and alleviate the sparsity problem.

[0029] Furthermore, the steps to calculate the PageRank values ​​of the user nodes and item nodes of the original graph are:

[0030] According to the adjacency matrix Calculate the PageRank value of the node, where 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; initialize the PageRank value of each item and user node to 1 / (|U|+|I|), and calculate the PageRank value of the item and user node in an iterative update manner until convergence:

[0031]

[0032] Among them, 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 the damping factor, which is used to control the probability of random jumps, In(x) represents the set of nodes pointing to node x, and Out(y) represents the out-degree of node y, that is, the number of edges starting from node y.

[0033] The PageRank algorithm is applied to the graph enhancement module, and the edge weights are redefined using the PageRank values ​​of the nodes. On the one hand, the influence of low-importance nodes and edges can be weakened, and important high-PageRank areas can be focused on, thereby improving the model's robustness to graph noise and disturbances, as well as its tolerance to structural disturbances.

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

[0035] The edge weights of the enhanced graph are reconstructed by multiplying the PageRank values ​​of two nodes, and the edges with weights less than the preset threshold are filtered out to denoise the enhanced graph and obtain the global interaction graph. That is, the enhanced user-item adjacency matrix:

[0036]

[0037] The threshold t is a hyperparameter, and its setting rule is to ensure that the number of edges in the enhanced graph increases by 30% to 50% compared with the original value. w(x, y) represents the global interaction graph in the reconstruction. The edge weight connecting node x and node y; 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 weights of the enhanced graph are reconstructed by multiplying the PageRank values ​​of two nodes, and the edges with weights less than the preset threshold are filtered out to denoise the enhanced graph, thereby obtaining the global interaction graph. That is the enhanced user-item adjacency matrix.

[0039] Furthermore, the specific steps for obtaining the local collaborative relationship between the user node and the item node are as follows:

[0040] Use lightweight graph convolution operators in LightGCN on undirected interaction graphs Message propagation is performed on the network to obtain the local collaborative relationship of user items. The formula for message propagation is as follows:

[0041]

[0042] in, They represent the embedded representations of the item and user nodes after the l-th convolution on the original graph, respectively. d is the dimension of the embedded representation. |U| represents the number of user nodes, and |I| represents the number of item nodes. represents the regularized undirected interaction graph The adjacency matrix of Represents the adjacency matrix The edge weight of the connection between node x and node y, N x and N y Represent the degrees of nodes x and y respectively;

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

[0044]

[0045] Among them, L represents the number of convolutional layers.

[0046] In order to enable the graph encoder to effectively capture the local connections and information transfer between a node and its neighboring nodes, thereby obtaining richer local structural features.

[0047] Furthermore, the steps to obtain the global collaborative relationship between user nodes and item nodes are as follows:

[0048] Message propagation using lightweight convolution on the enhanced global interaction graph, global interaction graph The formula for message propagation is as follows:

[0049]

[0050] in, and They represent the embedding representations of user and item nodes after the l-th convolution layer on the global interaction graph respectively; Represents the global interaction graph The adjacency matrix of , || represents the concatenation of matrices;

[0051] Sum the intermediate embeddings of each convolution layer to obtain the final embedding representation Z′ for learning the global collaborative relationship between 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 adds weights and global structural information, lightweight graph convolution can carry more global collaborative information during the information aggregation process, and thus learn the potential global collaborative relationship between nodes.

[0055] Furthermore, the objective function is:

[0056] Using contrastive loss L cl , recommended loss L rec and the regularization loss L reg The weighted summed joint loss function L is used as the optimization target of the model:

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

[0058] Among them, λ 1 , 2 and λ 3 Represent the weights of contrast loss, recommendation loss and regularization loss respectively;

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

[0060]

[0061] Where 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 τ represents the temperature coefficient used to control 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 Represents the final embedding of the global collaborative relationship learning between user nodes and item nodes; and Represents the transpose of the final embedding matrix for learning local collaborative relationships between user nodes and item nodes;

[0062] Using BPR loss L rec As the recommended loss:

[0063]

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

[0065] L2 regularization is introduced to control the complexity of the model by penalizing the parameter size of the model as the regularization loss L reg :

[0066]

[0067] Among them, L reg , θ represents all learnable weight parameters in the model.

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

[0069] The present invention also provides a graph comparison recommendation system based on local and global collaborative relationships, comprising a data acquisition module and a processing module, wherein the data acquisition module is used to collect an original data set of user-item interactions, and an output end of the data acquisition module is connected to an input end of the processing module;

[0070] The processing module executes the method of the present invention to perform image comparison and recommendation.

[0071] This system uses data acquisition modules and processing modules to effectively capture local and global collaborative relationships and achieve excellent recommendation performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] Figure 1 It is a flow chart of the graph comparison recommendation method based on local and global collaborative relationships of the present invention. DETAILED DESCRIPTION

[0073] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.

[0074] In the description of the present invention, it is necessary to understand that the terms "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.

[0075] In the description of the present invention, unless otherwise specified and limited, it should be noted that the terms "installed", "connected" and "connected" should be understood in a broad sense. For example, it can be a mechanical connection or an electrical connection, or it can be the internal connection between two components. It can be a direct connection or an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to the specific circumstances.

[0076] The present invention discloses a local and global collaborative relation based graph contrastive learning (LGCR-GCL) recommendation method. The recommendation model based on graph contrastive learning effectively combines local collaborative relations with global collaborative relations, wherein the modeling of local collaborative relations is achieved by changing the directed edges of the original user-item interaction graph into undirected edges and performing lightweight graph convolution on the undirected interaction graph.

[0077] Because in traditional directed interaction graphs, usually only the interaction from user to item (such as rating, click, etc.) is recorded, while the reverse relationship - the impact of items on users - is ignored. In some scenarios, the attributes of items may have an impact on users, thus affecting the recommendation effect. The user-item undirected interaction graph can help the model understand the user's evaluation of items and the impact of items on users.

[0078] In addition, lightweight graph convolution enables the model to focus on the local collaborative relationship between a node and its direct neighbors, thereby helping the model capture the local interaction relationship between users and items.

[0079] The modeling of global collaborative relationships is mainly achieved through PageRank-based global collaborative relationship graph enhancement and lightweight graph convolution for the enhanced graph.

[0080] The PageRank algorithm was originally used by Google to measure the relative importance of web pages. Its 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 and redefining the edge weights with the node's PageRank value can, on the one hand, weaken the influence of low-importance nodes and edges, and focus on important high PageRank areas, thereby improving the model's robustness to graph noise and disturbances and tolerance to structural disturbances. On the other hand, it can pay more attention to those "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 adds weights and global structural information, lightweight graph convolution can carry more global collaborative information during the information aggregation process, and thus learn the potential global collaborative relationship between nodes.

[0082] The method of the present invention proposes a graph enhancement method for modeling global collaborative relationships. The method can reconstruct a global collaborative enhancement view of principal component enhancement and noise filtering, which can fully model the global collaborative relationship while solving the data sparsity problem. A self-supervised collaborative filtering recommendation method adapted to the graph enhancement method is designed, which effectively captures local collaborative relationships and global collaborative relationships. The recommendation method has achieved excellent performance on the Gowalla public dataset widely used in recommendation systems.

[0083] like Figure 1 As shown in FIG. 1 , the graph comparison recommendation method based on local and global collaborative relationships includes the following steps:

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

[0085] According to the adjacency matrix of the undirected interaction graph Calculate the PageRank values ​​of user nodes and item nodes;

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

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

[0088] Based on the local and global collaborative relationships between user nodes and item nodes, the objective function is calculated for recommendation.

[0089] In a preferred embodiment of the present invention, a method for changing the directed edges of the original graph in the original data set into undirected edges to obtain an undirected interaction graph is:

[0090] Because the characteristics of users will affect their choice of items, the characteristics of items will in turn affect the user's preferences. The directed edges of the original graph are changed to undirected edges, and the mutual dependence between users and items is used to alleviate the sparsity problem. The undirected interaction graph is constructed by matrix splicing. Get the adjacency matrix

[0091]

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

[0093] In a preferred embodiment of the present invention, the steps of calculating the PageRank values ​​of the user nodes and item nodes of the original graph are:

[0094] According to the adjacency matrix Calculate the PageRank value of the node, where 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; initialize the PageRank value of each item and user node to 1 / (|U|+|I|), and calculate the PageRank value of the item and user node in an iterative update manner until convergence:

[0095]

[0096] Among them, 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 the damping factor, which is used to control the probability of random jumps, In(x) represents the set of nodes pointing to node x, and Out(y) represents the out-degree of node y, that is, the number of edges starting from node y.

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

[0098] In order to effectively utilize the global network structure information, the edge weights of the enhanced graph are reconstructed by multiplying the PageRank values ​​of two nodes, and the edges with weights less than the preset threshold are filtered out to denoise the enhanced graph and obtain the global interaction graph. That is, the enhanced user-item adjacency matrix:

[0099]

[0100] The threshold t is a hyperparameter, and its setting rule is to ensure that the number of edges in the enhanced graph increases by 30% to 50% compared with the original value. w(x, y) represents the global interaction graph in the reconstruction. The edge weight connecting node x and node y; 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 embodiment of the present invention, the specific steps of obtaining the local collaborative relationship between the user node and the item node are as follows:

[0102] In order to enable the graph encoder to effectively capture the local connections and information transfer between nodes and their neighboring nodes, and thus obtain richer local structural features, the lightweight graph convolution operator in LightGCN is used to construct an undirected interaction graph. Message propagation is performed on the network to obtain the local collaborative relationship of user items. The formula for message propagation is as follows:

[0103]

[0104]

[0105] in, They represent the embedded representations of the item and user nodes after the l-th convolution on the original graph, respectively. d is the dimension of the embedded representation. |U| represents the number of user nodes, and |I| represents the number of item nodes. represents the regularized undirected interaction graph The adjacency matrix of Represents the adjacency matrix The edge weight of the connection between node x and node y, N x and N y Represent the degrees of nodes x and y respectively;

[0106] Sum the intermediate embeddings of each convolution layer to obtain the final embedding representation of the local relationship learning between user nodes and item nodes and

[0107]

[0108] Among them, L represents the number of convolutional layers.

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

[0110] Message propagation using lightweight convolution on the enhanced global interaction graph, global interaction graph The formula for message propagation is as follows:

[0111]

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

[0113] Sum the intermediate embeddings of each convolution layer to obtain the final embedding representation Z′ for learning the global collaborative relationship between user nodes and item nodes u and Z′ i :

[0114]

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

[0116] Using contrastive loss L cl , recommended loss L rec and the regularization loss L reg The weighted summed joint loss function L is used as the optimization target of the model:

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

[0118] Among them, λ 1 , 2 and λ 3 Represent the weights of contrast loss, recommendation loss and regularization loss respectively;

[0119] In order to capture the shared semantic features of the global interaction graph and the local interaction graph, InfoNCE loss is used as the objective function of contrastive learning. The contrast losses of user nodes and item nodes are calculated separately and their sum is taken as the total contrast loss L cl :

[0120]

[0121] Where 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 τ represents the temperature coefficient used to control 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 Represents the final embedding of the global collaborative relationship learning between user nodes and item nodes; and Represents the transpose of the final embedding matrix for learning local collaborative relationships between user nodes and item nodes;

[0122] In order to optimize the user's preference for sorting items and capture the user's interests and preferences, the BPR loss L is used rec As the recommended loss:

[0123]

[0124] Where σ is the sigmoid function, i is the item interacted with user u in the user-item interaction graph G, and i′ is a randomly sampled item; Z i is the final embedding of the local collaborative relationship learning of item nodes, Z i′ Final embedding of global collaborative relationship learning of item nodes;

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

[0126]

[0127] Among them, L reg , θ represents all learnable weight parameters in the model.

[0128] The present invention also provides a graph comparison recommendation system based on local and global collaborative relationships, including a data acquisition module and a processing module. The data acquisition module is used to collect original data sets of user-item interactions, and the output end of the data acquisition module is electrically connected to the input end of the processing module.

[0129] The processing module executes the method of the present invention to perform image comparison and recommendation.

[0130] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", 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 present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0131] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.

Claims

1. A graph comparison recommendation method based on local and global collaborative relationships, characterized in that: The steps include: Collect the original data set of user-item interactions, change the directed edges in the original graph of the original data set to undirected edges, and obtain an undirected interaction graph; According to the adjacency matrix of the undirected interaction graph Calculate the PageRank values ​​of user nodes and item nodes; Based on the PageRank values ​​of user nodes and 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 between user nodes and item nodes, and message propagation is performed on the enhanced global undirected interaction graph to obtain the global collaborative relationship between user nodes and item nodes; Based on the local and global collaborative relationships between user nodes and item nodes, the objective function is calculated for recommendation.

2. The graph comparison recommendation method based on local and global collaborative relationships according to claim 1, characterized in that: The method of changing the directed edges of the original graph in the original data set into undirected edges and obtaining an undirected interaction graph is: The directed edges of the original graph are changed to undirected edges, the interdependence between users and items is utilized to alleviate the sparsity problem, and an undirected interaction graph is constructed by matrix splicing. Get the adjacency matrix Among them, A represents the adjacency matrix of the original user-item interaction graph, A T represents the transpose of the adjacency matrix A; Represents an undirected interaction graph The adjacency matrix of , |U| represents the number of user nodes, and |I| represents the number of item nodes.

3. The graph comparison recommendation method based on local and global collaborative relationships according to claim 1, characterized in that: The steps to calculate the PageRank values ​​of user nodes and item nodes in the original graph are: According to the adjacency matrix Calculate the PageRank value of the node, where 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; initialize the PageRank value of each item and user node to 1 / (|U|+|I|), and calculate the PageRank value of the item and user node in an iterative update manner until convergence: Among them, 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 the damping factor, which is used to control the probability of random jumps, In(x) represents the set of nodes 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 graph comparison recommendation method based on local and global collaborative relationships according to claim 1, characterized in that: Based on the PageRank values ​​of user nodes and item nodes, an enhanced global undirected interaction graph is obtained. The specific steps are: The edge weights of the enhanced graph are reconstructed by multiplying the PageRank values ​​of two nodes, and the edges with weights less than the preset threshold are filtered out to denoise the enhanced graph and obtain the global interaction graph. That is, the enhanced user-item adjacency matrix: The threshold t is a hyperparameter, and its setting rule is to ensure that the number of edges in the enhanced graph increases by 30% to 50% compared with the original value. w(x, y) represents the global interaction graph in the reconstruction. The edge weight connecting node x and node y; PR(x) represents the current PageRank value of node x, and PR(y) represents the current PageRank value of node y.

5. The graph comparison recommendation method based on local and global collaborative relationships according to claim 1, characterized in that: The specific steps to obtain the local collaborative relationship between user nodes and item nodes are as follows: Use lightweight graph convolution operators in LightGCN on undirected interaction graphs Message propagation is performed on the network to obtain the local collaborative relationship of user items. The formula for message propagation is as follows: in, They represent the embedded representations of the item and user nodes after the l-th convolution on the original graph, respectively. d is the dimension of the embedded representation. |U| represents the number of user nodes, and |I| represents the number of item nodes. represents the regularized undirected interaction graph The adjacency matrix of Represents the adjacency matrix The edge weight of the connection between node x and node y, N x and N y Represent the degrees of nodes x and y respectively; Sum the intermediate embeddings of each convolution layer to obtain the final embedding representation of the local relationship learning between user nodes and item nodes and Among them, L represents the number of convolutional layers.

6. The graph comparison recommendation method based on local and global collaborative relationships according to claim 1, characterized in that: The steps to obtain the global collaborative relationship between user nodes and item nodes are as follows: Message propagation using lightweight convolution on the enhanced global interaction graph, global interaction graph The formula for message propagation is as follows: in, and They represent the embedding representations of user and item nodes after the l-th convolution layer on the global interaction graph respectively; Represents the global interaction graph The adjacency matrix of , || represents the concatenation of matrices; Sum the intermediate embeddings of each convolution layer to obtain the final embedding representation Z′ for learning the global collaborative relationship between user nodes and item nodes u and Z′ i :

7. The graph comparison recommendation method based on local and global collaborative relationships according to claim 1, characterized in that: The objective function is: Using contrastive loss L cl , recommended loss L rec and the regularization loss L reg The weighted summed joint loss function L is used as the optimization target of the model: L=λ1L cl +λ2L rec +λ3.L reg Among them, λ1, λ2 and λ3 represent the weights of contrast loss, recommendation loss and regularization loss respectively; Among them, InfoNCE loss is used as the objective function of contrastive learning, and the contrast losses of user nodes and item nodes are calculated separately and their sum is taken as the total contrast loss L cl : Where 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 τ represents the temperature coefficient used to control 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 Represents the final embedding of the global collaborative relationship learning between user nodes and item nodes; and Represents the transpose of the final embedding matrix for learning local collaborative relationships between user nodes and item nodes; Using BPR loss L rec As the recommended loss: Where σ is the sigmoid function, i is the item interacted with user u in the user-item interaction graph G, and i′ is a randomly sampled item; Z i is the final embedding of the local collaborative relationship learning of item nodes, Z i′ Final embedding of global collaborative relationship learning of item nodes; L2 regularization is introduced to control the complexity of the model by penalizing the parameter size of the model as the regularization loss L reg : Among them, L reg , θ represents all learnable weight parameters in the model.

8. A graph comparison recommendation system based on local and global collaborative relationships, characterized in that: It includes a data acquisition module and a processing module, wherein the data acquisition module is used to collect the original data set of user-item interaction, and the output end of the data acquisition module is connected to the input end of the processing module; The processing module executes the method described in any one of claims 1-7 to perform image comparison 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