Uncertain type enhancement path-based interpretable recommendation system and method

By introducing uncertain type enhancement paths into the recommendation system, using text description coding and long and short-term memory networks to calculate the probability of user interaction with products, the problems of accuracy and interpretability of traditional recommendation systems under sparse relationships are solved, and more accurate recommendation results are achieved.

CN120598628APending Publication Date: 2025-09-05ANQING NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510682973.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-26
Publication Date
2025-09-05

AI Technical Summary

Technical Problem

The effect of traditional recommendation systems has decreased when product relationships are sparse, and the existing path-based methods lack accuracy and explanatoryness in path representation and cannot accurately express user preferences.

Method used

An interpretable recommendation system for enhanced paths of uncertain types is introduced, encoding uncertain types is described through text, and the uncertain type set encoding layer and path encoding layer are used to calculate the probability of interaction between users and goods in combination with long and short-term memory networks.

Benefits of technology

Provide more accurate and interpretable recommendation results, which can better express user preferences and improve the accuracy and interpretability of the recommendation system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120598628A_ABST
    Figure CN120598628A_ABST
Patent Text Reader

Abstract

The invention discloses an interpretable recommendation system and method based on an uncertain type enhancement path, and belongs to the technical field of computer artificial intelligence interpretable recommendation systems, and the system comprises an uncertain type coding module and a recommendation module. According to the method, a new path representation method is provided by introducing an uncertain type, user preferences can be expressed in a recommendation system, and the representation method has higher expression ability in the aspect of describing the user preferences; based on the provided path representation, a recommendation system based on the uncertain type enhanced path is designed, the recommendation system is used for calculating the probability of commodity recommendation, and a more accurate recommendation result can be provided for a user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer artificial intelligence explainable recommendation systems, and in particular to an explainable recommendation system and method based on uncertain type enhancement paths. Background Art

[0002] Due to the explosive growth of online content and services, recommendation systems have emerged to alleviate information overload and help users find desirable products. Traditional recommendation systems rely on user-item interactions, item descriptions, or both to identify interesting items. Matrix factorization is a classic recommendation technique. It decomposes the user-item interaction matrix into the product of two low-dimensional matrices, one representing the user's hidden features and the other representing the item's hidden features. To handle sparse categorical features, some researchers have leveraged the linearity of factorization machines to model low-order feature interactions and the nonlinearity of neural networks to model high-order feature interactions. Some studies have leveraged the memory capacity of wide models and the generalization ability of deep models, using neural networks and logistic regression models to learn the correlations between features.

[0003] When relationships between items are sparse, the performance of traditional recommendation systems may decline. Knowledge graphs can complement the underlying relationships between items and have therefore been used in more advanced recommendation systems. Most methods used in knowledge graph-based recommendation systems are generally either embedding-based or path-based. Embedding-based methods learn embeddings for all entities in the knowledge graph and integrate them into the collaborative filtering process. Using neural networks, some learn user and item embeddings layer by layer on the knowledge graph. Others improve on graph convolutional networks by learning the embedding of each entity by aggregating information about its neighbors. Among path-based methods, some scholars view the knowledge graph as a network with heterogeneous information and design several types of meta-paths to extract features between items. Others design several types of meta-graphs and use matrix factorization on the meta-graph's similarity matrix to calculate recommended items. These path-based methods suffer from the drawback of manually designing meta-paths or meta-graphs. As an alternative, some research aims to automatically construct paths to express user preferences for items and encode these paths using long-short-term memory networks.

[0004] Traditional recommendation systems generally work well when product descriptions are detailed, but in some cases, their effectiveness can be significantly reduced due to sparse relationships between products. To alleviate this problem, researchers have proposed integrating knowledge graphs into recommendation systems, using the rich facts about entities in the knowledge graph to supplement the relationships between products. Embedding-based recommendation methods and path-based recommendation methods constitute the two main models of knowledge graph-based recommendation systems. Embedding-based methods use knowledge graph embedding algorithms to learn embeddings of users and products in the knowledge graph and use them to calculate click probabilities; path-based methods, on the other hand, express user preferences for products as recommendation paths.

[0005] Path-based recommender systems model the connections between users and items in a knowledge graph as paths to express user preferences. They can provide more accurate and explainable recommendations. However, research on how to design appropriate path representations remains limited. Some existing attempts have incorporated certain entity types into path representations, but such representations can be too general to accurately express personalized preferences or explain the rationale behind recommendations.

[0006] To more accurately represent user preferences, in addition to certain types, we incorporate uncertain types into the path representation to describe entities along the path. Uncertain types are user-specified high-level values ​​of entity-related attributes. These types are uncertain because their degree of association with the entity is uncertain, determined by the textual description on the network. To leverage uncertain types in recommendation systems, this paper proposes an interpretable recommendation system and method based on paths enhanced with uncertain types. Summary of the Invention

[0007] The technical problem to be solved by the present invention is: how to provide users with more accurate and explainable recommendation results. An explainable recommendation system based on uncertain type enhanced path is provided. The system relies on a joint model for encoding uncertain types through text descriptions and encoding the path through different information including the uncertain types of all entities on the path.

[0008] The present invention solves the above technical problems through the following technical solutions, which include an uncertain type encoding module and a recommendation module;

[0009] The uncertain type encoding module includes a text encoding layer, an uncertain type encoding layer, and an uncertain type set encoding layer; the text encoding layer is used to encode each text in the text description set to obtain the embedding of each text; the uncertain type encoding layer is used to obtain the embedding of the uncertain type of the entity based on the embedding of the text; the uncertain type set encoding layer is used to obtain the embedding of the uncertain type set based on the embedding of the uncertain type of the entity; wherein the text description set is obtained from the search engine using the name of the entity and the name of the uncertain type;

[0010] The recommendation module includes a definite type set embedding layer, a path encoding layer and a prediction layer; the definite type set embedding layer is used to encode the definite type set of entities to obtain the embedding of the definite type set; the path encoding layer is used to encode the recommended path through a long short-term memory network to obtain the embedding of the recommended path; the prediction layer is used to calculate the probability of interaction between the user and the product.

[0011] Furthermore, in the text encoding layer, s is encoded using the averaging method, and the embedding of s is represented as l s , s is the text description set A text in .

[0012] Furthermore, in the uncertain type coding layer, based on the text description set Embedding of text in Chinese, embedding of entity e with uncertain type c e,c The calculation formula is as follows:

[0013]

[0014]

[0015] Among them, the weight parameter Bias parameters and the query vector are all trainable parameters, d w is the dimension of word embedding, d1 is the dimension of user-specified uncertain type embedding, is the key vector of the i-th text, is the value vector of the i-th text, i.e. the embedding of the text, is the attention weight of the i-th text.

[0016] Furthermore, in the uncertain type set coding layer, the uncertain type set Embed The calculation formula is as follows:

[0017]

[0018] Among them, T eis a set of determined types of entities e, and the weight parameter Bias parameters and the query vector are all trainable parameters, d2 is the embedding dimension of the user-specified uncertain type set, is the key vector of the i-th uncertain type, is the value vector of the i-th uncertain type, that is, the embedding of the uncertain type, Is entity e of indeterminate type c i degree of certainty.

[0019] Furthermore, in the determined type set coding layer, T e ={t e,1 ,t e,2 ,…,t e,m} is a set of definite types of entity e, embedding each definite type The average value of the embedding of the determined type set

[0020] Furthermore, in the path coding layer, let l p It represents the embedding of the recommended path p, which is defined as the final hidden state obtained by iterative calculation of the long short-term memory network LSTM. The calculation formula is as follows:

[0021] h i =LSTM(n i ,h i-1 )

[0022] Among them, 1≤i≤L, L represents the dimension of the final hidden state, and h0 is set to a zero-filled vector d p is the path embedding dimension specified by the user, h i is the hidden layer output at the i-th time step, h i-1 is the hidden layer output at the i-1 time step, n i is the embedding of the i-th node in the path, and is the embedding of the i-th entity Determine the type set T e Embed The i-th embedding of a certain type in Embedding of Uncertain Type Sets The i-th uncertain type embedding in and the i-th relation embedding

[0023] It is obtained by splicing operation, where d e and d r are the dimensions of user-specified entities and relationships, respectively.

[0024] Furthermore, in the prediction layer, for each recommended path in, is a given knowledge graph, θ is a given maximum path length, and a two-layer fully connected network is used to define the probability that user u interacts with product v through path p, denoted as Pr(u,v|p), which is calculated as follows:

[0025] Pr(u,v|p)=W4ReLU(W3l p +b3)+b4

[0026] Among them, the weight parameter Bias parameters Weight parameter and bias parameters Both are trainable parameters, d3 is the predicted embedding dimension given by the user;

[0027] Use logarithmic sum exponential pooling method to aggregate The possibility of all paths in the , and the probability of user u interacting with product v. The calculation formula is as follows:

[0028]

[0029] Here, σ is a sigmoid function.

[0030] like Figure 7 As shown, the present invention also proposes an explainable recommendation method based on an uncertain type enhancement path, comprising the following steps:

[0031] S1: Preprocessing

[0032] Get a text description set from the search engine using the name of entity e and the name of uncertain type c In the knowledge graph The recommended path set from user u to product v in the recommended path set is denoted as Among them, user u and product v are both knowledge graphs Entities in

[0033] S2: Probability Calculation

[0034] Based on text description collection and recommended path collection The recommendation system is used to calculate the probability of interaction between user u and product v, that is, to predict the likelihood of user u selecting product v.

[0035] S3: Product Recommendations

[0036] Based on the probability of each user interacting with each product and the required number of recommendations, the probability of interaction is sorted from large to small, and the top N products are recommended to the corresponding users, where the value of N is equal to the required number of recommendations.

[0037] Furthermore, in step S1, in the knowledge graph In, use Representing knowledge graph The entity set in Representing knowledge graph The set of relations in the relation set, the inverse relation of each relation r in the relation set is r - , then the new relationship set

[0038] It is defined as the union of the original relation set and the inverse relation set, that is, Given a knowledge graph User u and product v, in the knowledge graph The recommended path of length L from user u to product v is:

[0039]

[0040] Where, e1=u,e L =v; for 2≤i≤L-1, there is For 2≤i≤L-1, we have T k Knowledge Graph Middle Entity e k A set of definite types, where 1≤k≤L.

[0041] Compared with the existing technology, the present invention has the following advantages: the explainable recommendation system based on the uncertain type enhanced path, by introducing uncertain types, proposes a new path representation method, which can express user preferences in the recommendation system. This representation method has a higher expressive ability in characterizing user preferences; based on the proposed path representation, a recommendation system based on the uncertain type enhanced path is designed to calculate the probability of recommending products, which can provide users with more accurate recommendation results. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 2 is a schematic diagram of an explainable recommendation system framework based on an uncertain type enhancement path in an embodiment of the present invention;

[0043] Figure 2 2. It is a schematic diagram of an uncertain type coding layer framework in an embodiment of the present invention;

[0044] Figure 3 is an example diagram of a text snapshot returned by a search engine in an embodiment of the present invention;

[0045] Figure 4 This is an example diagram of a recommendation system based on a knowledge graph in an embodiment of the present invention;

[0046] Figure 5 is an example diagram of a path from Tony to Forrest Gump in an embodiment of the present invention;

[0047] Figure 6 is an example diagram of a recommended path based on an uncertain type enhanced path in an embodiment of the present invention;

[0048] Figure 7 It is a flowchart of the explainable recommendation method based on the uncertain type enhancement path of the present invention. DETAILED DESCRIPTION

[0049] The following is a detailed description of an embodiment of the present invention. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process. However, the protection scope of the present invention is not limited to the following embodiment.

[0050] Example 1

[0051] In this embodiment, we will introduce uncertainty types into the path and apply them to the recommendation system. We will also propose a new recommendation system based on uncertainty type enhanced path, referred to as UTEP. The overall framework is as follows: Figure 1 The recommendation system based on the uncertain type enhanced path is an end-to-end model consisting of two modules: an upstream uncertain type encoding module, which includes a text encoding layer, an uncertain type encoding layer, and an uncertain type set encoding layer; and a downstream recommendation module, which includes a certain type set embedding layer, a path encoding layer, and a prediction layer.

[0052] First, since the recommendation problem we are dealing with is specifically about predicting the likelihood that a user will choose a product, we first define the recommendation problem that needs to be solved.

[0053] For a user-item pair (u,v), given a knowledge graph First, extract the path from user u to product v from the knowledge graph, and mark the path set as where p1, p2, ..., p K For each recommended path; then, given an uncertain type set With path collection For the entity e of the determined type t in the recommended path set and the corresponding uncertain type set where c1, c2, ..., c MFor each uncertain type, crawl the text description related to the entity and uncertain type from the World Wide Web, and mark the text description collection as a corpus in, For entity e, uncertain type c i The above two preparatory tasks are independent of the specific recommendation steps, so they can be completed offline, which will not affect the performance of the recommendation algorithm. Based on the above definitions and preparatory tasks, the overall goal of the recommendation problem is to recommend a set of paths based on the path set. A collection of text descriptions related to entities and uncertain types Predict the probability that user u will choose product v, marked as The process can be formally expressed as:

[0054]

[0055] Among them, f is the specific recommendation algorithm model, and Θ is the trainable parameter of the model.

[0056] It should be noted that in the recommendation scenario, the deterministic type represents what the entity is. For example, in the following embodiment 2, the deterministic type of the movie entity APOLLO 13 is Movie; the uncertain type is defined as the product attributes that users pay attention to when making product recommendations, and is usually used to characterize the direct connection between the entity in the knowledge graph and the recommendation scenario. The uncertain types of the movie entity APOLLO 13 can include the subject matter of the movie, the actors of the movie, the director of the movie, etc.

[0057] Based on the definition of the recommendation problem, we solve the recommendation problem through a recommendation algorithm based on uncertain type enhancement path. The explainable recommendation system based on uncertain type enhancement path has two preprocessing steps and then learns a neural model for predicting the probability of user-item interaction.

[0058] The first preprocessing step is to calculate the text set that mentions entity e and uncertain type c. This calculation is done for all uncertain types c of entity e in the backend knowledge graph. T is the set of certain types of entity e. We use represents the set of texts that mention entity e and uncertain type c. For practical reasons, we do not require must be computed from a carefully prepared corpus of text, but is instead obtained directly from a search engine The approach is to concatenate the entity name, the name of the uncertain type, and the uncertain type from DBPedia to form a search query. We use the first 10 text snapshots that contain at least one word in the search query to form

[0059] The second preprocessing step is to calculate the knowledge graph The set of recommended paths from user u to item v in , such that the length of path p does not exceed the threshold θ specified by the user, for all user-item pairs (u, v) whose engagement needs to be considered. We denote this set of recommended paths as It is calculated according to the following definition:

[0060] For knowledge graphs We use express The entity set in express The set of relations in the relation set. The inverse relation of each relation r in the relation set is r - , then the new relationship set It can be defined as the union of the original relation set and the inverse relation, that is, Given a knowledge graph User u and product v, in The recommended path of length L from u to v (abbreviated as path a) is of the form:

[0061]

[0062] Where, e1=u,e L =v; for 2≤i≤L-1, there is For 2≤i≤L-1, we have T k Knowledge Graph Middle Entity e k A set of definite types, where 1≤k≤L.

[0063] The explainable recommendation system based on uncertain type enhanced paths consists of two modules. One module is the uncertain type encoding module, which includes a text encoding layer, an uncertain type encoding layer, and an uncertain type set encoding layer. The other module is the recommendation module, which includes a certain type set embedding layer, a path encoding layer, and a prediction layer. Given a user-item pair (u, v) and a knowledge graph, the construction of the model can be described in detail as follows:

[0064] (1) Text encoding layer

[0065] For each entity e and its uncertain type set in the backend knowledge graph For each uncertainty type c in , we consider Encode each text (text fragment) in . Assume A text s is a sequence of words <w1,...,w n>, whose word embedding is given. There are many ways to encode text using word embedding, such as averaging, bidirectional long short-term memory networks, or convolutional neural networks. In order to reduce the number of trainable parameters, we use averaging to encode s. That is, we represent the embedding of s as l s , and define it as The average value of Indicates w i Embedded.

[0066] (2) Uncertain type coding layer

[0067] The schematic diagram of the uncertain type coding layer framework is as follows Figure 2 Based on The encoding embedding of Chinese text, the embedding of the uncertain type c of entity e can be recorded as l e,c , which can be calculated as the weighted sum of text embeddings through the attention mechanism, and its formal definition is:

[0068]

[0069] Among them, the weight parameter Bias parameters and the query vector is a trainable parameter, d w is the dimension of word embedding, d1 is the dimension of user-specified uncertain type embedding, is the key vector of the i-th word, is the value vector of the i-th text, is the attention weight of the i-th text, and the final text representation l s It is the result of weighted summation of all text segment representations according to the attention weight. The larger the attention weight, the more important the text segment is to the output.

[0070] (3) Uncertain type set coding layer

[0071] Based on the uncertain type set The embedding representation of each uncertain type c in T e is the set of definite types of e, the set of indefinite types The embedding of It is also calculated as a weighted sum of embeddings of uncertain types through the attention mechanism, which is defined as:

[0072]

[0073] Among them, the weight parameter Bias and the query vector are all trainable parameters, d2 is the embedding dimension of the user-specified uncertain type set, is the key vector of the i-th uncertain type, is the value vector of the i-th uncertain type, that is, the embedding of the uncertain type, Is entity e of indeterminate type c i The degree of certainty, the final uncertainty type set representation is the result of weighted summation of all uncertain type representations according to the attention weight. In the method of the present invention, e and c i The correlation certainty between d(e,c i ) will be used to explain the recommendation results and is defined as for In the case of It has nothing to do with any entity or any text, we simply Set to a zero-filled vector, i.e.

[0074] (4) Determine the type set embedding layer

[0075] Since an entity may have multiple deterministic types, we simply use the average method to encode the deterministic type set. Assume T e ={t e,1 ,t e,2 ,…,t e,m} is a set of definite types of entities e. Indicates the determination of type t e,i The trainable embedding of entity e is the set of determined types T e The embedding can be used It is defined as The average value of .

[0076] (5) Path coding layer

[0077] For each recommended path Its embedding is calculated by the embedding of all nodes in the path. i The embedding of is defined as the concatenation of four embeddings, including the trainable entity embedding Determine the type set T e Embed The i-th embedding of a certain type in Embedding of Uncertain Type Sets The i-th uncertain type embedding in and trainable relation embeddings Among them, d e and d r are the dimensions of user-specified entities and relationships, namely:

[0078]

[0079] in, Represents a splicing operation, is a set of certain types T of entity e e Embed The i-th embedding of a certain type in , is the embedding of the undefined type set of entity e The i-th uncertain type embedding in .

[0080] It should be noted that different trainable mapping tables can be used to map into embedding vectors to obtain entity embedding and relationship embedding respectively.

[0081] In order to explore the sequence information within the above path p, we use the long short-term memory network (LSTM) to encode it. p represents the embedding of path p, which is defined as the final hidden state h obtained by iterative calculation L ,Right now:

[0082] h i =LSTM(n i ,h i-1 ) (10)

[0083] Among them, 1≤i≤L, and h0 is set to a zero-filled vector d p is the user-specified path embedding dimension.

[0084] It should be noted that at the i-th time step, LSTM will rely on the serialized information of the previous i-1 time steps to calculate the hidden layer output h of the i-th step i , and the historical information of the previous i-1 time step has been encoded into the hidden layer output h of the i-1 time step i-1 Therefore, when calculating the hidden layer output h at the i-th time step i When , the long short-term memory network LSTM only needs to rely on the current input n i And the historical information h of the previous i-1 time steps i-1 .

[0085] (6) Prediction layer

[0086] To calculate the probability of user u interacting with product v, we consider All paths in which is a given knowledge graph, θ is a given maximum path length. For each path We use a two-layer fully connected network (with ReLU as the activation function) to define the probability that user u interacts with product v through path p, denoted as Pr(u,v|p). More precisely, the calculation formula is as follows:

[0087] Pr(u,v|p)=W4ReLU(W3l p +b3)+b4(11)

[0088] Among them, the weight parameter Bias parameters Weight parameter and bias parameters are all trainable parameters, and d3 is the predicted embedding dimension given by the user.

[0089] We use the logarithmic sum exponential pooling method to aggregate The probability of all paths in the . The resulting probability of u and v interacting Defined as:

[0090]

[0091] Here, σ is a sigmoid function.

[0092] (7) Training objective function

[0093] Given a training triplet (u,v,y uv ) If user u interacts with product v, then y uv =1, otherwise y uv = 0. We minimize the classic cross entropy loss of the above model To optimize the model (i.e., the recommendation system of the present invention), Defined as:

[0094]

[0095] Example 2

[0096] Compared to existing technologies, we propose introducing uncertain types into recommendation paths to enrich their representation. To address the challenge of capturing the semantics of uncertain types, we developed a novel strategy that crawls text descriptions of uncertain types from the web and uses a neural model to encode these text descriptions to compute the semantics of the uncertain types. Leveraging these semantics, uncertain types can more accurately capture user preferences. By introducing uncertain types, the proposed recommendation system based on the uncertain type-enhanced path consistently outperforms state-of-the-art models across various metrics.

[0097] In Top-K recommendation, we train the model to select the K items with the highest click probability for each user. Two representative Top-K recommendation metrics used for evaluation are Normalized Loss Cumulative Gain (NGCG) and Hit Rate (HR). Table 1 reports the Top-K metric values ​​of the proposed method (denoted as UTEP) and the baseline method on the MI dataset and KKBOX dataset. It can be seen that our proposed interpretable recommender system based on uncertain type enhancement path significantly outperforms KPRN, especially on the MI dataset. To explore the reasons for this, we reimplemented KPRN and tuned its hyperparameters to the optimal value, reporting the results as KPRN*. We found that the difference between the results of KPRN and KPRN* lies in technical aspects: the weight decay in L2 regularization plays an important role on the MI dataset, but KPRN does not tune it to the optimal value. However, our recommender system still outperforms KPRN*.

[0098] Table 1 Top-K performance on MI dataset and KKBOX dataset

[0099]

[0100] The results in Table 1 show that by leveraging text descriptions to represent uncertain types, our model consistently outperforms all baseline models. It is particularly noteworthy that due to the different scales of the KKBOX dataset and the MI dataset, our method performs differently on them. For the KKBOX dataset, where the sparsity between items is relatively high, our method achieves more significant improvements in top-5 and top-10 recommendations than in top-1 recommendations compared to the best baseline model (i.e., KPRN*), indicating that the accuracy of recommendations is affected by the sparsity of relationships between items, but our method is consistently able to generate high-quality recommendation lists. Specifically, on KKBOX, our model achieves absolute HR and NDCG gains of 2.7% and 1.9% respectively relative to the state-of-the-art model KRPN*.

[0101] Conversely, for the MI dataset, where item sparsity is relatively low, our approach outperforms in top-1 recommendations. This suggests that due to the dense relationships between items, the interpretable recommendation system based on the Uncertain Type Enhanced Path can significantly output more accurate recommendations. Specifically, the interpretable recommendation system UTEP based on the Uncertain Type Enhanced Path achieves up to 4.7% absolute HR and NDCG gains compared to the state-of-the-art KRPN* model on the MI dataset.

[0102] Example 3

[0103] This embodiment is used as a practical application case of the present invention to illustrate the following:

[0104] Since the uncertain type of an entity and the degree of certainty of its belonging to the uncertain type are difficult to accurately label quantitatively, we use text descriptions related to entities and uncertain types crawled from the World Wide Web as text support, and model the text to calculate the degree of certainty that the entity does not belong to the uncertain type.

[0105] For the entity e with deterministic type t and the set of uncertain types in the knowledge graph In the uncertain type c, we annotate the text description set corresponding to the entity-uncertain type pair (e, c) as We do not directly obtain it from the pre-prepared text corpus, but directly use the Bing search engine to search. First, combine the entity e and the name of the uncertain type c into search keywords, and then use the Bing search engine to search. At this time, the search engine will return the following Figure 3 The text snapshot shown is the text description used to model the uncertain type later.

[0106] Given the instability of search engine results and the imperfections of search algorithms, in order to ensure that the text descriptions returned by the search engine are more closely related to the entity e and the uncertain type c, and to reduce the pressure on text storage, we enforce a filtering mechanism when obtaining text descriptions: only the first N text snapshots containing entity name keywords or uncertain type keywords are retained from the text snapshots returned by the search engine, and these N text snapshots are used as the text description set.

[0107] Figure 4 The figure shows an example of a recommendation system based on a knowledge graph. The recommendation path in the knowledge graph is represented by serialized entities connected by blue arrows, and the entity APOLLO 13 in the recommendation path is represented by three elements.<APOLLO 13,Movie,Written> It indicates that the three elements represent that the deterministic type of the movie entity APOLLO 13 is Movie, and the relationship between this entity and the next entity William Broyles Jr in the recommendation path is Written.

[0108] Based on the representation of knowledge graph paths, Figure 4 A path from Tony to Forrest Gump in the knowledge graph shown can be represented as follows Figure 5 shown.

[0109] When will Figure 5The knowledge graph path shown above, when applied to a recommendation system, is also called a recommendation path. Therefore, the recommendation path can express the user Tony's behavior of watching the movie Forrest Gump through serialized entities and their relationships. Furthermore, due to the multi-hop relationships in the path, the recommendation path can contain the complex semantics and simple explanation of this viewing behavior. Based on the above representation of the recommendation path, the user Tony's behavior of watching the movie Forrest Gump can be interpreted as follows: Since the user Tony has watched the movie Apollo 13, and Apollo 13 and the movie Cast Away were written by the same screenwriter, the user Tony is likely to like the movie Cast Away. Since Cast Away and the movie Forrest Gump were directed by the same director, the recommendation system will infer that the user Tony is likely to like the movie Forrest Gump as well.

[0110] It should be noted that the "movies" recommended in this embodiment are regarded as "commodities" in the present invention.

[0111] Based on the representation of the uncertain type enhancement path, we further Figure 5 Further expressed as Figure 6 shown.

[0112] Apart from Figure 5 In addition to the original entity name, deterministic type and next hop relationship, Figure 6 The method also introduces an additional set of uncertain types and the degree of the uncertain types, and characterizes the entities more comprehensively based on the above elements. In the recommendation scenario, compared with the original path characterization method, the path characterization based on the enhanced uncertain type can give the specific reasons why the user (head node) in the path chooses the product (tail node), and this level of recommendation explanation is not provided by the original path characterization; at the same time, compared with directly obtaining the entity's more specific related attributes from the existing knowledge base (such as DBPedia, Freebase and YAGO) to replace the uncertain type, the path characterization proposed in this embodiment can provide a more universal recommendation reason, and the universality is reflected in the fact that the predefined uncertain types can be shared by most entities. Therefore, when characterizing the user's personalized preferences and explaining the recommendation results, the characterization method of the uncertain type enhanced path proposed in the present invention can balance the accuracy of the recommendation reasons and the universality of the related attributes. It is worth mentioning that the difference between the uncertain type enhanced path and the original knowledge graph path is mainly reflected in the path representation form, so our work can completely extract the uncertain type enhanced path according to the extraction steps of the original knowledge graph path.

[0113] Although the embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and are not to be construed as limitations on the present invention. A person skilled in the art may change, modify, replace and modify the above embodiments within the scope of the present invention.

Claims

1. An explainable recommendation system based on uncertain type enhancement path, characterized by: Includes uncertain type encoding module and recommendation module; The uncertain type encoding module includes a text encoding layer, an uncertain type encoding layer and an uncertain type set encoding layer; the text encoding layer is used to encode each text in the text description set to obtain the embedding of each text; The uncertain type encoding layer is used to obtain the embedding of the uncertain type of the entity based on the embedding of the text; the uncertain type set encoding layer is used to obtain the embedding of the uncertain type set based on the embedding of the uncertain type of the entity; wherein the text description set is obtained from the search engine using the name of the entity and the name of the uncertain type; The recommendation module includes a type set embedding layer, a path encoding layer and a prediction layer; The deterministic type set embedding layer is used to encode the deterministic type set of entities and obtain the embedding of the deterministic type set; the path encoding layer is used to encode the recommended path through the long short-term memory network and obtain the embedding of the recommended path; the prediction layer is used to calculate the probability of interaction between users and products.

2. The explainable recommendation system based on the uncertain type enhanced path according to claim 1, characterized in that: In the text encoding layer, s is encoded using the averaging method, and the embedding of s is represented as l s , s is the text description set A text in .

3. The explainable recommendation system based on the uncertain type enhanced path according to claim 2, characterized in that: In the uncertain type coding layer, based on the text description set Embedding of text in Chinese, embedding of entity e with uncertain type c e,c The calculation formula is as follows: Among them, the weight parameter Bias parameters and the query vector are all trainable parameters, d w is the dimension of word embedding, d1 is the dimension of user-specified uncertain type embedding, is the key vector of the i-th text, is the value vector of the i-th text, i.e. the embedding of the text, is the attention weight of the i-th text.

4. The explainable recommendation system based on uncertain type enhanced path according to claim 3, characterized in that: In the uncertain type set coding layer, the uncertain type set Embed The calculation formula is as follows: Among them, T e is a set of determined types of entities e, and the weight parameter Bias parameters and the query vector are all trainable parameters, d2 is the embedding dimension of the user-specified uncertain type set, is the key vector of the i-th uncertain type, is the value vector of the i-th uncertain type, that is, the embedding of the uncertain type, Is entity e of indeterminate type c i degree of certainty.

5. The explainable recommendation system based on uncertain type enhanced path according to claim 4, characterized in that: In the determined type set coding layer, T e ={t e,1 ,t e,2 ,…,t e,m } is a set of definite types of entity e, embedding each definite type The average value of the embedding of the determined type set 6. The explainable recommendation system based on uncertain type enhanced path according to claim 5, characterized in that: In the path coding layer, let l p It represents the embedding of the recommended path p, which is defined as the final hidden state obtained by iterative calculation of the long short-term memory network LSTM. The calculation formula is as follows: h i =LSTM(n i ,h i-1 ) Among them, 1≤i≤L, L represents the dimension of the final hidden state, and h0 is set to a zero-filled vector d p is the path embedding dimension specified by the user, h i is the hidden layer output at the i-th time step, h i-1 is the hidden layer output at the i-1 time step, n i is the embedding of the i-th node in the path, and is the embedding of the i-th entity Determine the type set T e Embed The i-th embedding of a certain type in Embedding of Uncertain Type Sets The i-th uncertain type embedding in and the i-th relation embedding It is obtained by splicing operation, where d e and d r are the dimensions of user-specified entities and relationships, respectively.

7. The explainable recommendation system based on uncertain type enhanced path according to claim 6, characterized in that: In the prediction layer, for each recommended path in, is a given knowledge graph, θ is a given maximum path length, and a two-layer fully connected network is used to define the probability that user u interacts with product v through path p, denoted as Pr(u,v|p), which is calculated as follows: Pr(u,v∣p)=W4ReLU(W3l p +b3)+b4 Among them, the weight parameter Bias parameters Weight parameter and bias parameters Both are trainable parameters, d3 is the predicted embedding dimension given by the user; Use logarithmic sum exponential pooling method to aggregate The possibility of all paths in the , and the probability of user u interacting with product v. The calculation formula is as follows: Here, σ is a sigmoid function.

8. An explainable recommendation method based on an uncertain type enhancement path, characterized in that: Performing product recommendations based on the recommendation system according to claim 7 includes the following steps: S1: Preprocessing Get a text description set from the search engine using the name of entity e and the name of uncertain type c In the knowledge graph The recommended path set from user u to product v in the recommended path set is denoted as Among them, user u and product v are both knowledge graphs Entities in S2: Probability Calculation Based on text description collection and recommended path collection The recommendation system is used to calculate the probability of interaction between user u and product v, that is, to predict the likelihood of user u selecting product v. S3: Product Recommendations Based on the probability of each user interacting with each product and the required number of recommendations, the probability of interaction is sorted from large to small, and the top N products are recommended to the corresponding users, where the value of N is equal to the required number of recommendations.

9. The explainable recommendation method based on the uncertain type enhanced path according to claim 8, characterized in that: In step S1, in the knowledge graph In, use Representing knowledge graph The entity set in Representing knowledge graph The set of relations in the relation set, the inverse relation of each relation r in the relation set is r - , then the new relationship set It is defined as the union of the original relation set and the inverse relation set, that is, Given a knowledge graph User u and product v, in the knowledge graph The recommended path of length L from user u to product v is: Where, e1=u,e L =v; for 2≤i≤L-1, there is For 2≤i≤L-1, we have T k Knowledge Graph Middle Entity e k A set of definite types, where 1≤k≤L.