Recommendation algorithm integrating knowledge graph convolutional network and user preferences

By extracting personalized features on the user and item side and combining the aggregation and dissemination mechanism of the knowledge graph, the problems of traditional recommendation algorithms in data sparsity and cold start are solved, and more accurate and diversified recommendation results are achieved.

CN113934936BActive Publication Date: 2025-01-03NANJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111231289.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-22
Publication Date
2025-01-03
Estimated Expiration
2041-10-22

AI Technical Summary

Technical Problem

Traditional recommendation algorithms are difficult to effectively deal with data sparseness and cold start problems, and cannot accurately capture the dynamic changes in user interests and item characteristics. The application of knowledge graph embedding technology in recommendations poses high efficiency challenges.

Method used

Fusion of knowledge graph convolution network and user preference recommendation algorithm, extract personalized features from the user and item side, use neighbor information in the knowledge graph to aggregate and disseminate features, combine internal product operations to predict user preferences, and adopt attention mechanism and aggregate functions improve recommendation accuracy.

Benefits of technology

It improves the accuracy and diversity of recommendation results, can further explore user interests and item characteristics, alleviate data sparsity and cold start problems, and provide personalized recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113934936B_ABST
    Figure CN113934936B_ABST
Patent Text Reader

Abstract

The present invention discloses a recommendation algorithm integrating knowledge graph convolutional network and user preference, which belongs to the field of recommendation algorithm, specifically: preprocessing input data to obtain interaction matrix and knowledge graph; obtaining the user's historical click objects through the interaction matrix, and integrating the neighbor information of the user node corresponding to the historical click objects in the knowledge graph to obtain user personalized features; aggregating the neighbor information of the items in the knowledge graph to obtain the personalized features of the items; performing joint feature extraction on the personalized features of the user and the items to obtain the feature vectors of the user and the items; performing inner product operation on the feature vectors, and predicting the user's preference through the prediction function. The present invention obtains the user personalized features by diffusing the user's historical click objects in the knowledge graph; obtains the personalized features of the items by aggregating the neighbor information of the items in the knowledge graph, and alternately performs the personalized features of the user and the items, thereby improving the accuracy of the recommendation results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a recommendation algorithm integrating a knowledge graph convolutional network and user preferences, and belongs to the field of recommendation algorithms. Background Art

[0002] As a product of the big data era, personalized recommendations play an increasingly important role. Although research and application of recommendation systems have made great progress, they still face many huge challenges, such as common data sparsity and cold start problems.

[0003] Traditional recommendation algorithms are mainly divided into collaborative filtering-based recommendation algorithms, content-based recommendation algorithms and hybrid recommendation algorithms. These algorithms focus more on mining the static correlation between users and items, but ignore the decay of user interests and dynamic changes in preferences over time. At the same time, collaborative filtering-based recommendation algorithms are not easy to make personalized recommendations for some special users, and are also constrained by the cold start problem; content-based recommendations are limited by the technology of extracting item content information, which affects the recommendation results; hybrid recommendations cannot accurately assign the weights of each recommendation algorithm.

[0004] Based on the problems of traditional recommendation systems, researchers consider introducing different auxiliary information to improve the accuracy of recommendations, such as text of user comments, social information, and project attributes. Knowledge graphs are designed to describe various entities and their relationships that exist objectively in the real world, forming a huge semantic network graph. Integrating various auxiliary information into recommendation algorithms can help alleviate the data sparsity and cold start problems of recommendations. At the same time, knowledge graphs have the following characteristics: 1) Accuracy: Rich semantic-related information can discover deeper hidden relationships and improve the accuracy of results; 2) Diversity: Multi-category relationships in knowledge graphs can expand user interests, reasonably diverge recommendation results, and improve the diversity of recommendation results; 3) Interpretability: Knowledge graphs can connect users' historical click records and recommendation records to provide interpretability for recommendation systems.

[0005] Although knowledge graphs have the above advantages, knowledge graphs are high-dimensional and heterogeneous. How to efficiently use knowledge graphs for recommendation is still a huge challenge. Knowledge graph embedding technology maps entities or relationships in knowledge graphs to low-dimensional vectors, but some typical knowledge graph embedding methods, such as TransE and TransR, generally strictly perform semantic relationship modeling, which is suitable for in-graph applications such as knowledge graph completion, but not for recommendation.

[0006] In view of this, it is necessary to propose a recommendation model that integrates knowledge graph convolutional networks and user preferences to solve the above problems. Summary of the invention

[0007] The purpose of the present invention is to provide a recommendation algorithm that integrates a knowledge graph convolutional network and user preferences. The method regards the knowledge graph as a weighted graph and extracts features on both the user side and the item side, thereby further improving the recommendation performance.

[0008] To achieve the above object, the present invention provides a recommendation algorithm integrating knowledge graph convolutional network and user preference, comprising the following steps:

[0009] Acquire input data and preprocess the input data to obtain an interaction matrix and a knowledge graph, wherein the interaction matrix includes a user and a historical click object of the user, and the knowledge graph includes a user node corresponding to the historical click object;

[0010] Fusing the neighbor information of the user node on the knowledge graph to obtain user personalized features;

[0011] The knowledge graph also includes neighbor information of the item node, and the neighbor information of the item node is aggregated to obtain personalized features of the item;

[0012] Performing joint feature extraction on the user personalized features and the item personalized features to obtain a user feature vector and an item feature vector respectively;

[0013] An inner product operation is performed on the user feature vector and the item feature vector, and a prediction function is used to predict the user preference.

[0014] As a further improvement of the present invention, the aggregation weight p of each triple is calculated according to the neighbor information of the user node. i , the aggregation weight p i It is expressed as:

[0015]

[0016] in, represents the one-hop neighbor set of user u; R i and h i is the embedding vector of the relationship between user nodes and the head entity; V is the embedding vector of a given item;

[0017] The neighbor information of the user node includes the tail entity t i and the tail entity t i The corresponding association probability for the tail entity t i And the association probabilities are weighted and summed to obtain the user personalized feature U, which is specifically:

[0018]

[0019]

[0020] in, It means starting from the historical click item preferences of user u through H-order propagation, the preference propagation of each order of user u is obtained.

[0021] As a further improvement of the present invention, the user u is accumulated and the importance of the user u is determined, specifically:

[0022]

[0023] Among them, γ is a parameter used to control the weight of each hop output; k is the order of propagation; the partial derivative of the importance of the user u is shown in the following formula:

[0024]

[0025] As a further improvement of the present invention, the neighbor information of the item node includes the relationship between the item and each item. i , calculate the relationship r of user u i Degree of preference Specifically:

[0026]

[0027] Among them, r i represents the relationship vector connecting the i-th neighbor, g(.) is an arbitrary function;

[0028] Degree of preference Perform normalization to obtain a standardized user relationship score Specifically:

[0029]

[0030] Among them, N(v) represents the first-order neighbor set of item v, and then further weighted summation operation is performed to obtain the feature vector

[0031]

[0032] Through aggregate functions Aggregate and calculate the item personalized feature a of item v, specifically:

[0033]

[0034] Among them, σ(.) is a nonlinear activation function, W is a linear transformation matrix, b is a bias term, Indicates the aggregation of the item v, and e represents the vector generated by the item v in the previous round of iterative update.

[0035] As a further improvement of the present invention, the aggregation function To sum up the aggregation, The corresponding elements are added and then nonlinearly transformed, specifically:

[0036]

[0037] As a further improvement of the present invention, the aggregation function To concatenate the two representation vectors, we concatenate them and then apply a nonlinear transformation, specifically:

[0038]

[0039] As a further improvement of the present invention, the aggregation function Aggregate neighbors by using As the output vector of this layer, it is:

[0040]

[0041] As a further improvement of the present invention, the joint feature extraction is specifically as follows: alternately performing operations on the user personalized features and the item personalized features so that the waveform of the user personalized features and the waveform of the item personalized features produce an interference effect, thereby obtaining the user feature vector and the item feature vector.

[0042] As a further improvement of the present invention, the prediction function for:

[0043]

[0044] Where p represents the inner product operation of the vector, and the expression of σ(x) is:

[0045]

[0046] Among them, σ(.) is a nonlinear activation function.

[0047] As a further improvement of the present invention, the prediction function for:

[0048]

[0049] Among them, σ(.) is a nonlinear activation function, W is a linear transformation matrix, W∈R 1×2d , the training process uses negative sampling and improves the prediction function through the loss function The accuracy of the loss function min L is specifically:

[0050]

[0051] Where f is the cross entropy loss function, p is the negative sampling distribution, and p follows a uniform distribution, N u is the number of negative samples of user u, N u =|{v:y uv =1}|, the second term represents regularization optimization.

[0052] The beneficial effects of the present invention are as follows: the recommendation algorithm of the present invention that integrates the knowledge graph convolutional network and user preferences improves the recommendation algorithms on the user side and the item side, and obtains user personalized features through the diffusion process of the user in the interaction matrix; obtains item personalized features through aggregation or splicing aggregation of the item's neighbor information in the knowledge graph, propagates user interests through the knowledge graph, finds the user's potential interests and finally obtains the user's representation, and alternately allows user interest propagation and item feature aggregation through joint feature extraction to share current known information, thereby improving the accuracy of recommendation results. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 It is the overall flow chart of the present invention. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0055] The present invention provides a recommendation algorithm that integrates knowledge graph convolutional networks and user preferences, and further improves the recommendation performance by extracting personalized features at both the user end and the item end. Specifically: The extraction of user features is carried out through the diffusion process of the user's historical click objects in the knowledge graph to obtain more user personalized features about the user. The extraction of item features needs to take into account that the neighbors of the item also contain the personalized information of the item itself. Therefore, the neighbor information of the item is aggregated into the item node, and an embedded vector is generated, so that more personalized features of the item itself can be included.

[0056] When aggregating neighbor nodes, the preference of each neighbor node relationship is different, so its weight is closely related to the neighbor node of the item clicked by the user. The KGCN model (recommendation model based on knowledge graph) takes this issue into consideration and converts g(u,r i ) is used as the weight to aggregate the neighbor nodes of the item. This paper extracts the item feature vector based on the KGCN model, and finally performs the inner product of the user feature vector and the item feature vector to measure the user's rating of the item, so as to further explore the potential connection between users and items on the knowledge graph, thereby optimizing the recommendation results.

[0057] like Figure 1 As shown in the figure, the recommendation algorithm integrating knowledge graph convolutional network and user preference specifically includes:

[0058] Step 1: Obtain input data and preprocess the input data to obtain an interaction matrix and a knowledge graph. The interaction matrix includes users and users' historical click objects, and the knowledge graph includes user nodes corresponding to historical click objects.

[0059] Specifically, the Book-Crossing dataset (book rating dataset) is used as input for preprocessing. The user-item interaction of the Book-Crossing dataset exists in the form of ratings, thereby obtaining a user interaction matrix.

[0060] The knowledge graph data corresponding to the dataset is obtained from the preprocessed knowledge graph publicly available from KGCN, and the knowledge graph information comes from Microsoft Satori.

[0061] Among them, the interaction matrix Y is:

[0062]

[0063] Knowledge graph G (entity-relationship-entity (h, r, t)); where h∈ε, r∈R, t∈ε, ε represents the entity in the knowledge graph, and R represents the relation in the knowledge graph.

[0064] Step 2: Fusion the neighbor information of the user node on the knowledge graph to obtain user personalized features.

[0065] The interaction matrix includes the neighbor information of user u and user node. Each triplet (h i ,r i ,t i )’s aggregation weight p i , aggregation weight p i It is expressed as:

[0066]

[0067] in, represents the set of one-hop neighbors of user u; R i and h i is the embedding vector of the relationship between user nodes and the head entity; V is the embedding vector of a given item.

[0068] The neighbor information of the user node includes the tail entity t i and the tail entity t i The corresponding association probability for the tail entity t iAnd the associated probability are weighted summed to obtain the user personalized feature U, which is specifically:

[0069]

[0070]

[0071] in, It means starting from the historical click item preferences of user u through H-order propagation, the preference propagation of each order of user u is obtained.

[0072] An accumulation operation is performed on user u. According to the accumulation operation, the importance of outputs of different jumps can be distinguished, and the importance of user u can be determined according to the importance, specifically:

[0073]

[0074] Among them, γ is a parameter used to control the weight of each hop output; k is the order of propagation; the partial derivative of the importance of user u is shown in the following formula:

[0075]

[0076] Step 3: The knowledge graph includes the neighbor information of the item node, and the neighbor information of the item node is aggregated to obtain the personalized features of the item.

[0077] The neighbor information of an item node includes the relationship between the item and each item. i , calculate the user u to relationship r i Degree of preference That is, through the knowledge graph i The edge is the weight of the message transmission. Because the user vector is added every time a message is transmitted, the result is better than directly taking the relationship vector r. i It can better reflect the attention of item v, specifically:

[0078]

[0079] Among them, r i represents the relationship vector connecting the i-th neighbor, and g(.) is an arbitrary function.

[0080] Degree of preference Normalization is performed through the softmax operation to obtain the standardized user relationship score Specifically:

[0081]

[0082] Among them, N(v) represents the first-order neighbor set of item v, and then further weighted summation operation is performed to obtain the feature vector Specifically, by calculating the normalized user relationship score The linear combination of the nodes directly connected to item v, that is, the feature vector of item v

[0083]

[0084] Through aggregate functions Aggregation is performed and the personalized feature a representing the item v is calculated. Specifically, one or more fully connected layer operations are performed during the aggregation process. The specific expression is:

[0085]

[0086] Among them, σ(.) is a nonlinear activation function, such as sigmoid, relu, etc., W is a linear transformation matrix, b is a bias term, Indicates the aggregation of item v, and e represents the vector generated by the item v in the previous round of iterative update.

[0087] Aggregate functions There are three ways to aggregate items v:

[0088] ① Aggregation function To sum up the aggregation, The corresponding elements are added and then nonlinearly transformed, specifically:

[0089] ② Aggregation function To concatenate the aggregation, we concatenate the two representation vectors and then apply a nonlinear transformation, specifically:

[0090] ③ Aggregation function Aggregate neighbors by using As the output vector of this layer, it is:

[0091] Step 4: Perform joint feature extraction on the user personalized features and the item personalized features to obtain the user feature vector and the item feature vector respectively.

[0092] The operations of step 2 and step 3 are performed alternately, so that the waveform of the user's personalized characteristics and the waveform of the item's personalized characteristics can further produce an interference effect, and the relationship between the user's interest distribution and the item characteristics is more deeply explored, so as to obtain the user feature vector and the item feature vector.

[0093] Step 5: perform an inner product operation on the user feature vector and the item feature vector, and predict the user's preference through a prediction function. Specifically, the user's preference can be predicted through one of the following two prediction functions.

[0094] ①Prediction function for:

[0095]

[0096] Where p represents the inner product operation of the vector, and the expression of σ(x) is:

[0097]

[0098] Among them, σ(.) is a nonlinear activation function.

[0099] ②Prediction function for:

[0100]

[0101] Among them, σ(.) is a nonlinear activation function, W is a linear transformation matrix, W∈R 1×2d ; In order to optimize the model, negative sampling is used in the training process to improve the prediction function through the loss function The accuracy of the loss function min L is as follows:

[0102]

[0103] Among them, f is the cross entropy loss function, p is the negative sampling distribution, and p obeys the uniform distribution, N u is the number of negative samples of user u, N u =|{v:y uv =1}|, and the second term is regularization optimization.

[0104] It should be noted that for the convenience of description, the present invention divides the steps of the recommendation algorithm that integrates the knowledge graph convolutional network and user preferences into steps 1 to 4. In actual situations, there is no specific order restriction for steps 2 and 3, and no restriction is made here.

[0105] In general, the present invention regards the knowledge graph as a weighted graph, and converts the relationship between users and items into weights through the attention mechanism, that is, the degree of preference that affects user behavior. The attention mechanism can be described as mapping query and key-value to output. The output is the weighted sum of values, where the weight assigned to each value is calculated by the query and key through the compatibility function; then starting from the center of the knowledge graph, it iteratively expands to the neighbor information, aggregates or splices the neighbor information, and obtains the personalized features of the item.

[0106] Based on the user's historical records, the user's potential high-level preferences for knowledge graph entities are mined. The items clicked by the user are used as "seeds" and diffused along the edges of the knowledge graph. This diffusion is a gradual attenuation process, similar to ripples in water. The nodes obtained by diffusion are related to the user's interests, and the user's personalized features are obtained.

[0107] Finally, the personalized features of items and users are jointly extracted, that is, the personalized features of items and users are extracted alternately, and the current known information (that is, user feature vector and item feature vector) is shared. The inner product operation is performed on the known information to improve the accuracy of the recommendation results.

[0108] In summary, the recommendation algorithm that integrates the knowledge graph convolutional network and user preferences of the present invention improves the recommendation models on the user side and the item side respectively, collects the user's historical click objects in the interaction matrix, and collects the personalized knowledge information of the item neighbors in the knowledge graph to enhance the item representation, find the user's potential interests and obtain the user's representation; through joint feature extraction, the user interest propagation and item feature aggregation are carried out alternately, and the current known information is shared, thereby improving the accuracy of the recommendation results. Furthermore, the user's item rating is measured based on the vector inner product of the extracted user feature vector and the item feature vector, and the potential connection between users and items on the knowledge graph is further explored, thereby optimizing the recommendation results.

[0109] The above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A recommendation algorithm integrating knowledge graph convolutional network and user preference, characterized in that: The following steps are involved: Acquire input data and preprocess the input data to obtain an interaction matrix and a knowledge graph, wherein the interaction matrix includes a user and a historical click object of the user, and the knowledge graph includes a user node corresponding to the historical click object; Fusing the neighbor information of the user node on the knowledge graph to obtain user personalized features; The knowledge graph also includes neighbor information of the item node, and the neighbor information of the item node is aggregated to obtain personalized features of the item; Performing joint feature extraction on the user personalized features and the item personalized features to obtain a user feature vector and an item feature vector respectively; the joint feature extraction specifically comprises: alternately performing operations on the user personalized features and the item personalized features so that the waveform of the user personalized features and the waveform of the item personalized features produce an interference effect, thereby obtaining the user feature vector and the item feature vector; An inner product operation is performed on the user feature vector and the item feature vector, and a prediction function is used to predict the user preference.

2. The recommendation algorithm integrating knowledge graph convolutional network and user preference according to claim 1, characterized in that: Calculate the aggregation weight p of each triplet according to the neighbor information of the user node i , the aggregation weight p i It is expressed as: in, represents the one-hop neighbor set of user u; R i and h i is the embedding vector of the relationship between user nodes and the head entity; V is the embedding vector of a given item; The neighbor information of the user node includes the tail entity t i and the tail entity t i The corresponding association probability for the tail entity t i And the association probabilities are weighted and summed to obtain the user personalized feature U, which is specifically: in, It means starting from the historical click item preferences of user u through H-order propagation, the preference propagation of user u in each order is obtained.

3. The recommendation algorithm integrating knowledge graph convolutional network and user preference according to claim 2, characterized in that: The user u is accumulated and the importance of the user u is determined, specifically: Among them, γ is a parameter used to control the weight of each hop output; k is the order of propagation; the partial derivative of the importance of the user u is shown in the following formula:

4. The recommendation algorithm integrating knowledge graph convolutional network and user preference according to claim 1, characterized in that: The neighbor information of the item node includes the relationship between the item and each item. i , calculate the relationship r of user u i Degree of preference Specifically: Among them, r i represents the relationship vector connecting the i-th neighbor, g(.) is an arbitrary function; Degree of preference Perform normalization to obtain a standardized user relationship score Specifically: Among them, N(v) represents the first-order neighbor set of item v, and then further weighted summation operation is performed to obtain the feature vector Through aggregate functions Aggregate and calculate the item personalized feature a of item v, specifically: Among them, σ(.) is a nonlinear activation function, W is a linear transformation matrix, b is a bias term, Indicates the aggregation of the item v, and e represents the vector generated by the item v in the previous round of iterative update.

5. The recommendation algorithm integrating knowledge graph convolutional network and user preference according to claim 4, characterized in that: The aggregation function To sum up the aggregation, The corresponding elements are added and then a nonlinear transformation is performed, specifically:

6. The recommendation algorithm integrating knowledge graph convolutional network and user preference according to claim 4, characterized in that: The aggregation function To concatenate the two representation vectors, we concatenate them and then apply a nonlinear transformation, specifically:

7. The recommendation algorithm integrating knowledge graph convolutional network and user preference according to claim 4, characterized in that: The aggregation function Aggregate neighbors by using As the output vector of this layer, it is:

8. The recommendation algorithm integrating knowledge graph convolutional network and user preference according to claim 1, characterized in that: The prediction function for: Where p represents the inner product operation of the vector, and the expression of σ(x) is: Among them, σ(.) is a nonlinear activation function.

9. The recommendation algorithm integrating knowledge graph convolutional network and user preference according to claim 1, characterized in that: The prediction function for: Among them, σ(.) is a nonlinear activation function, W is a linear transformation matrix, W∈R 1×2d , the training process uses negative sampling and improves the prediction function through the loss function The accuracy of the loss function minL is specifically: Where f is the cross entropy loss function, p is the negative sampling distribution, and p follows a uniform distribution, N u is the number of negative samples of user u, N u =|{v:y uv =1}|, the second term represents regularization optimization.