A collaborative filtering recommendation method based on knowledge graph embedding
By constructing a sub-knowledge graph and extracting vector representations of structured knowledge using improved knowledge graph embedding methods, combined with unstructured features, the problem of insufficient sparsity and accuracy of recommended results in the existing collaborative filtering methods is solved, and more efficient and accurate personalized recommendations are achieved.
Patent Information
- Application Number
- CN202210338588.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-01
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2042-04-01
AI Technical Summary
The existing collaborative filtering recommendation methods are difficult to effectively utilize user-project history interaction and structured knowledge information, resulting in insufficient sparsity and accuracy of recommendation results.
By constructing a sub-knowledge graph, a latent vector representation of structured knowledge is extracted from it using an improved knowledge graph embedding method, and a final latent vector representation of the project is constructed in combination with the unstructured project feature vector, and a personalized recommendation list is generated using a collaborative filtering recommendation method.
Effectively integrate the structured information of the knowledge graph, alleviate the problem of sparseness, improve the accuracy and diversity of recommendations, and can show strong flexibility in fusion of heterogeneous data.
Smart Images

Figure CN114676269B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer applications, and specifically relates to a collaborative filtering recommendation method based on knowledge graph embedding. Background Art
[0002] In recent years, with the rapid development of online applications such as shopping, news, reading, music, video platforms and social media websites, users have to choose their favorite content from the overwhelming information. In this case, the recommendation system, as a tool to alleviate information overload, needs to help users discover personalized interests from the growing massive data.
[0003] In order to achieve personalized recommendations, traditional collaborative filtering methods use various online unstructured data of users, such as clicks, ratings, etc., and predict users' preferences for items based on this historical information. Generally speaking, learnable collaborative filtering models consist of two parts: embedding and interactive data modeling. Embedding converts users and items into vector form, while interactive data modeling reconstructs the historical interactive information of users and items based on the embedded vectors.
[0004] For example, the matrix decomposition model directly represents the IDs of users and items in vector form and models their interactions through the inner product; the neural collaborative filtering model uses a nonlinear neural network to replace the inner product interaction function in the matrix decomposition model; the translation-based collaborative filtering model uses the Euclidean distance metric as the interaction function to predict the recommendation results. However, these methods only consider descriptive features such as user and item IDs or attributes to construct embedding functions, which may make it difficult for collaborative filtering algorithms to produce satisfactory embedding vectors. Moreover, when the interaction function digs deeper into the complex user-item relationship, these methods tend to overfit, making the sparsity problem more serious. Therefore, researchers propose to use auxiliary information in the recommendation system to enrich the semantic representation of items, such as social networks, attributes, and multimedia.
[0005] As auxiliary information containing rich structured semantic knowledge, knowledge graphs have shown great potential in improving the accuracy and explainability of recommendations. Knowledge graphs are machine-understandable heterogeneous information networks that store objective facts in the real world in the form of graphs. The nodes in the graph represent entities, i.e., related concepts and attributes in the real world, and the edges connected to them represent the relationships between different entities. Knowledge graphs build links between items through different types of relationships, thereby capturing the semantic relevance between items and expanding the intrinsic characteristics of items. Compared with recommendation models without the assistance of knowledge graphs, recommendation models using knowledge graphs can make recommendation results more accurate and diverse.
[0006] Although knowledge graphs have the above advantages, there are two key issues in developing recommendation systems based on knowledge graphs. The first is how to obtain rich structured knowledge information for recommended items, and the second is how to discover the semantic relevance between user-specific items defined by the knowledge graph and entities in the graph. For the first problem, existing research generally has two approaches: a) Produce structured project knowledge by collecting various auxiliary information. This method generally collects auxiliary information from the recommendation system platform as contextual features, and then constructs it into a small amount of simple structured information similar to a knowledge base. However, this kind of knowledge base usually has a small number of project-related attributes and relationships, and most of the useful project information may be lost. b) Use an externally constructed knowledge graph to enrich the semantic features of the project. Summary of the invention
[0007] The present invention is made to solve the above-mentioned problems, and its purpose is to provide a collaborative filtering recommendation method based on knowledge graph embedding.
[0008] The present invention provides a collaborative filtering recommendation method based on knowledge graph embedding, which has the following characteristics and includes the following steps: Step 1, in the structured knowledge feature extraction stage, a sub-knowledge graph is constructed based on user-item historical interaction and Satori knowledge graph, and then a latent vector representation of structured knowledge is found from the sub-knowledge graph through an improved knowledge graph embedding method to obtain a structured embedding vector, thereby obtaining a knowledge-aware project representation; Step 2, in the joint learning stage, a final project latent vector representation is constructed based on the structured embedding vector and the unstructured project feature vector, and a collaborative filtering recommendation method is used to embed the information of the structured embedding vector and the unstructured project feature vector into a unified vector space; Step 3, in the recommendation list generation stage, the inner product of the user vector representation and the final project latent vector representation is used as the user's preference probability value, and a personalized recommendation list is generated with the user's preference probability value as a target.
[0009] The collaborative filtering recommendation method based on knowledge graph embedding provided by the present invention may also have the following features: wherein, in step 1, the user-project historical interaction and the Satori knowledge graph in the recommendation system are used as inputs to extract entities related to the project to construct a sub-knowledge graph.
[0010] The collaborative filtering recommendation method based on knowledge graph embedding provided by the present invention may also have the following feature: wherein, in step 2, the structured embedding vector and the unstructured project feature vector in the knowledge graph are integrated together by adding the elements at their positions to construct the final project latent vector representation.
[0011] The collaborative filtering recommendation method based on knowledge graph embedding provided by the present invention may also have the following features: wherein, in step 2, the collaborative filtering recommendation method embeds structured and unstructured information into a unified vector space by optimizing the pairwise ranking function between items.
[0012] The collaborative filtering recommendation method based on knowledge graph embedding provided by the present invention may also have the following features, including: Step 4, the detection phase, in which data from different fields are collected and brought into the model to perform personalized recommendations and obtain the best detection results.
[0013] Functions and Effects of the Invention
[0014] According to the collaborative filtering recommendation method based on knowledge graph embedding involved in the present invention, the specific steps are as follows: Step 1, in the structured knowledge feature extraction stage, a sub-knowledge graph is constructed based on the user-item historical interaction and the Satori knowledge graph, and then the latent vector representation of the structured knowledge is found from the sub-knowledge graph through the improved knowledge graph embedding method to obtain the structured embedding vector, thereby obtaining the project representation with knowledge perception; Step 2, in the joint learning stage, the final project latent vector representation is constructed based on the structured embedding vector and the unstructured project feature vector, and the collaborative filtering recommendation method is adopted to embed the information of the structured embedding vector and the unstructured project feature vector into a unified vector space; Step 3, in the recommendation list generation stage, the inner product of the user vector representation and the final project latent vector representation is used as the user's preference probability value, and a personalized recommendation list is generated with the user's preference probability value as the target.
[0015] Therefore, the collaborative filtering recommendation method based on knowledge graph embedding of the present invention integrates the structured information of the knowledge graph into the collaborative filtering framework, uses an improved knowledge graph embedding algorithm to extract the semantic features of items from structured data, and jointly learns user and item representations in an end-to-end model, effectively alleviating the sparsity problem and improving the accuracy of recommendations.
[0016] In addition, in the detection stage of the present invention, experiments were carried out on two real datasets, Movielens-1M and Last.FM. Precision, Recall, F1 value and NDCG were used as model evaluation indicators, and KGECF was compared with BPR, LINE, CFKG and KTUP. The experiments showed that KGECF is superior to the comparison algorithms in terms of recommendation accuracy, recall rate, F1 value and NDCG on the two datasets. It can integrate large-scale structured and unstructured data and obtain high-precision recommendation results. It can provide users with more accurate recommendation results and has strong flexibility in fusing heterogeneous data. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 is a model diagram of a collaborative filtering recommendation method based on knowledge graph embedding in an embodiment of the present invention;
[0018] Figure 2 It is a code running process diagram of the collaborative filtering recommendation method based on knowledge graph embedding in an embodiment of the present invention. DETAILED DESCRIPTION
[0019] In order to make the technical means, creative features, objectives and effects achieved by the present invention easy to understand, the following embodiments and the accompanying drawings specifically illustrate a collaborative filtering recommendation method based on knowledge graph embedding of the present invention.
[0020] In this embodiment, a collaborative filtering recommendation method based on knowledge graph embedding is provided.
[0021] Figure 1 It is a model diagram of the collaborative filtering recommendation method based on knowledge graph embedding in an embodiment of the present invention.
[0022] Figure 2 It is a code running process diagram of the collaborative filtering recommendation method based on knowledge graph embedding in an embodiment of the present invention.
[0023] like Figure 1-2 As shown, the collaborative filtering recommendation method based on knowledge graph embedding involved in this embodiment includes the following steps:
[0024] Step 1, structured knowledge feature extraction: In the structured knowledge feature extraction stage, the user-item historical interactions and Satori knowledge graph in the recommendation system are used as input to extract project-related entities to construct a sub-knowledge graph (Sub-graph), and an improved knowledge graph embedding method (Xavier-TransR) is used to find the latent vector representation of structured knowledge from the sub-graph to obtain knowledge-aware project representation.
[0025] Step 2, joint learning: In the joint learning stage, the structured embedding vectors and unstructured project feature vectors in the knowledge graph are integrated by adding the elements in position to construct the final latent vector representation of the project. The recommendation method of collaborative filtering is adopted to embed the structured and unstructured information into a unified vector space by optimizing the pairwise ranking function between projects.
[0026] Step 3, recommendation list generation: In the recommendation list generation stage, the inner product of the final user and item latent vector representation is used as the user's preference probability value, and a personalized recommendation list is generated for the target user.
[0027] Step 4, detection phase: mainly to collect data, bring it into the model, and obtain the best detection results. This embodiment uses real data sets from two different fields, movies and music, for personalized recommendations. After filtering the data set, the experiment randomly divides the data set in the user dimension in a ratio of 8:1:1 to construct a training set, a test set, and a validation set. The model parameters are selected on the validation set, and the four indicators of Precision@N, Recall@N, F1@N, and NDCG@N are used to measure the pros and cons of each model.
[0028] In this embodiment, the KGHR model is compared with four benchmark algorithms: BPR, LINE, CFKG and KTUP. The results show that the method provided in this embodiment is superior to the baseline methods in terms of recommendation accuracy, recall rate, F1 value and NDCG. It can integrate large-scale structured and unstructured data and obtain high-precision recommendation results.
[0029] Functions and Effects of the Embodiments
[0030] According to the collaborative filtering recommendation method based on knowledge graph embedding involved in this embodiment, the specific steps are as follows: Step 1, in the structured knowledge feature extraction stage, a sub-knowledge graph is constructed based on the user-item historical interaction and the Satori knowledge graph, and then the latent vector representation of structured knowledge is found from the sub-knowledge graph through the improved knowledge graph embedding method to obtain a structured embedding vector, thereby obtaining a knowledge-aware project representation; Step 2, in the joint learning stage, the final project latent vector representation is constructed based on the structured embedding vector and the unstructured project feature vector, and the collaborative filtering recommendation method is used to embed the information of the structured embedding vector and the unstructured project feature vector into a unified vector space; Step 3, in the recommendation list generation stage, the inner product of the user vector representation and the final project latent vector representation is used as the user's preference probability value, and a personalized recommendation list is generated with the user's preference probability value as the target.
[0031] Therefore, the collaborative filtering recommendation method based on knowledge graph embedding in this embodiment integrates the structured information of the knowledge graph into the collaborative filtering framework, uses an improved knowledge graph embedding algorithm to extract the semantic features of projects from structured data, and jointly learns user and project representations in an end-to-end model, effectively alleviating the sparsity problem and improving the accuracy of recommendations.
[0032] In addition, in the detection stage of this embodiment, experiments were carried out on two real datasets, Movielens-1M and Last.FM. Precision, Recall, F1 value and NDCG were used as model evaluation indicators, and KGECF was compared with BPR, LINE, CFKG and KTUP. The experiments showed that KGECF is superior to the comparison algorithms in terms of recommendation accuracy, recall rate, F1 value and NDCG on the two datasets. It can integrate large-scale structured and unstructured data and obtain high-precision recommendation results. It can provide users with more accurate recommendation results and has strong flexibility in fusing heterogeneous data.
[0033] The above-mentioned embodiments are preferred examples of the present invention and are not intended to limit the protection scope of the present invention.
Claims
1. A collaborative filtering recommendation method based on knowledge graph embedding, characterized in that: The following steps are involved: Step 1: In the structured knowledge feature extraction stage, a sub-knowledge graph is constructed based on the user-item historical interaction and the Satori knowledge graph, and then a latent vector representation of structured knowledge is found from the sub-knowledge graph through an improved knowledge graph embedding method to obtain a structured embedding vector, thereby obtaining a knowledge-aware project representation; Step 2: In the joint learning stage, a final latent vector representation of the project is constructed based on the structured embedding vector and the unstructured project feature vector, and a collaborative filtering recommendation method is used to embed the information of the structured embedding vector and the unstructured project feature vector into a unified vector space; Step 3, in the recommendation list generation stage, the inner product of the user vector representation and the final item latent vector representation is used as the user's preference probability value, and a personalized recommendation list is generated with the user's preference probability value as the target.
2. The collaborative filtering recommendation method based on knowledge graph embedding according to claim 1, characterized in that: in, In step 1, the user-item historical interaction in the recommendation system and the Satori knowledge graph are used as input to extract project-related entities to construct the sub-knowledge graph.
3. The collaborative filtering recommendation method based on knowledge graph embedding according to claim 1, characterized in that: in, In step 2, the structured embedding vector and the unstructured project feature vector in the knowledge graph are integrated together by adding them element-wise to construct the final project latent vector representation.
4. The collaborative filtering recommendation method based on knowledge graph embedding according to claim 1, characterized in that: Also includes: Wherein, in step 2, the collaborative filtering recommendation method embeds structured and unstructured information into a unified vector space by optimizing the pairwise ranking function between items.
5. The collaborative filtering recommendation method based on knowledge graph embedding according to claim 1, characterized in that: Also includes: Step 4, detection phase, During the detection phase, data from different fields are collected, brought into the model, and personalized recommendations are made to obtain the best detection results.
Citation Information
Patent Citations
Collaborative filtering recommendation method based on coupling network embedding and knowledge graph
CN112084428A
Improved Ripp-MKR recommendation method combining multi-task learning and knowledge graph
CN112800326A