A recommendation system and method
By combining a graph walk model that emphasizes both diversity and accuracy, and fusing them to generate comprehensive prediction results, the problem of insufficient diversity in recommendation systems is solved, a balance between accuracy and diversity is achieved, and the user experience is improved.
Patent Information
- Application Number
- CN202211525638.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-30
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2042-11-30
AI Technical Summary
Existing recommendation systems neglect the diversity of recommended items when improving the accuracy of recommendations, resulting in users being exposed to duplicate information and affecting user satisfaction.
A first-graph walk model that focuses on diversity prediction and a second-graph walk model that focuses on accuracy prediction are adopted. The two prediction results are fused through a gating balance layer to generate a comprehensive prediction result that takes into account both accuracy and diversity.
While ensuring the accuracy of the recommendation results, the diversity of the recommendation results was improved, thereby increasing user engagement and satisfaction.
Smart Images

Figure CN115718843B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of recommendation system, and in particular, to a recommendation system and method. BACKGROUND
[0002] The recommendation system aims to predict whether a user will interact with a certain item (such as an article, news, article, multimedia file) according to the user's interest and historical behavior, and recommend items that the user may like or need to each user, so as to meet the user's needs.
[0003] With the development of the recommendation system, people focus on improving the accuracy of recommended items, but ignore the diversity of recommended items, that is, the type of recommended items is less.
[0004] However, accurate recommendation results are not necessarily satisfactory. When users access the network, finding accurate content is only one of their many needs. From the perspective of user satisfaction, accuracy is never the only standard. Among the many indicators that affect user satisfaction, diversity determines the user's participation in the recommendation scenario. Without diverse recommendation results, users are likely to be exposed to repetitive information, resulting in information redundancy. SUMMARY
[0005] The purpose of the embodiments of the present application is to provide a recommendation method and system that improves the diversity of the recommendation results while ensuring the accuracy of the recommendation results.
[0006] To achieve the above-mentioned purpose, the embodiments of the present application provide the following solutions:
[0007] A recommendation system, comprising:
[0008] an input layer, a first graph walk model focusing on diversity prediction, a second graph walk model focusing on accuracy prediction, and a gate balance layer;
[0009] The input layer is configured to generate an initial embedding vector based on input data, the input data comprising historical interaction records between users and items; the items in the input data comprise part or all of the N preset items; the users in the input data are all users; N is a positive integer;
[0010] The first graph walk model is configured to perform neighborhood aggregation based on the initial embedding vector output by the input layer to obtain a first final embedding vector, and generate a first prediction result based on the first final embedding vector; wherein the first prediction result comprises a first possibility of each item in the N items being recommended to the user; the decay factor of the first graph walk model is d = λ and λ ∈ [0, 1], and the decay factor d = λ is configured to make the first graph walk model focus on diversity prediction;
[0011] The second graph walk model is configured to perform neighborhood aggregation on the initial embedding vectors output by the input layer to obtain second final embedding vectors, and generate a second prediction result according to the second final embedding vectors; wherein the second prediction result comprises a second possibility that each of the N items is recommended to the user; and a decay factor of the second graph walk model is d = 1-λ and λ ∈ [0, 1], wherein the decay factor d = 1-λ is configured to make the second graph walk model focus on accurate prediction.
[0012] The gating balance layer is configured to fuse the first prediction result and the second prediction result to obtain a comprehensive prediction result, wherein the comprehensive prediction result comprises a comprehensive possibility that each of the N items is recommended to the user.
[0013] Optionally, the method further comprises:
[0014] The model output layer is configured to:
[0015] According to the comprehensive prediction result, a recommendation probability is calculated, wherein the recommendation probability comprises a probability that each of the N items is recommended to the user.
[0016] According to the recommendation probability, the N items are sorted in descending order, and the first n items in the sorted order are output; n is not greater than N; and n is a positive integer.
[0017] Optionally, in the aspect of generating the initial embedding vectors based on the input data, the input layer is specifically configured to:
[0018] According to historical interaction records between users and items in the input data, a user-item bipartite graph is generated; each node in the user-item bipartite graph comprises a node identifier and a node attribute; the node identifier is a user identifier or an item identifier; a node comprising a user identifier is a user node, and a node comprising an item identifier is an item node; user nodes and item nodes that have interacted are connected by edges.
[0019] According to the user-item bipartite graph, the initial embedding vectors are generated.
[0020] Optionally, the neighborhood aggregation specifically comprises:
[0021] The u-th user is subjected to k+1-th neighborhood aggregation:
[0022]
[0023] The i-th item is subjected to k+1-th neighborhood aggregation:
[0024]
[0025] wherein d is an attenuation factor, represents a symmetric normalization term, |N i represents the total number of neighbor nodes of item i, N i represents the neighbor set of item i, |N u represents the total number of neighbor nodes of user u, N u represents the neighbor set of user u, represents the k-th order embedding vector of item i, represents the k-th order embedding vector of user u, represents the initial embedding vector of user u, represents the initial embedding vector of item i.
[0026] Optionally, the fusing specifically comprises:
[0027] linearly transforming the first prediction result and the second prediction result; G = σ(W1R a +W2R d );
[0028] wherein R a represents the second prediction result, R d represents the first prediction result, W1 represents a weight coefficient of the second prediction result R a , W2 represents a weight coefficient of the first prediction result R d , σ(·) represents an activation function, and G represents a weight distribution vector, the value range of G being (0, 1);
[0029] obtaining a comprehensive prediction result Rating by weighted fusing the second prediction result R a and the first prediction result R d through matrix point multiplication;
[0030] Rating = GΘR a +(1-G)ΘR d ;
[0031] Θ represents matrix point multiplication.
[0032] The embodiment of the application further provides a recommendation method, comprising:
[0033] obtaining an initial embedding vector generated based on input data, the input data comprising historical interaction records between users and items; the items in the input data comprising part or all of the preset N items; the users in the input data being all users; N being a positive integer;
[0034] The first final embedding vector is obtained by neighborhood aggregation according to the initial embedding vector output by the input layer, and a first prediction result is generated according to the first final embedding vector; wherein the first prediction result comprises a first possibility of each item in the N items being recommended to the user; the decay factor corresponding to the first prediction result is d = λ and λ ∈ [0, 1], and the decay factor d = λ is used to make the first prediction result focus on diversity prediction;
[0035] The second final embedding vector is obtained by neighborhood aggregation according to the initial embedding vector output by the input layer, and a second prediction result is generated according to the second final embedding vector; wherein the second prediction result comprises a second possibility of each item in the N items being recommended to the user; the decay factor corresponding to the second prediction result is d = 1-λ and λ ∈ [0, 1], and the decay factor d = 1-λ is used to make the second prediction result focus on accuracy prediction;
[0036] The first prediction result and the second prediction result are fused to obtain a comprehensive prediction result, and the comprehensive prediction result comprises a comprehensive possibility of each item in the N items being recommended to the user.
[0037] Optionally, it further comprises:
[0038] According to the comprehensive prediction result, a recommendation probability is calculated; the recommendation probability comprises a probability of each item in the N items being recommended to the user;
[0039] According to the recommendation probability, the N items are sorted in descending order, and the first n items after sorting are output; n is not greater than N; n is a positive integer.
[0040] Optionally, the obtaining of the initial embedding vector based on the input data comprises:
[0041] According to the historical interaction records between users and items in the input data, a user-item bipartite graph is generated; each node in the user-item bipartite graph comprises a node identifier and a node attribute; the node identifier is a user identifier or an item identifier; a node containing a user identifier is a user node, and a node containing an item identifier is an item node; the user nodes and the item nodes that interact are connected by edges;
[0042] According to the user-item bipartite graph, an initial embedding vector is generated.
[0043] Optionally, the neighborhood aggregation comprises:
[0044] The (k+1)th neighborhood aggregation is performed on the uth user:
[0045]
[0046] The k+1th neighborhood aggregation is performed on the ith item:
[0047]
[0048] where d is a decay factor, denotes a symmetric normalization term, |N i denotes the total number of neighbor nodes of the item i, N i denotes the neighbor set of the item i, |N u denotes the total number of neighbor nodes of the user u, N u denotes the neighbor set of the user u, is the kth order embedding vector of the item i, is the kth order embedding vector of the user u, is the initial embedding vector of the user u, is the initial embedding vector of the item i.
[0049] Optionally, the fusing specifically comprises:
[0050] linearly transforming the first prediction result and the second prediction result; G = σ(W1R a +W2R d );
[0051] where R a denotes the second prediction result, R d denotes the first prediction result, W1 denotes a weight coefficient of the second prediction result R a , W2 denotes a weight coefficient of the first prediction result R d , σ(·) denotes an activation function, and G denotes a weight distribution vector, the value range of G being (0, 1);
[0052] performing weighted fusion on the second prediction result R a and the first prediction result R d by matrix dot multiplication to obtain a comprehensive prediction result Rating;
[0053] Rating = GΘR a +(1-G)ΘR d ;
[0054] Θ denotes matrix dot multiplication.
[0055] According to the embodiments provided in the application, the following technical effects are disclosed:
[0056] The embodiment of the application generates an initial embedding vector according to historical interaction records between users and items, then uses a first graph walk model focusing on diversity prediction to make a prediction based on the initial embedding vector to obtain a first prediction result, and simultaneously uses a second graph walk model focusing on accuracy prediction to make a prediction based on the initial embedding vector to obtain a second prediction result. The decay factor of the first graph walk model is d = λ and λ ∈ [0, 1], so that the first prediction result focuses on recommending diverse items to the user, and the decay factor of the second graph walk model is d = 1-λ and λ ∈ [0, 1], so that the second prediction result focuses on recommending accurate items to the user. Then, the first prediction result and the second prediction result are fused, that is, the accuracy and diversity of the prediction result are fused, and the comprehensive prediction result obtained takes into account both accuracy and diversity. That is, while ensuring the accuracy of the recommendation result, the diversity of the recommendation result is improved. BRIEF DESCRIPTION OF DRAWINGS
[0057] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the drawings needed in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.
[0058] Figure 1 A structural schematic diagram of a recommendation system provided by the embodiment of the present application;
[0059] Figure 2 A historical interaction record diagram of users and items provided by the embodiment of the present application;
[0060] Figure 3 A user-item bipartite graph provided by the embodiment of the present application;
[0061] Figure 4 A neighborhood aggregation process schematic diagram provided by the embodiment of the present application;
[0062] Figure 5 A process schematic diagram of a recommendation method provided by the embodiment of the present application.
[0063] Symbol explanation:
[0064] Input layer-1, first graph walk model-2, second graph walk model-3, gate balance layer-4. DETAILED DESCRIPTION
[0065] With reference to the accompanying drawings: the technical solutions in the embodiments of the present application will be described clearly and completely. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0066] The purpose of the present application is to provide a recommendation system and method, which solves the problem that people focus on improving the accuracy of recommended items, ignoring the diversity of recommended items, and the user may be exposed to repetitive information, leading to information redundancy.
[0067] In order to make the above-mentioned purposes, characteristics and advantages of the present application more apparent and easy to understand, the present application will be described in further detail below with reference to the accompanying drawings and specific embodiments.
[0068] Figure 1 An exemplary structure of the above-mentioned recommendation system is shown, which includes an input layer 1, a first graph walk model 2, a second graph walk model 3 and a gated balance layer 4. Each part will be described in detail below.
[0069] The input layer 1 is used to generate an initial embedding vector based on input data, and the input data includes historical interaction records between users and items; the items in the input data include part or all of the preset N items; the users in the input data are all users; N is a positive integer.
[0070] In terms of generating an initial embedding vector based on input data, the input layer 1 is specifically used to:
[0071] According to the historical interaction records between users and items in the input data, a user-item bipartite graph is generated; each node in the user-item bipartite graph includes a node identifier and a node attribute; the node identifier is a user identifier or an item identifier; the node containing the user identifier is a user node, and the node containing the item identifier is an item node; the user node and the item node that interact with each other are connected by an edge;
[0072] According to the user-item bipartite graph, an initial embedding vector is generated.
[0073] In one example, a user refers to a natural person registered account, such as a natural person's account ID on Taobao app, email, etc. An item refers to a link, address, product, news, article and multimedia file accessed by a natural person registered account. The historical interaction records between users and items can be found in Figure 2 , Figure 2 Each user u or item i is an independent node. The items include part or all of the preset N items, i.e. Figure 2(v1, v4) or (v1, v2, v3, v4). Users are u1, u2, u3, u4. All users form a set U = (u1,..., u M ), all items form a set I = (i1,..., i N ), the node set V = (U∪I), the node is the ID attribute (ID encoding) of the user or item, M represents the number of all users, and N represents the number of all items.
[0074] Referring to Figure 3 , the historical interaction records between users and items generate a user-item bipartite graph G = (V, E), all users and items in the user-item bipartite graph are uniformly numbered, that is, uniformly ID encoded. Historical interaction between a certain user and a certain item generates an edge, and all edges form an edge set E. If a user u has historical interaction with an item i (the user u clicks, browses, evaluates the item i, and the like), the historical interaction of the user u with the item i is regarded as an edge between the node u and the node i. If the user u has no interaction with the item i, there is no edge between the node u and the node i. After traversing the historical interaction records of all users and items, a user-item bipartite graph G is obtained.
[0075] Generating the initial embedding vector based on the input data specifically includes: inputting the ID encoding of the user and the item, and initializing the initial embedding vector based on the node set V in the user-item bipartite graph G. wherein W represents a word number matrix; M+N represents the number of rows; and T represents the number of columns, for example, 64 or 128. The embedding vector is initialized in the Xavier manner.
[0076] One node set V corresponds to one initial embedding vector The input data is determined to be and The number of input data is the total number (M+N) of users and items. The initial embedding vector set of all users is M represents the number of rows, and T represents the number of columns, The initial embedding vector of a single user u is The initial embedding vector set and the input data are in one-to-one mapping relationship. The initial embedding vector set of all items is N represents the number of rows, and T represents the number of columns, The initial embedding vector of a single item i is
[0077] The first graph walking model 2 is used to output the initial embedding vector of the input layer 1 The first final embedding vector is obtained by performing neighborhood aggregation, and the first prediction result is generated according to the first final embedding vector; wherein the first prediction result includes: a first possibility of each item in the N items being recommended to the user; the decay factor of the first graph walk model is d = λ and λ ∈ [0, 1], and the decay factor d = λ is used to make the first graph walk model 2 focus on diversity prediction.
[0078] In one example, the initial embedding vector is input into the first graph walk model 2 focusing on diversity prediction to perform neighborhood aggregation to generate the first prediction result of preference diversity. The first graph walk model 2 focusing on diversity prediction is a neural network model that needs to perform K times of neighborhood aggregation. Therefore, the initial embedding vector is performed K times of neighborhood aggregation, and the embedding vector E (K) generated by the last time of neighborhood aggregation is taken as the first final embedding vector. The first final embedding vector E (K) generated by neighborhood aggregation specifically includes:
[0079] Let k = 1, k ∈ [1, K];
[0080] The decay factor d = λ and λ ∈ [0, 1] is determined, and the initial embedding vector is input into the first graph walk model 2 focusing on diversity prediction;
[0081] Each initial embedding vector is performed k times of neighborhood aggregation;
[0082] Let k = k + 1, k ∈ [1, K] until k = K, to obtain the first final embedding vector E
[0083] The first prediction result is generated according to the first final embedding vector specifically includes:
[0084] The first prediction result R is a matrix including M*N elements, M corresponding to u and N corresponding to i, and T representing transposition. The first prediction result R d is a matrix including M*N elements, M corresponding to u and N corresponding to i, and T representing transposition. The first prediction result R d The element in the M(u)th row and the N(i)th column represents the possibility of recommending the item i to the user u.
[0085] The second graph walk model 3 is used to obtain the second final embedding vector by performing neighborhood aggregation on the initial embedding vector output by the input layer 1, and to generate the second prediction result according to the second final embedding vector; wherein the second prediction result includes: a second possibility of each item in the N items being recommended to the user; the decay factor of the second graph walk model 3 is d = 1-λ and λ ∈ [0, 1], and the decay factor d = 1-λ is used to make the second graph walk model 3 focus on accuracy prediction.
[0086] In one example, the initial embedding vectors are input into the second graph walk model 3 focusing on accuracy prediction for neighborhood aggregation to generate the second prediction result of preference accuracy. The second graph walk model 3 focusing on accuracy prediction is a neural network model that needs to be aggregated for K times. Therefore, the initial embedding vectors are aggregated for K times, and the embedding vector E (K) generated by the last time of neighborhood aggregation is taken as the second final embedding vector. The neighborhood aggregation generates the second final embedding vector E (K) Specifically includes:
[0087] Let k = 1, k ∈ [1, K];
[0088] Determine the decay factor d = 1 - λ and λ ∈ [0, 1], and input the initial embedding vectors into the second graph walk model 3 focusing on accuracy prediction;
[0089] For each initial embedding vector , the k-th time of neighborhood aggregation is performed;
[0090] Let k = k + 1, k ∈ [1, K] until k = K, and the second final embedding vector E
[0091] Generating the second prediction result according to the second final embedding vector specifically includes:
[0092] The second prediction result R is a matrix including M*N elements, M corresponding to u, N corresponding to i, and T representing transposition. The second prediction result R a is a matrix including M*N elements, M corresponding to u, N corresponding to i, and T representing transposition. The second prediction result R a The element in the M(u)th row and the N(i)th column represents the possibility of recommending the item i to the user u.
[0093] In another example, the first graph walk model 2 and the second graph walk model 3 do not contain the feature transformation and nonlinear activation components specific to the traditional graph convolutional neural network model, but only keep the neighborhood aggregation component.
[0094] The gating balance layer 4 is used to fuse the first prediction result R d and the second prediction result R a to obtain a comprehensive prediction result, and the comprehensive prediction result includes the comprehensive possibility of each item in the N items being recommended to the user.
[0095] In one example, a balancing method is determined in the training process of the first graph walk model 2 focusing on diversity prediction and the second graph walk model 3 focusing on accuracy prediction, the balancing method is a gating mechanism, and a comprehensive prediction result Rating is generated. The comprehensive prediction result Rating is a matrix including M*N elements, M corresponds to u, and N corresponds to i. The element of the M(u)th row and the N(i)th column of the comprehensive prediction result Rating represents a comprehensive possibility of recommending the item i to the user u.
[0096] In summary, the recommendation system and method provided by the embodiment of the application expand the neighborhood information range of the traditional node set V, fuse the first prediction result R d and the second prediction result R a to obtain the comprehensive prediction result Rating, thereby ensuring the accuracy of the recommendation result and improving the diversity of the recommendation result.
[0097] The model output layer is configured to calculate a recommendation probability according to the comprehensive prediction result Rating; the recommendation probability includes a probability of each item in the N items being recommended to the user.
[0098] The N items are sorted in descending order according to the recommendation probability, and the first n items after sorting are output; n is not greater than N; n is a positive integer.
[0099] In one example, the model output layer adopts a Sigmoid activation function to normalize the comprehensive prediction result Rating to calculate the recommendation probability, and the value range of the recommendation probability is limited to (0, 1). The recommendation probability is sorted in descending order, and the first n items after sorting are output.
[0100] Please refer to Figure 4 , k represents the number of layers, and u0, u2, u3, i0, i2, and i4 are taken as examples. The neighborhood aggregation specifically includes:
[0101] The k+1th neighborhood aggregation is performed on the kth embedding vector of the uth user:
[0102]
[0103] The k+1th neighborhood aggregation is performed on the kth embedding vector of the ith item:
[0104]
[0105] wherein d is a decay factor, represents a symmetric normalization term, and |N i | represents the total number of neighbor nodes of the item i, N i is the neighbor set of the item i, and |N u N represents the total number of neighbor nodes of the user u u is a neighbor set of the user u, is the kth order embedding vector of the item i, is the kth order embedding vector of the user u, is the initial embedding vector of the user u, is the initial embedding vector of the item i.
[0106] The fusion specifically includes:
[0107] linearly transforming the first prediction result and the second prediction result;
[0108] G = σ (W1R a +W2R d ) ;
[0109] wherein, R a represents the second prediction result, R d represents the first prediction result, W1 represents the weight coefficient of the second prediction result R a , W2 represents the weight coefficient of the first prediction result R d , σ (·) represents an activation function, and G represents a weight distribution vector, the value range of G being (0, 1) ;
[0110] The second prediction result R a and the first prediction result R d are weighted and fused by matrix point multiplication to obtain a comprehensive prediction result Rating;
[0111] Rating = GΘR a +(1-G)ΘR d ;
[0112] Θ represents matrix point multiplication.
[0113] In other embodiments of the present application, in the training process, the first graph walk model 2 and the second graph walk model 3, the only trainable parameters are the initial embedding vector E (0) of the 0th layer (k = 0), the weight coefficient W1 of the second prediction result R a , and the weight coefficient W2 of the first prediction result R d , the above E (0) , W1 and W2 parameters are initialized in the Xavier manner.
[0114] Please refer to Figure 5 , the embodiment of the present application further provides a recommendation method, comprising:
[0115] Step 1: obtaining an initial embedding vector based on input data, the input data including historical interaction records between users and items; the items in the input data including part or all of the N preset items; the users in the input data including all users; and N being a positive integer.
[0116] Step 1 can be specifically performed by the aforementioned input layer 1, and details can be referred to the introduction of the input layer 1, which will not be repeated here.
[0117] Step 2: obtaining a first final embedding vector by neighborhood aggregation based on the initial embedding vector output by the input layer, and generating a first prediction result based on the first final embedding vector; wherein the first prediction result includes a first possibility of each item in the N items being recommended to the user; the decay factor corresponding to the first prediction result is d = λ and λ ∈ [0, 1], and the decay factor d = λ is used to make the first prediction result focus on diversity prediction.
[0118] Step 2 can be specifically performed by the aforementioned first graph walk model 2, and details can be referred to the introduction of the first graph walk model 2, which will not be repeated here.
[0119] At the same time of performing Step 2, Step 3 can also be performed: obtaining a second final embedding vector by neighborhood aggregation based on the initial embedding vector output by the input layer, and generating a second prediction result based on the second final embedding vector; wherein the second prediction result includes a second possibility of each item in the N items being recommended to the user; the decay factor corresponding to the second prediction result is d = 1-λ and λ ∈ [0, 1], and the decay factor d = 1-λ is used to make the second prediction result focus on accuracy prediction.
[0120] Step 3 can be specifically performed by the aforementioned second graph walk model 3, and details can be referred to the introduction of the second graph walk model 3, which will not be repeated here.
[0121] Step 4: fusing the first prediction result and the second prediction result to obtain a comprehensive prediction result, the comprehensive prediction result including a comprehensive possibility of each item in the N items being recommended to the user.
[0122] Step 4 can be specifically performed by the aforementioned gating balance layer 4, and details can be referred to the introduction of the gating balance layer 4, which will not be repeated here.
[0123] In other embodiments of the present application, the recommendation method in all the above embodiments can further include:
[0124] Step 41: calculating a recommendation probability according to the comprehensive prediction result; the recommendation probability including a probability of each item in the N items being recommended to the user;
[0125] Ranking the N items in descending order according to the recommendation probability, and outputting the top n items in the ranking; n is not greater than N; n is a positive integer.
[0126] The step 41 can be specifically performed by the aforementioned gating balance layer 4, and details can be referred to the aforementioned gating balance layer 4, which will not be repeated here.
[0127] In other embodiments of the present application, the recommendation method in all the above embodiments can further include:
[0128] The step 11 of obtaining the initial embedding vector based on the input data specifically includes:
[0129] According to the historical interaction record between the user and the item in the input data, a user-item bipartite graph is generated; each node in the user-item bipartite graph includes: node identifier and node attribute; the node identifier is a user identifier or an item identifier; the node containing the user identifier is a user node, and the node containing the item identifier is an item node; the user node and the item node that interact with each other are connected by an edge;
[0130] According to the user-item bipartite graph, an initial embedding vector is generated.
[0131] The step 11 can be specifically performed by the aforementioned input layer 1, and details can be referred to the aforementioned input layer 1, which will not be repeated here.
[0132] In other embodiments of the present application, the recommendation method in all the above embodiments can further include:
[0133] The step 21 of neighborhood aggregation specifically includes:
[0134] The k+1th neighborhood aggregation is performed on the uth user:
[0135]
[0136] The k+1th neighborhood aggregation is performed on the ith item:
[0137]
[0138] Wherein, d is a decay factor, represents a symmetric normalization term, |N i | represents the total number of neighbor nodes of the item i, N i is the neighbor set of the item i, |N u | represents the total number of neighbor nodes of the user u, N u is the neighbor set of the user u, is the kth order embedding vector of the item i, is the kth order embedding vector of the user u, is the initial embedding vector of the user u, An initial embedding vector for the item i.
[0139] The step 21 can be specifically performed by the first graph walk model 2 and the second graph walk model 3 described above, and details can be referred to the descriptions of the first graph walk model 2 and the second graph walk model 3, which are not repeated here.
[0140] In other embodiments of the present application, the recommendation method in all the above embodiments can further include:
[0141] The step 42 specifically includes:
[0142] performing linear transformation on the first prediction result and the second prediction result;
[0143] G = σ(W1R a +W2R d );
[0144] wherein R a represents the second prediction result, R d represents the first prediction result, W1 represents a weight coefficient of the second prediction result R a , W2 represents a weight coefficient of the first prediction result R d , σ(·) represents an activation function, and G represents a weight distribution vector, the value range of G being (0, 1);
[0145] performing weighted fusion on the second prediction result R a and the first prediction result R d by matrix point multiplication to obtain a comprehensive prediction result Rating;
[0146] Rating = GΘR a +(1-G)ΘR d ;
[0147] Θ represents matrix point multiplication.
[0148] The step 42 can be specifically performed by the gate balance layer 4 described above, and details can be referred to the descriptions of the gate balance layer 4, which are not repeated here.
[0149] The embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other.
[0150] The principles and implementation manners of the embodiments of the present application are described by using specific examples in the present application, and the above examples are only used for helping to understand the method and the core idea of the embodiments of the present application; meanwhile, for the general technical personnel in the art, according to the idea of the embodiments of the present application, the specific implementation manners and application ranges will be changed. In conclusion, the content of the present application should not be understood as the limitation of the embodiments of the present application.
Claims
1. A recommendation system, characterized in that, The method comprises the following steps: an input layer, a first graph walk model focusing on diversity prediction, a second graph walk model focusing on accuracy prediction, and a gating balance layer; the input layer is configured to generate an initial embedding vector based on input data, wherein the input data comprises historical interaction records between users and items; the users refer to accounts registered by natural persons; the items refer to links, addresses, products, news, articles, and multimedia files accessed by the accounts registered by the natural persons; the items in the input data comprise part or all of a preset N items; all the users in the input data; N is a positive integer; The first graph walk model is used to perform neighborhood aggregation on the initial embedding vector output by the input layer to obtain a first final embedding vector, and generate a first prediction result according to the first final embedding vector; wherein the first prediction result includes a first possibility that each item in the N items is recommended to the user; and an attenuation factor of the first graph walk model is and , the attenuation factor is used to make the first graph walk model focus on diversity prediction; The second graph walk model is configured to perform neighborhood aggregation on the initial embedding vector output by the input layer to obtain a second final embedding vector, and generate a second prediction result according to the second final embedding vector; wherein the second prediction result comprises a second possibility that each item in the N items is recommended to the user; and an attenuation factor of the second graph walk model is and , the attenuation factor is configured to make the second graph walk model focus on accurate prediction. the gating balance layer is configured to fuse the first prediction result and the second prediction result to obtain a comprehensive prediction result, wherein the comprehensive prediction result comprises a comprehensive possibility that each item in the N items is recommended to the user.
2. The recommendation system of claim 1, wherein, The method further comprises the following steps: a model output layer configured to: calculate a recommendation probability according to the comprehensive prediction result; the recommendation probability comprises a probability that each item in the N items is recommended to the user; perform descending order sorting on the N items according to the recommendation probability, and output the first n items in the sorted order; n is not greater than N; n is a positive integer.
3. The recommendation system of claim 1, wherein, In the aspect of generating the initial embedding vector based on the input data, the input layer is specifically configured to: generate a user-item bipartite graph according to the historical interaction records between the users and the items in the input data; each node in the user-item bipartite graph comprises a node identifier and a node attribute; the node identifier is a user identifier or an item identifier; a node containing a user identifier is a user node, and a node containing an item identifier is an item node; user nodes and item nodes that have interacted are connected by edges; generate the initial embedding vector according to the user-item bipartite graph.
4. The recommendation system of claim 1, wherein, The neighborhood aggregation specifically comprises: performing the k+1th neighborhood aggregation on the u-th user: ; performing the k+1th neighborhood aggregation on the i-th item: ; where d is a decay factor, denotes the symmetric normalization term, denotes the total number of neighbor nodes of item i, denotes the neighbor set of item i, denotes the total number of neighbor nodes of user u, denotes the neighbor set of user u, denotes the k-th order embedding vector of item i, denotes the k-th order embedding vector of user u, denotes the initial embedding vector of user u, denotes the initial embedding vector of item i.
5. The recommendation system of claim 1, wherein, The fusion specifically comprises: performing linear transformation on the first prediction result and the second prediction result; the formula is as follows: ; wherein, represents a second prediction result, represents a first prediction result, represents a second prediction result R a a weight coefficient of the first prediction result R represents a first prediction result R d a weight coefficient of the second prediction result R represents an activation function, represents a weight distribution vector, a value range of the weight distribution vector is (0, 1); The second prediction result is fused with the first prediction result by weighted fusion to obtain a comprehensive prediction result and the first prediction result ; ; denotes a matrix point multiplication.
6. A recommendation method based on the recommendation system of any of the preceding claims 1-5, characterized in that, The method comprises the following steps: obtain an initial embedding vector based on input data, wherein the input data comprises historical interaction records between users and items; the users refer to accounts registered by natural persons; the items refer to links, addresses, products, news, articles, and multimedia files accessed by the accounts registered by the natural persons; the items in the input data comprise part or all of a preset N items; all the users in the input data; N is a positive integer; The first final embedding vector is obtained by neighborhood aggregation according to the initial embedding vector output by the input layer, and a first prediction result is generated according to the first final embedding vector; wherein the first prediction result comprises a first possibility that each item in the N items is recommended to the user; and the decay factor corresponding to the first prediction result is and the decay factor is used to make the first prediction result focus on the diversity prediction. The second final embedding vector is obtained by neighborhood aggregation according to the initial embedding vector output by the input layer, and a second prediction result is generated according to the second final embedding vector; wherein the second prediction result comprises a second possibility of each item in the N items being recommended to the user; and the decay factor corresponding to the second prediction result is and , the decay factor is used to make the second prediction result focus on accurate prediction. fuse the first prediction result and the second prediction result to obtain a comprehensive prediction result, wherein the comprehensive prediction result comprises a comprehensive possibility that each item in the N items is recommended to the user.
7. The recommendation method of claim 6, wherein, The method further comprises the following steps: calculate a recommendation probability according to the comprehensive prediction result; the recommendation probability comprises a probability that each item in the N items is recommended to the user; perform descending order sorting on the N items according to the recommendation probability, and output the first n items in the sorted order; n is not greater than N; n is a positive integer.
8. The recommendation method of claim 6, wherein, The obtaining of the initial embedding vector based on the input data specifically comprises: According to a historical interaction record between a user and an item in the input data, a user-item bipartite graph is generated; each node in the user-item bipartite graph comprises a node identifier and a node attribute; the node identifier is a user identifier or an item identifier; a node comprising a user identifier is a user node, and a node comprising an item identifier is an item node; user nodes and item nodes that have interacted are connected by edges; According to the user-item bipartite graph, an initial embedding vector is generated.
9. The recommendation method of claim 6, wherein, The neighborhood aggregation specifically comprises: The u-th user is subjected to k+1-th neighborhood aggregation: ; The i-th item is subjected to k+1-th neighborhood aggregation: ; where d is a decay factor, denotes the symmetric normalization term, denotes the total number of neighbor nodes of item i, is the neighbor set of item i, denotes the total number of neighbor nodes of user u, is the neighbor set of user u, is the k-th order embedding vector of item i, is the k-th order embedding vector of user u, is the initial embedding vector of user u, is the initial embedding vector of item i.
10. The recommendation method of claim 6, wherein, The fusion specifically comprises: The first prediction result and the second prediction result are subjected to linear transformation; The formula is as follows: ; wherein, represents a second prediction result, represents a first prediction result, represents a second prediction result R a a weight coefficient of the first prediction result R represents a first prediction result R d a weight coefficient of the first prediction result R represents an activation function, represents a weight distribution vector, a value range of (0, 1); performing weighted fusion on the second prediction result and the first prediction result to obtain a comprehensive prediction result and the first prediction result performing weighted fusion on the second prediction result and the first prediction result to obtain a comprehensive prediction result ; ; denotes a matrix point multiplication.
Citation Information
Patent Citations
Information recommendation method, system and equipment based on graph neural network, and storage medium
CN113468227A
Social recommendation method and system based on graph convolutional network
CN114036405A