A user entity group recommendation method based on knowledge graph embedding

By building a user's knowledge graph and using Ripple Net and BERT models for vectorized representation, combining the recall algorithm and LSTM model, the problem of not being able to effectively utilize knowledge graph information in the existing technology is solved, and the efficiency and accuracy of user entity group recommendations are achieved.

CN112732932BActive Publication Date: 2025-03-07XIAN FIBERHOME SOFTWARE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110024581.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-08
Publication Date
2025-03-07
Estimated Expiration
2041-01-08

AI Technical Summary

Technical Problem

The prior art cannot effectively utilize the semantic and structural information of the knowledge graph, cannot obtain interactive information between user entities, ignore dynamic changes in user and item portraits, and lacks a method to use internal information of the graph to achieve group recommendations of user entities.

Method used

By building a user's knowledge graph, the user entities and relationships are vectorized using Ripple Net and BERT models. Combining the content-based recall algorithm and the attention-based LSTM model, high and low-order interaction information between user entities is obtained, the correlation between user entities is calculated, and the target user entity correlation is output.

Benefits of technology

It has achieved deep exploration of user interests, improved recommendation accuracy, and can dynamically update user entity portraits, provide relevance and recommendation reasons, and enhance the simplicity and efficiency of user operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112732932B_ABST
    Figure CN112732932B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for recommending user entity groups based on knowledge graph embedding, which portraits user entities in the knowledge graph and returns the top-K user entity groups with the highest relevance to the target user entity according to the user entity portrait features. The present invention can more comprehensively use the structural information and semantic information of the knowledge graph to depict dynamic user entity portraits, enhance the accuracy of the user entity group recommendation method, provide reasons for the recommendation results, make user operations simple and efficient, and can also construct labels and provide connections for user entities in the knowledge graph.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention discloses a user entity group recommendation method based on knowledge graph embedding, and relates to the field of Internet information technology. Background Art

[0002] With the development of information technology and the Internet, people are gradually moving from a lack of information to an era of information overload. To solve this problem, the recommendation system came into being. The task of the recommendation system is to connect users and information, help users find valuable information for themselves, and at the same time allow the information to be displayed to users who are interested in it, thereby achieving a win-win situation for information producers and consumers.

[0003] The user group recommendation algorithm aims to characterize user portraits and find a group of users who are interested in items. Traditional methods mainly use explicit / implicit feedback interaction data as input to extract high- and low-order interaction features between users and items for recommendation. The commonly used method is to introduce side information to enrich the user and item portraits, such as large-scale node (user node or item node) information in the knowledge graph and the attribute information of the node itself. However, there are still the following three problems:

[0004] 1) It is impossible to obtain the interaction information between user entities and fail to fully utilize the semantic and structural information of the knowledge graph;

[0005] 2) It is easy to ignore the dynamic changes of user and item portraits and lack an effective model update strategy;

[0006] 3) All of them are based on recommendations between users and items, and there is no method that uses internal information of the graph (nodes and relationships) to achieve user entity group recommendations.

[0007] The main problems of current user group recommendation algorithms include the inability to obtain interaction information between user entities, the tendency to ignore the dynamic changes of user and item portraits, and the fact that all recommendations are based on users and items. Summary of the invention

[0008] The technical problem to be solved by the present invention is: in view of the defects of the prior art, a method for recommending user entity groups based on knowledge graph embedding is provided. The present invention mainly uses the structure and semantic information of the knowledge graph to characterize dynamic user entity portraits and realize user entity group recommendation. Specifically, this task requires profiling user entities and obtaining the interaction information between user entities (the relationship between nodes) from the knowledge graph data to recommend user entity groups for target users.

[0009] The present invention adopts the following technical solutions to solve the above technical problems:

[0010] A method for recommending user entity groups based on knowledge graph embedding, the method comprising:

[0011] Step 1: Build the user's knowledge graph based on the triple data. The user's knowledge graph includes all the information of the current user and consists of user entities and relationships.

[0012] Step 2: Use the knowledge representation model Ripple Net and the pre-trained language model BERT to vectorize user entities and relationships respectively;

[0013] Step 3: Use the content-based recall algorithm to obtain a candidate set of user entity groups;

[0014] Step 4: Use the attention-based LSTM model to model the temporal characteristics of user entities;

[0015] Step 5: Input the embedding vector into the Wide & Deep model to obtain high- and low-order interactions between user entities and profile the user entities; the embedding vector includes the temporal features of the user entities in the candidate set or the vectorized representation of the user entities and relationships;

[0016] Step 6: Calculate the correlation between user entities and output the top-K user entity groups with the target user entity correlation.

[0017] As a further preferred embodiment of the present invention, the knowledge graph is formally defined as:

[0018] Knowledge Graph It consists of triplets of the form (h, r, t), where h∈N, r∈R, t∈N represent the head entity, relationship or attribute, and tail entity, respectively. The number of entities is P′, the number of user entities is P, and the number of relationships is Q.

[0019] As a further preferred solution of the present invention, in step 2, vectorizing the user entity specifically includes:

[0020] Assume that there are a total of P user nodes in the knowledge graph, which are represented as a user node set

[0021] The user entity in the knowledge graph is used as a seed. For each seed, a vector representation of the seed is generated through the Ripple Net model. Its k-hop user entity set is expressed as:

[0022]

[0023] Its k-hop triplet set is expressed as:

[0024]

[0025] Use the word vector model BERT to initialize all user entities in the graph, represented as

[0026] Through the Ripple NET model user entity vector, represented as

[0027] As a further preferred solution of the present invention, in step 2, vectorizing the user relationship specifically includes:

[0028] Use the word vector model BERT to initialize all relations in the graph, represented as r j ∈ER,j=1,2,...,Q.

[0029] As a further preferred embodiment of the present invention, in step 3, a content-based recall algorithm is used to generate a user entity candidate set. The content-based recall algorithm is based on user entity attributes and path length, and obtains a user candidate set through a candidate set generation layer, wherein the user entity represents

[0030] As a further preferred embodiment of the present invention, the step 4 specifically comprises:

[0031] The candidate set user entity representation vector And the relation representation vector ER is used as the input of LSTM, and the formula of LSTM is simplified as follows:

[0032]

[0033]

[0034] Among them, h * Represents the hidden state of each unit of LSTM;

[0035] Under the attention mechanism, the output vector is the weighted sum of each element according to its importance, as shown in the formula:

[0036]

[0037] Among them, parameter i represents the time, j represents the jth element in the sequence, T x represents the length of the sequence, and f(·) represents the The encoding of each dimension;

[0038] aij is regarded as a probability, reflecting the importance of element hj to Ci, and is represented by the softmax function, as shown in the formula:

[0039]

[0040] Among them, e ij It reflects the matching degree between the coded element and other elements. The higher the matching degree, the greater the influence of the element on it. ij The larger the value of

[0041] The feature embedding vector representation f of the user entity is obtained through the attention-based LSTM model ui ∈F u .

[0042] As a further preferred solution of the present invention, in step 5, the profiling of the user entity specifically includes:

[0043] User Entity in Computational Graph and , thereby obtaining the relevance score of the candidate user entity;

[0044] Given Its target users The correlation calculation formula is as follows:

[0045]

[0046] Among them, Wide&Deep is the Wide&Deep model, pi is the user entity ui and user entity u j degree of correlation.

[0047] As a further preferred solution of the present invention, in step 6, the user entity association score result matrix P Score Save for external use in the following format:

[0048] P Score =p ij ,i=1,2,...,P;j=1,2,...,K;

[0049] Among them, p ij For User Entity With User Entity degree of correlation.

[0050] As a further preferred embodiment of the present invention, the method further includes updating the recommendation model, and the triggering of the model update needs to satisfy one of the following two conditions:

[0051] Condition 1: When the content of the current knowledge graph changes due to the addition of external data, in order to describe this change, the vector dimension of user entities and relationships is increased by 2. cDimension, where c = 1, 2, ...;

[0052] Condition 2: When the user manually constructs the connection between the target user entity and other entities, the feature vector of the target user entity needs to be changed;

[0053] The method of changing is to add 2q dimensions based on the feature vector of the target user entity, where q = 1, 2, ...;

[0054] The user entity vector, relationship vector and user entity feature vector after model update are re-input into the Wide&Deep model to obtain the relevance score of each user entity after the model update.

[0055] Compared with the prior art, the present invention adopts the above technical solution and has the following technical effects: Compared with the previous recommendation algorithm based on knowledge graph, the present invention has the following three advantages:

[0056] 1) The present invention utilizes user entities and the interactive information between entities to deeply explore user interests, and at the same time adopts a joint training method to update user entity portraits through neural networks, thereby improving the accuracy of the algorithm.

[0057] 2) This invention uses a new model update strategy to characterize dynamic user entity portraits. On the one hand, the information related to user entity attributes and relationships in the user input data is spliced ​​into the current user entity feature representation in the form of vectors. On the other hand, the newly added knowledge graph data is spliced ​​into the user entity and relationship vector representation in the form of vectors.

[0058] 3) Traditional algorithms based on knowledge graph recommendation use knowledge graph as auxiliary information to enrich user / item portraits, thereby recommending items that users are interested in. Different from traditional methods, this invention implements user entity group recommendation based on user entity portraits and user interaction information, and provides relevance and recommendation reasons.

[0059] In summary, the present invention can more comprehensively utilize the structural information and semantic information of the knowledge graph to characterize dynamic user entity portraits, enhance the accuracy of the user entity group recommendation method, and provide reasons for the recommendation results, making user operations simple and efficient, and can also construct labels and provide connections for user entities in the knowledge graph. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 It is a schematic diagram of the overall process of the present invention.

[0061] Figure 2 This is a schematic diagram of the formal definition of the knowledge graph in the present invention.

[0062] Figure 3It is a schematic diagram of vectorizing the entities and relationships of the knowledge graph in the present invention.

[0063] Figure 4 In the present invention, the candidate set user entity representation vector And the relationship representation vector E R Schematic diagram of the input to LSTM.

[0064] Figure 5 It is a schematic diagram of calculating the relevance score of the candidate user entity in the present invention. DETAILED DESCRIPTION

[0065] The embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be interpreted as limiting the present invention.

[0066] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings:

[0067] Aiming at the user entity group recommendation problem in knowledge graph, the present invention proposes a user entity group recommendation method based on knowledge graph embedding, which profiles the user entities in the knowledge graph and returns the top-K user entity groups with the highest association degree to the target user entity according to the user entity profile features.

[0068] Specifically, we first construct the user's knowledge graph based on the triple data. The user's knowledge graph includes all the information of the current user and consists of user entities and relationships.

[0069] Then, the knowledge representation model Ripple Net and the pre-trained language model BERT are used to vectorize user entities and relations respectively.

[0070] Then a content-based recall algorithm is used to obtain a candidate set of user entity groups.

[0071] Then, an attention-based LSTM model is used to model the temporal features of user entities.

[0072] Then, the temporal features of user entities in the candidate set, the vectorized representations of user entities and relationships, etc. are input into the Wide&Deep model as embedding vectors to obtain high- and low-order interactions between user entities and profile the user entities.

[0073] Finally, the correlation between user entities is calculated, and the top-K user entity groups with the target user entity correlation are output.

[0074] The present invention discloses a method for recommending user entity groups based on knowledge graph embedding. The system architecture corresponding to the method includes an input layer, a graph vectorization representation layer, a candidate set generation layer, a feature extraction layer, a user entity portrait layer, an output layer, and a model update module. The overall process is as follows Figure 1 shown.

[0075] 1. Input Layer

[0076] The present invention implements the user entity group recommendation task based on knowledge graph data. The formal definition of knowledge graph is as follows. It consists of a triple of the form (h, r, t), where h∈N, r∈R, t∈N represent the head entity, relationship or attribute, and tail entity respectively. The number of entities is P′, the number of user entities is P, and the number of relationships is Q. Figure 2 shown.

[0077] 2. Graph Vectorization Representation Layer

[0078] The graph vectorization representation layer vectorizes the entities and relationships of the knowledge graph. The specific implementation steps are divided into the following two steps.

[0079] The first step is to define the user entity vector representation.

[0080] In the knowledge graph, there are a total of P user nodes, which are represented as the user node set The user entity in the knowledge graph is used as a seed. For each seed, its own vector representation is generated through the Ripple Net model. The idea of ​​the RippleNet model is formalized as follows: Figure 3 As shown, for user nodes Its k-hop user entity set is expressed as:

[0081]

[0082] Its k-hop ripple set (triplet set) is expressed as:

[0083]

[0084] Use the word vector model BERT to initialize all user entities in the graph, represented as Through the RippleNet model user entity vector, it is expressed as

[0085] The second step is to define the relationship vector representation.

[0086] Use the word vector model BERT to initialize all relations in the graph, represented as r j ∈E R, j=1,2,...,Q.

[0087] In summary, the user entities and relationships in the knowledge graph are vectorized.

[0088] 3. Candidate Set Generation Layer

[0089] Since there are a huge number of user entities in the knowledge graph, and the user entities associated with the target user entity are a subset of all user entity sets, a content-based recall algorithm is used to generate a user entity candidate set. The content-based recall algorithm is mainly based on user entity attributes and path length. The user candidate set is obtained through the candidate set generation layer, where the user entity represents

[0090] 4. Feature Extraction Layer

[0091] The candidate set user entity representation vector And the relationship representation vector E R As the input of LSTM, Figure 4 As shown. The LSTM formula is simplified as follows:

[0092]

[0093]

[0094] Among them, h * Represents the hidden state of each unit of LSTM.

[0095] Under the attention mechanism, the output vector is the weighted sum of each element according to its importance, as shown in the formula:

[0096]

[0097] Among them, parameter i represents the time, j represents the jth element in the sequence, T x represents the length of the sequence, and f(·) represents the The encoding of each dimension. ij It can be regarded as a probability, reflecting the element h j C i The importance of can be expressed using the softmax function, as shown in the formula:

[0098]

[0099] Here ij It reflects the matching degree between the coded element and other elements. The higher the matching degree, the greater the influence of the element on it. ij The larger the value of .

[0100] The feature embedding vector representation f of the user entity can be obtained through the attention-based LSTM model ui ∈F u .

[0101] 5. User Entity Portrait Layer

[0102] The user entity portrait layer is used to calculate the user entities in the graph and , thereby obtaining the relevance score of the candidate user entity, such as Figure 5 As shown. Given Its target users The correlation calculation formula is as follows:

[0103]

[0104] Among them, Wide&Deep is the Wide&Deep model, p i is the user entity u i and user entity u j degree of correlation.

[0105] 6. Output Layer

[0106] The user entity association score result matrix P Score Save for external use. The format is as follows:

[0107] P Score =p ij ,i=1,2,...,P;j=1,2,...,K;

[0108] Among them, p ij For User Entity With User Entity degree of correlation.

[0109] 7. Model Update Module

[0110] The size of the knowledge graph will change with the amount of data, and the user entity portrait in the knowledge graph will also change accordingly. This requires updating the recommendation model to adapt to the changes in the user entity portrait.

[0111] The trigger of model update needs to meet one of the following two conditions:

[0112] Condition 1: When the content of the current knowledge graph changes due to the addition of external data, the attributes and relationships of user entities become richer. In order to describe this change, we increase the vector dimension of user entities and relationships by 2. c dimensional, where c = 1, 2, ...

[0113] Condition 2: When the user manually builds the connection between the target user entity and other entities, the feature vector of the target user entity needs to be changed. The change strategy is to add 2q dimensions on the basis of the feature vector of the target user entity, where q = 1, 2, ...

[0114] The user entity vector, relationship vector and user entity feature vector after model update are re-input into the Wide&Deep model to obtain the relevance score of each user entity after the model update.

[0115] The above is a detailed description of the implementation mode of the present invention in conjunction with the accompanying drawings, but the present invention is not limited to the above implementation mode. Various changes can be made within the knowledge scope of ordinary technicians in the field without departing from the purpose of the present invention. The above is only a preferred embodiment of the present invention, and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technician familiar with this profession can make some changes or modify the technical content disclosed above to an equivalent embodiment of equivalent changes without departing from the scope of the technical solution of the present invention. However, any simple modification, equivalent replacement and improvement of the above embodiments made according to the technical essence of the present invention, within the spirit and principle of the present invention, still belongs to the protection scope of the technical solution of the present invention.

Claims

1. A user entity group recommendation method based on knowledge graph embedding, characterized in that: The method comprises: Step 1: Build the user's knowledge graph based on the triple data. The user's knowledge graph includes all the information of the current user and consists of user entities and relationships. Step 2: Use the knowledge representation model Ripple Net and the pre-trained language model BERT to vectorize user entities and relationships respectively; Step 3: Use the content-based recall algorithm to obtain a candidate set of user entity groups; Step 4: Use the attention-based LSTM model to model the temporal characteristics of user entities; The step 4 specifically includes: The candidate set user entity representation vector And the relationship representation vector E R As the input of LSTM, the LSTM formula is simplified as follows: Among them, h * Represents the hidden state of each unit of LSTM; Under the attention mechanism, the output vector is the weighted sum of each element according to its importance, as shown in the formula: Among them, parameter i represents the time, j represents the jth element in the sequence, T x represents the length of the sequence, and f(·) represents the The encoding of each dimension; a ij As a probability, it reflects the element h j C i The importance of is expressed using the softmax function, as shown in the formula: Among them, e ij It reflects the matching degree between the coded element and other elements. The higher the matching degree, the greater the influence of the element on it. ij The larger the value of The feature embedding vector representation f of the user entity is obtained through the attention-based LSTM model ui ∈F u ; Step 5: Input the embedding vector into the Wide & Deep model to obtain the high- and low-order interaction features between user entities and profile the user entities; The profiling of the user entity specifically includes: User Entity in Computational Graph and , thereby obtaining the relevance score of the candidate user entity; Given Its target users The correlation calculation formula is as follows: Among them, Wide&Deep is the Wide&Deep model, p i is the user entity u i and user entity u j degree of relevance; Step 6: Calculate the correlation between user entities and output the top-K user entity groups with the target user entity correlation. The user entity association score result matrix P Score Save for external use in the following format: P Score =p ij ,i=1,2,…,P;j=1,2,…,K; Among them, p ij For User Entity With User Entity degree of correlation.

2. A method for recommending user entity groups based on knowledge graph embedding according to claim 1, characterized in that: In step five, the embedding vector includes the temporal features of user entities in the candidate set or the vectorized representation of user entities and relationships.

3. The method for recommending user entity groups based on knowledge graph embedding according to claim 1, characterized in that: The knowledge graph is formally defined as: Knowledge Graph It consists of triplets of the form (h, r, t), where h∈N, r∈R, t∈N represent the head entity, relationship or attribute, and tail entity respectively. The number of entities is P′, the number of user entities is P, and the number of relationships is Q.

4. The method for recommending user entity groups based on knowledge graph embedding according to claim 1, characterized in that: In step 2, vectorizing the user entity specifically includes: Assume that there are a total of P user nodes in the knowledge graph, which are represented as a user node set The user entity in the knowledge graph is used as a seed. For each seed, a vector representation of the seed is generated through the Ripple Net model. Its k-hop user entity set is expressed as: Its k-hop triplet set is expressed as: Use the word vector model BERT to initialize all user entities in the graph, represented as The user entity vector is obtained through the Ripple NET model, expressed as 5. The method for recommending user entity groups based on knowledge graph embedding according to claim 1, characterized in that: In step 2, vectorizing the user relationship specifically includes: Use the word vector model BERT to initialize all relations in the graph, represented as r j ∈E R ,j=1,2,…,Q.

6. The method for recommending user entity groups based on knowledge graph embedding according to claim 1, characterized in that: In step 3, a content-based recall algorithm is used to generate a user entity candidate set. The content-based recall algorithm is based on user entity attributes and path length, and obtains a user candidate set through a candidate set generation layer, where the user entity represents 7. The method for recommending user entity groups based on knowledge graph embedding according to claim 1, characterized in that: The method further includes updating the recommendation model, and the triggering of the model update needs to meet one of the following two conditions: Condition 1: When the content of the current knowledge graph changes due to the addition of external data, in order to describe this change, the vector dimension of user entities and relationships is increased by 2. c Dimension, where c = 1, 2, ...; Condition 2: When the user manually constructs the connection between the target user entity and other entities, the feature vector of the target user entity needs to be changed; The method of change is to add 2 to the feature vector of the target user entity. q dimension, where q = 1, 2, ...; The user entity vector, relationship vector and user entity feature vector after model update are re-input into the Wide&Deep model to obtain the relevance score of each user entity after the model update.

Citation Information

Patent Citations

  • Entity recommendation method and apparatus, terminal and readable storage medium

    CN108509479A

  • Cross-network character association method based on social network knowledge graph

    CN110110094A