An intelligent auxiliary recommendation method and system based on graph coding

By constructing heterogeneous graphs and adopting self-supervised learning methods, the problem of feature loss in existing intelligent assisted interactive recommendations is solved, and efficient feature representation and recommendation accuracy is improved, which is suitable for a variety of downstream recommendation applications.

CN117150120BActive Publication Date: 2025-08-19709TH RESEARCH INSTITUTE CHINA STATE SHIPBUILDING CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310988788.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-07
Publication Date
2025-08-19
Estimated Expiration
2043-08-07

AI Technical Summary

Technical Problem

The existing intelligent assisted interactive recommendation method has feature loss in the feature encoding stage, resulting in low recommendation accuracy. When training the model with the supervised learning method, features that are inconsistent with the target will be reduced, affecting the performance of the downstream model.

Method used

The heterogeneous graph is constructed, and the heterogeneous graph coding model is trained using a self-supervised learning method. By constructing positive and negative sample pairs of sample users and item nodes, the nonlinear activation function in the relationship graph convolution network is removed, and a lightweight network design is adopted, and the triple-tuple loss function is used to optimize feature representations to achieve higher-order relationship learning.

Benefits of technology

Effectively reduce feature loss, improve recommendation accuracy and user satisfaction, reduce model complexity and training costs, and is suitable for a variety of downstream recommendation models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117150120B_ABST
    Figure CN117150120B_ABST
Patent Text Reader

Abstract

The present invention provides an intelligent auxiliary recommendation method and system based on graph coding, including: constructing a heterogeneous graph; the heterogeneous graph includes users, items, item attribute nodes and the relationships between nodes; inputting the heterogeneous graph into a heterogeneous graph coding model; learning heterogeneous graph node representation; based on the feature representation of user and item nodes, predicting the user's rating of each item and recommending items to the user; the heterogeneous graph coding model is obtained by self-supervised learning training based on positive and negative samples; the construction of positive and negative samples is based on the user and item interaction matrix. The intelligent auxiliary recommendation method based on graph coding of the present invention decouples coding from recommendation and adopts a lightweight network design to improve the cost-effectiveness of the model; at the same time, the coding method of self-supervised learning is adopted to reduce the feature loss of coding. In general, the method provided by the present invention is conducive to the flexible use of various downstream recommendation models and effectively guarantees the accuracy of recommendations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of intelligent assistance technology, and more specifically, relates to an intelligent assistance recommendation method and system based on graph coding. Background Art

[0002] With the continuous development and improvement of artificial intelligence (AI) theories and technologies, a "Smart+" craze has swept across various industries. "Smart+" is supported by smarter machines, smarter networks, and smarter interactions, aiming to build smarter economic development models and social ecosystems. Traditional auxiliary analysis methods and systems primarily utilize knowledge bases, which are less user-friendly and lack the ability to analyze knowledge associations or proactively learn user preferences. In recent years, supported by AI technologies such as deep learning, interactive intelligent auxiliary recommendation methods have made significant progress. In particular, because graphs have a strong ability to represent knowledge and can unify interactive information, social networks, and knowledge graphs, situational awareness methods and systems can use such heterogeneous graphs as a foundation for their capabilities.

[0003] Existing interactive intelligent-assisted recommendation methods can achieve good results in some tasks. One type uses knowledge graphs (KGs), either leveraging the knowledge contained in KGs to enrich representations or using KGs to increase entity connections for better recommendation performance. Another type incorporates other graphs, such as social network graphs. These methods use attention mechanisms to model the consistency of social network graphs and interactive bipartite graphs, and leverage deep networks to fit the relationship between learned representations and predicted scores, thereby improving the overall intelligent-assisted recommendation performance of the model.

[0004] However, current methods using knowledge graphs and methods incorporating other graphs such as social network graphs mostly use supervised learning to train models. During the process of optimizing representations, supervised learning will cut features that are inconsistent with its goals, resulting in large feature loss. This is unfriendly to downstream models and will seriously affect the accuracy of recommendations. Summary of the Invention

[0005] In response to the shortcomings of the prior art, the purpose of the present invention is to provide an intelligent assisted recommendation method and system based on graph coding, aiming to solve the problem of feature loss in the feature coding stage of the existing intelligent assisted interactive recommendation method, which leads to low recommendation accuracy.

[0006] To achieve the above objectives, in a first aspect, the present invention provides an intelligent assisted recommendation method and system based on graph coding, comprising the following steps:

[0007] Step S101: construct a heterogeneous graph; the heterogeneous graph includes user nodes, item nodes, user-item interaction behavior nodes, and item attribute nodes;

[0008] Step S102: inputting the heterogeneous graph into a heterogeneous graph coding model to obtain a feature representation of each node in the heterogeneous graph output by the heterogeneous graph coding model;

[0009] Step S103: predicting the user's rating for each item based on the feature representation of the user node and the feature representation of each item node;

[0010] Step S104: recommending items to the user based on the user's ratings of the items;

[0011] Among them, the heterogeneous graph encoding model is obtained by self-supervised learning training of the initial model based on the positive sample pairs and negative sample pairs of sample user nodes and the positive sample pairs and negative sample pairs of sample item nodes in the sample heterogeneous graph; the nodes corresponding to two sample users who have interacted with the same item constitute the positive sample pairs of sample user nodes; the nodes corresponding to two items that have been interacted by the same user constitute the positive sample pairs of sample item nodes.

[0012] In an optional example, the initial model is obtained by removing the nonlinear activation function in the relational graph convolutional network.

[0013] In an optional example, the feature representation of any node in the heterogeneous graph is generated based on the following steps:

[0014] Calculate any node e i The representation generated in the lth layer of feature propagation:

[0015]

[0016] in, Indicates that in the relationship Next, connect directly to node e i The node set of is the Laplace matrix, W is the feature transformation matrix, is node e j The representation generated in the feature propagation of the previous layer, l = 1, 2, ..., L, where L represents the number of propagation layers of the heterogeneous graph coding model;

[0017] A layer-weighted fusion operation is used to fuse the representations generated by all layers to obtain the feature representation of any node.

[0018] In an optional example, the loss function of self-supervised learning adopts the idea of triplet loss, which is determined based on the distance between the feature representations of positive sample pairs of sample user nodes, the distance between the feature representations of negative sample pairs of sample user nodes, the distance between the feature representations of positive sample pairs of sample item nodes, and the distance between the feature representations of negative sample pairs of sample item nodes.

[0019] In an optional example, the positive sample pairs and negative sample pairs of the sample user nodes are determined based on the user adjacency matrix; the positive sample pairs and negative sample pairs of the sample item nodes are determined based on the item adjacency matrix; the user adjacency matrix and the item adjacency matrix are determined based on the interaction information between users and items in the sample heterogeneous graph.

[0020] In a second aspect, the present invention provides an intelligent auxiliary recommendation system based on graph coding, comprising:

[0021] A heterogeneous graph construction module is used to construct a heterogeneous graph; the heterogeneous graph includes user nodes, item nodes, user-item interaction behavior nodes, and item attribute nodes;

[0022] a heterogeneous graph learning module, configured to input the heterogeneous graph into a heterogeneous graph encoding model and obtain a feature representation of each node in the heterogeneous graph output by the heterogeneous graph encoding model;

[0023] The rating prediction module is used to predict the user's rating for each item based on the feature representation of the user node and the feature representation of each item node;

[0024] An item recommendation module, configured to recommend items to the user based on the user's ratings of each item;

[0025] Among them, the heterogeneous graph encoding model is obtained by self-supervised learning training of the initial model based on the positive sample pairs and negative sample pairs of sample user nodes and the positive sample pairs and negative sample pairs of sample item nodes in the sample heterogeneous graph; the nodes corresponding to two sample users who have interacted with the same item constitute the positive sample pairs of sample user nodes; the nodes corresponding to two items that have been interacted by the same user constitute the positive sample pairs of sample item nodes.

[0026] In an optional example, the initial model is obtained by removing the nonlinear activation function in the relational graph convolutional network.

[0027] In an optional example, the heterogeneous graph learning module is specifically configured to perform the following steps to generate a feature representation of any node in the heterogeneous graph:

[0028] Calculate any node e i The representation generated in the lth layer of feature propagation:

[0029]

[0030] in, Indicates that in the relationship Next, connect directly to node e i The node set of is the Laplace matrix, W is the feature transformation matrix, is node e j The representation generated in the feature propagation of the previous layer, l = 1, 2, ..., L, where L represents the number of propagation layers of the heterogeneous graph coding model;

[0031] A layer-weighted fusion operation is used to fuse the representations generated by all layers to obtain the feature representation of any node.

[0032] In an optional example, the loss function of self-supervised learning adopts the idea of triplet loss, which is determined based on the distance between the feature representations of positive sample pairs of sample user nodes, the distance between the feature representations of negative sample pairs of sample user nodes, the distance between the feature representations of positive sample pairs of sample item nodes, and the distance between the feature representations of negative sample pairs of sample item nodes.

[0033] In an optional example, the positive sample pairs and negative sample pairs of the sample user nodes are determined based on the user adjacency matrix; the positive sample pairs and negative sample pairs of the sample item nodes are determined based on the item adjacency matrix; the user adjacency matrix and the item adjacency matrix are determined based on the interaction information between users and items in the sample heterogeneous graph.

[0034] In general, the above technical solutions conceived by the present invention have the following beneficial effects compared with the prior art:

[0035] The present invention provides an intelligent assisted recommendation method and system based on graph coding, which decouples the coding-based recommendation method into two stages: coding and recommendation, and constructs a heterogeneous graph example for interactive intelligent assisted recommendation. On the one hand, a lightweight approach is adopted to design the network structure of the graph coding, removing the nonlinear activation function that increases the complexity of the model in the relational graph convolutional network, thereby improving the cost-effectiveness of the model; on the other hand, positive and negative sample pairs of sample users and item nodes are constructed based on the interaction records between users and items, and a heterogeneous graph coding model is trained using a self-supervised learning method to achieve graph coding that distinguishes various relationships. It can better learn high-order relationships between nodes while characterizing propagation, minimizing feature loss. In general, the two-stage method provided by the present invention is conducive to the flexible use of various downstream recommendation models, can effectively improve the accuracy of recommendations, and enhance user satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 11 is a flow chart of an intelligent auxiliary recommendation method based on graph coding provided by an embodiment of the present invention;

[0037] Figure 2 is a schematic diagram of the structure of a heterogeneous graph provided by an embodiment of the present invention;

[0038] Figure 3 Schematic diagram of feature propagation performed by a user node in the first layer according to an embodiment of the present invention;

[0039] Figure 4 Schematic diagram of calculation of user adjacency matrix and item adjacency matrix provided by an embodiment of the present invention;

[0040] Figure 5 This is an architecture diagram of an intelligent auxiliary recommendation system based on graph coding provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0041] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0042] Although some existing interactive intelligent-assisted recommendation methods can achieve good results in some tasks, they still have the following problems. For methods that use knowledge graphs: general knowledge graphs are large in size and contain a large amount of redundant information. Their effective learning relies on high computing power and more sophisticated secondary annotation. In contrast, the construction of more suitable specialized knowledge graphs is too complex. Therefore, it is only appropriate to use knowledge graphs as the knowledge basis for intelligent-assisted interactive recommendation when conditions permit. More importantly, current methods using knowledge graphs and methods that incorporate other graphs such as social network graphs mostly use supervised learning to train models. However, supervised learning will reduce features that are inconsistent with its goals during the process of optimizing representations, which is harmful to downstream models. In addition, the graph neural network models used by current methods are relatively complex, with low learning efficiency and poor recommendation performance.

[0043] In view of the defects and improvement needs of the existing technology, the present invention provides an intelligent auxiliary recommendation method based on graph coding. Figure 1 is a flow chart of an intelligent auxiliary recommendation method based on graph coding provided by an embodiment of the present invention, such as Figure 1 As shown, the method includes the following steps:

[0044] Step S101: construct a heterogeneous graph; the heterogeneous graph includes user nodes, item nodes, user-item interaction behavior nodes, and item attribute nodes;

[0045] Step S102: inputting the heterogeneous graph into a heterogeneous graph coding model to obtain a feature representation of each node in the heterogeneous graph output by the heterogeneous graph coding model;

[0046] Step S103: predicting the user's rating for each item based on the feature representation of the user node and the feature representation of each item node;

[0047] Step S104: recommending items to the user based on the user's ratings of the items;

[0048] Among them, the heterogeneous graph encoding model is obtained by self-supervised learning training of the initial model based on the positive and negative sample pairs of sample user nodes and the positive and negative sample pairs of sample item nodes in the sample heterogeneous graph; the nodes corresponding to two sample users who have interacted with the same item constitute the positive sample pairs of sample user nodes; the nodes corresponding to two items that have been interacted by the same user constitute the positive sample pairs of sample item nodes.

[0049] For example, the item may be information, in which case the user's interactive behavior with respect to the item may be, for example, commenting, liking, etc., and the attributes of the item may be the content description, category, etc. of the information. For another example, the item may be a certain type of commodity, in which case the user's interactive behavior with respect to the item may be, for example, purchasing, and the attributes of the item may be the description, introduction, category, etc. of the information. The embodiments of the present invention do not specifically limit this.

[0050] It should be noted that the present invention uses heterogeneous graph encoding and self-supervised learning to optimize or learn the node representations of users and items, realizing graph representation learning that distinguishes various relationships. It can better learn high-order relationships between nodes while representing propagation. The feature representation obtained by this algorithm can be applied to a variety of downstream intelligent assistance applications, including interactive intelligent auxiliary recommendation. Moreover, the framework involved in the present invention needs to combine interaction knowledge and item knowledge to obtain a representation vector that can fully distinguish between close nodes and distant nodes, and is suitable for the use of comparison-based self-supervised learning methods.

[0051] In addition, supervised learning will cut features that are inconsistent with its goals during the process of optimizing representation, resulting in a large feature loss. The present invention uses self-supervised learning to perform representation learning based on the original structure of the heterogeneous graph. It does not set a clear goal of learning items of user interest, thereby minimizing feature loss. In addition, the heterogeneous graph integrates multiple information such as users, items, users' interactive behaviors on items, and item attributes, enriching the learned knowledge and further improving the node representation capability.

[0052] The method provided by the embodiment of the present invention constructs a heterogeneous graph example for interactive intelligent assisted recommendation, constructs positive and negative sample pairs of sample user nodes, and positive and negative sample pairs of sample item nodes based on the interaction records between users and items, and adopts the self-supervised learning method to train a heterogeneous graph encoding model to realize graph representation learning that distinguishes various relationships. It can better learn high-order relationships between nodes while representing propagation, minimize feature loss, and apply the feature representations of user nodes and item nodes learned by the heterogeneous graph encoding model to downstream item recommendation tasks, which can greatly improve the accuracy of recommendations and enhance user satisfaction.

[0053] Based on the above embodiment, in order to avoid introducing unnecessary model complexity, the initial model in the embodiment of the present invention is obtained by removing the nonlinear activation function in the relational graph convolutional network RGCN.

[0054] It should be noted that due to the feature propagation cost calculation example, unnecessary nonlinear activation functions were removed, and a lightweight graph neural network was constructed for updating the representation of each node. This reduced the complexity of the model while reducing the training cost and improving learning efficiency.

[0055] Based on any of the above embodiments, the feature representation of any node in the heterogeneous graph is generated based on the following steps:

[0056] Calculate the node e i The representation generated in the lth layer of feature propagation:

[0057]

[0058] in, Indicates that in the relationship Next, connect directly to node e i The node set of is the Laplace matrix, W is the feature transformation matrix, is node e j The representation generated in the feature propagation of the previous layer, l = 1, 2, ..., L, where L represents the number of propagation layers of the heterogeneous graph coding model;

[0059] A layer-weighted fusion operation is used to fuse the representations generated by all layers to obtain the feature representation of the node:

[0060]

[0061] Where α0 represents the initial weight, represents the initial representation of the node, α l represents the weight of the lth layer, and L represents the number of propagation layers of the initial model.

[0062] Here, any node can be a user node, an item node, an interaction node, or an attribute node. For example, when any node is a user node, It can be a collection of interaction behavior nodes and item nodes corresponding to the user's interaction behavior.

[0063] Furthermore, weights can be pre-set hyperparameters. The initial representation, or initialized representation, can be randomly generated or generated by a pre-trained model. For example, the attribute information included in an attribute node can be vectorized using a pre-trained natural language model to obtain the initial representation of the attribute node. Each type of node corresponds to a Laplacian matrix and a feature transformation matrix, and the feature transformation matrix is learnable.

[0064] It should be noted that although the initial model in the embodiment of the present invention removes unnecessary nonlinear activation functions, it retains the feature conversion matrix. Experimental verification shows that this approach ensures the feature representation capability, thereby improving the accuracy of subsequent item recommendations.

[0065] To alleviate the over-smoothing problem that occurs as the number of RGCN propagation layers increases, the above formula applies an initial residual operation. That is, in each feature propagation layer, an operation is constructed from the input to the current layer. Different from the standard form of the initial residual, considering that the initial representations of user nodes and item nodes are randomly initialized, the initial residual operation of passing such representations to subsequent propagation layers does not help alleviate over-smoothing. Therefore, here, by directly adding the representation that has passed through one layer of propagation To construct the initial residual. Entity node e i The feature information contained in the l-hop neighbors can be propagated by stacking l layers of feature propagation layers, and finally the feature representation of the node is obtained.

[0066] Based on any of the above embodiments, the loss function of self-supervised learning adopts the idea of triplet loss, and is determined based on the distance between the feature representations of positive sample pairs of sample user nodes, the distance between the feature representations of negative sample pairs of sample user nodes, the distance between the feature representations of positive sample pairs of sample item nodes, and the distance between the feature representations of negative sample pairs of sample item nodes.

[0067] It should be noted that the loss is defined using self-supervised graph learning. Through backpropagation of the loss, the representation network parameters are optimized, ultimately resulting in a trained heterogeneous graph encoding model. Using the concept of triplet loss, the loss function is constructed based on the principle that close nodes are similar and distant nodes are different. This maximizes the difference between the representations of anchor points and positive and negative samples, preventing over-learning of vectors and achieving good convergence.

[0068] Furthermore, the loss function is defined as,

[0069]

[0070] Where λ is a hyperparameter, G are learnable model parameters, including feature conversion matrices, to prevent model overfitting. Represents the sample user node u i The positive sample set, Represents u i The negative sample set, Represents the sample item node v j The positive sample set, Represents v j The negative sample set, u i ,u m ,u n ,v j ,v m ,v n are the feature representations of each node, and d(·) represents the distance.

[0071] In particular, for the self-supervised model used in the present invention, when adding a new node, nodes related to the new node can be selected purposefully, and only these nodes are used to participate in the loss calculation, thereby achieving fine-tuning of the model and having higher training flexibility.

[0072] Based on any of the above embodiments, the positive sample pairs and negative sample pairs of the sample user nodes are determined based on the user adjacency matrix; the positive sample pairs and negative sample pairs of the sample item nodes are determined based on the item adjacency matrix; the user adjacency matrix and the item adjacency matrix are determined based on the interaction information between users and items in the sample heterogeneous graph.

[0073] Furthermore, by determining whether there is interaction between users and items in the sample heterogeneous graph, the adjacency matrix H of user-item interaction is generated; then the user adjacency matrix U is calculated. 2 =H×H T , item adjacency matrix V 2 =H T ×H; the positive sample pairs and negative sample pairs of the sample user nodes can be determined based on whether the element values in the user adjacency matrix are positive, and the positive sample pairs and negative sample pairs of the sample item nodes can be determined based on whether the element values in the item adjacency matrix are positive.

[0074] Based on any of the aforementioned embodiments, to address the issues of existing intelligent-assisted interactive recommendation methods, such as the feature encoding stage being unfriendly to downstream models, high training costs, and complex models, the present invention provides an intelligent-assisted recommendation method based on graph coding, including a network construction phase and a vector coding learning phase. This method will be described in detail below, using items as information, interactive behaviors as reviews, and item attributes as information content as an example.

[0075] The network construction phase includes:

[0076] Use graph structures to represent multi-source heterogeneous information and its interaction with users.

[0077] Specifically, to facilitate the description of the details of the present invention, the interactive users are defined as U = {u1, u2, ... u M}, information is defined as V = {v1, v2, ... v N}, the user's comments on the information are defined as C = {c1, c2, ... c P}, the content of the information is defined as D = {d1, d2, ... d Q The representations of the above nodes in the lth layer of graph convolution are defined as like Figure 2 FIG. 1 is a schematic diagram of the structure of a heterogeneous graph provided by an embodiment of the present invention.

[0078] In addition, for the convenience of representation, any type of node is represented as e, and its representation is e.

[0079] Vectorize the nodes containing original information in the above heterogeneous graph, for example, use a pre-trained large model to vectorize natural language information.

[0080] Initialize graph node representations. For nodes containing raw information, such as news content nodes and comment nodes, use their vectorized features to initialize the corresponding node representations. Other nodes are initialized with zero vectors.

[0081] Subsequently, a relational graph convolution method is used to learn the representation. Taking into account the different relationships between multi-source information, the representation of each relationship will be updated separately according to the relational graph convolution method.

[0082] Specifically, taking user u1 as an example, in the relationship The feature propagation mode under is,

[0083]

[0084] Among them, g m (·) is the information constructor W is the feature transformation matrix, Indicates that node u1 is in the relationship In order to avoid introducing unnecessary model complexity, the nonlinear activation function in the standard graph convolutional network is removed here. The schematic diagram of the feature propagation of the user node u1 in the first layer provided by the embodiment of the present invention is as follows: Figure 3 As shown, based on the representation of adjacent nodes, the initial representation of the comment and the initial representation of information Perform feature propagation in the heterogeneous GCN layer and obtain

[0085] To alleviate the over-smoothing problem that occurs as the number of RGCN propagation layers increases, the above formula applies the initial residual operation. That is, in each feature propagation layer, an operation is constructed from the input to the current layer. Unlike the standard form of the initial residual, since the initial representations of users and information to be recommended are zero vectors, the initial residual operation of passing these zero-valued representations to subsequent propagation layers does not help alleviate over-smoothing. Only after one layer of propagation, users and information are truly initialized. Therefore, here, by directly adding To construct the initial residual.

[0086] Normalized representation of node e i In the information propagation at layer l, the representation of computing nodes is changed from Expand to and use Indicates that it is directly connected to node e under relationship r i Entity node collection. i It is possible to propagate the feature information contained in l-hop neighbors by stacking l layers of feature propagation layers. In the lth step, e i The embedding of is recursively expressed as,

[0087]

[0088] in, is the Laplace matrix (it should be noted that each type of relationship r corresponds to a Laplace matrix), and They are defined as nodes e i and e j Representations generated during feature propagation from the previous layer.

[0089] After propagating the features of various relationships on the lth layer, the representation sequence E of all nodes can be learned (l) Then, a layer weighted fusion operation is used to combine all the representation sequences E of all layers (l) To integrate,

[0090] E=α0E (0) +α1E (1) +…+α L E (L)

[0091] Among them, α i represents the weight of the i-th propagation layer, which is a hyperparameter determined by the experiment, and E is the feature representation sequence of all nodes output by the model.

[0092] This stage represents the heterogeneous graph used for graph learning, removes unnecessary graph convolution operations, and constructs a lightweight graph neural network for updating the representation of each node. The definition of the network loss function and the specific learning steps are included in the self-supervised graph learning encoding stage.

[0093] The vector encoding learning phase includes:

[0094] The loss function of self-supervised graph learning is based on the attribute characteristics of the nodes. The attribute of whether the nodes are one-hop adjacent can be selected as the basis for distinguishing positive and negative samples.

[0095] Based on whether the nodes are one-hop adjacent to each other, positive and negative samples for self-supervised learning are constructed.

[0096] Furthermore, for any user, this section selects users that are one hop adjacent to each other as positive samples, and non-adjacent users as negative samples; the same rule applies to any information.

[0097] The positive and negative samples in the above process are obtained based on the attributes of the samples on the adjacency matrix, and the user adjacency matrix U 2 and the item adjacency matrix V 2 The calculation method of is as follows:

[0098] U 2 =H×H T , V 2 =H T ×H

[0099] Among them, H is the interaction record matrix between users and information, H T is the transpose of H.

[0100] Figure 4 Schematic diagram of the calculation of the user adjacency matrix and the item adjacency matrix provided by the embodiment of the present invention. 2 and V 2 They are all symmetric matrices, symmetric along the diagonal, that is, and U 2 The diagonal elements in the middle represent the total number of interactive items of the corresponding user, and the corresponding V 2 The diagonal elements represent the total number of user interactions with the corresponding item. i and u j There is at least one common interactive item, then For example, otherwise, For example, The same rule applies to V 2 .therefore, Indicates that there is at least one u i and u j Information that has been commented on, and Indicates that there is at least one person who has commented on the information v i and v j Based on the attribute of whether the samples are directly adjacent, the anchor point u i Any positive sample u j Needs to be satisfied Anchor point v i Any positive sample v j Needs to be satisfied nature.

[0101] In the user adjacency matrix U 2 and the item adjacency matrix V 2 If the user interacts with the information, and The value of the corresponding position is greater than 0, otherwise it is equal to 0. The corresponding position is greater than 0 for positive samples, otherwise it is a negative sample.

[0102] The loss is defined by using self-supervised graph learning. First, a batch of user anchor samples and item anchor samples learned by the representation network are randomly selected, and the adjacency matrix U between items and users is used. 2 and V 2 Get the positive and negative samples corresponding to the anchor sample, and then calculate the loss.

[0103] Furthermore, combined with the principle of Triplet Loss, by max(d(e i ,e m )-d(e i ,e n )+margin,0) operation, the positive sample e m and negative samples e n With anchor point e i The distance difference between representations is controlled between 0 and margin. This is to avoid the situation where the loss value is too diffuse and cannot converge. According to the principles of self-supervised learning and Triplet Loss, the loss function is defined as:

[0104]

[0105] Where λ is a hyperparameter, θ G are learnable model parameters. To prevent the model from overfitting, Represents u i The positive sample set, Represents u i The negative sample set, Represents v j The positive sample set, Represents v j The negative sample set.

[0106] By backpropagating the loss, the representation network parameters are optimized, ultimately yielding a trained heterogeneous graph encoding model. Based on the principle that nearby nodes are similar and distant nodes are different, a loss function is constructed to maximize the difference in representation between the anchor point and the positive and negative samples.

[0107] The relational graph convolution method is used to update and optimize the node representation until the loss converges.

[0108] Combining the graph convolutional representation network based on RGCN and the loss function design using the Triplet Loss idea, the parameter learning process of the self-supervised representation learning model based on graph convolution, namely the heterogeneous graph encoding model, is shown in Table 1.

[0109] Table 1 Parameter learning process of the self-supervised representation learning model based on graph convolution

[0110]

[0111]

[0112] The present invention discloses an intelligent auxiliary recommendation method and system based on graph coding, in the field of situational awareness, including: using a graph structure to represent multi-source heterogeneous information and its interactive information with users; using methods including pre-trained large models to vectorize nodes containing original information in the graph; using a lightweight relational graph convolution method suitable for self-supervised learning, utilizing high-order relationships between nodes, and updating the representations of information from different sources respectively; constructing positive and negative samples suitable for self-supervised learning based on whether the nodes in the graph are one-hop adjacent; combining the principle of Triplet Loss to design a loss function suitable for graph self-supervised learning; through graph propagation learning, the loss gradually converges and the node representation is learned.

[0113] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects:

[0114] (1) The lightweight self-supervised graph learning encoding method for interactive intelligent assisted recommendation provided by the present invention proposes an effective self-supervised graph learning encoding algorithm. The encoding obtained by this algorithm can be applied to a variety of downstream intelligent assisted applications including interactive intelligent assisted recommendation.

[0115] (2) The lightweight self-supervised graph learning encoding method for interactive intelligent assisted recommendation provided by the present invention constructs a heterogeneous graph example for interactive intelligent assisted recommendation, adopts a modified lightweight relational graph convolution method to realize graph representation learning that distinguishes various relationships, and can better learn high-order relationships between nodes while representing propagation.

[0116] (3) The lightweight self-supervised graph learning encoding method for interactive intelligent assisted recommendation provided by the present invention solves the problem of feature loss in learning representations by supervised graph learning methods. It proposes an attribute-based self-supervised learning method, which uses node adjacency information and combines it with Triplet Loss to flexibly and effectively learn discriminative node representations, thereby reducing the feature loss of graph learning.

[0117] Based on any of the above embodiments, the present invention provides an intelligent auxiliary recommendation system based on graph coding, Figure 5 This is an architecture diagram of an intelligent auxiliary recommendation system based on graph coding provided by an embodiment of the present invention. Figure 5 As shown, the system includes:

[0118] A heterogeneous graph construction module 510 is used to construct a heterogeneous graph; the heterogeneous graph includes user nodes, item nodes, user-item interaction behavior nodes, and item attribute nodes;

[0119] A heterogeneous graph learning module 520 is configured to input the heterogeneous graph into a heterogeneous graph encoding model and obtain a feature representation of each node in the heterogeneous graph output by the heterogeneous graph encoding model;

[0120] Rating prediction module 530, used to predict the user's rating for each item based on the feature representation of the user node and the feature representation of each item node;

[0121] An item recommendation module 540 is configured to recommend items to the user based on the user's ratings of the items;

[0122] Among them, the heterogeneous graph encoding model is obtained by self-supervised learning training of the initial model based on the positive sample pairs and negative sample pairs of sample user nodes and the positive sample pairs and negative sample pairs of sample item nodes in the sample heterogeneous graph; the nodes corresponding to two sample users who have interacted with the same item constitute the positive sample pairs of sample user nodes; the nodes corresponding to two items that have been interacted by the same user constitute the positive sample pairs of sample item nodes.

[0123] The system provided by the embodiment of the present invention constructs a heterogeneous graph example for interactive intelligent assisted recommendation, constructs positive and negative sample pairs of sample user nodes, and positive and negative sample pairs of sample item nodes based on the interaction records between users and items, and adopts a self-supervised learning method to train a heterogeneous graph encoding model to achieve graph representation learning that distinguishes various relationships. It can better learn high-order relationships between nodes while representing propagation, minimize feature loss, and apply the feature representations of user nodes and item nodes learned by the heterogeneous graph encoding model to downstream item recommendation tasks, which can greatly improve the accuracy of recommendations and enhance user satisfaction.

[0124] It is understandable that the detailed functional implementation of each of the above modules can be found in the introduction of the aforementioned method embodiment, and will not be repeated here.

[0125] In addition, an embodiment of the present invention provides another intelligent auxiliary recommendation device based on graph coding, which includes: a memory and a processor;

[0126] The memory is used to store computer programs;

[0127] The processor is configured to implement the method in the above embodiment when executing the computer program.

[0128] In addition, the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method in the above embodiment is implemented.

[0129] Based on the method in the above embodiment, an embodiment of the present invention provides a computer program product. When the computer program product runs on a processor, the processor executes the method in the above embodiment.

[0130] It will be easily understood by those skilled in the art that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. An intelligent auxiliary recommendation method based on graph coding, characterized in that: The following steps are involved: Step S101: construct a heterogeneous graph; the heterogeneous graph includes user nodes, item nodes, user-item interaction behavior nodes, and item attribute nodes; Step S102: inputting the heterogeneous graph into a heterogeneous graph coding model to obtain a feature representation of each node in the heterogeneous graph output by the heterogeneous graph coding model; Step S103: predicting the user's rating for each item based on the feature representation of the user node and the feature representation of each item node; Step S104: recommending items to the user based on the user's ratings of the items; The heterogeneous graph encoding model is obtained by self-supervised learning training of the initial model based on the positive and negative sample pairs of sample user nodes and the positive and negative sample pairs of sample item nodes in the sample heterogeneous graph; the nodes corresponding to two sample users who have interacted with the same item constitute the positive sample pairs of sample user nodes; the nodes corresponding to two items that have been interacted with by the same user constitute the positive sample pairs of sample item nodes; The feature representation of any node in the heterogeneous graph is generated based on the following steps: Calculate any node In the Representations generated during layer feature propagation: in, Indicates that in the relationship Connect directly to the node The node set of is the Laplace matrix, is the feature transformation matrix, is a node The representation generated in the feature propagation of the previous layer, , Represents the number of propagation layers of the heterogeneous graph coding model; A layer-weighted fusion operation is used to fuse the representations generated by all layers to obtain the feature representation of any node.

2. The method according to claim 1, characterized in that The initial model is obtained by removing the nonlinear activation function in the relational graph convolutional network.

3. The method according to any one of claims 1 to 2, characterized in that The loss function of self-supervised learning adopts the idea of triplet loss, which is determined based on the distance between the feature representations of the positive sample pairs of sample user nodes, the distance between the feature representations of the negative sample pairs of sample user nodes, the distance between the feature representations of the positive sample pairs of sample item nodes, and the distance between the feature representations of the negative sample pairs of sample item nodes.

4. The method according to any one of claims 1 to 2, characterized in that The positive sample pairs and negative sample pairs of the sample user nodes are determined based on the user adjacency matrix; the positive sample pairs and negative sample pairs of the sample item nodes are determined based on the item adjacency matrix; the user adjacency matrix and the item adjacency matrix are determined based on the interaction information between users and items in the sample heterogeneous graph.

5. An intelligent auxiliary recommendation system based on graph coding, characterized in that: include: Heterogeneous graph construction module, used to construct heterogeneous graphs; The heterogeneous graph includes user nodes, item nodes, user-item interaction behavior nodes, and item attribute nodes; a heterogeneous graph learning module, configured to input the heterogeneous graph into a heterogeneous graph encoding model and obtain a feature representation of each node in the heterogeneous graph output by the heterogeneous graph encoding model; The rating prediction module is used to predict the user's rating for each item based on the feature representation of the user node and the feature representation of each item node; An item recommendation module, configured to recommend items to the user based on the user's ratings of each item; The heterogeneous graph encoding model is obtained by self-supervised learning training of the initial model based on the positive and negative sample pairs of sample user nodes and the positive and negative sample pairs of sample item nodes in the sample heterogeneous graph; the nodes corresponding to two sample users who have interacted with the same item constitute the positive sample pairs of sample user nodes; the nodes corresponding to two items that have been interacted with by the same user constitute the positive sample pairs of sample item nodes; The heterogeneous graph learning module is specifically configured to perform the following steps to generate a feature representation of any node in the heterogeneous graph: Calculate any node In the Representations generated during layer feature propagation: in, Indicates that in the relationship Connect directly to the node The node set of is the Laplace matrix, is the feature transformation matrix, is a node The representation generated in the feature propagation of the previous layer, , Represents the number of propagation layers of the heterogeneous graph coding model; A layer-weighted fusion operation is used to fuse the representations generated by all layers to obtain the feature representation of any node.

6. The system according to claim 5, characterized in that The initial model is obtained by removing the nonlinear activation function in the relational graph convolutional network.

7. The system according to any one of claims 5 to 6, characterized in that: The loss function of self-supervised learning adopts the idea of triplet loss, which is determined based on the distance between the feature representations of the positive sample pairs of sample user nodes, the distance between the feature representations of the negative sample pairs of sample user nodes, the distance between the feature representations of the positive sample pairs of sample item nodes, and the distance between the feature representations of the negative sample pairs of sample item nodes.

8. The system according to any one of claims 5 to 6, characterized in that: The positive sample pairs and negative sample pairs of the sample user nodes are determined based on the user adjacency matrix; the positive sample pairs and negative sample pairs of the sample item nodes are determined based on the item adjacency matrix; the user adjacency matrix and the item adjacency matrix are determined based on the interaction information between users and items in the sample heterogeneous graph.

Citation Information

Patent Citations

  • Text information-based deep reinforcement learning interactive recommendation method and system

    CN111104595A

  • Graph neural networks for datasets with heterophily

    US20220309334A1