Preference prediction method based on local correlation of entity paths
By adopting preference prediction methods based on local correlation of entity paths in the recommendation system, the entity relationship in the knowledge graph is optimized, and the problem of inconsistency between entity relationships and product relationships is solved, and accurate prediction of user tendencies and improvement of recommendation results is achieved.
Patent Information
- Application Number
- CN202210438899.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-25
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2042-04-25
AI Technical Summary
The existing recommendation system based on knowledge graphs cannot effectively improve the inconsistency between entity relationships and product relationships, affecting the accuracy of recommendation results.
The preference prediction method based on local correlation of entity paths is adopted, and the entity relationship structures in the knowledge graph are constructed, and the entity relationship in the knowledge graph is optimized, and the model of potential product associations is extracted to enhance the consistency between entity relationships and product relationships.
Accurate prediction of user tendencies is achieved, the correlation between entity relationships and the current application fields of recommendation systems is enhanced, and the accuracy of recommendation results is improved.
Smart Images

Figure CN115033778B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of recommendation systems, and in particular to a recommendation system based on knowledge graphs. Background Art
[0002] With the development of the Internet, there is a contradiction between the rapid increase in the number of products and the limited information receiving ability of users. Therefore, a recommendation system is needed to sort the products that users may buy. In order to enrich the associations between products and improve the recommendation system's ability to model users and products, entity relationships are introduced through knowledge graphs. However, since entity relationships come from the objective world, while product relationships come from the user's subjective intentions, there is an inconsistency between the two. Although the existing recommendation system algorithms based on knowledge graphs rely on entity relationships to enhance the expressiveness of products, they cannot effectively improve the impact of this inconsistency on the recommendation results. Therefore, it is of great significance to maximize the correlation between entity relationships and product relationships and reduce the negative impact of subjective and objective inconsistencies on recommendation results. Summary of the invention
[0003] In view of the shortcomings of the existing technology and the problem of spatial structure loss in the entity propagation process, the present invention proposes a preference prediction method based on local correlation of entity paths, realizes the extraction model of potential product associations based on user tendencies, and makes decisions on entity relationships.
[0004] The present invention is implemented by the following technical solutions:
[0005] A preference prediction method based on local correlation of entity paths, the method comprising the following steps:
[0006] Step 1: Construct three entity relationship structures: chain, collision, and split, traverse all entities in the original data knowledge graph, and extract entity spatial structure information: obtain entity a, entity b, and entity c,<a,b> ∈R represents that there is a path from a to b in the graph relationship. R1, R2, and R3 are set to represent the basic structure of the relative relationship between the three entities, and the result is added to the entity relationship candidate set after the entity association decision, that is:
[0007] R1: When<a,b> ∈R and<b,c> ∈R, and And the decision is established, add<a,c>
[0008] R2: When<a,b> ∈R and<a,c> ∈R, and And the decision is established, add<b,c>
[0009] R3: When<b,a> ∈R and<c,a> ∈R, and And the decision is established, add<b,c>
[0010] Step 2: Optimize the entity relationships in the knowledge graph, remove the redundancy and noise in the entity relationships, and extract the relationships between products based on user preferences:
[0011] First, the interactive behavior of users purchasing products is sorted in chronological order, and the products purchased by the same user are crossed in a directed pairwise manner. A set of positive and negative samples is generated based on the interactive behavior of the user on the two products in the crossover. This process is represented as follows:
[0012]
[0013] Among them, l x,p Represents user u x With product i p Whether an interaction occurs, with a value of 1 indicating an interaction occurs and a value of 0 indicating no interaction occurs. f( ) represents a decision model for fitting the relationship between two products based on the same user, and f'( ) represents a function that extracts the product from the model and uses only two labels for calculation;
[0014] Secondly, based on the relationship between products obtained above, a user potential tendency learning model is constructed. The user potential tendency learning model is a binary classification model, which is implemented by three parts: the concatenation layer for retaining the original features, the inner product operation and the outer product operation for calculating the similarity between the two product embedding vectors. The expression is as follows:
[0015] The inner product operation formula of corresponding position multiplication is:
[0016] Outer product operation of matrix multiplication:
[0017] Among them, the vector and vector Represent the embedding vectors of the two products respectively;
[0018] The similarity between entities is calculated on the basis of retaining the original features, so as to obtain the distribution of entities in space and predict whether there is a correlation between two products. The expression of similarity is as follows:
[0019]
[0020] Then, a decision model f() between the relationship set between candidate entities and the extracted entities is obtained for fitting the relationship between two products based on the same user;
[0021] Step 3: Optimize the entity relationship set through the decision model to enhance the consistency between entity relationships and product relationships: Divide the candidate entity relationship set into two parts, namely the original entity relationship and the newly acquired spatial structure relationship, including two parts of processing: ① For the newly acquired spatial structure relationship, obtain the similarity through the decision model and set the threshold to determine whether to retain it; ② For the original entity relationship, assign weights and sort the entity relationships; the specific process is:
[0022] Step 3.1, set the initial threshold and construct two empty lists of strong correlation and weak correlation respectively;
[0023] Step 3.2, traverse all entity relationship triples, if the correlation between two entities in the triple is greater than the threshold, add the triple to the strong correlation list, otherwise add it to the weak correlation list;
[0024] Step 3.3, if one of the strong correlation list or the weak correlation list is empty, exit this process; otherwise, directly merge the strong correlation list and the weak correlation list in the order of front and back, and replace the original triple data;
[0025] Step 3.4, clear the strong correlation list and the weak correlation list, increase or decrease the threshold, and repeat steps 3.2 to 3.4;
[0026] Based on the set threshold, the above steps are repeated multiple times until the consistency of entity relationship and product relationship is strengthened.
[0027] When the entity relationship diagram corresponding to the product is not among the factors that users consider when purchasing the product, the most original interaction between the user and the product is directly extracted, and a parameter is used to measure whether the user wants to consider the various relationships behind the product. The extraction formula of the original interaction is expressed as follows:
[0028] I′ k =Σ(W 0 I k +b 0 )
[0029] π(u k , I k )=ReLU(W 1 (u k ||I′ k +b 1 ))
[0030]
[0031] Among them, I k Represents user u k The set of products that have interacted. represents the result of prediction based on the knowledge graph, σ represents the Sigmoid function, λ represents the introduced hyperparameter, and the final prediction result is I' k Represents the product vector set I k Each product vector in is assigned a different weight and added together, π(u k ,I k ) represents the relationship between the user and product set, W 0 , W 1 、b 0 、b 1 Respectively represent the parameters in the model, ReLU() represents the activation function, Represents the predicted result.
[0032] Compared with the prior art, the beneficial effects and advantages of the present invention are:
[0033] 1) Based on the entity relationship optimization model, accurate and comprehensive prediction of user preferences is achieved;
[0034] 2) It can enhance the relevance between entity relationships and the current application areas of the recommendation system. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is an overall flow chart of the preference prediction method based on local correlation of entity paths of the present invention;
[0036] Figure 2 Schematic diagram of three entity relationships;
[0037] Figure 3 Schematic diagram of the overall structure of the entity relationship optimization model. DETAILED DESCRIPTION
[0038] The specific implementation modes of the present invention will be described in detail below with reference to the accompanying drawings.
[0039] like Figure 1 As shown, it is an overall flow chart of the preference prediction method based on local correlation of entity paths of the present invention. The process includes the following steps:
[0040] Step 1: Construct three entity relationship structures: chain, collision, and split, traverse all entities in the original data knowledge graph, and extract entity spatial structure information: obtain entity a, entity b, and entity c,<a,b> ∈R represents that there is a path from a to b in the graph relationship. R1, R2, and R3 are set to represent that when the relative relationship of the three entities can introduce the above three basic structures, and the result is added to the entity relationship candidate set after the entity association decision, that is:
[0041] R1: When<a,b> ∈R and<b,c> ∈R, and And the decision is established, add<a,c>
[0042] R2: When<a,b> ∈R and<a,c> ∈R, and And the decision is established, add<b,c>
[0043] R3: When<b,a> ∈R and<c,a> ∈R, and And the decision is established, add<b,c> ;
[0044] like Figure 2 The three entity relationship structures shown are chain, collision, and split;
[0045] Step 2: Optimize the entity relationships in the knowledge graph, remove the redundancy and noise in the relationships between entities, and extract the relationships between products based on user preferences; Figure 3 As shown, this is a schematic diagram of the overall structure of the entity relationship optimization model.
[0046] First, there is a certain order in the process of users interacting with products. Assume that in an e-commerce platform, there is a progressive relationship between the two products purchased by a certain user, such as buying a mobile phone and then continuing to buy a mobile phone case. Based on this common situation in reality, the user's purchase of products is sorted in chronological order, and the products purchased by the same user are crossed in a directed pairwise manner. Based on the user's interaction with the two products in the crossover, a set of positive and negative samples is generated. This process is represented as follows:
[0047]
[0048] Among them, l x,p Represents user u x With product i p Whether an interaction occurs, with a value of 1 indicating an interaction occurs and a value of 0 indicating no interaction occurs. f( ) represents a decision model for fitting the relationship between two products based on the same user, and f'( ) represents a function that extracts the product from the model and uses only two labels for calculation;
[0049] The original data contains a triplet of user-product-label, which represents whether a user interacts with the product.
[0050] Secondly, based on the product relationship obtained above, a user potential tendency learning model is constructed. The user potential tendency learning model is a binary classification model, which is implemented by three parts: the concatenation layer used to retain the original features, and the calculation of the inner product and outer product of the similarity between the two product embedding vectors. The expression is as follows:
[0051] The inner product operation formula of corresponding position multiplication is:
[0052] Outer product operation of matrix multiplication:
[0053] Among them, the vector and vector Represent the embedding vectors of the two products respectively;
[0054] The similarity between entities is calculated on the basis of retaining the original features, so as to obtain the distribution of entities in space and predict whether there is a correlation between two products. The similarity expression is as follows:
[0055]
[0056] Then, a decision model f() between the relationship set between candidate entities and the extracted entities is obtained for fitting the relationship between two products based on the same user;
[0057] Step 3: Optimize the entity relationship set through the decision model to enhance the consistency between entity relationships and product relationships: Divide the candidate entity relationship set into two parts, namely the original entity relationship and the newly acquired spatial structure relationship, including two parts of processing: ① For the newly acquired spatial structure relationship, directly obtain the similarity through the decision model, set the threshold to determine whether to retain; ② For the original entity relationship, based on the characteristic of the knowledge graph recommendation model that limits the number of next-hop entities during the entity propagation process, the entity relationship is weighted and sorted. The specific process is:
[0058] Step 3.1, set the initial threshold and construct two empty lists of strong correlation and weak correlation respectively;
[0059] Step 3.2, traverse all entity relationship triples, if the correlation between two entities in the triple is greater than the threshold, add the triple to the strong correlation list, otherwise add it to the weak correlation list;
[0060] Step 3.3, if one of the strong correlation list or the weak correlation list is empty, exit this process; otherwise, directly merge the strong correlation list and the weak correlation list in the order of front and back, and replace the original triple data;
[0061] Step 3.4: Clear the strong correlation list and the weak correlation list, increase or decrease the threshold, and repeat steps 3.2 to 3.4.
[0062] In the above steps, multiple cycles are performed based on the set threshold until the consistency between entity relationship and product relationship is strengthened;
[0063] However, when the entity corresponding to a product is propagated and aggregated in the knowledge graph (several vectors are added together with different weights), it can be regarded as an entity graph aggregate with additional associations. When the decision model predicts the possibility of a user interacting with this product, it is equivalent to judging the possibility of the entity relationship graph corresponding to this user and this product. Therefore, in the learning process of the decision model, what really plays a role is the aggregate of the entity relationship graph corresponding to the product. If the entity relationship graph corresponding to this product is not among the factors considered by the user when purchasing the product, the most original interaction between the user and the product should be directly extracted, and a parameter should be used to measure whether the user wants to consider the various relationships behind the product. The extraction formula of the original interaction is expressed as follows:
[0064] I′ k =∑(W 0 I k +b 0 )
[0065] π(u k ,I k )=ReLU(W 1 (u k ||I′ k +b 1 ))
[0066]
[0067] Among them, I k Represents user u k The set of products that have interacted. represents the result of prediction based on the knowledge graph, σ represents the Sigmoid function, λ represents the introduced hyperparameter, and the final prediction result is I' k Represents the product vector set I k Each product vector in is assigned a different weight and added together, π(u k ,I k ) represents the relationship between the user and product set, W 0 , W 1 , b 0 , b 1 Respectively represent the parameters in the model, ReLU() represents the activation function, Represents the predicted result.
[0068] In summary, the present invention analyzes the newly acquired entity relationships to determine whether they are reasonable, and therefore designs an extraction model for potential product associations based on user preferences, makes decisions on entity relationships, and enhances their relevance to the current application field of the recommendation system. Finally, an aggregation module is constructed in the network to explicitly control the weight ratio between entity relationships and product relationships, further correcting the impact of inconsistency on recommendation results.
[0069] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Those skilled in the art may make various modifications, equivalent substitutions or variations without departing from the spirit and scope of the present invention, and all modifications, equivalent substitutions or variations made within the spirit and principles of the present application fall within the protection scope of the present invention as defined by the appended claims.
Claims
1. A preference prediction method based on local correlation of entity paths, characterized in that: The method comprises the following steps: Step 1: Construct three entity relationship structures: chain, collision, and split, traverse all entities in the original data knowledge graph, and extract entity spatial structure information: obtain entity a, entity b, and entity c,<a,b> ∈R represents that there is a path from a to b in the graph relationship. R1, R2, and R3 are set to represent the basic structure of the relative relationship between the three entities, and the result is added to the entity relationship candidate set after the entity association decision, that is: R1: When<a,b> ∈R and<b,c> ∈R, and And the decision is established, add<a,c> R2: When<a,b> ∈R and<a,c> ∈R, and And the decision is established, add<b,c> R3: When<b,a> ∈R and<c,a> ∈R, and And the decision is established, add<b,c> Step 2: Optimize the entity relationships in the knowledge graph, remove the redundancy and noise in the entity relationships, and extract the relationships between products based on user preferences: First, the interactive behavior of users purchasing products is sorted in chronological order, and the products purchased by the same user are crossed in a directed pairwise manner. A set of positive and negative samples is generated based on the interactive behavior of the user on the two products in the crossover. This process is represented as follows: Among them, l x,p Represents user u x With product i p Whether an interaction occurs, with a value of 1 indicating an interaction occurs and a value of 0 indicating no interaction occurs. f() represents a decision model for fitting the relationship between two products based on the same user, and f'() represents a function that extracts the product from the model and uses only two labels for calculation; Secondly, based on the relationship between products obtained above, a user potential tendency learning model is constructed. The user potential tendency learning model is a binary classification model, which is implemented by three parts: the concatenation layer for retaining the original features, the inner product operation and the outer product operation for calculating the similarity between the two product embedding vectors. The expression is as follows: The inner product operation formula of corresponding position multiplication is: Outer product operation of matrix multiplication: Among them, the vector and vector Represent the embedding vectors of the two products respectively; The similarity between entities is calculated on the basis of retaining the original features, so as to obtain the distribution of entities in space and predict whether there is a correlation between two products. The expression of similarity is as follows: Then, a decision model f() between the relationship set between candidate entities and the extracted entities is obtained for fitting the relationship between two products based on the same user; Step 3: Optimize the entity relationship set through the decision model to enhance the consistency between entity relationships and product relationships: Divide the candidate entity relationship set into two parts, namely the original entity relationship and the newly acquired spatial structure relationship, including two parts of processing: ① For the newly acquired spatial structure relationship, obtain the similarity through the decision model and set the threshold to determine whether to retain it; ② For the original entity relationship, assign weights and sort the entity relationships; the specific process is: Step 3.1, set the initial threshold and construct two empty lists of strong correlation and weak correlation respectively; Step 3.2, traverse all entity relationship triples, if the correlation between two entities in the triple is greater than the threshold, add the triple to the strong correlation list, otherwise add it to the weak correlation list; Step 3.3, if one of the strong correlation list or the weak correlation list is empty, exit this process; otherwise, directly merge the strong correlation list and the weak correlation list in the order of front and back, and replace the original triple data; Step 3.4, clear the strong correlation list and the weak correlation list, increase or decrease the threshold, and repeat steps 3.2 to 3.4; Based on the set threshold, the above steps are repeated multiple times until the consistency of entity relationship and product relationship is strengthened.
2. A preference prediction method based on local correlation of entity paths as claimed in claim 1, characterized in that: The method comprises the following steps: When the entity relationship diagram corresponding to the product is not among the factors that users consider when purchasing the product, the most original interaction between the user and the product is directly extracted, and a parameter is used to measure whether the user wants to consider the various relationships behind the product. The extraction formula of the original interaction is expressed as follows: I' k =∑(W0I k +b0) π(in k ,AND k )=ReLU(W1(u k ||I′ k +b1)) Among them, I k Represents user u k The set of products that have interacted. represents the result of prediction based on the knowledge graph, σ represents the Sigmoid function, λ represents the introduced hyperparameter, and the final prediction result is I′ k Represents the product vector set I k Each product vector in is assigned a different weight and added together, π(u k ,I k ) represents the function used to calculate the relationship between the user and the product set, W0, W1, b0, b1 represent the parameters in the model, ReLU() represents the activation function, Represents the predicted result.
Citation Information
Patent Citations
Online shopping mall commodity recommendation method based on knowledge graph
CN111507796A
Personalized recommendation method based on collaborative knowledge graph
CN112149004A