An item rating prediction method, device, system, and storage medium

CN115759381BActive Publication Date: 2026-09-04GUILIN UNIV OF ELECTRONIC TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211413372.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-11
Publication Date
2026-09-04
Estimated Expiration
2042-11-11

AI Technical Summary

Technical Problem

现有的方法并不能令目标节点聚合到更相关的邻居节点的信息,从而导致物品的评分预测结果精准度不高

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115759381B_ABST
    Figure CN115759381B_ABST
Patent Text Reader

Abstract

The application provides an article score prediction method, device and system and a storage medium, and belongs to the field of article recommendation. The method comprises the following steps: preprocessing original score data to obtain an interaction graph; sampling and analyzing the interaction graph to obtain a target user node, a target article node, target user data and target article data; performing feature learning on the target user node and the target user data to obtain a user global vector; and performing feature learning on the target article node and the target article data to obtain an article global vector. In the modeling of user score prediction of articles, the target node can be aggregated to more relevant neighbor nodes, so that a more accurate score prediction result can be generated, which has significant value and significance for improving the recommendation accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of item recommendation technology, specifically to an item rating prediction method, device, system, and storage medium. Background Technology

[0002] Recommender systems, as information filtering systems, can effectively solve the problem of information overload and have practical significance for promoting production and improving quality of life. How to utilize deep learning technology to extract user interests and preferences from user interactions with items, and to predict ratings (preference predictions) for items that users have not yet interacted with, has been a focus of academia and industry. Existing methods cannot aggregate information from more relevant neighboring nodes to the target node, resulting in low accuracy in item rating predictions. Summary of the Invention

[0003] The technical problem to be solved by the present invention is to provide a method, apparatus, system and storage medium for predicting item ratings, which addresses the shortcomings of the prior art.

[0004] The technical solution of this invention to solve the above-mentioned technical problems is as follows: A method for predicting item rating, comprising the following steps:

[0005] Multiple raw rating data are obtained from a preset database, and all the raw rating data are preprocessed to obtain an interaction graph;

[0006] The interaction graph is sampled and analyzed to obtain an interaction subgraph, which includes multiple target user nodes, multiple target item nodes, target user data corresponding to each target user node, and target item data corresponding to each target item node.

[0007] Feature learning is performed on each target user node and the target user data corresponding to each target user node to obtain the global user vector of each target user node.

[0008] Feature learning is performed on each target item node and the target item data corresponding to each target item node to obtain the global item vector of each target item node;

[0009] The dot product of the global vector of each target user node and the global vector of each target item node is used to obtain multiple predicted item scores for each target user node, and all predicted item scores of all target user nodes are used as the item score prediction result.

[0010] Another technical solution of the present invention to solve the above-mentioned technical problems is as follows: an item rating prediction device, comprising:

[0011] The preprocessing module is used to obtain multiple raw rating data from a preset database, preprocess all the raw rating data, and obtain an interaction graph.

[0012] The sampling analysis module is used to perform sampling analysis on the interaction graph to obtain an interaction subgraph. The interaction subgraph includes multiple target user nodes, multiple target item nodes, target user data corresponding to each of the target user nodes, and target item data corresponding to each of the target item nodes.

[0013] The user feature learning module is used to learn the features of each target user node and the target user data corresponding to each target user node, so as to obtain the global user vector of each target user node.

[0014] The item feature learning module is used to learn the features of each target item node and the target item data corresponding to each target item node, so as to obtain the global vector of each target item node.

[0015] The prediction result acquisition module is used to perform dot product calculation on the user global vector of each target user node and the item global vector of each target item node to obtain multiple item prediction scores for each target user node, and to use all item prediction scores of all target user nodes as the item score prediction result.

[0016] Based on the above-mentioned item rating prediction method, the present invention also provides an item rating prediction system.

[0017] Another technical solution of the present invention to solve the above-mentioned technical problems is as follows: an item rating prediction system, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the item rating prediction method as described above.

[0018] Based on the above-described item rating prediction method, the present invention also provides a computer-readable storage medium.

[0019] Another technical solution of the present invention to solve the above-mentioned technical problems is as follows: a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the item rating prediction method as described above.

[0020] The beneficial effects of this invention are as follows: By preprocessing the original rating data to obtain an interaction graph, sampling and analysis of the interaction graph to obtain target user nodes, target item nodes, target user data, and target item data, learning the target user node features of the target user nodes and target user data to obtain a user global vector, learning the target item node features of the target item nodes and target item data to obtain an item global vector, and calculating the item rating prediction result based on the dot product of the user global vector and the item global vector, the invention enables target nodes to aggregate information from more relevant neighbor nodes in the user rating prediction model, thereby generating more accurate rating prediction results, which has significant value and significance for improving recommendation accuracy. Attached Figure Description

[0021] Figure 1 This is a flowchart illustrating an item rating prediction method provided in an embodiment of the present invention;

[0022] Figure 2 An interactive diagram illustrating an item rating prediction method provided in an embodiment of the present invention;

[0023] Figure 3 This is a block diagram of an item rating prediction device provided in an embodiment of the present invention. Detailed Implementation

[0024] The principles and features of the present invention are described below with reference to the accompanying drawings. The examples given are only for explaining the present invention and are not intended to limit the scope of the present invention.

[0025] Figure 1 This is a flowchart illustrating an item rating prediction method provided in an embodiment of the present invention.

[0026] like Figure 1 As shown, an item rating prediction method includes the following steps:

[0027] Multiple raw rating data are obtained from a preset database, and all the raw rating data are preprocessed to obtain an interaction graph;

[0028] The interaction graph is sampled and analyzed to obtain an interaction subgraph, which includes multiple target user nodes, multiple target item nodes, target user data corresponding to each target user node, and target item data corresponding to each target item node.

[0029] Feature learning is performed on each target user node and the target user data corresponding to each target user node to obtain the global user vector of each target user node.

[0030] Feature learning is performed on each target item node and the target item data corresponding to each target item node to obtain the global item vector of each target item node;

[0031] The dot product of the global vector of each target user node and the global vector of each target item node is used to obtain multiple predicted item scores for each target user node, and all predicted item scores of all target user nodes are used as the item score prediction result.

[0032] It should be understood that a user-item interaction graph (i.e., the interaction graph) is constructed by preprocessing the user rating data for items (i.e., the original rating data).

[0033] It should be understood that user rating data for items (i.e., the original rating data) is exported from the database (i.e., the preset database), specifically represented as (user id, item id, rating value).

[0034] Specifically, the interaction subgraph is used to learn the features of the nodes using a graph neural network to obtain the embedding representation of the target user node (i.e., the user global vector) and the embedding representation of the target item (i.e., the item global vector), and then the predicted score (i.e., the item predicted score) is obtained by calculating the dot product.

[0035] Specifically, the dot product is calculated using the following formula to obtain the user u. i For item v j The predicted score (i.e., the predicted score of the item),

[0036]

[0037] In the above embodiments, an interaction graph is obtained by preprocessing the original rating data. The target user node, target item node, target user data, and target item data are obtained by sampling and analysis of the interaction graph. The user global vector is obtained by learning the target user node features of the target user node and the target user data. The item global vector is obtained by learning the target item node features of the target item node and the target item data. The item rating prediction result is obtained by calculating the dot product of the user global vector and the item global vector. In the modeling of user rating prediction for items, the target node can be aggregated to information of more relevant neighbor nodes, thereby generating a more accurate rating prediction result, which has significant value and significance for improving recommendation accuracy.

[0038] Optionally, as an embodiment of the present invention, such as Figure 1 and 2 As shown, the process of preprocessing all the original rating data to obtain the interaction graph includes:

[0039] A rating matrix is ​​constructed using all the original rating data, and the rating matrix includes multiple user IDs and multiple item IDs.

[0040] Import the original user vector corresponding to each user ID and the original item vector corresponding to each item ID. Then, filter out the user IDs and / or item IDs that are not equal to the preset values ​​from all the user IDs and all the item IDs. Construct an interaction graph using all the filtered user IDs, all the filtered item IDs, the original user vectors corresponding to all the filtered user IDs, and the original item vectors corresponding to all the filtered item IDs.

[0041] Preferably, the preset value can be 0.

[0042] It should be understood that the rating data (i.e., the raw rating data) is preprocessed to obtain the user-item rating matrix. (i.e., the rating matrix). Where m and n are the total number of users and items, respectively; r ij ∈R represents user u i For item v j The rating, r ij The value of r reflects the user's preference for the item; the higher the value, the more the user likes it. ij A value of 0 indicates u i v not j Once a score has been assigned, predictions are required.

[0043] Specifically, user nodes, item nodes, and user-item edges are constructed for all non-zero content in the rating matrix to generate a user-item interaction graph G. R ={U,V,ε R} (i.e., the interaction graph). Where U is the set of user nodes, V is the set of item nodes, and ε R It is a collection of user-item edges.

[0044] In the above embodiments, the interaction graph is obtained by preprocessing all the original scoring data, which enables accurate extraction of the data that needs to be processed, reduces the amount of data, and saves time.

[0045] Optionally, as an embodiment of the present invention, the interaction graph includes multiple user nodes to be sampled and multiple item nodes to be sampled; wherein, each user node to be sampled corresponds to a user node vector to be sampled, multiple neighbor nodes to be sampled, and a neighbor node vector to be sampled that corresponds one-to-one with each of the neighbor nodes to be sampled; each item node to be sampled corresponds to an item node vector to be sampled, multiple neighbor nodes to be sampled, and a neighbor node vector to be sampled that corresponds one-to-one with each of the neighbor nodes to be sampled.

[0046] The process of sampling and analyzing the interaction graph to obtain the interaction subgraph includes:

[0047] Based on the consistency scores of each user node to be sampled, each item node to be sampled, the user node vector corresponding to each user node to be sampled, multiple neighbor nodes of items to be sampled, multiple neighbor nodes of users to be sampled, the item node vector corresponding to each item node to be sampled, multiple neighbor nodes of items to be sampled, and multiple neighbor nodes of items to be sampled, the consistency scores of multiple users for each user node to be sampled and the consistency scores of multiple items for each item node to be sampled are obtained.

[0048] Based on all neighbor nodes corresponding to each user neighbor node to be sampled and all neighbor nodes corresponding to each item neighbor node to be sampled, the number of user neighbor nodes and the number of item neighbor nodes to be sampled are analyzed to obtain the number of user neighbor nodes and the number of item neighbor nodes for each user node to be sampled.

[0049] The user consistency scores of each user node to be sampled are sorted in descending order to obtain the sorted user consistency scores of each user node to be sampled.

[0050] The neighboring nodes of each user node to be sampled, corresponding to the first n sorted user consistency scores, are taken as the user nodes to be constructed for the user node to be sampled, where n is the number of user neighboring nodes.

[0051] The multiple item consistency scores of each of the sampled item nodes are sorted in descending order to obtain multiple sorted item consistency scores for each of the sampled item nodes.

[0052] The first m neighboring nodes of each of the sampled item nodes corresponding to the first m sorted item consistency scores are taken as the item nodes to be constructed for the sampled item node, where m is the number of item neighboring nodes;

[0053] An interaction subgraph is constructed by all user nodes to be constructed from all user nodes to be sampled and all item nodes to be constructed from all item nodes to be sampled.

[0054] It should be understood that the neighboring nodes of the target user node (i.e., the user node to be sampled) and the target item node (i.e., the item node to be sampled) in the user-item interaction graph are adaptively sampled based on the consistency of the query features to obtain the sampled interaction subgraph.

[0055] It should be understood that, regarding u i and v j According to the consistency score CS(x∈N(u) i (i.e., the user consistency score) and CS(y∈N(v) j (i.e., the consistency score of the item) respectively in G R The top NS(u) with the highest scores were sampled from the middle. i (i.e., the number of user neighbor nodes) and NS(v) j (i.e., the number of neighboring nodes of the item) neighboring nodes, and the unsampled neighboring nodes will be in G. R Eliminating the middle part, we obtain the interaction subgraph after dynamic neighbor sampling.

[0056] Specifically, after sampling, u i and v j In the interaction subgraph The neighboring nodes in the sample are called "sampled neighboring nodes", and let and They represent the samples after u i and v j The set of neighbor nodes. After performing consistency score calculation and dynamic neighbor sampling, for the target user node (i.e., the user node to be sampled) and the target item node (i.e., the item node to be sampled), neighbor nodes that are more consistent with the query features can be selected. This allows the filtering out of noise information from irrelevant neighbor nodes when using graph neural network algorithms to model the user-item interaction graph, thereby improving the accuracy of score prediction.

[0057] In the above embodiments, sampling analysis of the interaction graph yields an interaction subgraph, which allows for the selection of neighboring nodes that are more consistent with the query features. This filters out noise information from irrelevant neighboring nodes, thereby improving the accuracy of score prediction.

[0058] Optionally, as an embodiment of the present invention, the process of analyzing consistency scores based on each of the user nodes to be sampled, each of the item nodes to be sampled, the user node vector corresponding to each user node to be sampled, multiple neighbor nodes of the item to be sampled, multiple neighbor node vectors of the user nodes to be sampled, the item node vector corresponding to each item node to be sampled, multiple neighbor nodes of the item to be sampled, and multiple neighbor node vectors of the item to be sampled, to obtain multiple user consistency scores for each user node to be sampled and multiple item consistency scores for each item node to be sampled includes:

[0059] Based on the first formula, query features are calculated according to each of the user nodes to be sampled, each of the item nodes to be sampled, the user node vector corresponding to each of the user nodes to be sampled, and the item node vector corresponding to each of the item nodes to be sampled, to obtain the query features of each user node to be sampled and each item node to be sampled. The first formula is:

[0060]

[0061] Based on the second formula, user consistency scores are calculated according to each user node to be sampled, the user node vector corresponding to each user node to be sampled, each neighbor node of the user node to be sampled, the neighbor node vector corresponding to each neighbor node of the user node to be sampled, and the query features of each user node to be sampled and each item node to be sampled, to obtain multiple user consistency scores for each user node to be sampled. The second formula is:

[0062]

[0063] Based on the third formula, item consistency scores are calculated according to each of the sampled item nodes, the sampled item node vectors corresponding to each sampled item node, each sampled item neighbor node, the sampled item neighbor node vectors corresponding to each sampled item neighbor node, and the query features of each sampled user node and each sampled item node, to obtain multiple item consistency scores for each sampled item node. The third formula is:

[0064]

[0065] Where CS(y∈N(v) j Let N(v) be the item consistency score of the neighbor nodes of the y-th item to be sampled. j Let ) be the set of neighboring nodes of the item to be sampled, and e y Let be the neighbor node vector of the y-th neighbor node of the item to be sampled. CS(x∈N(u i )) represents the user consistency score of the neighbor nodes of the x-th user to be sampled, N(u i Let ) be the set of neighbor nodes of the user to be sampled, and e x Let x be the neighbor node vector of the x-th user to be sampled. Let i be the query features of the i-th user node to be sampled and the j-th item node to be sampled. Let be the vector of the user nodes to be sampled corresponding to the i-th user node to be sampled. Let be the vector of the j-th item node to be sampled. u i For the i-th user node to be sampled, v j Let be the j-th item node to be sampled, and d be the dimension of the vector. For vector concatenation, ReLU(·) is the ReLU activation function, W q For learnable parameters, It is the square of the L2 norm.

[0066] It should be understood that, let u i and v j Let Q(u) represent the target user node (i.e., the user node to be sampled) and the target item node (i.e., the item node to be sampled) to be queried, respectively, and consider them together as a set of query objects Q(u). i ,v j ), indicating that it is necessary to predict u. i For v j The rating.

[0067] It should be understood that the L2 norm is the square root of the sum of the squares of the individual parameters.

[0068] It should be understood that the following formula is used for Q(u) i ,v j Generate query features

[0069]

[0070] in and u i and v j The embedding vector, where d is the dimension of the embedding vector; Represents vector concatenation; ReLU(·) is the ReLU activation function; These are learnable parameters.

[0071] Specifically, u is calculated using the following formulas respectively. i and v jThe embedding vectors of each neighbor node and Consistency score CS:

[0072]

[0073]

[0074] Where N(u) i ) and N(v j ) represent u respectively i and v j The set of neighboring nodes, x and y are N(u i ) and N(v j Nodes in ) and These are the embedding vectors for x and y, respectively.

[0075] In the above embodiments, user consistency scores and item consistency scores are obtained by analyzing the consistency scores of the user node to be sampled, the item node to be sampled, the user node vector to be sampled, the neighbor node to be sampled, the neighbor node vector to be sampled, the item node vector to be sampled, the neighbor node to be sampled, and the neighbor node vector to be sampled. Neighbor nodes that are more consistent with the query features can be selected, thereby filtering out the noise information of irrelevant neighbor nodes when using graph neural network algorithms to model the user-item interaction graph, thereby improving the accuracy of rating prediction.

[0076] Optionally, as an embodiment of the present invention, the process of performing neighbor node number analysis based on all neighbor nodes corresponding to each user neighbor node to be sampled and all neighbor nodes corresponding to each item neighbor node to be sampled to obtain the number of user neighbor nodes and the number of item neighbor nodes to be sampled for each user node to be sampled includes:

[0077] The total number of all neighboring nodes of each user to be sampled and the total number of all neighboring nodes of each item to be sampled are counted respectively, so as to obtain the total number of user neighboring nodes of each user to be sampled and the total number of item neighboring nodes of each item to be sampled.

[0078] The median is calculated based on the total number of user neighbor nodes of all the user neighbor nodes to be sampled and the total number of item neighbor nodes of all the item neighbor nodes to be sampled, thus obtaining the user median and the item median of the user neighbor nodes to be sampled.

[0079] Based on the fourth formula, the number of user neighbor nodes is calculated according to the median of the neighbor nodes of the user to be sampled and the total number of user neighbor nodes of each of the user to be sampled. The fourth formula is:

[0080]

[0081] Based on the fifth formula, the number of neighboring nodes of each sampled item is calculated according to the median of the neighboring nodes of the sampled item and the total number of neighboring nodes of each sampled item. The fifth formula is:

[0082]

[0083] Among them, NS(v j ) represents the number of neighboring nodes of the j-th item node to be sampled, M. v The median of the items. Let p be the total number of neighboring nodes of the j-th item node to be sampled, p be the sampling ratio, min(·) be the minimum value calculation, and NS(u i () represents the number of neighboring nodes of the i-th user node to be sampled. M represents the total number of neighboring nodes of the i-th user node to be sampled. u This represents the median number of users.

[0084] It should be understood that u is adaptively calculated using the following formulas. i and v j The number of neighboring nodes to be sampled NS(u i (i.e., the number of user neighbor nodes) and NS(v) j (i.e., the number of neighboring nodes of the item):

[0085]

[0086]

[0087] in and G R in u i and v j The total number of neighboring nodes; and u i and v j The median of the distribution of the number of neighboring nodes of all nodes in the set space (U or V); p represents the sampling ratio, ranging from 0.1 to 0.9; min(·) represents taking the smaller of the two values.

[0088] In the above embodiments, the number of neighboring nodes of the user and the item to be sampled is obtained by analyzing the number of neighboring nodes of the user and the item to be sampled. The number of neighboring nodes can be obtained adaptively, and the noise information of irrelevant neighboring nodes can be filtered out, thereby improving the accuracy of the score prediction.

[0089] Optionally, as an embodiment of the present invention, the target user data includes the target user node vector, a plurality of target user neighbor nodes, and a target user neighbor node vector corresponding one-to-one with each of the target user neighbor nodes;

[0090] The process of performing feature learning on each target user node and the target user data corresponding to each target user node to obtain the global user vector of each target user node includes:

[0091] Based on the sixth equation, user attention scores are calculated according to each target user node, the target user node vector corresponding to each target user node, each target user neighbor node, and each target user neighbor node vector, to obtain multiple user attention scores for each target user node. The sixth equation is:

[0092]

[0093] in, Let be the user attention score of the i'th target user node at the x'th user, where q1, W, and b1 are all learnable parameters. For vector concatenation, T is the vector transpose operation, σ is the sigmoid activation function, and e is the vector concatenation operation. x' Let x' be the target user's neighbor node vector. Let i' be the target user node vector of the i'th target user node.

[0094] The multiple user attention scores of each target user node are normalized to obtain the multiple user attention weights of each target user node.

[0095] Based on the seventh equation, user neighborhood aggregation features are calculated according to multiple user attention scores, multiple target user neighbor nodes, and multiple target user neighbor node vectors for each target user node, to obtain the user neighborhood aggregation features for each target user node. The seventh equation is:

[0096]

[0097] Based on Equation 8, the global user vector of each target user node is calculated according to the target user node vector and the user neighborhood aggregation feature, thus obtaining the global user vector of each target user node. Equation 8 is as follows:

[0098]

[0099] in, Let be the global user vector of the i'th target user node. Let be the target user node vector of the i'-th target user node. Let W3 be the aggregated features of the user neighborhood of the i'-th target user node, and W3 be a learnable parameter. For vector concatenation, NS(ui') is the set of neighbor nodes of the target user, e x' Let x' be the target user's neighbor node vector. Let x' be the user attention weight of the i'th target user node.

[0100] It should be understood that u is calculated using the following formula. i Attention score between each sampled neighbor node (i.e., the user attention score):

[0101]

[0102] Where q1, These are all learnable parameters, where T represents the vector transpose operation and σ is the sigmoid activation function.

[0103] Specifically, the calculated attention score is obtained using the following formula. Attention weights are obtained by normalizing the user attention score. (i.e., the user attention weight):

[0104]

[0105] It should be understood that by combining the features of all sampled neighbor nodes (i.e., the target user's neighbor nodes) of the target user node according to their weight ratios using the following formula, a neighborhood aggregation feature representation is obtained.

[0106]

[0107] Specifically, u is used as follows i The embedding vector of the target user node (i.e., the target user node vector) and the corresponding neighborhood aggregated features are fused to obtain an embedding vector containing global features, which is simply referred to as the user global embedding vector. (i.e., the user global vector):

[0108]

[0109] in All of these are learnable parameters.

[0110] It should be understood that by calculating attention weights, the importance of different sampled neighbor nodes can be distinguished so that the target node can aggregate more relevant information, making the final generated user global embedding vector (i.e., the user global vector) more reliable, thereby obtaining a more accurate score.

[0111] In the above embodiments, the target user node and the target user node features of the target user data are learned to obtain the user global vector, which can distinguish the importance of different sampled neighbor nodes, so that the target node can be aggregated to more relevant information, making the final generated user global embedding vector more reliable, thereby obtaining a more accurate score.

[0112] Optionally, as an embodiment of the present invention, the target item data includes the target item node vector, multiple target item neighbor nodes, and target item neighbor node vectors corresponding one-to-one with each of the target item neighbor nodes;

[0113] The process of performing feature learning on each target item node and the target item data corresponding to each target item node to obtain the global item vector of each target item node includes:

[0114] Based on the ninth formula, item attention scores are calculated according to each target item node, the target item node vector corresponding to each target item node, each target item neighbor node, and each target item neighbor node vector, to obtain multiple item attention scores for each target item node. The ninth formula is:

[0115]

[0116] in, Let be the attention score of the y'th item in the j'th target item node, where q2, W2, and b2 are all learnable parameters. For vector concatenation, T is the vector transpose operation, σ is the sigmoid activation function, and e is the vector concatenation operation. y' Let y' be the target item neighbor node vector. Let be the target item node vector of the j'th target item node;

[0117] The multiple item attention scores of each target item node are normalized to obtain the multiple item attention weights of each target item node.

[0118] Based on the tenth formula, the item neighborhood aggregation features are calculated according to the multiple item attention scores, multiple target item neighbor nodes, and multiple target item neighbor node vectors of each target item node, to obtain the item neighborhood aggregation features of each target item node. The tenth formula is:

[0119]

[0120] Based on the eleventh equation, the global vector of each target item node is calculated according to the target item node vector and the item neighborhood aggregation feature, thus obtaining the global vector of each target item node. The eleventh equation is:

[0121]

[0122] in, Let j' be the global item vector of the j'-th target item node. Let be the target item node vector of the j'-th target item node. Let W be the item neighborhood aggregation feature of the j'-th target item node, and W4 be a learnable parameter. For vector concatenation, NS(vj') is the set of neighbor nodes of the target item, e y' Let y' be the target item neighbor node vector. Let y' be the attention weight of the j'th target item node.

[0123] It should be understood that v is calculated using the following formula. j Attention score between each sampled neighbor node (i.e., the attention score of the item):

[0124]

[0125] Where q2, These are all learnable parameters, where T represents the vector transpose operation and σ is the sigmoid activation function.

[0126] It should be understood that the calculated attention score is used with the following formula. Attention weights are obtained by normalizing the attention scores of the items. (i.e., the attention weight of the item):

[0127]

[0128] Specifically, after obtaining the attention weights (i.e., the item attention weights), the features of all sampled neighbor nodes of the item node (i.e., the target item node) are combined according to the weight ratio using the following formula to obtain the neighborhood aggregation feature representation. (i.e., the neighborhood aggregation feature of the items):

[0129]

[0130] Specifically, using the following formula to convert v j The embedding vector of the target item (i.e., the target item node vector) and the corresponding neighborhood aggregation feature (i.e., the item neighborhood aggregation feature) are fused to obtain an embedding vector containing global features, which is simply referred to as the item global embedding vector. (i.e., the global vector of the item):

[0131]

[0132] in All of these are learnable parameters.

[0133] It should be understood that by calculating attention weights, the importance of different sampled neighbor nodes can be distinguished, so that the target node can aggregate more relevant information, making the final generated global embedding vector of the item more reliable, and thus obtaining a more accurate score.

[0134] In the above embodiments, the global vector of an item is obtained by learning the features of the target item node and the target item data. This can distinguish the importance of different sampled neighbor nodes, so that the target node can be aggregated with more relevant information, making the final generated global embedding vector of the item more reliable, thereby obtaining a more accurate score.

[0135] Optionally, as another embodiment of the present invention, the present invention constructs a user-item interaction graph after preprocessing the user rating data of items; adaptively samples the neighboring nodes of the target user node and the target item node in the user-item interaction graph according to the consistency of query features to obtain the sampled interaction subgraph; uses a graph neural network to learn the features of the nodes in the interaction subgraph to obtain the embedding representation of the target user node and the embedding representation of the target item, and then calculates the predicted rating by dot product.

[0136] Alternatively, as another embodiment of the present invention, this invention can aggregate information from more relevant neighboring nodes into the target node during the user-item rating prediction modeling, thereby generating a more accurate rating prediction result. This technology has significant value and meaning for improving the recommendation accuracy in recommendation systems.

[0137] Figure 3This is a block diagram of an item rating prediction device provided in an embodiment of the present invention.

[0138] Alternatively, as another embodiment of the present invention, such as Figure 3 As shown, an item rating prediction device includes:

[0139] The preprocessing module is used to obtain multiple raw rating data from a preset database, preprocess all the raw rating data, and obtain an interaction graph.

[0140] The sampling analysis module is used to perform sampling analysis on the interaction graph to obtain an interaction subgraph. The interaction subgraph includes multiple target user nodes, multiple target item nodes, target user data corresponding to each of the target user nodes, and target item data corresponding to each of the target item nodes.

[0141] The user feature learning module is used to learn the features of each target user node and the target user data corresponding to each target user node, so as to obtain the global user vector of each target user node.

[0142] The item feature learning module is used to learn the features of each target item node and the target item data corresponding to each target item node, so as to obtain the global vector of each target item node.

[0143] The prediction result acquisition module is used to perform dot product calculation on the user global vector of each target user node and the item global vector of each target item node to obtain multiple item prediction scores for each target user node, and to use all item prediction scores of all target user nodes as the item score prediction result.

[0144] Optionally, another embodiment of the present invention provides an item rating prediction system, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the item rating prediction method as described above. This system can be a computer or similar system.

[0145] Optionally, another embodiment of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the item rating prediction method as described above.

[0146] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0147] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described apparatus and unit can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0148] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.

[0149] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of the present invention, depending on actual needs.

[0150] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0151] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0152] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for predicting item ratings, characterized in that, Includes the following steps: Multiple raw rating data are obtained from a preset database, and all the raw rating data are preprocessed to obtain an interaction graph; The interaction graph is sampled and analyzed to obtain an interaction subgraph, which includes multiple target user nodes, multiple target item nodes, target user data corresponding to each target user node, and target item data corresponding to each target item node. Feature learning is performed on each target user node and the target user data corresponding to each target user node to obtain the global user vector of each target user node. Feature learning is performed on each target item node and the target item data corresponding to each target item node to obtain the global item vector of each target item node; The dot product of the global vector of each target user node and the global vector of each target item node is calculated to obtain multiple predicted item scores for each target user node, and all predicted item scores of all target user nodes are used as the item score prediction result. The interaction graph includes multiple user nodes to be sampled and multiple item nodes to be sampled; wherein, each user node to be sampled corresponds to a user node vector to be sampled, multiple neighbor nodes to be sampled, and a neighbor node vector to be sampled that corresponds one-to-one with each of the user neighbor nodes to be sampled; each item node to be sampled corresponds to an item node vector to be sampled, multiple neighbor nodes to be sampled, and a neighbor node vector to be sampled that corresponds one-to-one with each of the user neighbor nodes to be sampled. The process of sampling and analyzing the interaction graph to obtain the interaction subgraph includes: Based on the consistency scores of each user node to be sampled, each item node to be sampled, the user node vector corresponding to each user node to be sampled, multiple neighbor nodes of items to be sampled, multiple neighbor nodes of users to be sampled, the item node vector corresponding to each item node to be sampled, multiple neighbor nodes of items to be sampled, and multiple neighbor nodes of items to be sampled, the consistency scores of multiple users for each user node to be sampled and the consistency scores of multiple items for each item node to be sampled are obtained. Based on all neighbor nodes corresponding to each user neighbor node to be sampled and all neighbor nodes corresponding to each item neighbor node to be sampled, the number of user neighbor nodes and the number of item neighbor nodes to be sampled are analyzed to obtain the number of user neighbor nodes and the number of item neighbor nodes for each user node to be sampled. The user consistency scores of each user node to be sampled are sorted in descending order to obtain the sorted user consistency scores of each user node to be sampled. The neighboring nodes of each user node to be sampled, corresponding to the first n sorted user consistency scores, are taken as the user nodes to be constructed for the user node to be sampled, where n is the number of user neighboring nodes. The multiple item consistency scores of each of the sampled item nodes are sorted in descending order to obtain multiple sorted item consistency scores for each of the sampled item nodes. The first m neighboring nodes of each of the sampled item nodes corresponding to the first m sorted item consistency scores are taken as the item nodes to be constructed for the sampled item node, where m is the number of item neighboring nodes; An interaction subgraph is constructed by all user nodes to be constructed from all user nodes to be sampled and all item nodes to be constructed from all item nodes to be sampled.

2. The item rating prediction method according to claim 1, characterized in that, The process of preprocessing all the original scoring data to obtain the interaction graph includes: A rating matrix is ​​constructed using all the original rating data, and the rating matrix includes multiple user IDs and multiple item IDs. Import the original user vector corresponding to each user ID and the original item vector corresponding to each item ID. Then, filter out the user IDs and / or item IDs that are not equal to the preset values ​​from all the user IDs and all the item IDs. Construct an interaction graph using all the filtered user IDs, all the filtered item IDs, the original user vectors corresponding to all the filtered user IDs, and the original item vectors corresponding to all the filtered item IDs.

3. The item rating prediction method according to claim 1, characterized in that, The process of analyzing consistency scores based on each of the user nodes to be sampled, each of the item nodes to be sampled, the user node vector corresponding to each user node to be sampled, multiple neighbor nodes of the item to be sampled, multiple neighbor node vectors of the user nodes to be sampled, the item node vector corresponding to each item node to be sampled, multiple neighbor nodes of the item to be sampled, and multiple neighbor node vectors of the item to be sampled, to obtain multiple user consistency scores for each user node to be sampled and multiple item consistency scores for each item node to be sampled, includes: Based on the first formula, query features are calculated according to each of the user nodes to be sampled, each of the item nodes to be sampled, the user node vector corresponding to each of the user nodes to be sampled, and the item node vector corresponding to each of the item nodes to be sampled, to obtain the query features of each user node to be sampled and each item node to be sampled. The first formula is: , Based on the second formula, user consistency scores are calculated according to each user node to be sampled, the user node vector corresponding to each user node to be sampled, each neighbor node of the user node to be sampled, the neighbor node vector corresponding to each neighbor node of the user node to be sampled, and the query features of each user node to be sampled and each item node to be sampled, to obtain multiple user consistency scores for each user node to be sampled. The second formula is: , Based on the third formula, item consistency scores are calculated according to each of the sampled item nodes, the sampled item node vectors corresponding to each sampled item node, each sampled item neighbor node, the sampled item neighbor node vectors corresponding to each sampled item neighbor node, and the query features of each sampled user node and each sampled item node, to obtain multiple item consistency scores for each sampled item node. The third formula is: , in, For the first The consistency score of the neighboring nodes of each item to be sampled. Let the set of neighboring nodes of the item to be sampled be _____. For the first The neighbor node vector of the item to be sampled. , For the first The user consistency score of the neighbor nodes of the user to be sampled Let the set of neighbor nodes of the user to be sampled be _____. For the first The vector of neighbor nodes of the user to be sampled , For the first The user node to be sampled and the first Query characteristics of each item node to be sampled. For the first The vector of each user node to be sampled. , For the first The vector of each item node to be sampled. , For the first One user node to be sampled For the first One node for the item to be sampled. Let the dimension be the vector. For vector concatenation, It is the ReLU activation function. For learnable parameters, , It is the square of the L2 norm.

4. The item rating prediction method according to claim 1, characterized in that, The process of performing neighbor node count analysis based on all neighbor nodes corresponding to each user neighbor node and all neighbor nodes corresponding to each item neighbor node to be sampled, to obtain the number of user neighbor nodes for each user node to be sampled and the number of item neighbor nodes for each item node to be sampled, includes: The total number of all neighboring nodes of each user to be sampled and the total number of all neighboring nodes of each item to be sampled are counted respectively, so as to obtain the total number of user neighboring nodes of each user to be sampled and the total number of item neighboring nodes of each item to be sampled. The median is calculated based on the total number of user neighbor nodes of all the user neighbor nodes to be sampled and the total number of item neighbor nodes of all the item neighbor nodes to be sampled, thus obtaining the user median and the item median of the user neighbor nodes to be sampled. Based on the fourth formula, the number of user neighbor nodes is calculated according to the median of the neighbor nodes of the user to be sampled and the total number of user neighbor nodes of each of the user to be sampled. The fourth formula is: , Based on the fifth formula, the number of neighboring nodes of each sampled item is calculated according to the median of the neighboring nodes of the sampled item and the total number of neighboring nodes of each sampled item. The fifth formula is: , in, For the first The number of neighboring nodes of each item node to be sampled. The median of the items. For the first The total number of neighboring nodes of each item node to be sampled. The sampling ratio, Calculate for the minimum value. For the first The number of user neighbor nodes of each user node to be sampled For the first The total number of neighboring nodes of the user node to be sampled. This represents the median number of users.

5. The item rating prediction method according to claim 1, characterized in that, The target user data includes the target user node vector, multiple target user neighbor nodes, and target user neighbor node vectors that correspond one-to-one with each of the target user neighbor nodes. The process of performing feature learning on each target user node and the target user data corresponding to each target user node to obtain the global user vector of each target user node includes: Based on the sixth equation, user attention scores are calculated according to each target user node, the target user node vector corresponding to each target user node, each target user neighbor node, and each target user neighbor node vector, to obtain multiple user attention scores for each target user node. The sixth equation is: , in, For the first The first target user node User attention score , and All of these are learnable parameters. , , For vector concatenation, This is a vector transpose operation. It is the sigmoid activation function. For the first The target user's neighbor node vector. For the first The target user node vector of each target user node; The multiple user attention scores of each target user node are normalized to obtain the multiple user attention weights of each target user node. Based on the seventh equation, user neighborhood aggregation features are calculated according to multiple user attention scores, multiple target user neighbor nodes, and multiple target user neighbor node vectors for each target user node, to obtain the user neighborhood aggregation features for each target user node. The seventh equation is: , Based on Equation 8, the global user vector of each target user node is calculated according to the target user node vector and the user neighborhood aggregation feature, thus obtaining the global user vector of each target user node. Equation 8 is as follows: , in, For the first The global user vector of each target user node. For the first The target user node vector of each target user node. For the first User neighborhood aggregation features of target user nodes For learnable parameters, , For vector concatenation, For the target user's neighbor node set, For the first The target user's neighbor node vector. For the first The first target user node Individual user attention weights.

6. The item rating prediction method according to claim 1, characterized in that, The target item data includes the target item node vector, multiple target item neighbor nodes, and target item neighbor node vectors that correspond one-to-one with each of the target item neighbor nodes. The process of performing feature learning on each target item node and the target item data corresponding to each target item node to obtain the global item vector of each target item node includes: Based on the ninth formula, item attention scores are calculated according to each target item node, the target item node vector corresponding to each target item node, each target item neighbor node, and each target item neighbor node vector, to obtain multiple item attention scores for each target item node. The ninth formula is: , in, For the first The first target item node Each item's attention score , and All of these are learnable parameters. , , For vector concatenation, This is a vector transpose operation. It is the sigmoid activation function. For the first The target item's neighbor node vector, For the first The target item node vector of each target item node; The multiple item attention scores of each target item node are normalized to obtain the multiple item attention weights of each target item node. Based on the tenth formula, the item neighborhood aggregation features are calculated according to the multiple item attention scores, multiple target item neighbor nodes, and multiple target item neighbor node vectors of each target item node, to obtain the item neighborhood aggregation features of each target item node. The tenth formula is: , Based on the eleventh equation, the global vector of each target item node is calculated according to the target item node vector and the item neighborhood aggregation feature, thus obtaining the global vector of each target item node. The eleventh equation is: , in, For the first The global vector of each target item node. For the first The target item node vector of each target item node. For the first The item neighborhood aggregation features of each target item node For learnable parameters, , For vector concatenation, For the set of neighbor nodes of the target item, For the first The target item's neighbor node vector, For the first The first target item node Individual item attention weights.

7. An item rating prediction device, characterized in that, include: The preprocessing module is used to obtain multiple raw rating data from a preset database, preprocess all the raw rating data, and obtain an interaction graph. The sampling analysis module is used to perform sampling analysis on the interaction graph to obtain an interaction subgraph. The interaction subgraph includes multiple target user nodes, multiple target item nodes, target user data corresponding to each of the target user nodes, and target item data corresponding to each of the target item nodes. The user feature learning module is used to learn the features of each target user node and the target user data corresponding to each target user node, so as to obtain the global user vector of each target user node. The item feature learning module is used to learn the features of each target item node and the target item data corresponding to each target item node, so as to obtain the global vector of each target item node. The prediction result acquisition module is used to calculate the dot product between the user global vector of each target user node and the item global vector of each target item node to obtain multiple item prediction scores for each target user node, and to use all item prediction scores of all target user nodes as the item score prediction result. The interaction graph includes multiple user nodes to be sampled and multiple item nodes to be sampled; wherein, each user node to be sampled corresponds to a user node vector to be sampled, multiple neighbor nodes to be sampled, and a neighbor node vector to be sampled that corresponds one-to-one with each of the user neighbor nodes to be sampled; each item node to be sampled corresponds to an item node vector to be sampled, multiple neighbor nodes to be sampled, and a neighbor node vector to be sampled that corresponds one-to-one with each of the user neighbor nodes to be sampled. The sampling analysis module is specifically used for: Based on the consistency scores of each user node to be sampled, each item node to be sampled, the user node vector corresponding to each user node to be sampled, multiple neighbor nodes of items to be sampled, multiple neighbor nodes of users to be sampled, the item node vector corresponding to each item node to be sampled, multiple neighbor nodes of items to be sampled, and multiple neighbor nodes of items to be sampled, the consistency scores of multiple users for each user node to be sampled and the consistency scores of multiple items for each item node to be sampled are obtained. Based on all neighbor nodes corresponding to each user neighbor node to be sampled and all neighbor nodes corresponding to each item neighbor node to be sampled, the number of user neighbor nodes and the number of item neighbor nodes to be sampled are analyzed to obtain the number of user neighbor nodes and the number of item neighbor nodes for each user node to be sampled. The user consistency scores of each user node to be sampled are sorted in descending order to obtain the sorted user consistency scores of each user node to be sampled. The neighboring nodes of each user node to be sampled, corresponding to the first n sorted user consistency scores, are taken as the user nodes to be constructed for the user node to be sampled, where n is the number of user neighboring nodes. The multiple item consistency scores of each of the sampled item nodes are sorted in descending order to obtain multiple sorted item consistency scores for each of the sampled item nodes. The first m neighboring nodes of each of the sampled item nodes corresponding to the first m sorted item consistency scores are taken as the item nodes to be constructed for the sampled item node, where m is the number of item neighboring nodes; An interaction subgraph is constructed by all user nodes to be constructed from all user nodes to be sampled and all item nodes to be constructed from all item nodes to be sampled.

8. An item rating prediction system, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the item rating prediction method as described in any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the item rating prediction method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Interactive score prediction method and system integrating comments and scores

    CN114386513A