Bundle recommendation method and system based on graph neural network

By building a multi-view model and graph neural network, the problems of ternary interaction relationship simulation and noise information in bundle recommendation are solved, and the accuracy of bundle recommendation and user experience are improved.

CN118170989BActive Publication Date: 2025-10-03SOUTH CHINA UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410402039.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-03
Publication Date
2025-10-03
Estimated Expiration
2044-04-03

AI Technical Summary

Technical Problem

Existing technologies find it difficult to simulate the complex ternary interaction relationship between users, bundles, and items, and the mixing of noise information leads to suboptimal bundle recommendation effects.

Method used

Build multiple views to model complex ternary interaction relationships, learn user preferences through graph neural networks, fuse multi-view node representations, use graph convolutional networks to optimize node representations, combine collaborative filtering algorithms and Bayesian personalized sorting, and predict bundle preference scores.

Benefits of technology

The accuracy of bundle recommendations and user experience are improved. By mining diverse user preferences and avoiding the introduction of noise information, the optimal bundle recommendation is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118170989B_ABST
    Figure CN118170989B_ABST
Patent Text Reader

Abstract

The present invention discloses a bundle recommendation method and system based on a graph neural network. The method comprises: constructing a direct preference graph and a collaborative preference graph based on interaction data between some users and some bundles, respectively; and constructing an item-level preference hypergraph based on interaction data between all items, all users, and all bundles; collectively referring to the direct preference graph, collaborative preference graph, and item-level preference hypergraph as a multi-view; inputting the multi-view and initialized node representations into a graph convolutional network, obtaining a fused node representation output by each convolutional layer, and then obtaining a final node embedding representation of the fused view, which is used as the output of the graph convolutional network; and predicting a recommended list of bundles corresponding to each user based on the final node embedding representation of the fused view output by all users, all bundles, and the optimized graph convolutional network. The present invention achieves optimal bundle recommendation results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of artificial intelligence and machine learning technology, and in particular relates to a bundle recommendation method, system, electronic device and computer-readable storage medium based on graph neural network. Background Art

[0002] Recommending bundles (i.e., a group of complementary items) has attracted widespread attention in academia and industry. Compared to recommending individual items, bundle recommendation is more challenging. Bundle recommendation has been widely used in various fields, such as e-commerce, online music platforms, video streaming platforms, book recommendations, and travel recommendations. Bundle recommendation encourages users to purchase multiple items at once, thereby increasing sales profits for businesses. It also provides users with access to a wider variety of products, improving their consumer experience and satisfaction.

[0003] Current research shows that bundle recommendation faces the following problems: (1) Existing technologies have difficulty simulating the complex ternary interaction relationship between users, bundles, and items; (2) Existing technologies loosely combine node representations learned from different views, resulting in the mixing of noisy information; thus, existing methods have suboptimal recommendation effects. Summary of the Invention

[0004] In order to address the deficiencies of the above-mentioned prior art, the present invention provides a bundle recommendation method, system, electronic device and computer-readable storage medium based on graph neural networks. By constructing multiple views to model complex ternary interaction relationships, the present invention explores diverse user preferences; and integrates the node representations learned from multiple views to avoid the introduction of noise information, ultimately achieving the optimal bundle recommendation effect.

[0005] The first object of the present invention is to provide a bundle recommendation method based on graph neural network.

[0006] A second object of the present invention is to provide a bundle recommendation system based on graph neural networks.

[0007] A third object of the present invention is to provide an electronic device.

[0008] A fourth object of the present invention is to provide a computer-readable storage medium.

[0009] The first object of the present invention can be achieved by adopting the following technical solutions:

[0010] A bundle recommendation method based on a graph neural network, the method comprising:

[0011] Obtain data for multiple users, multiple items, and multiple bundles; construct a direct preference graph and a collaborative preference graph based on the interaction data between some users and some bundles, and construct an item-level preference hypergraph based on the interaction data between all items and all users and all bundles; the direct preference graph, collaborative preference graph, and item-level preference hypergraph are collectively referred to as a multi-view;

[0012] Input multiple views and initialized node representations into the graph convolutional network, and obtain the node representations learned for each view in the multiple views output by each convolutional layer. Based on the node representations learned for each view output by the convolutional layer, the similarity between them and the nodes in the collaborative preference graph and the item-level preference hypergraph is calculated with the direct preference graph as the target. The fusion weights of the nodes in each view are dynamically adjusted based on the similarity, the popularity of the nodes in the direct preference graph, and the number of convolutional layers. Based on the node representations learned for each view output by the convolutional layer and the corresponding fusion weights, the fused node representation output by the convolutional layer is calculated. The fused node representations of the multiple views and the output of the convolutional layer are used as the input to the next convolutional layer.

[0013] Based on the node representation learned from each view in the multi-view output of each convolutional layer, the final node embedding representation of each view is obtained respectively; based on the initialized node representation and the fused node representation output by each convolutional layer, the final node embedding representation of the fused view is obtained; the final node embedding representation of the fused view is the output of the graph convolutional network;

[0014] The final contrastive learning loss is calculated based on the final node embedding representations of each view in the multi-view and the final node embedding representation of the fused view. The recommendation task loss is calculated based on the final node embedding representation of the fused view. The total loss is calculated by combining the recommendation task loss with the final contrastive learning loss, and the graph convolutional network is optimized to update the initialized node representations through gradient backpropagation.

[0015] Based on the final node embedding representation of the fused view of all users, all bundles, and the output of the optimized graph convolutional network, each user's preference score for all bundles is predicted; based on the preference score, a list of recommended bundles is obtained.

[0016] Furthermore, based on the interaction data between some users and some bundles, a collaborative preference graph is constructed based on the collaborative filtering algorithm, including:

[0017] Based on the interaction records between users and bundles, a similarity algorithm is used to calculate the K users / bundles closest to the current user / bundle. The similarity between two nodes is measured by the ratio of the number of their common neighbors to the total number of their neighbors, as follows:

[0018]

[0019] Among them, |·| represents the number of elements contained in the set, represents the set of neighbor nodes of node i in the direct preference graph, represents the set of neighbor nodes of node j in the direct preference graph, ∩ represents the intersection operation of the set, and ∪ represents the union operation of the set;

[0020] If sim(i,j) is greater than the set threshold δ, it indicates that the nodes are similar; connect each user / bundle with similar users / bundles to obtain the collaborative preference graph By explicitly modeling the high-order information of collaborative filtering, the elements in the adjacency matrix of the collaborative preference graph are:

[0021]

[0022] Furthermore, the item-level preference hypergraph is constructed based on the interaction data between all items and all users and all bundles, including:

[0023] Hyperedges are used to connect bundles associated with items and users who have interacted with them, explicitly modeling high-order relationships and obtaining an item-level preference hypergraph. The adjacency matrix is:

[0024]

[0025] Among them, A ui Represents the historical interaction data between users and items, A bi Indicates the relationship between a bundle and an item.

[0026] Furthermore, the multi-view and initialized node representations are input into the graph convolutional network to obtain the node representations learned by each view in the multi-view output of each convolutional layer, including:

[0027] Take the first convolution layer as the convolution layer;

[0028] Input each view and the initialized node representation in the multi-view graph convolutional network into the corresponding convolutional layer, and obtain the node representation of each view learned by the output of the convolutional layer, specifically including:

[0029] The direct preference graph and the initialized node representation are input into the convolutional layer of the graph convolutional network for graph convolution, message propagation and neighbor aggregation operations are performed to capture the information of the graph structure and output the node representation learned by the direct preference graph;

[0030] The collaboration preference graph and the initialized node representation are input into the convolutional layer of the graph convolutional network for graph convolution to extract the high-order interaction relationship between users and bundles, and output the node representation of the learned collaboration preference graph;

[0031] Input the item-level preference hypergraph and the initialized node representation into the convolutional layer of the graph convolutional network for hypergraph convolution, and output the node representation of the learned item-level preference hypergraph;

[0032] Calculate the fused node representation output by the convolutional layer based on the node representation learned from each view and the corresponding fusion weights;

[0033] The fused node representation output by the convolutional layer is used as the initialized node table, and the next convolutional layer of the convolutional layer is used as the convolutional layer. Return each view in the multi-view and the initialized node representation to the convolutional layer in the graph convolution network and continue to perform subsequent operations, thereby obtaining the node representation learned by each view output by each convolutional layer.

[0034] Furthermore, the calculation formula of the fusion weight is:

[0035]

[0036]

[0037] Among them, α v,1 is the fusion weight of node v in the collaborative preference view, α v,3 is the fusion weight of node v in the item-level preference view; β1 and β2 are hyperparameters; 1 is the number of convolutional layers, and s(·) is the cosine similarity function; and are the node representations of the direct preference graph, collaborative preference graph, and item-level preference hypergraph learned by the first convolutional layer, respectively; pop(·) is the popularity of node v in the direct preference graph. represents the set of neighbor nodes of node v in the direct preference graph, Represents the set of neighbor nodes of node c in the direct preference graph; Represents a user collection / bundle collection.

[0038] Furthermore, the final contrastive learning loss is calculated using InfoNCE;

[0039] The recommendation task adopts Bayesian personalized ranking.

[0040] Furthermore, the inner product function is used to predict the user's preference score for the bundle.

[0041] The second object of the present invention can be achieved by adopting the following technical solutions:

[0042] A bundle recommendation system based on a graph neural network, the system comprising:

[0043] A construction module is configured to obtain data for multiple users, multiple items, and multiple bundles; construct a direct preference graph and a collaborative preference graph based on the interaction data between some users and some bundles, and construct an item-level preference hypergraph based on the interaction data between all items and all users and all bundles; the direct preference graph, collaborative preference graph, and item-level preference hypergraph are collectively referred to as a multi-view;

[0044] The learning and fusion module is used to input multiple views and initialized node representations into the graph convolutional network, and obtain the node representations learned for each view in the multiple views output by each convolutional layer. Based on the node representations learned for each view output by the convolutional layer, the module calculates the similarity between the nodes in the collaboration preference graph and the item-level preference hypergraph, taking the direct preference graph as the target. The module dynamically adjusts the fusion weights of the nodes in each view based on the similarity, the popularity of the nodes in the direct preference graph, and the number of convolutional layers. The module calculates the fused node representation output by the convolutional layer based on the node representations learned for each view output by the convolutional layer and the corresponding fusion weights. The fused node representations of the multiple views and the output of the convolutional layer are used as the input to the next convolutional layer.

[0045] The output module is used to obtain the final node embedding representation of each view based on the node representation learned from each view in the multi-view output of each convolutional layer. The final node embedding representation of the fused view is obtained based on the initialized node representation and the fused node representation output by each convolutional layer. The final node embedding representation of the fused view is the output of the graph convolutional network.

[0046] The optimization module is used to calculate the final contrastive learning loss based on the final node embedding representations of each view in the multi-view and the final node embedding representation of the fused view; calculate the recommendation task loss based on the final node embedding representation of the fused view; and optimize the graph convolutional network by combining the recommendation task loss with the final contrastive learning loss to calculate the total loss to update the initialized node representations through gradient backpropagation.

[0047] The prediction module is used to predict each user's preference score for all bundles based on the final node embedding representation of the fusion view of all users, all bundles, and the output of the optimized graph convolutional network; based on the preference scores, a list of recommended bundles is obtained.

[0048] The third object of the present invention can be achieved by adopting the following technical solutions:

[0049] An electronic device includes a processor and a memory for storing a program executable by the processor. When the processor executes the program stored in the memory, the above-mentioned bundle recommendation method based on graph neural network is implemented.

[0050] The fourth object of the present invention can be achieved by adopting the following technical solutions:

[0051] A computer-readable storage medium stores a program, which, when executed by a processor, implements the above-mentioned bundle recommendation method based on graph neural network.

[0052] The present invention has the following beneficial effects compared to the prior art:

[0053] 1. This invention models complex ternary interactions across multiple views to explore diverse user preferences. First, it learns users' direct interests from the perspective of their interactions with bundles, building a direct preference graph. Second, it learns collaborative relationships from a semantic neighborhood perspective by calculating similar users / bundles, building a collaborative preference graph. Finally, through a hypergraph neural network, using items as a bridge, it extracts item-level preferences from the relationships between bundles and items and the interactions between users and items, building an item-level preference hypergraph.

[0054] 2. This invention automatically calculates fusion weights for each node in each view output by all convolutional layers, avoiding the introduction of noise information and enabling better fusion of node representations learned from multiple views. Furthermore, using multi-view comparative learning as an auxiliary task allows for the full exchange of information between different views. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying any creative work.

[0056] Figure 1 This is a simplified flowchart of the bundle recommendation method based on graph neural network according to embodiment 1 of the present invention;

[0057] Figure 2 This is a detailed flow chart of the bundle recommendation method based on graph neural network according to embodiment 1 of the present invention;

[0058] Figure 3 This is a flowchart of constructing multiple views according to embodiment 1 of the present invention;

[0059] Figure 4 This is a flowchart of the convolutional layer of Example 1 of the present invention;

[0060] Figure 5 This is a flowchart of the adaptive fusion module of Example 1 of the present invention;

[0061] Figure 6 Schematic diagram of the process of calculating the total loss in Example 1 of the present invention;

[0062] Figure 7 This is a structural block diagram of a bundle recommendation system based on graph neural network according to embodiment 2 of the present invention;

[0063] Figure 8 This is a structural block diagram of an electronic device according to embodiment 3 of the present invention. DETAILED DESCRIPTION

[0064] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention. It should be understood that the specific embodiments described are only used to explain this application and are not used to limit this application.

[0065] Example 1:

[0066] like Figure 1 、 2 As shown, the bundle recommendation method based on graph neural network provided in this embodiment includes the following steps:

[0067] S101. Build multiple views based on interaction data of users, items, and bundles.

[0068] Assume that there are M users, N bundles, O items, and the interaction data between users and bundles is A ub , user-item interaction data A ui , interaction data between bundle and item A bi .

[0069] In this embodiment, M is 8039, N is 4771, O is 32770, and A is 1. ub There are 51377 non-zero elements in A (that is, there are 51377 pieces of interaction data between users and bundles). ui There are 138,515 non-zero elements in A (that is, there are 138,515 pieces of interaction data between users and items). bi There are 176,667 non-zero elements in (i.e., there are 176,667 pieces of interaction data between bundles and items). The interaction data between users and bundles is divided into training data sets according to the ratio of 7:1:2. (34,416 interaction records in total), validation dataset (5189 interaction records in total), test data set (A total of 9746 interaction records). Among them, the training data set is used to train the model, the validation data set is used to select the model hyperparameters, and the test data set is used to test the effect of the model. User-item interaction data A ui , interaction data between bundles and items A bi , build multiple views.

[0070] The multiple views in this embodiment include a direct preference graph, a collaborative preference graph, and an item-level preference hypergraph. The nodes in each graph represent user nodes or bundle nodes, that is, the direct preference graph represents the user's direct preference graph and the bundle's direct preference graph, and the same is true for the other two views.

[0071] Furthermore, if Figure 3 As shown, step S101 specifically includes:

[0072] (1) Construct a direct preference graph based on the training interaction data between users and bundles.

[0073] Historical interaction data reflects the user's potential interests. Based on the training interaction data between users and bundles Constructing a direct preference graph The adjacency matrix of the direct preference graph is expressed as:

[0074]

[0075] (2) Construct a collaborative preference graph based on the training interaction data between users and bundles.

[0076] Based on collaborative filtering, we discover other users with similar behaviors to the current user and recommend bundles based on their interests. Based on the interaction records between users and bundles, we use a similarity algorithm to calculate the K users / bundles closest to the current user / bundle. The similarity between two nodes is measured by the ratio of their common neighbors to their total number of neighbors. The specific calculation formula is as follows:

[0077]

[0078] Among them, |·| represents the number of elements contained in the set, represents the set of neighbor nodes of node i in the direct preference graph, represents the set of neighbor nodes of node j in the direct preference graph, ∩ represents the intersection operation of the sets, and ∪ represents the union operation of the sets.

[0079] If sim(i, j) is greater than a threshold δ, it indicates that they are similar. Generally, the threshold δ is set to 0.8. Connect each user / bundle with similar users / bundles to obtain a collaborative preference graph. To explicitly model the high-order information of collaborative filtering, the elements in the adjacency matrix of the collaborative preference graph are represented as:

[0080]

[0081] (3) Based on the interaction data between users and items and the interaction data between bundles and items, an item-level preference hypergraph is constructed.

[0082] Based on the metapath "user-item-bundle", we learn users' potential interests and preferences from the item level. Specifically, we connect bundles associated with the item and users who have interacted with the item with hyperedges to explicitly model high-order relationships. Based on the historical interaction data between users and items and the association and subordination between bundles and items, we construct an item-level preference hypergraph. The adjacency matrix of a hypergraph is represented as:

[0083]

[0084] Among them, A ui Represents the historical interaction data between users and items, A bi Indicates the relationship between a bundle and an item.

[0085] S102. Input the initialized node representation and each view in the multi-view into the graph convolutional network to obtain the learned node representation of each view and the fused node representation output by each convolutional layer.

[0086] The model in this embodiment is a graph convolutional network, which includes multiple convolutional layers, each of which is connected to an adaptive fusion module.

[0087] This embodiment takes two convolutional layers as an example to illustrate step S102.

[0088] Furthermore, if Figure 4 As shown, step S102 specifically includes:

[0089] (1) Use Xavier initialization to obtain node representation Node representation The fused node representation as the output of the 0th convolutional layer in the graph convolutional network.

[0090] (2) Each view in the multi-view and fusion node representation Input the first convolutional layer (convolutional layer 1) respectively to obtain the node representation of each view learned by the output of the first convolutional layer.

[0091] (2-1) Representing direct preference graph and fusion node Input the first convolutional layer to perform graph convolution, perform message propagation and neighbor aggregation operations, capture graph structure data, and output optimized node representation

[0092]

[0093] in, The node v representing the direct preference graph is the node representation learned in the first convolutional layer, represents the set of neighbor nodes of node v in the direct preference graph, and c represents other neighbor nodes of node v in the direct preference graph.

[0094] (2-2) Representing the collaboration preference graph and fusion nodes Input the first convolutional layer to perform graph convolution, extract the high-order interaction relationship between users and bundles, and output the optimized node representation

[0095]

[0096] in, The node v representing the collaboration preference graph is the node representation learned in the first convolutional layer, represents the set of neighbor nodes of node v in the collaborative preference graph, and c represents other neighbor nodes of node v in the collaborative preference graph.

[0097] (2-3) Representing item-level preference hypergraph and fusion nodes Input the first convolution layer for hypergraph convolution to learn the embedded representation of the node

[0098]

[0099] in, The node representation of node v in the item-level preference hypergraph learned in the first convolutional layer, d v d ε and d c They represent the node v, hyperedge ε and degree of node c of the item-level preference hypergraph, Represents the set of hyperedges where node v is located.

[0100] (3) Use the adaptive fusion module to assign fusion weights to the nodes in each view output by the first convolutional layer.

[0101] Based on the diverse user interest preferences learned from the three views, the optimal fusion weight is automatically calculated for each node, thereby suppressing the introduction of noise when aggregating information and obtaining a more informative node representation.

[0102] like Figure 5 As shown in the figure, taking direct preference as the target, we calculate its similarity with collaborative preference and item-level preference, and dynamically adjust the final value based on hyperparameters, node popularity, and the number of convolutional layers to output the appropriate fusion weight. The specific calculation is as follows:

[0103]

[0104]

[0105] Among them, β1 and β2 are hyperparameters, l represents the number of convolutional layers, s(·) is the cosine similarity function, pop(·) is the popularity function of computing node v on the direct preference graph, and α v,1 is the fusion weight of node v in the collaborative preference view, α v,2 is the fusion weight of node v in the item-level preference view; Represents a user collection / bundle collection.

[0106] If the node representations of other views are similar to those of the direct preference view, the weight during fusion is reduced. For some nodes, the data from the collaborative preference view and the item-level preference view are noisy information. In particular, when there is sufficient interaction between nodes in the direct preference graph, the contribution of other views to the final embedding should be smaller. In addition, as the number of convolutional layers increases, especially the number of convolutional layers in the hypergraph, the data receptive field of the node will also increase rapidly, resulting in too much useless information being learned. The fusion weight of other views decreases with the increase in the number of convolutional layers.

[0107] (4) Calculate the fusion node representation output by the first convolutional layer based on the learned node representations and corresponding fusion weights in each view output by the first convolutional layer

[0108] The optimized node representations of each view output by the first convolutional layer are weighted summed to obtain the fused node representation for:

[0109]

[0110] in, Respectively represent the node representations learned in the direct preference graph, collaborative preference graph, and item-level preference hypergraph, The fused node representation representing the output of the first convolutional layer.

[0111] (5) The original views and fusion node representation Input the second convolutional layer (convolutional layer 2), repeat the above steps (2)-(4), and obtain the node representation of each view learned by the second convolutional layer output and fusion node representation

[0112] S103. According to the learned node representations of each view and the fused node representation output by each convolutional layer, obtain the final node embedding representation of each view and the final node embedding representation of the fused view respectively.

[0113] The initialized node representation Node representation of fused view And the node representation of the three views The final node embedding representation z of the fused view is calculated through the weighted sum function v And the final node embedding representation of the three views The specific formula is as follows:

[0114]

[0115] Among them, the weighted sum function controls the contribution weight of each convolutional layer, thereby alleviating the overfitting problem.

[0116] S104: Obtain the final contrastive learning loss based on the final node embedding representations of each view and the fused view.

[0117] like Figure 6 As shown, the final nodes of the three views are represented as The final node representation z of the fused view is v By performing comparative learning, the feature representations of the same node in different views are closer in the embedding space, while the feature representations of different nodes are more evenly distributed in the embedding space, thereby strengthening the collaborative relationship between the three views and the fused view, so that the final node representation of the fused view contains richer user preference information.

[0118] Contrastive learning loss is calculated using InfoNCE, and its formula is as follows:

[0119]

[0120] in, represents the set of users or bundles, exp(·) is the exponential function, s(·) is the cosine similarity function, τ is the temperature coefficient that controls the smoothness of the output, and z v is the final node representation of the fused view, is the final node representation of the three views.

[0121] The final contrastive learning loss is calculated by the summation function:

[0122]

[0123] in, represents the contrast loss calculated between the fused view and the direct preference view, represents the contrast loss calculated between the fusion view and the collaborative preference view, Represents the contrastive loss calculated between the fusion view and the item-level preference view.

[0124] S105. The total loss is calculated by combining the recommendation task loss with the final contrastive learning loss, and the graph convolutional network is optimized to update the initialized node representation through gradient backpropagation.

[0125] This embodiment uses the final node of the fusion view to represent z v Predicting user preference scores for bundles Generally, the inner product function is used for prediction, and the calculation formula is as follows:

[0126]

[0127] Among them, z u The final node representation of the fused view of user u, z b The final node representation representing the fused view of bundle b.

[0128] For the recommendation task, we use Bayesian Personalized Ranking (BPR) loss optimization. The idea is to assume that the model predicts that the scores of bundles that users have actually interacted with will be much higher than those of bundles that they have not interacted with:

[0129]

[0130] in, is a set of paired training samples, σ is the sigmoid activation function, b + represents the bundles that the user has actually interacted with, b - Represents bundles that the user has not interacted with.

[0131] The recommendation task loss is combined with the final contrastive learning loss in S104 to jointly optimize the graph convolutional network, and the learnable parameters of the model are updated through gradient backpropagation. The recommendation task loss is combined with the final contrastive learning loss to make the representation learned by the graph convolutional network more evenly distributed in the embedding space, thereby effectively alleviating the over-smoothing problem of the graph neural network. The final total loss function is calculated as follows:

[0132]

[0133] Among them, λ1 and λ2 are hyperparameters for balancing the weights between tasks, and ||·||2 represents the regularization term to prevent parameter overfitting. Represents all learnable parameters of the graph convolutional network.

[0134] In the above steps S101 to S105, the interaction data between some users and some bundles (training interaction data) ) and auxiliary information (user-item interaction data A ui , bundle and item related data A bi ) Train the graph convolutional network to obtain a trained graph convolutional network; finally, use the trained graph convolutional network to output the final node embedding representation of the fusion view.

[0135] S106. Predict each user's preference score for all bundles based on the final node embedding representation of the fused view of the user, bundle, and the optimized graph convolutional network output; and obtain a recommended bundle list based on the preference scores.

[0136] This step is based on the fusion view of all users (M) and all bundles (N) and the optimized graph convolutional network output to obtain the final node embedding representation z v , predict each user's preference score for N bundles, sort them from large to small and remove the bundles previously recommended to the user (based on the interaction data between the user and the bundle in step S101), and then obtain the K bundles with the highest scores as the generated bundle recommendation list according to and a test interaction dataset of users and bundles Evaluate the model's performance. We use the TopK recommendation evaluation algorithm, where the graph convolutional network predicts K bundles that the user might be interested in and ranks them from highest to lowest based on their preference scores. We use Recall@K and NDCG@K as evaluation metrics. In this example, K is set to 20 and 40.

[0137]

[0138]

[0139]

[0140] Among them, R(u) represents the list of bundles predicted by the algorithm, T(u) represents the list of bundles that the user has actually interacted with, and IDCG represents the maximum DCG score when the recommendation list is sorted according to user preferences.

[0141] This example uses three datasets: Youshu, NetEase, and iFashion. These datasets represent scenarios such as book list recommendations, song list recommendations, and clothing recommendations. The experimental results are shown in Table 1 below:

[0142] Table 1 Experimental results of three datasets: Youshu, NetEase, and iFashion

[0143]

[0144] Those skilled in the art will appreciate that all or part of the steps in the method for implementing the above embodiments may be completed by instructing related hardware through a program, and the corresponding program may be stored in a computer-readable storage medium.

[0145] It should be noted that although the method operations of the above embodiments are described in a particular order in the accompanying drawings, this does not require or imply that the operations must be performed in this particular order, or that all of the illustrated operations must be performed to achieve the desired results. Rather, the depicted steps may be performed in a different order. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into a single step, and / or a single step may be broken down into multiple steps.

[0146] Example 2:

[0147] like Figure 7 As shown, this embodiment provides a bundle recommendation system based on a graph neural network, which includes a construction module 701, a learning and fusion module 702, an output module 703, an optimization module 704, and a prediction module 705, wherein:

[0148] Construction module 701 is configured to obtain data on multiple users, multiple items, and multiple bundles; construct a direct preference graph and a collaborative preference graph based on the interaction data between some users and some bundles; and construct an item-level preference hypergraph based on the interaction data between all items, all users, and all bundles; the direct preference graph, collaborative preference graph, and item-level preference hypergraph are collectively referred to as a multi-view.

[0149] The learning and fusion module 702 is configured to input multiple views and initialized node representations into the graph convolutional network, and obtain the node representations learned for each view in the multiple views output by each convolutional layer; based on the node representations learned for each view output by the convolutional layer, the similarity between the node representations learned for each view and the nodes in the collaborative preference graph and the item-level preference hypergraph is calculated with the direct preference graph as the target; the fusion weights of the nodes in each view are dynamically adjusted based on the similarity, the popularity of the nodes in the direct preference graph, and the number of convolutional layers; the fused node representation output by the convolutional layer is calculated based on the node representations learned for each view output by the convolutional layer and the corresponding fusion weights; and the fused node representations output by the multiple views and the convolutional layer are used as the input to the next convolutional layer;

[0150] Output module 703 is configured to obtain a final node embedding representation for each view based on the node representation learned from each view in the multi-view output of each convolutional layer; obtain a final node embedding representation for the fused view based on the initialized node representation and the fused node representation output by each convolutional layer; the final node embedding representation for the fused view is the output of the graph convolutional network;

[0151] Optimization module 704 is configured to calculate a final contrastive learning loss based on the final node embedding representations of each of the multiple views and the final node embedding representation of the fused view; calculate a recommendation task loss based on the final node embedding representation of the fused view; and optimize the graph convolutional network by combining the recommendation task loss with the final contrastive learning loss to calculate a total loss, thereby updating the initialized node representations through gradient backpropagation.

[0152] The prediction module 705 is used to predict each user's preference score for all bundles based on the final node embedding representation of the fusion view of all users, all bundles, and the optimized graph convolutional network output; and obtain a recommended bundle list based on the preference score.

[0153] The specific implementation of each module in this embodiment can be found in the above-mentioned embodiment 1, and will not be described one by one here; it should be noted that the system provided in this embodiment is only illustrated by the division of the above-mentioned functional modules. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure can be divided into different functional modules to complete all or part of the functions described above.

[0154] Example 3:

[0155] This embodiment provides an electronic device, which may be a computer, such as Figure 8As shown, it includes a processor 802, a memory, an input device 803, a display 804, and a network interface 805 connected via a system bus 801. The processor is used to provide computing and control capabilities. The memory includes a non-volatile storage medium 806 and an internal memory 807. The non-volatile storage medium 806 stores an operating system, a computer program, and a database. The internal memory 807 provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. When the processor 802 executes the computer program stored in the memory, the bundle recommendation method based on the graph neural network of the above-mentioned embodiment 1 is implemented as follows:

[0156] Obtain data for multiple users, multiple items, and multiple bundles; construct a direct preference graph and a collaborative preference graph based on the interaction data between some users and some bundles, and construct an item-level preference hypergraph based on the interaction data between all items and all users and all bundles; the direct preference graph, collaborative preference graph, and item-level preference hypergraph are collectively referred to as a multi-view;

[0157] Input multiple views and initialized node representations into the graph convolutional network, and obtain the node representations learned for each view in the multiple views output by each convolutional layer. Based on the node representations learned for each view output by the convolutional layer, the similarity between them and the nodes in the collaborative preference graph and the item-level preference hypergraph is calculated with the direct preference graph as the target. The fusion weights of the nodes in each view are dynamically adjusted based on the similarity, the popularity of the nodes in the direct preference graph, and the number of convolutional layers. Based on the node representations learned for each view output by the convolutional layer and the corresponding fusion weights, the fused node representation output by the convolutional layer is calculated. The fused node representations of the multiple views and the output of the convolutional layer are used as the input to the next convolutional layer.

[0158] Based on the node representation learned from each view in the multi-view output of each convolutional layer, the final node embedding representation of each view is obtained respectively; based on the initialized node representation and the fused node representation output by each convolutional layer, the final node embedding representation of the fused view is obtained; the final node embedding representation of the fused view is the output of the graph convolutional network;

[0159] The final contrastive learning loss is calculated based on the final node embedding representations of each view in the multi-view and the final node embedding representation of the fused view. The recommendation task loss is calculated based on the final node embedding representation of the fused view. The total loss is calculated by combining the recommendation task loss with the final contrastive learning loss, and the graph convolutional network is optimized to update the initialized node representations through gradient backpropagation.

[0160] Based on the final node embedding representation of the fused view of all users, all bundles, and the output of the optimized graph convolutional network, each user's preference score for all bundles is predicted; based on the preference score, a list of recommended bundles is obtained.

[0161] Example 4:

[0162] This embodiment provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the bundle recommendation method based on a graph neural network of the above-mentioned embodiment 1 is implemented as follows:

[0163] Obtain data for multiple users, multiple items, and multiple bundles; construct a direct preference graph and a collaborative preference graph based on the interaction data between some users and some bundles, and construct an item-level preference hypergraph based on the interaction data between all items and all users and all bundles; the direct preference graph, collaborative preference graph, and item-level preference hypergraph are collectively referred to as a multi-view;

[0164] Input multiple views and initialized node representations into the graph convolutional network, and obtain the node representations learned for each view in the multiple views output by each convolutional layer. Based on the node representations learned for each view output by the convolutional layer, the similarity between them and the nodes in the collaborative preference graph and the item-level preference hypergraph is calculated with the direct preference graph as the target. The fusion weights of the nodes in each view are dynamically adjusted based on the similarity, the popularity of the nodes in the direct preference graph, and the number of convolutional layers. Based on the node representations learned for each view output by the convolutional layer and the corresponding fusion weights, the fused node representation output by the convolutional layer is calculated. The fused node representations of the multiple views and the output of the convolutional layer are used as the input to the next convolutional layer.

[0165] Based on the node representation learned from each view in the multi-view output of each convolutional layer, the final node embedding representation of each view is obtained respectively; based on the initialized node representation and the fused node representation output by each convolutional layer, the final node embedding representation of the fused view is obtained; the final node embedding representation of the fused view is the output of the graph convolutional network;

[0166] The final contrastive learning loss is calculated based on the final node embedding representations of each view in the multi-view and the final node embedding representation of the fused view. The recommendation task loss is calculated based on the final node embedding representation of the fused view. The total loss is calculated by combining the recommendation task loss with the final contrastive learning loss, and the graph convolutional network is optimized to update the initialized node representations through gradient backpropagation.

[0167] Based on the final node embedding representation of the fused view of all users, all bundles, and the output of the optimized graph convolutional network, each user's preference score for all bundles is predicted; based on the preference score, a list of recommended bundles is obtained.

[0168] It should be noted that the computer-readable storage medium of the present embodiment may be a computer-readable signal medium or a computer-readable storage medium or any combination thereof. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0169] The above is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes based on the technical solution and inventive concept of the present invention within the scope disclosed by the present invention, which falls within the scope of protection of the present invention.

Claims

1. A bundle recommendation method based on graph neural network, characterized in that: The method comprises: Obtain data for multiple users, multiple items, and multiple bundles; construct a direct preference graph and a collaborative preference graph based on the interaction data between some users and some bundles, and construct an item-level preference hypergraph based on the interaction data between all items and all users and all bundles; the direct preference graph, collaborative preference graph, and item-level preference hypergraph are collectively referred to as a multi-view; Input multiple views and initialized node representations into the graph convolutional network, and obtain the node representation learned by each view in the multiple views output by each convolutional layer. Based on the node representation learned by each view output by the convolutional layer, the similarity between the direct preference graph and the nodes in the collaborative preference graph and the item-level preference hypergraph is calculated with the direct preference graph as the target. The fusion weight of the nodes in each view is dynamically adjusted based on the similarity, the popularity of the nodes in the direct preference graph, and the number of convolutional layers. Based on the node representation learned by each view output by the convolutional layer and the corresponding fusion weight, the fused node representation output by the convolutional layer is calculated. The fused node representation of the multiple views and the output of the convolutional layer is used as the input of the next convolutional layer. The initialized node representation The fused node representation and the node representation of each view in the multi-view are combined through a weighted sum function to calculate the final node embedding representation z of the fused view v And the final node embedding representation of each view: Where, They are the fusion node representations of the outputs of the first and second convolutional layers respectively; is the final node embedding representation of the direct preference graph, Node representations learned from the direct preference graphs output by the first and second convolutional layers, respectively; is the final node embedding representation of the collaboration preference graph, Node representations learned from the collaborative preference graphs output by the first and second convolutional layers, respectively; is the final node embedding representation of the item-level preference hypergraph, Node representations of item-level preference hypergraph learning output from the first and second convolutional layers, respectively; Based on the final node embedding representation of each view in the multi-view and the final node embedding representation of the fused view, InfoNCE is used to calculate the contrast loss between the fused view and each view. All the contrast losses are summed to obtain the final contrastive learning loss. The recommendation task loss is calculated based on the final node embedding representation of the fused view. The total loss is calculated by combining the recommendation task loss with the final contrastive learning loss, and the graph convolutional network is optimized to update the initialized node representation through gradient backpropagation. Based on the final node embedding representation of the fused view of all users, all bundles, and the output of the optimized graph convolutional network, each user's preference score for all bundles is predicted; based on the preference score, a list of recommended bundles is obtained.

2. The bundle recommendation method according to claim 1, characterized in that: Based on the interaction data between some users and some bundles, a collaborative preference graph is constructed based on the collaborative filtering algorithm, including: Based on the interaction records between users and bundles, a similarity algorithm is used to calculate the K users closest to the current user, and a similarity algorithm is used to calculate the K bundles closest to the current bundle. The similarity between two nodes is measured by the ratio of the number of their common neighbors to the total number of their neighbors, as follows: Among them, |·| represents the number of elements contained in the set, represents the set of neighbor nodes of node i in the direct preference graph, represents the set of neighbor nodes of node j in the direct preference graph, ∩ represents the intersection operation of the set, and ∪ represents the union operation of the set; If sim(i,j) is greater than the set threshold δ, it indicates that the nodes are similar; connect each user with similar users and connect each bundle with similar bundles to obtain the collaborative preference graph By explicitly modeling the high-order information of collaborative filtering, the elements in the adjacency matrix of the collaborative preference graph are:

3. The bundle recommendation method according to claim 1, wherein: The item-level preference hypergraph is constructed based on the interaction data between all items and all users and all bundles, including: Hyperedges are used to connect bundles associated with items and users who have interacted with them, explicitly modeling high-order relationships and obtaining an item-level preference hypergraph. The adjacency matrix is: Among them, A ui Represents the historical interaction data between users and items, A bi Indicates the relationship between a bundle and an item.

4. The bundle recommendation method according to any one of claims 1 to 3, characterized in that: The multi-view and initialized node representations are input into the graph convolutional network to obtain the node representation learned by each view in the multi-view output of each convolutional layer, including: Take the first convolution layer as the convolution layer; Input each view and the initialized node representation in the multi-view graph convolutional network into the corresponding convolutional layer, and obtain the node representation of each view learned by the output of the convolutional layer, specifically including: The direct preference graph and the initialized node representation are input into the convolutional layer of the graph convolutional network for graph convolution, message propagation and neighbor aggregation operations are performed to capture the information of the graph structure and output the node representation learned by the direct preference graph; The collaboration preference graph and the initialized node representation are input into the convolutional layer of the graph convolutional network for graph convolution to extract the high-order interaction relationship between users and bundles, and output the node representation of the learned collaboration preference graph; Input the item-level preference hypergraph and the initialized node representation into the convolutional layer of the graph convolutional network for hypergraph convolution, and output the node representation of the learned item-level preference hypergraph; Calculate the fused node representation output by the convolutional layer based on the node representation learned from each view and the corresponding fusion weights; The fused node representation output by the convolutional layer is used as the initialized node table, and the next convolutional layer of the convolutional layer is used as the convolutional layer. Return each view in the multi-view and the initialized node representation to the convolutional layer in the graph convolution network and continue to perform subsequent operations, thereby obtaining the node representation learned by each view output by each convolutional layer.

5. The bundle recommendation method according to any one of claims 1 to 3, characterized in that: The calculation formula of the fusion weight is: Among them, α v,1 is the fusion weight of node v in the collaborative preference view, α v,2 is the fusion weight of node v in the item-level preference view; β1 and β2 are hyperparameters; l is the number of convolutional layers, and s(·) is the cosine similarity function; and are the node representations of the direct preference graph, collaborative preference graph, and item-level preference hypergraph learned by the output of the l-th convolutional layer; pop(·) is the popularity of node v in the direct preference graph; represents the set of neighbor nodes of node v in the direct preference graph, Represents the set of neighbor nodes of node c in the direct preference graph; Represents a user collection / bundle collection.

6. The bundle recommendation method according to any one of claims 1 to 3, characterized in that: The recommendation task adopts Bayesian personalized ranking.

7. The bundle recommendation method according to any one of claims 1 to 3, characterized in that: The inner product function is used to predict the user's preference score for the bundle.

8. A bundle recommendation system based on graph neural network, characterized in that The system comprises: A construction module is configured to obtain data for multiple users, multiple items, and multiple bundles; construct a direct preference graph and a collaborative preference graph based on the interaction data between some users and some bundles, and construct an item-level preference hypergraph based on the interaction data between all items and all users and all bundles; the direct preference graph, collaborative preference graph, and item-level preference hypergraph are collectively referred to as a multi-view; The learning and fusion module is used to input multiple views and initialized node representations into the graph convolutional network, and obtain the node representation learned for each view in the multiple views output by each convolutional layer. Based on the node representation learned for each view output by the convolutional layer, the module calculates the similarity between the nodes in the direct preference graph and the collaborative preference graph and the item-level preference hypergraph, taking the direct preference graph as the target. The module dynamically adjusts the fusion weights of the nodes in each view based on the similarity, the popularity of the nodes in the direct preference graph, and the number of convolutional layers. The module calculates the fused node representation output by the convolutional layer based on the node representation learned for each view output by the convolutional layer and the corresponding fusion weights. The fused node representation output by the multiple views and the convolutional layer is used as the input to the next convolutional layer. Output module, used to represent the initialized node The fused node representation and the node representation of each view in the multi-view are combined through a weighted sum function to calculate the final node embedding representation z of the fused view v And the final node embedding representation of each view: Where, They are the fusion node representations of the outputs of the first and second convolutional layers respectively; is the final node embedding representation of the direct preference graph, Node representations learned from the direct preference graphs output by the first and second convolutional layers, respectively; is the final node embedding representation of the collaboration preference graph, Node representations learned from the collaborative preference graphs output by the first and second convolutional layers, respectively; is the final node embedding representation of the item-level preference hypergraph, Node representations of item-level preference hypergraph learning output from the first and second convolutional layers, respectively; The optimization module is used to calculate the contrastive loss between the fused view and each view using InfoNCE based on the final node embedding representation of each view in the multi-view and the final node embedding representation of the fused view. All the contrastive losses are summed to obtain the final contrastive learning loss. The recommendation task loss is calculated based on the final node embedding representation of the fused view. The total loss is calculated by combining the recommendation task loss with the final contrastive learning loss, and the graph convolutional network is optimized to update the initialized node representation through gradient backpropagation. The prediction module is used to predict each user's preference score for all bundles based on the final node embedding representation of the fusion view of all users, all bundles, and the output of the optimized graph convolutional network; based on the preference scores, a list of recommended bundles is obtained.

9. An electronic device comprising a processor and a memory for storing a program executable by the processor, characterized in that: When the processor executes the program stored in the memory, the bundle recommendation method according to any one of claims 1 to 7 is implemented.

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

Citation Information

Patent Citations

  • Binding recommendation method based on multi-channel hypergraph neural network

    CN113177159A

  • Binding recommendation method and system based on cross-view enhancement

    CN117556101A