A Recommendation Method and System Based on Attention Networks and Differentiable Sampling Knowledge Graphs
By employing attention networks and differentiable sampling techniques, the problems of user item interactions and noisy triples in knowledge graph recommendation are solved, achieving more efficient item recommendation and CTR prediction, and improving the accuracy and interpretability of the recommendation system.
Patent Information
- Application Number
- CN202211096014.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-08
- Publication Date
- 2026-03-06
- Estimated Expiration
- 2042-09-08
AI Technical Summary
Existing knowledge graph recommendation methods ignore the importance of user item interactions and KG relationships, cannot perform fine-grained modeling, and are affected by noisy triples that impact recommendation performance.
We employ an attention network-based and differentiable sampling approach to generate interaction guidance signals from users’ historical interactions with items. We apply a differentiable sampling strategy to filter out noisy triples and construct a relationship-aware attention network to update item representations and generate user preference scores.
It improves the accuracy and recall of recommendations, can handle sparse data, and provides a more accurate list of recommended items, making it suitable for CTR prediction tasks.
Smart Images

Figure CN115577115B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of knowledge graph recommendation technology, and in particular to a knowledge graph recommendation method and system based on attention networks and differentiable sampling. Background Technology
[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.
[0003] Recommender systems can mine items of interest to users from massive amounts of data based on their needs and interests. From various search engines and social platforms to news websites, recommender systems have become an essential module in all applications that provide services to users. Most popular recommender algorithms model user preferences and item features separately, exploring user preferences based on historical user behavior. However, due to the lack of side information such as user profiles, item attributes, and contextual information, recommender systems suffer from data sparsity and cold-start problems.
[0004] The proper use of side information can refine user preferences. Among various side information types, knowledge graphs (KGs) have attracted widespread attention in the recommender system field due to their rich semantic information and relational structure, which can provide relevant facts for items. Knowledge graphs utilize heterogeneous information networks to construct meta-paths, mining multi-hop relationships between users and items through these meta-paths. They can also use embedding methods to represent entities and relationships, capturing the semantic information they contain and enriching the representation of users and items. However, most existing knowledge graph recommendation methods ignore the importance of user item interactions and relationships in the KG, failing to learn fine-grained node embeddings. Furthermore, the semantics and contribution of the same triple in a KG differ for different user item interaction pairs; therefore, knowledge extraction requires dynamic matching with user item interaction information. Additionally, KGs contain a large number of noisy triples irrelevant to recommendations, and aggregating them can negatively impact the modeling of user interests.
[0005] Graph Neural Networks (GNNs) can learn the dependencies between graph nodes, thus enabling accurate recommendations based on user-item interactions. In recommender systems, most existing techniques utilize attention networks to assign different attention weights to neighboring nodes, representing the varying contributions of neighbors to the central node, and modeling higher-order connectivity between user items to improve predictive performance. While these methods perform well, they do not explicitly model user items at a fine-grained level or explicitly encode user item interaction information, which may affect recommendation results. Summary of the Invention
[0006] To address the shortcomings of existing technologies, the present invention aims to provide a knowledge graph recommendation method and system based on attention networks and differentiable sampling, capable of fully and coherently learning user item interactions and the knowledge graph (KG). Specifically, firstly, historical user item interactions are encapsulated into interaction guidance signals, which are then used to extract knowledge information from the KG. Next, a relationship-aware attention network is designed to learn the representation of items in the KG. Furthermore, a differentiable sampling strategy is applied to entities to reduce the number of noisy triples, thereby improving recommendation efficiency.
[0007] To achieve the above objectives, the present invention is implemented through the following technical solution:
[0008] The first aspect of this invention provides a knowledge graph recommendation method based on attention networks and differentiable sampling, comprising the following steps:
[0009] S1: Collect user historical interaction records to generate a user item interaction bipartite graph, and use a multi-head attention mechanism to update the embedding representation of users and items on the user item interaction bipartite graph;
[0010] S2: Encode the user and project embedded representation as interaction guidance signals, and extract external knowledge based on the interaction guidance signals;
[0011] S3: Apply a differentiable sampling strategy to the KG entity and select entities related to the project as attribute supplements;
[0012] S4: Apply interactive guidance signals to KG relationships to dynamically customize external knowledge;
[0013] S5: Construct a relation-aware attention network to update the item representation in the KG;
[0014] S6: Perform an inner product operation on the updated user embedding and item embedding to generate a user preference score for the item, and obtain recommendation results based on the score.
[0015] Furthermore, the specific process of collecting user historical interaction records to generate a user item interaction bipartite graph is as follows: the nodes and edges in the user item interaction bipartite graph are generated from the user's historical interaction records with the items. The historical interaction records contain user information, item information, and the user's rating of the interactive items. After data processing, the user information is the user ID, the item information is the item ID, and the explicit rating is converted into implicit feedback 0 and 1. The nodes in the user item interaction bipartite graph represent users and items, and the edges represent whether there is an interaction between the user and the item.
[0016] Furthermore, a multi-head attention mechanism is used on the user-item interaction bipartite graph to propagate information back and forth between the user and the item to update the embedded representations of the user and the item.
[0017] Furthermore, the specific process of applying the differentiable sampling strategy to KG entities is as follows: apply the differentiable sampling method to the linked entities of the item, extract the top-n entities related to the item as attribute supplements, which can reduce noise and retain information that has a positive effect on recommendation.
[0018] Furthermore, a differentiable sampling method is applied to extract the top-n entities related to the project. The specific steps are as follows: set a relevance score probability distribution for each project, give a Gumbel noise, and obtain a one-hot encoder by generating sample vectors; each time a one-hot vector is obtained, repeat the above process n times, which are the selected top-n most relevant entities.
[0019] Furthermore, the specific process of dynamically customizing external knowledge is as follows: First, a triple is given to represent the relationship linking items and entities; based on the importance of relationships in the KG for user preference modeling, the interaction guidance signal is multiplied by the relationship matrix to encapsulate both user item interaction information and knowledge information in the relationship.
[0020] Furthermore, a relation-aware attention network is constructed to update the representation of items in the KG. The specific steps are as follows: construct a relation-aware attention network, with trainable weights and biases set for each layer of the neural network; normalize the attention weights, then execute an average multi-head attention mechanism to calculate the latent embedding of the item's neighborhood information in the KG; and use an aggregation function to fuse the item and its neighborhood entity set in the KG to calculate the final embedding of the item.
[0021] A second aspect of the present invention provides a knowledge graph recommendation system based on attention networks and differentiable sampling, comprising:
[0022] The data preprocessing module is configured to update the embedded representations of users and items on the user item interaction bipartite graph using a multi-head attention mechanism;
[0023] The encoding module is configured to encode user and project embedded representations into interaction guidance signals, and extract external knowledge based on the interaction guidance signals.
[0024] The differentiable sampling module is configured to apply a differentiable sampling strategy to KG entities, selecting project-related entities as attribute supplements;
[0025] The dynamic customization module is configured to apply interactive guidance signals to the KG relationship to dynamically customize external knowledge;
[0026] The attention network module is configured to build a relation-aware attention network to update the item representation in the KG;
[0027] The recommendation module is configured to perform an inner product operation on the updated user embedding and item embedding to generate a user's preference score for the item, and obtain recommendation results based on the score.
[0028] A third aspect of the present invention provides a medium having a program stored thereon, which, when executed by a processor, implements the steps of the knowledge graph recommendation method based on attention networks and differentiable sampling as described in the first aspect of the present invention.
[0029] A fourth aspect of the present invention provides an apparatus including a memory, a processor, and a program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the knowledge graph recommendation method based on attention networks and differentiable sampling as described in the first aspect of the present invention.
[0030] The beneficial effects of the above embodiments of the present invention are as follows:
[0031] This invention proposes an end-to-end method for knowledge graph recommendation, emphasizing the importance of relationships. It fully learns from user item interactions and the knowledge graph, and accurately selects entities in the knowledge graph relevant to the recommendation. The method first learns the embeddings of user item information and encodes them as interaction guidance signals to dynamically customize external knowledge. Furthermore, a differentiable sampling strategy is applied to the entities in the knowledge graph to filter out noisy triples that are detrimental to the recommendation process, thereby improving recommendation performance. Compared with other knowledge graph recommendation methods, this invention achieves higher accuracy and recall on Top-K recommendation tasks, returning a more accurate list of recommended items, where K ultimately represents the number of items recommended to the user. This method can also be used for CTR (Click Through Rate) prediction tasks, predicting whether a user will click on a target item, and also performs well on CTR tasks. In addition, this method can handle sparse data well, exhibiting a certain tolerance for data sparsity. Therefore, the method of this invention has strong universality and feasibility. Attached Figure Description
[0032] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0033] Figure 1 This is a model architecture diagram of the knowledge graph recommendation method according to Embodiment 1 of the present invention;
[0034] Figure 2 This is a flowchart illustrating the knowledge graph recommendation method according to Embodiment 1 of the present invention;
[0035] Figure 3This is a schematic diagram of differentiable sampling based on Gumbel-Softmax in Embodiment 1 of the present invention. Detailed implementation method:
[0036] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0037] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0038] Knowledge graphs, acting as edge information, can provide relevant attributes for items and connect user-item historical interactions. They can expand user interests through various relationship types, providing users with a reasonable recommendation list. Utilizing knowledge graphs can enhance user and item representations, improving the accuracy and interpretability of recommendation systems. However, real-world knowledge graphs contain a large number of triples irrelevant to the recommendation task. Aggregating these triples introduces noise into the recommendation process and increases computational costs. Therefore, a method is needed to filter out noisy triples that negatively impact recommendations. Furthermore, modeling user item interaction relationships and knowledge graph relationships is crucial for recommendation models. Therefore, this invention constructs two different relationship-aware attention networks to learn user item interaction information and external knowledge, such as... Figure 1 As shown, the learned user item representations are encoded into interaction guidance signals to achieve adaptive matching between external knowledge and user item pairs, generating more accurate recommendation results.
[0039] Example 1:
[0040] Embodiment 1 of this invention provides a recommendation method based on attention networks and differentiable knowledge graphs, such as... Figure 2 As shown, it includes the following steps:
[0041] S1: Collect user historical interaction records to generate a user item interaction bipartite graph, and use a multi-head attention mechanism to update the embedding representation of users and items on the user item interaction bipartite graph.
[0042] Preferably, the specific process of collecting user historical interaction records to generate a user item interaction bipartite graph is as follows: the nodes and edges in the user item interaction bipartite graph are generated from the user's historical interaction records with the items. The historical interaction records contain user information, item information, and the user's rating of the interactive items. After data processing, the user information is the user ID, the item information is the item ID, and the explicit rating is converted into implicit feedback 0 and 1.
[0043] In the user-item interaction bipartite graph, nodes represent users and items, and edges represent whether there is interaction between users and items.
[0044] S1.1: Utilize a multi-head attention mechanism to propagate information back and forth between users and items to update the embedded representations of users and items. First, given the target user-item interaction pair (u, r... * The relation-aware collaborative attention α(u,v) is constructed as follows:
[0045]
[0046] Where e u ,e v Let u and v represent the embedded representations of user u and item v, respectively. For relation r * The transformation matrix.
[0047] S1.2: Taking user u as an example, apply softmax to calculate the normalization coefficients of all interactions from user u:
[0048]
[0049] Where, N u Let v' represent the neighborhood item set of user u, and v' represent the items in the user's neighborhood set. To stabilize the learning process, we extend the average multi-head attention mechanism to compute the neighborhood representation of u.
[0050] S1.3: Order Represents the normalized coefficient of the m-th attention head:
[0051]
[0052] Where M represents the number of heads in multi-head attention.
[0053] S1.4: Similar to the user's calculation method, the latent representation of the interaction neighborhood of item v can be obtained:
[0054]
[0055] S1.5: Then, the obtained neighborhood representation is aggregated with the original representation to update the node embedding. We set an aggregation function of the form: The update embedding representation for user u and item v can be expressed as follows:
[0056]
[0057] The subscript 'o' represents a placeholder for both the user symbol 'u' and the bullet symbol 'v'.
[0058] S2: Encode the user and project embedding representation as interaction guidance signals, and extract external knowledge based on the interaction guidance signals.
[0059] S2.1: The updated user and item representations are encoded into the interaction guidance signal to extract external knowledge. The signal encoder takes the form of... f(e u ,e v This can be an operation such as summation, average, or maximum value.
[0060] S3: Apply a differentiable sampling strategy to KG entities, selecting entities related to the project as attribute supplements. Applying a differentiable sampling method to the linked entities of the project, extracting the top-n entities related to the project as attribute supplements, can reduce noise and retain information that has a positive effect on recommendations.
[0061] Preferably, the knowledge graph contains a large number of triples with the structure: (head entity, relation, tail entity), where nodes correspond to entities, edges between nodes correspond to relations, and triples describe facts about items.
[0062] S3.1: Apply the differentiable sampling method to extract the top-n entities related to the project. The specific steps are as follows: set a relevance score probability distribution for each project, give a Gumbel noise, and obtain a one-hot encoder by generating sample vectors; each time a one-hot vector is obtained, repeat the above process n times, which are the selected top-n most relevant entities.
[0063] S3.1.1: Set a relevance score probability distribution for each item v:
[0064]
[0065] Where p(c vt =1) represents the probability that entity t is related to target project v; t′ represents the entity in the neighborhood entity set of the project; R represents the set of neighboring entities of item v; vt With e t represents the embedded representations of relations and entities, respectively; W0 and b0 are learnable weights and biases.
[0066] S3.1.2: To make the sampling process differentiable, the Gumbel-Softmax reparameterization technique is applied to differentiable sampling, such as... Figure 3 As shown. Specifically, given a Gumbel noise g ~ Gumbel(0,1), a sample vector can be generated.
[0067]
[0068] Where p v All neighboring entities of project v The probability score p(c) vt The structure consists of parameters τ>0, and when τ approaches 0, This approximates a discrete one-hot encoder. The above process is repeated n times, each time the selected entity is mapped to p... v The relevance score is set to 0, and then the one-hot vectors are summed to obtain a one-hot vector, which is the top-n most relevant entities selected.
[0069] S4: Apply interactive guidance signals to KG relationships to dynamically customize external knowledge.
[0070] S4.1: Utilize the interactive guidance signal f(e) encoded in S2 u ,e v This invention provides guidance and customization based on external knowledge. First, a triple (v, r, t) is given, representing a relation r linking item v and entity t. This invention emphasizes the importance of relations in the knowledge base (KG) for user preference modeling, and uses interaction guidance signals f(e...) u ,e v ) and relation matrix M r Construct a Hadamard product such that relation r simultaneously encapsulates user item interaction information and knowledge information, as shown in the following formula:
[0071]
[0072] S5: Construct a relation-aware attention network to update the item representation in the KG.
[0073] S5.1: Construct a relation-aware attention network to update the representation of items in the KG. The specific steps are as follows: Construct a relation-aware attention network, with trainable weights and biases set for each layer of the neural network; normalize the attention weights, then execute an average multi-head attention mechanism to calculate the latent embedding of the item's neighborhood information in the KG; use an aggregation function to fuse the item and its neighborhood entity set in the KG to calculate the final embedding of the item.
[0074] S5.1.1: To update the representation of items in the KG, a relation-aware attention network is constructed. Compared with traditional attention networks, this invention makes some improvements to obtain fine-grained representations of items. The relation and tail entity in the triple are concatenated, and trainable weights and biases are applied. The LeakyReLU activation function is used in the first two layers of the neural network. This allows relation information to be incorporated into the updated item representation. The specific formula is as follows:
[0075]
[0076] in The embedded representation of the relationship between item v and its neighbor entity t, which incorporates interactive information, is called e. t This is the embedded representation of entity t.
[0077] Each layer of the neural network is assigned trainable weights W and biases b; σ is the sigmoid activation function. The attention weights are normalized as follows:
[0078]
[0079] Where β vt Let t be the value at position t in the one-hot vector of item v obtained from the entity sampling process, indicating whether entity t is selected as a neighbor of item v.
[0080] S5.1.2: Execute the average multi-head attention mechanism to compute the latent embedding of item v in the neighborhood information of KG:
[0081]
[0082] S5.1.3: The item v and its neighborhood entity set in the KG are merged using the aggregation function δ to calculate the final embedding of the item:
[0083]
[0084] S6: Perform an inner product operation on the updated user embedding and item embedding to generate a user preference score for the item, and obtain recommendation results based on the score.
[0085] S6.1: During the prediction phase, we update the user embedding e u and project embedding e v Perform inner product operations to generate a preference score for user u on item v:
[0086]
[0087] S6.2: Based on the calculated preference scores, determine the k items with the highest predicted preference scores for the current user, sort them from highest to lowest, and return a list of recommended items to the user.
[0088] Example 2:
[0089] Embodiment 2 of the present invention provides a knowledge graph recommendation system based on attention networks and differentiable sampling, comprising:
[0090] The data preprocessing module is configured to update the embedded representations of users and items on the user item interaction bipartite graph using a multi-head attention mechanism;
[0091] The encoding module is configured to collect user historical interaction records to generate a user item interaction bipartite graph, embed users and items into the representation and encode them as interaction guidance signals, and extract external knowledge based on the interaction guidance signals.
[0092] The differentiable sampling module is configured to apply a differentiable sampling strategy to KG entities, selecting project-related entities as attribute supplements;
[0093] The dynamic customization module is configured to apply interactive guidance signals to the KG relationship to dynamically customize external knowledge;
[0094] The attention network module is configured to build a relation-aware attention network to update the item representation in the KG;
[0095] The recommendation module is configured to perform an inner product operation on the updated user embedding and item embedding to generate a user's preference score for the item, and obtain recommendation results based on the score.
[0096] Example 3:
[0097] Embodiment 3 of the present invention provides a medium on which a program is stored. When the program is executed by a processor, it implements the steps in the knowledge graph recommendation method based on attention network and differentiable sampling as described in Embodiment 1 of the present invention.
[0098] Example 4:
[0099] Embodiment 4 of the present invention provides a device including a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in the knowledge graph recommendation method based on attention networks and differentiable sampling as described in Embodiment 1 of the present invention.
[0100] The steps and methods involved in the apparatuses of Embodiments 2, 3, and 4 above correspond to those in Embodiment 1. For specific implementation details, please refer to the relevant description section of Embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood as including any medium capable of storing, encoding, or carrying an instruction set for execution by a processor and enabling the processor to perform any of the methods in this invention.
[0101] Those skilled in the art will understand that the modules or steps of the present invention described above can be implemented using general-purpose computer devices. Optionally, they can be implemented using computer-executable program code, thereby allowing them to be stored in a storage device for execution by a computer device, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. The present invention is not limited to any particular combination of hardware and software.
[0102] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.
Claims
1. A knowledge graph recommendation method based on an attention network and differentiable sampling, characterized in that, The method comprises the following steps: S1: collecting user historical interaction records to generate a user-item interaction bipartite graph, and updating embedding representations of users and items on the user-item interaction bipartite graph by using a multi-head attention mechanism; S2: encoding the embedding representations of the users and the items into interaction guidance signals, and extracting external knowledge according to the interaction guidance signals; S3: Apply the differentiable sampling strategy on the KG entity, select the entity related to the project as the attribute supplement, the specific process is: apply the differentiable sampling method on the link entity of the project, extract the top- entity related to the project as the attribute supplement, which can reduce noise and retain information that has a positive effect on recommendation; apply the differentiable sampling method to extract the top- entity related to the project, the specific steps are: set a relevance score probability distribution for each project, given a Gumbel noise, obtain a one-hot encoder by generating a sample vector; get a one-hot vector each time, repeat the above process times, that is, select the top- most relevant entity. S4: applying the interaction guidance signals to KG relations to dynamically customize the external knowledge, and the specific process is as follows: first, a triple is given, which represents a relationship linking an item and an entity; based on the importance of the relationship in the KG for modeling user preferences, the interaction guidance signals are Hadamard multiplied with the relationship matrix, so that the user-item interaction information and the knowledge information are simultaneously encapsulated in the relationship; S5: constructing a relationship-aware attention network to update the representation of the item in the KG, and the specific steps are as follows: constructing a relationship-aware attention network, and setting trainable weights and biases for each layer of the neural network; normalizing the attention weights, and then performing an average multi-head attention mechanism to calculate the latent embedding of the neighborhood information of the item in the KG, and fusing the item and the set of neighborhood entities in the KG by using an aggregation function to calculate the final embedding of the item; S6: performing an inner product operation on the updated user embedding and the item embedding to generate a preference score of the user for the item, and obtaining a recommendation result according to the score. 2.The knowledge graph recommendation method based on attention network and differentiable sampling according to claim 1, wherein, The specific process of collecting user historical interaction records to generate a user-item interaction bipartite graph is as follows: the nodes and edges in the user-item interaction bipartite graph are generated from user and item historical interaction records, the historical interaction records contain user information and item information, and the user's rating for the interaction item; after data processing, the user information is a user ID, the item information is an item ID, and the explicit rating is converted into implicit feedback 0 and 1; the nodes in the user-item interaction bipartite graph represent users and items, and the edges represent whether there is interaction between the users and the items. 3.The knowledge graph recommendation method based on attention network and differentiable sampling according to claim 1, wherein, The multi-head attention mechanism is used to propagate information back and forth between the users and the items on the user-item interaction bipartite graph to update the embedding representations of the users and the items.
4. A knowledge graph recommendation system based on an attention network and differentiable sampling, characterized in that, The method comprises the following steps: The data preprocessing module is configured to collect user historical interaction records to generate a user-item interaction bipartite graph, and update embedding representations of users and items on the user-item interaction bipartite graph by using a multi-head attention mechanism; The encoding module is configured to encode the embedding representations of the users and the items into interaction guidance signals, and extract external knowledge according to the interaction guidance signals; The differentiable sampling module is configured to apply a differentiable sampling strategy on the KG entity, and selects an entity related to the item as attribute supplement, and the specific process is as follows: a differentiable sampling method is applied on the link entity of the item, and top- entity related to the item is extracted as attribute supplement, which can reduce noise and retain information having positive effect on recommendation; the differentiable sampling method is applied to extract top- entity related to the item, and the specific steps are as follows: a relevance score probability distribution is set for each item, a Gumbel noise is given, and a one-hot encoder is obtained through a generated sample vector; a one-hot vector is obtained each time, and the above process is repeated times, that is, top- most relevant entities are selected. The dynamic customization module is configured to apply the interaction guidance signals to KG relations to dynamically customize the external knowledge, and the specific process is as follows: first, a triple is given, which represents a relationship linking an item and an entity; based on the importance of the relationship in the KG for modeling user preferences, the interaction guidance signals are Hadamard multiplied with the relationship matrix, so that the user-item interaction information and the knowledge information are simultaneously encapsulated in the relationship; The attention network module is configured to construct a relation-aware attention network to update the representation of the item in the KG, and the specific steps are as follows: constructing a relation-aware attention network, each layer of the neural network is provided with trainable weights and biases; normalizing the attention weights, and then performing an average multi-head attention mechanism to calculate the latent embedding of the neighborhood information of the item in the KG, and fusing the item and the set of neighborhood entities of the item in the KG by using the form of an aggregation function to calculate the final embedding of the item; The recommendation module is configured to perform an inner product operation on the updated user embedding and the item embedding to generate a preference score of the user for the item, and obtain a recommendation result according to the score.
5. A computer readable storage medium, characterized in that, A computer readable storage medium is provided, and a plurality of instructions are stored in the computer readable storage medium, the instructions being adapted to be loaded and executed by a processor of a terminal device to implement the knowledge graph recommendation method based on the attention network and the differentiable sampling according to any one of claims 1-3.
6. A terminal device, characterized by comprising: A computer readable storage medium is provided, and a plurality of instructions are stored in the computer readable storage medium, the instructions being adapted to be loaded and executed by a processor of a terminal device to implement the knowledge graph recommendation method based on the attention network and the differentiable sampling according to any one of claims 1-3.
Citation Information
Patent Citations
Sequence recommendation method and device and computer readable storage medium
CN111522962A
Deep reinforcement learning interactive recommendation system and method based on knowledge enhancement
CN114117220A