An item recommendation method based on knowledge graph
Through the item recommendation method based on the knowledge graph, the user interaction learning, graph convolution network and full-connection network are used to solve the problem of low item recommendation accuracy, achieving higher recommendation accuracy and user satisfaction.
Patent Information
- Application Number
- CN202210216014.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-07
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2042-03-07
AI Technical Summary
The existing product recommendation method based on knowledge graphs has problems such as low accuracy, inconsistent with actual conditions, and low user satisfaction.
Using the item recommendation method based on the knowledge graph, the item recommendation prediction model is established, user data and recommended item data are obtained, and the user interaction learning module, graph convolution network module, RippleNet network module and fully connected network module are used for prediction. Combining the implicit information of users and items, an item recommendation list is obtained.
It improves the accuracy and user satisfaction of item recommendations, can better reflect the mutual influence of user interests and the hidden information of items, and improves the authenticity of recommendation results.
Smart Images

Figure CN114461921B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of item recommendation, and specifically relates to an item recommendation method based on knowledge graph. Background Art
[0002] With the development of information technology, the problem of information overload has become increasingly prominent. Therefore, recommendation technologies are being used to help users extract useful information from a vast amount of information, satisfying their interests and preferences, and thus addressing this issue. Among traditional recommendation technologies, the most popular is coordinated filtering (CF), which analyzes users' historical interactions and recommends items based on their shared preferences. However, CF-based recommendation algorithms suffer from cold start issues and sparse user-item interactions, which hinder the effectiveness of personalized recommendations.
[0003] To address these issues, existing technologies incorporate knowledge graphs (KGs) as auxiliary information into recommendation methods. This enriches the semantic relationships between entities, addresses data sparsity, and improves recommendation performance. KGs are heterogeneous graphs, where nodes represent entities and edges represent relationships between entities. Mapping items and their attributes into KGs establishes connections between items, enhancing the interpretability of recommendation results and possessing significant research significance and value. At present, some KG-based recommendation methods apply KG in three ways: embedding-based method, path-based method and unified method; the embedding-based method uses KG to enrich the representation of items or users, but ignores the association of information in the knowledge graph, resulting in low practicality of the recommendation method; the path-based method explores the connection between each entity in KG and provides users with an explanation of the results, but relies too much on manually designed meta-paths; the unified method combines the embedding-based method and the path-based method, using the connection between entities to mine the user's interest representation or the representation of the implicit information of the item, and also has the ability to explain the recommendation results, but ignores the mutual influence between the implicit information of the user and the item. The problems of the above methods lead to low accuracy of the final item recommendation, which is inconsistent with the actual situation and low user satisfaction. Summary of the Invention
[0004] In order to solve the problems of low accuracy of item recommendation, inconsistency with actual conditions and low user satisfaction in the existing technology, an item recommendation method based on knowledge graph is proposed.
[0005] The technical solution adopted in the present invention is:
[0006] A method for recommending items based on a knowledge graph includes the following steps:
[0007] Establish an item recommendation prediction model based on the knowledge graph;
[0008] Obtain user data of several recommended items and target users;
[0009] Input the user data of all recommended items and target users into the item recommendation prediction model for prediction, and obtain the item recommendation prediction results of all recommended items;
[0010] All recommended items are sorted and filtered according to the item recommendation prediction results to obtain an item recommendation list.
[0011] Furthermore, an item recommendation prediction model is established based on the knowledge graph, which includes the following steps:
[0012] Obtain the recommended item training dataset and the corresponding user data training dataset;
[0013] Establish an initial item recommendation prediction model based on knowledge graph and neural network;
[0014] The recommended item training dataset and the corresponding user data training dataset are input into the initial item recommendation prediction model for training to obtain the optimal item recommendation prediction model.
[0015] Furthermore, the item recommendation prediction model includes a user interaction learning module, a graph convolutional network module, a RippleNet network module, and a fully connected network module.
[0016] Furthermore, the user data includes the original user historical interests and original user feature data of the target user.
[0017] Furthermore, the user data of all recommended items and target users are input into the item recommendation prediction model for prediction, which includes the following steps:
[0018] Input the original user history interests and original user feature data of the target user into the user interaction learning module to obtain the extracted user history interests and user features of multi-information interaction;
[0019] The extracted user historical interests and current recommended items are input into the graph convolutional network module to obtain a vector with enhanced item representation;
[0020] The enhanced item representation vector is input into the RippleNet network module to obtain the user's interest representation and the iterated item knowledge representation;
[0021] The extracted user historical interests, user features of multi-information interactions, and user interest representation are input into the fully connected network module to obtain the final user embedding;
[0022] The enhanced item representation vector and the iterated item knowledge representation are input into the fully connected network module to obtain the final item embedding;
[0023] Based on the final user embedding and the final item embedding, the target user's click probability for the current recommended item is obtained, that is, the item recommendation prediction result of the current recommended item;
[0024] Repeat the above prediction steps until the item recommendation prediction results for all recommended items are obtained.
[0025] Furthermore, the user interaction learning module includes a cross compression submodule, an adaptive parameterized corrected linear submodule, a variation layer, and a text classification model.
[0026] Furthermore, all recommended items are sorted and filtered according to the item recommendation prediction results, including the following steps:
[0027] Sort all recommended items in descending order according to the target user's click probability on the recommended items;
[0028] The recommended items with a click probability lower than the preset threshold are eliminated to obtain a list of recommended items.
[0029] The beneficial effects of the present invention are:
[0030] The item recommendation prediction model established by the present invention based on the knowledge graph can fully explore the user's interest expression and the item's implicit information expression, while considering the mutual influence between the user and the item's implicit information, so that the item recommendation prediction model can predict the real-world item recommendation, and finally establish the final item recommendation list based on the item recommendation prediction results, thereby improving the accuracy of item recommendation and user satisfaction.
[0031] Other beneficial effects of the present invention will be further described in the detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 This is a flowchart of the item recommendation method based on knowledge graph in the present invention.
[0033] Figure 2 It is a structural diagram of the item recommendation prediction model in the present invention.
[0034] Figure 3 It is a structural diagram of the user interactive learning module in the present invention.
[0035] Figure 4 It is a structural diagram of the cross compression submodule in the present invention. DETAILED DESCRIPTION
[0036] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0037] Example 1:
[0038] like Figure 1 As shown, this embodiment provides an item recommendation method based on a knowledge graph, comprising the following steps:
[0039] Building an item recommendation prediction model based on the knowledge graph includes the following steps:
[0040] Obtain the recommended item training dataset and the corresponding user data training dataset;
[0041] Establish an initial item recommendation prediction model based on knowledge graph and neural network;
[0042] Input the recommended item training dataset and the corresponding user data training dataset into the initial item recommendation prediction model for training to obtain the optimal item recommendation prediction model;
[0043] like Figure 2 As shown in Figure 2, the item recommendation prediction model includes a user interaction learning module Uil unit, a graph convolutional network module, a RippleNet network module, and a fully connected network module. Figure 3 As shown in the figure, the user interaction learning module includes the cross compression submodule C unit, the adaptive parameterized rectified linear submodule APReLU, the transformation layer Transformer Layer and the text classification model TextCNN;
[0044] Obtaining user data of several recommended items and target users, including the target user's original user history interests and original user feature data;
[0045] Input the user data of all recommended items and target users into the item recommendation prediction model for prediction, and obtain the item recommendation prediction results of all recommended items, including the following steps:
[0046] The original user history interest of the target user u The original user feature data uesr(u)feature is input into the user interaction learning module to obtain the extracted user historical interest h_hisory and the user feature high_user of multi-information interaction, including the following steps:
[0047] The individual features of the target user u are spliced together to obtain the original user feature matrix, and then the user feature matrix is constructed by copying Matrix uf of the same size;
[0048] Will And uf input C unit to build the cross matrix C, and get the user feature matrix uf after interaction c and user historical interests after interaction The structure of the cross compression submodule C unit is as follows Figure 4 As shown, it includes the input part input, the cross part Cross, the cross feature matrix part Cross feature matrix, the compression part Compress and the output part output;
[0049] The formula is:
[0050]
[0051] Where C is the cross matrix, d is the original user historical interest Dimensions;
[0052]
[0053] Where W UU 、W UR 、W RU 、W RR are the weights of the cross-compression submodule; b U 、b R Both are bias items of the cross-compression submodule;
[0054] uf c The output vectors of TextCNN are concatenated and randomly dropped through an APReLU and TextCNN, where the TextCNN uses two convolution kernels of dimension d and size {2, 3}. The pooling layer uses LeakyReLU to obtain the user feature high_user of multi-information interaction.
[0055] Pass through another APReLU and Transformer Layer respectively, The weight matrix W is obtained by linear projection Q 、W K 、W V , W Q 、W K 、W V are the weight of the query item, the weight of the key item, and the weight of the value item in the attention mechanism, and The Multi-Head Self-attention mechanism is input for calculation. The input and output of the previous layer are added together through the Add&Norm module. The residual connection before and after the attention mechanism is performed. The LayerNormalization module is then used to normalize the hidden layer to a standard normal distribution. Finally, a linear transformation is performed using the feed-forward network and the Add&Norm module to obtain the extracted user historical interest h_hisory. The formula is:
[0056]
[0057] Where, head i is the output of the i-th attention head; Attention(*) is the attention mechanism function; S and MH(*) are both multi-head self-attention mechanism functions; Concat(*) is the connection function; W o is the matrix weight of the multi-head self-attention mechanism; X and AN(*) are both Add&Norm module functions; ReLU(*) is the activation function; W1 and W2 are the weights of the activation function; b1 and b2 are bias terms;
[0058] The extracted user historical interests h_hisory and the current recommended item item v are input into the graph convolutional network module, and the correlation between the target user's historical interests and entities is learned through the graph convolutional neural network to obtain the vector of item representation enhancement. Then perform nonlinear transformation, the formula is:
[0059]
[0060] Where, item_embedding_G is the vector of item representation enhancement after nonlinear transformation; W Eir is the weight of the fully connected layer; b Eir is the bias term; is the topological domain structure of the recommended item v based on the target user u The set of k nodes in the neighborhood of item v in the entity obtained by the neighboring node set S(v); S(v) is the neighboring node set, S(v) = {e|e∈N(v), |S(v)| = k}; e is the entity indicator;
[0061] The formula for the topological domain structure of the target user u for the recommended item v is:
[0062]
[0063] Where, is the user relationship score normalization function; N(v) is the set of entities directly connected to item v in KG, and the number of k neighbor nodes is randomly selected and the parameter hop is set n Control the depth of the neighborhood;
[0064] Will As the seed of the KG in the historical interest set of the target user u, it then spreads to the periphery along the link to form multiple ripple sets The formula is:
[0065]
[0066] Where G is the KG of the recommended item; are all entity sets of hops of target user u; H is the total number of hops; is the set of hop neighbors of target user u; t is the tail entity of the triple; h is the head entity of the triple; r is the relationship between h and t in the triple;
[0067] Input the enhanced vector item_embedding_G after nonlinear transformation into the RippleNet network module to obtain the user's interest representation user_embeddibg_ripple and the knowledge representation of the item after iteration item_embeddibg_ripple. The formula is:
[0068]
[0069] Where W ripp is the weight of the fully connected network module; b ripp is the bias term; is the interest representation of the target user u’s hop, hop = 1, 2, ..., H;
[0070]
[0071] Where, is the interest representation of the target user u’s hop, hop = 1, 2, ..., H;
[0072] The formula for expressing the interest of target user u's hop is:
[0073]
[0074] Where, is the interest representation of the j-th hop of target user u; j is the hop indicator; is the set of neighbors of the jth hop of target user u; p j is the normalized similarity of (h, r) in diffusion;
[0075] The extracted user historical interest h_hisory, the user feature high_user of multi-information interaction and the user interest representation user_embeddibg_ripple are input into the fully connected network module Z u , get the final user embedding;
[0076] Input the enhanced vector item_embedding_G after nonlinear transformation and the knowledge representation item_embeddibg_ripple after iteration into the fully connected network module Z v , get the final item embedding, the formula is:
[0077]
[0078] Where u' is the final user embedding; v' is the final item embedding; All are bias terms;
[0079] According to the final user embedding u' and the final item embedding v', the target user's click probability for the current recommended item is obtained, that is, the item recommendation prediction result of the current recommended item. The formula is:
[0080]
[0081] Where, is the click probability of the target user u on the current recommended item v; σ(*) is the sigmoid function;
[0082] Repeat the above prediction steps until the item recommendation prediction results for all recommended items are obtained;
[0083] Sort and filter all recommended items based on the item recommendation prediction results to obtain an item recommendation list, including the following steps:
[0084] Sort all recommended items in descending order according to the target user's click probability on the recommended items;
[0085] The recommended items with a click probability lower than the preset threshold are eliminated to obtain a list of recommended items.
[0086] The item recommendation prediction model established by the present invention based on the knowledge graph can fully explore the user's interest expression and the item's implicit information expression, while considering the mutual influence between the user and the item's implicit information, so that the item recommendation prediction model can predict the real-world item recommendation, and finally establish the final item recommendation list based on the item recommendation prediction results, thereby improving the accuracy of item recommendation and user satisfaction.
[0087] The present invention is not limited to the above optional embodiments. Anyone can derive various other forms of products based on the teachings of the present invention. The above specific embodiments should not be construed as limiting the scope of protection of the present invention. The scope of protection of the present invention shall be based on the scope defined in the claims, and the description can be used to interpret the claims.
Claims
1. A method for recommending items based on a knowledge graph, characterized by: The steps include: Establish an item recommendation prediction model based on the knowledge graph; The item recommendation prediction model includes a user interaction learning module Uil unit, a graph convolutional network module, a RippleNet network module, and a fully connected network module; The user interaction learning module includes a cross compression submodule C unit, an adaptive parameterized rectified linear submodule APReLU, a transformation layer Transformer Layer, and a text classification model TextCNN; Obtain user data of several recommended items and target users; The user data includes the original user history interests and original user feature data of the target user; Input the user data of all recommended items and target users into the item recommendation prediction model for prediction, and obtain the item recommendation prediction results of all recommended items, including the following steps: The original user history interest of the target user u The original user feature data uesr(u)feature is input into the user interaction learning module to obtain the extracted user historical interest h_hisory and the user feature high_user of multi-information interaction, including the following steps: The individual features of the target user u are spliced together to obtain the original user feature matrix, and then the user feature matrix is constructed by copying Matrix uf of the same size; Will And uf input C unit to build the cross matrix C, and get the user feature matrix uf after interaction c and user historical interests after interaction The cross compression submodule C unit includes the input part, the cross part Cross, the cross feature matrix part Cross feature matrix, the compression part Compress and the output part output; The formula is: Where C is the cross matrix, d is the original user historical interest Dimensions; Where W UU 、W UR 、W RU 、W RR are the weights of the cross-compression submodule; b U 、b R Both are bias items of the cross-compression submodule; uf c The output vectors of TextCNN are concatenated and randomly dropped through an APReLU and TextCNN, where the TextCNN uses two convolution kernels of dimension d and size {2, 3}. The pooling layer uses LeakyReLU to obtain the user feature high_user of multi-information interaction. Pass through another APReLU and Transformer Layer respectively, The weight matrix W is obtained by linear projection Q 、W K 、W V , W Q 、W K 、W V are the weight of the query item, the weight of the key item, and the weight of the value item in the attention mechanism, and The Multi-Head Self-attention mechanism is input for calculation, and then the input and output of the previous layer are added together through the Add&Norm module. The residual connection before and after the attention mechanism is performed. The LayerNormalization module is then used to normalize the hidden layer to a standard normal distribution. Finally, a linear transformation is performed using the feed-forward network and the Add&Norm module to obtain the extracted user historical interest h_hisory. The formula is: Where, head i is the output of the i-th attention head; Attention(*) is the attention mechanism function; S and MH(*) are both multi-head self-attention mechanism functions; Concat(*) is the connection function; W o is the matrix weight of the multi-head self-attention mechanism; X and AN(*) are both Add&Norm module functions; ReLU(*) is the activation function; W1 and W2 are the weights of the activation function; b1 and b2 are bias terms; The extracted user historical interests h_hisory and the current recommended item item v are input into the graph convolutional network module, and the correlation between the target user's historical interests and entities is learned through the graph convolutional neural network to obtain the vector of item representation enhancement. Then perform nonlinear transformation, the formula is: Where, item_embedding_G is the vector of item representation enhancement after nonlinear transformation; W Eir is the weight of the fully connected layer; b Eir is the bias term; is the topological domain structure of the recommended item v based on the target user u The set of k nodes in the neighborhood of item v in the entity obtained by the neighboring node set S(v); S(v) is the neighboring node set, S(v) = {e|e∈N(v), |S(v)| = k}; e is the entity indicator; The formula for the topological domain structure of the target user u for the recommended item v is: Where, is the user relationship score normalization function; N(v) is the set of entities directly connected to item v in KG, and the number of k neighbor nodes is randomly selected and the parameter hop is set n Control the depth of the neighborhood; Will As the seed of the KG in the historical interest set of the target user u, it then spreads to the periphery along the link to form multiple ripple sets The formula is: Where G is the KG of the recommended item; are all entity sets of hops of target user u; H is the total number of hops; is the set of hop neighbors of target user u; t is the tail entity of the triple; h is the head entity of the triple; r is the relationship between h and t in the triple; Input the enhanced vector item_embedding_G after nonlinear transformation into the RippleNet network module to obtain the user's interest representation user_embeddibg_ripple and the knowledge representation of the item after iteration item_embeddibg_ripple. The formula is: Where W ripp is the weight of the fully connected network module; b ripp is the bias term; is the interest representation of the target user u’s hop, hop = 1, 2, ..., H; Where, is the interest representation of the target user u’s hop, hop = 1, 2, ..., H; The formula for expressing the interest of target user u's hop is: Where, is the interest representation of the j-th hop of target user u; j is the hop indicator; is the set of neighbors of the jth hop of target user u; p j is the normalized similarity of (h, r) in diffusion; The extracted user historical interest h_hisory, the user feature high_user of multi-information interaction and the user interest representation user_embeddibg_ripple are input into the fully connected network module Z u , get the final user embedding; Input the enhanced vector item_embedding_G after nonlinear transformation and the knowledge representation item_embeddibg_ripple after iteration into the fully connected network module Z v , get the final item embedding, the formula is: Where u' is the final user embedding; v' is the final item embedding; All are bias terms; According to the final user embedding and the final item embedding, the target user’s click probability for the current recommended item is obtained, that is, the item recommendation prediction result of the current recommended item. The formula is: Where, is the click probability of the target user u on the current recommended item v; σ(*) is the sigmoid function; Repeat the above prediction steps until the item recommendation prediction results for all recommended items are obtained; All recommended items are sorted and filtered according to the item recommendation prediction results to obtain an item recommendation list.
2. The method for recommending items based on a knowledge graph according to claim 1, characterized in that: The aforementioned knowledge graph-based item recommendation prediction model includes the following steps: Obtain the recommended item training dataset and the corresponding user data training dataset; Establish an initial item recommendation prediction model based on knowledge graph and neural network; The recommended item training dataset and the corresponding user data training dataset are input into the initial item recommendation prediction model for training to obtain the optimal item recommendation prediction model.
3. The method for item recommendation based on knowledge graph according to claim 1, characterized in that: The aforementioned sorting and screening of all recommended items based on the item recommendation prediction results includes the following steps: Sort all recommended items in descending order according to the target user's click probability on the recommended items; The recommended items with a click probability lower than the preset threshold are eliminated to obtain a list of recommended items.
Citation Information
Patent Citations
Improved Ripp-MKR recommendation method combining multi-task learning and knowledge graph
CN112800326A