A knowledge-enhanced dialogue recommendation method based on a multi-level attention mechanism

By combining a multi-level attention mechanism with an external knowledge graph, the problem of insufficient utilization of topic sequence information in dialogue recommendation systems is solved, achieving natural interaction and efficient recommendation, and generating responses that match user preferences.

CN114065047BActive Publication Date: 2025-11-21UNIV OF SHANGHAI FOR SCI & TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111410022.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-25
Publication Date
2025-11-21
Estimated Expiration
2041-11-25

AI Technical Summary

Technical Problem

Existing dialogue recommendation systems struggle to effectively utilize topic sequence information when acquiring user preference information, resulting in unsatisfactory recommendation performance. Furthermore, existing models fail to effectively integrate external knowledge bases to enhance the informativeness and diversity of generated responses.

Method used

We employ a knowledge-enhanced dialogue recommendation method based on a multi-level attention mechanism. Through topic prediction, item recommendation, and dialogue generation modules, we utilize BERT, graph attention networks, and global attention mechanisms, combined with external knowledge graphs, to capture multi-dimensional information and generate responses that match user preferences.

Benefits of technology

It enables the natural collection of user preference information during conversations and effectively recommends items that users are interested in, thereby improving the recommendation effect and the quality of generated responses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114065047B_ABST
    Figure CN114065047B_ABST
Patent Text Reader

Abstract

The application relates to a knowledge-enhanced dialogue recommendation method based on a multi-level attention mechanism, which comprises the following steps: topic prediction: predicting a next topic based on a historical dialogue context, a historical topic sequence and a user preference profile; item recommendation: recommending an item interested by a user based on the historical dialogue context, a historical interaction sequence and the user preference profile; dialogue generation: generating a reply fitting the topic based on the predicted topic or generating a reply recommending the item based on the recommended item. Compared with the prior art, the application can switch topics and gradually guide to a recommendation scene, and good recommendation effects are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the natural language processing technology field under artificial intelligence, and in particular to a knowledge enhanced dialogue recommendation method based on a multi-level attention mechanism. BACKGROUND

[0002] With the deep application of deep learning in reading comprehension, relation extraction and question and answer systems and other natural language processing tasks, it is possible to realize an intelligent man-machine dialogue system, which has high research value. In recent years, dialogue recommendation systems based on dialogue have become a very popular research direction.

[0003] The dialogue recommendation system combines open chat systems and task-based chat systems, hoping to complete a scenario in which the machine and the user start from daily casual conversation, then the machine guides the shift of the chat topic and collects the user's preference information during the chat process, and finally reaches the recommendation scenario of the user, recommending the items that the user may be interested in. Based on the above description, the difference between the dialogue recommendation system and the ordinary dialogue system is that the dialogue recommendation system integrates the recommendation task in the dialogue system, so the dialogue recommendation system can be mainly divided into three sub-modules: the topic prediction module predicts the next stage of chat topic based on the dialogue context and historical topic sequence; the recommendation module selects the items to be recommended to the user based on the dialogue context and the user preference information in the input; and the dialogue generation module generates the corresponding reply based on the dialogue context and the predicted topic or the recommended items.

[0004] The existing dialogue recommendation system adopts the method of the task-based dialogue system, predefines some key information slots, and then interacts with the user through the question and answer form to obtain the key information and fill the slots, thereby realizing the recommendation task. However, this way cannot realize natural interaction with the user and is not suitable for real-life scenarios. Some try to interact with the user in an open chat way and obtain user preference information, and then make recommendations. This way can generate natural replies, and the whole dialogue process is smoother and more realistic, but the information that can be extracted is relatively limited, resulting in less than ideal recommendation effect. Some integrate external knowledge bases in the dialogue recommendation system, and use the rich information contained in the external knowledge bases to enhance the informativeness and diversity of the generated replies. This way can capture more rich semantic information and is a good solution. However, none of the above models uses the topic sequence information in the dialogue process, which is useful and cannot be ignored for the recommendation module and the dialogue generation module. Therefore, a more intelligent dialogue recommendation method is needed to solve the above problems. SUMMARY

[0005] The present application aims to provide a knowledge-enhanced dialogue recommendation method based on a multi-level attention mechanism to overcome the defects of the prior art.

[0006] The object of the present application can be achieved by the following technical solutions:

[0007] A knowledge-enhanced dialogue recommendation method based on a multi-level attention mechanism, the method comprising:

[0008] Topic prediction: predicting the next topic based on historical dialogue context, historical topic sequence and user preference profile;

[0009] Item recommendation: recommending items of interest to the user based on historical dialogue context, historical interaction sequence and user preference profile;

[0010] Dialogue generation: generating a reply that fits the topic based on the predicted topic or recommending the reason for recommending the item based on the recommended item.

[0011] Preferably, the topic prediction specifically comprises:

[0012] S11, encoding the historical dialogue context, historical topic sequence and user preference profile to obtain three different semantic vectors;

[0013] S12, querying a single-hop subgraph composed of entities directly connected to the current time topic in the external knowledge graph, and encoding the single-hop subgraph to obtain a knowledge graph semantic vector of the current time topic;

[0014] S13, fusing the semantic vectors of the historical dialogue context, historical topic sequence, user preference profile and topic knowledge graph to obtain a topic prediction semantic fusion vector;

[0015] S14, calculating the scores of the topic prediction semantic fusion vector and each candidate topic vector to obtain candidate topic probabilities, and taking the candidate topic with the highest probability as the predicted topic.

[0016] Preferably, the item recommendation specifically comprises:

[0017] S21, encoding the historical dialogue context, historical interaction sequence and user preference profile to obtain three different semantic vectors;

[0018] S22, querying a single-hop subgraph composed of entities directly connected to the historical interaction item in the external knowledge graph, and encoding the single-hop subgraph to obtain a knowledge graph semantic vector of the historical interaction item;

[0019] S23, fusing the semantic vectors of the historical dialogue context, historical interaction sequence, user preference profile and interaction item knowledge graph to obtain an item recommendation semantic fusion vector;

[0020] S24, calculate the item recommendation semantic fusion vector and each candidate item vector to obtain a candidate item probability, and take the candidate item with the highest probability as the recommended item.

[0021] Preferably, the dialogue generation specifically comprises:

[0022] S31, based on whether the current is a dialogue scene or a recommendation scene, select a predicted topic or a recommended item, and combine a historical dialogue context and an external knowledge graph as an input of a dialogue generation model;

[0023] S32, encode and decode the dialogue generation model to obtain a reply based on the predicted topic or a reason for recommending the recommended item.

[0024] Preferably, when the topic is predicted, the historical dialogue context, the historical interaction sequence and the user preference profile are respectively encoded by a BERT model.

[0025] Preferably, when the knowledge graph semantic vector of the current topic is obtained, a local attention mechanism of a graph attention network is used to encode the corresponding single-hop subgraph.

[0026] Preferably, when the item is recommended, the historical dialogue context and the user preference profile are respectively encoded by a BERT model, and the historical interaction sequence is encoded by a self-attention sequential recommendation model SASREC.

[0027] Preferably, when the knowledge graph semantic vector of the historical interaction item is obtained, a local attention mechanism of a graph attention network is used to encode the corresponding single-hop subgraph.

[0028] Preferably, when the multiple different semantic vectors are fused, a global attention mechanism is used for fusion.

[0029] Preferably, the dialogue generation model comprises a GPT-2 model.

[0030] Compared with the prior art, the present application has the following advantages:

[0031] The present application realizes that, in a dialogue scene, the machine and the user start from daily chatting, then the machine guides the shift of the chatting topic and collects the user's preference information in the process of chatting, finally reaches the recommendation scene of the user, and recommends the items that the user may be interested in to the user, so that a good recommendation effect is realized. BRIEF DESCRIPTION OF DRAWINGS

[0032] Figure 1 It is a model structure diagram of the knowledge-enhanced dialogue recommendation method based on the multi-level attention mechanism. Detailed Implementation

[0033] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. Note that the following description of the embodiments is merely illustrative and is not intended to limit its applicability or use, nor is the present invention limited to the following embodiments.

[0034] Example

[0035] This invention provides a knowledge-enhanced dialogue recommendation method based on a multi-level attention mechanism. In a dialogue scenario, the machine and the user begin with casual conversation, then the machine guides the conversation towards different topics while collecting the user's preferences, ultimately leading to a recommendation scenario where the machine recommends items the user might be interested in (such as physical goods, songs, electronic products, etc.).

[0036] This method comprises three main modules: topic prediction, item recommendation, and dialogue generation. The following is a detailed explanation of these three main modules:

[0037] (1) Topic Prediction Module

[0038] The topic prediction module aims to predict topics based on historical dialogue context {s1,…,s} k-1}, historical topic sequence {t1,…,t k-1 User preference profile P u Wait for information to predict the next topic. k Then the dialogue generation model can be based on t k Generate appropriate responses and gradually guide the topic toward the recommended scenarios.

[0039] This step specifically includes:

[0040] (1.1) Input encoding

[0041] BERT is a pre-trained language model trained on a large corpus, consisting of multiple Transformer encoders stacked together. When it was first introduced, it achieved state-of-the-art performance on 11 NLP tasks. BERT's success is largely attributed to the Transformer's self-attention mechanism. This article will first briefly introduce the initial attention mechanism, and then discuss the self-attention mechanism and why it is so effective.

[0042] In the earliest Encoder-Decoder model, the semantic vector used by the Decoder was obtained by directly fusing all the information encoded by the Encoder. This vector might contain information that is useless to the current decoding stage, and the amount of information is too large. The model does not know which part of the information to focus on. To address this problem, the attention mechanism was proposed.

[0043]

[0044] e ij =a(s i-1 ,h j ),

[0045] Among them, c i Let α be the semantic vector at time i. ij To calculate the attention score (weight), h j for

[0046] The hidden layer vector at time j in the encoder, e ij s represents the degree of correlation between the output at time i and the input at time j. i-1 This is the output at time i-1.

[0047] The attention mechanism described above allows the model to focus more on information that is more important in the current decoding stage, while ignoring less important information, thus achieving better encoding and decoding results. However, this attention mechanism mainly captures the correlation between input and output, but cannot capture information related to the input itself. To address this issue, the Transformer's self-attention mechanism was proposed.

[0048] First, multiply the input X by three different trainable parameter matrices to obtain three matrices Q, K, and V:

[0049] Q = W Q X,

[0050] K = W K X,

[0051] V = W V X,

[0052] Then, the vectors in the Q matrix and K matrix interact and are passed through the softmax function to obtain the self-attention score:

[0053]

[0054] Where d k Let K be the dimension of the vectors in the K matrix.

[0055] Finally, the self-attention score and the V matrix are multiplied to obtain the final semantic vector Z:

[0056] Z = score · V,

[0057] The above process is summarized as the calculation formula of self-attention:

[0058]

[0059] This way of allowing the input to interact with itself to calculate self-attention can allow the model to capture more important information inside the input and ignore secondary information.

[0060] The model first uses three different BERTs to encode information in multiple dimensions, BERT conv is used to encode the historical dialogue context, BERT topic is used to encode the historical topic sequence, and BERT profile is used to encode the user preference profile:

[0061] v conv = BERT conv ({s1,..., s k-1}),

[0062] v topic = BERT topic ({t1,..., t k-1}),

[0063] v profile = BERT profile (P u ),

[0064] where v conv , v topic , v profile are the semantic vectors obtained after encoding the historical dialogue context, the historical topic sequence, and the user preference profile, respectively. Since the attention mechanism in BERT can capture which information is more important from a microscopic perspective, and BERT has the ability to encode information from a large corpus, the three semantic vectors obtained can well represent the rich information in the three dimensions.

[0065] (1.2) Knowledge graph embedding

[0066] In addition, this invention believes that information related to the current topic in the external knowledge graph is also very important for topic prediction. Therefore, in addition to the information in the three dimensions mentioned above, information from the ConceptNet knowledge graph is also incorporated into this invention. First, based on the topic t at the current moment... k-1 Querying in ConceptNet for results related to t k-1 A single-hop subgraph consisting of directly connected entities is then encoded using a graph attention network. Graph attention networks encode graph-structured data by combining graph convolutional networks and graph attention mechanisms. This allows for the identification of which entities in the subgraph are more important at a micro-level, rather than assigning equal weights to all entities. Furthermore, since the structure and size of subgraphs differ across topics, graph attention effectively addresses the issue of inconsistent node counts in subgraphs. Assume the nodes in the subgraph are X = {x1, ..., x...} n}, where n is the number of nodes in the subgraph, the encoding process is as follows:

[0067]

[0068] Where W is a learnable parameter, To and Directly connected neighbor nodes, α can be any attention mechanism, e ij For nodes and nodes The attention scores between them are then normalized using the softmax function:

[0069]

[0070] Where N i Represents a node The set of neighboring nodes.

[0071] The final encoded representation of the current topic node is then obtained:

[0072]

[0073] Where σ is the sigmoid function.

[0074] (1.3) Global attention mechanism

[0075] The above method uses a local attention mechanism to capture important information from each input while ignoring secondary information. In addition, it employs a global attention mechanism to fuse the multiple semantic vectors obtained above, enabling the model to capture the relationships between multiple inputs globally.

[0076] v topicMLP(Attention(v 1 ,v 2 ,v 3 ,v 4 )),

[0077] where v 1 ,v 2 ,v 3 ,v 4 are the semantic vectors of the history dialogue context, history topic sequence, user preference profile and external knowledge graph after being encoded by BERT or GATs respectively. Assuming e i is the vector of the candidate topic after being encoded, then the probability of the candidate topic being the final predicted topic is:

[0078] P topic (i)=softmax(e i T ·v topic ),

[0079] The ranking of each candidate topic can be performed according to the probability, and the highest ranked one is taken as the final predicted topic, and the next round of reply generation can be performed based on the topic.

[0080] The experimental comparison results of the topic prediction module of the application with other baseline models on the TG-ReDial dialogue recommendation dataset are shown in Table 1.

[0081] The experimental results of Conversation-BERT and Topic-BERT are better than MGCG, indicating that the large pre-training model BERT and the attention mechanism therein are very effective in encoding topic information. Secondly, among the three BERTs, Profile-BERT which only uses the user preference profile performs the worst, indicating that only the user preference information is not enough, and the information contained in the history dialogue context and topic sequence is more important for topic prediction. In addition, the MULTI-BERT model which fuses the history dialogue context, topic sequence and user preference profile performs better than the above models, indicating that encoding multiple dimensions of information helps the model to better model the topic. Finally, the application performs better than all other baseline models, indicating that the information in the external knowledge graph is also useful for topic modeling, and the global attention mechanism can help the model to better encode multiple dimensions of information.

[0082] Table 1

[0083]

[0084] In summary, the topic prediction module first uses the local attention mechanism of BERT and graph attention network to encode information from multiple dimensions such as historical dialogue context, historical topic sequence, user preference profile, and knowledge graph, to capture the internal semantic information, and then uses the global attention mechanism to maximize the retention of valuable information and remove redundant semantic information.

[0085] (2) Item recommendation module

[0086] The item recommendation module aims to recommend the most interesting items m to the user based on historical dialogue context {s1,..., s k-1}, historical interaction sequence I u , user preference profile P u and other information, and then the dialogue generation model can generate a strong recommendation reason based on the recommended item m and make a recommendation to the user.

[0087] This embodiment takes recommending movies as an example to illustrate the specific implementation process of this step:

[0088] (2.1) Input encoding, use two different BERT and a self-attention sequential recommendation model SASREC to encode information from multiple dimensions, BERT conv is used to encode historical dialogue context, SASREC is used to encode historical interaction sequence, and BERT profile is used to encode user preference profile, to obtain three different semantic vectors:

[0089] v conv = BERT conv ({s1,..., s k-1}),

[0090] v film = SARREC({m1,..., m k-1}),

[0091] v profile = BERT profile (P u ),

[0092] where v conv , v film , v profile are semantic vectors obtained after encoding historical dialogue context, historical interaction sequence, and user preference profile, respectively;

[0093] (2.2) Knowledge graph embedding, query the ConceptNet based on the movies m k interacted by the user m kThe single-hop subgraph composed of directly connected entities is then encoded using a graph attention network to obtain the movie m k 's knowledge graph representation:

[0094]

[0095] where W is a learnable parameter, is the neighbor node directly connected to , and a can be any kind of attention mechanism, e ij is the attention score between node and node , N i represents the neighbor node set of node , and sigma is the sigmoid function.

[0096] (2.3) The global attention mechanism is used to fuse the semantic vectors obtained from multiple dimensions above, so that the model can further analyze the relationship between multiple inputs globally, capture important information, and obtain a semantic fusion representation:

[0097] v film = MLP(Attention(v 1 ,v 2 ,v 3 ,v 4 )),

[0098] where v 1 , v 2 , v 3 , and v 4 are the semantic vectors of the historical dialogue context, historical interaction sequence, user preference profile, and external knowledge graph obtained after BERT, SRSREC, and GATs encoding, respectively.

[0099] 2.4) After the above steps, the final semantic vector representation v film is obtained, then the semantic vector is calculated with each candidate movie vector e i to get the score, and the candidate movie probability is:

[0100] P film (i) = softmax(e i T ·v film ),

[0101] The ranking of each candidate movie can be performed according to the probability of each candidate movie, and the highest ranked movie is taken as the final recommended movie. Based on this movie, the generation of the recommendation reason can be performed next.

[0102] Since item recommendation and topic prediction are similar in principle, both of which are based on the existing entity sequence (topic or item) to predict the next entity, the same model structure as topic prediction is adopted for item recommendation, only the historical topic sequence information encoded by BERT in the input is replaced by the historical interaction sequence information encoded by a self-attention sequential recommendation model SASREC. Therefore, the specific execution process of this step is not described again.

[0103] Table 2 Experimental comparison results of the item recommendation module of the application with other baseline models on the TG-ReDial dialogue recommendation dataset, as shown in Table 2:

[0104] KBRD performs better than Popularity and ReDial, indicating that introducing an external knowledge graph into the recommendation task can enable the model to capture more rich semantic information. Then, BERT and SASRec perform better than GRU4Rec and other models, indicating that the self-attention mechanism can well capture important information within the input. In addition, the models such as MULTI-BERT, BERT and TextCNN that encode the historical dialogue context perform better than the models that do not use the historical dialogue context, indicating that the historical dialogue context is useful for the recommendation task, and MULTI-BERT performs better than the latter two models, indicating that simultaneously encoding the information of the historical dialogue context and the historical interaction sequence can help the model achieve more accurate recommendation. Finally, the application performs better than all other baseline models in all indicators, indicating that in addition to the historical dialogue context, the historical interaction sequence, the information contained in the external knowledge graph is also useful, and the global attention mechanism can also capture more important information for item recommendation.

[0105] Table 2

[0106]

[0107] In summary, the item recommendation module first utilizes the local attention mechanism of BERT, SASREC and graph attention network to encode the information from multiple dimensions such as historical dialogue context, historical interaction sequence, user preference profile and knowledge graph, and capture the internal semantic information, and then adopts the global attention mechanism to maximize the retention of valuable information and remove redundant semantic information.

[0108] (3) Dialogue generation module

[0109] The dialogue generation module aims to generate a reply or a strong reason for recommending the item m according to the topic t k predicted by the topic prediction model or the item m recommended by the item recommendation model. k

[0110] Specifically:​

[0111] (3.1) Based on whether the current is a dialogue scenario or a recommendation scenario, the predicted topic or recommended item is selected, combining the historical dialogue context and the external knowledge graph as the input of the dialogue generation model;

[0112] (3.2) The dialogue generation model is used for encoding and decoding to obtain a reply based on the predicted topic or a reason for recommending the recommended item.

[0113] The dialogue generation model used in this embodiment is the GPT-2 model. GPT-2 is a large pre-trained language model, and the training data it uses has the following characteristics: high-quality data after quality screening, more extensive data from various fields, and larger-scale data, and its parameter size is very large, so it requires extremely high computing power, but the model encoding and decoding ability is also very strong, and it has achieved state of the art (the best at that time) effect on multiple fine-tuning tasks. This work uses GPT-2 as a dialogue generation model to encode and decode the historical dialogue context, external knowledge graph, and topic / item information, and then generate diverse and meaningful replies.

[0114] Table 3 is the experimental comparison results of the dialogue generation module of the present application with other baseline models on the TG-ReDial dialogue recommendation dataset, as shown in Table 3:

[0115] ReDial performs the worst, which may be because the RNN used in ReDial is not good at capturing information in long sentences. Second, the PPL of KBRD is much lower than that of ReDial, indicating that introducing an external knowledge graph into the dialogue generation task can improve the quality of the generated replies. In addition, the performance of Transformer and GPT-2 is better than that of the above two models, indicating that the self-attention mechanism of Transformer can effectively capture multiple information contained in the input, and then generate more fluent and diverse replies. In addition, the MULTI-BERT model performs better than other models, indicating that introducing topic information or item information into the model can improve the quality of the generated replies. Finally, the present application performs better than the above models in most indicators, further indicating the effectiveness of the knowledge graph in the dialogue generation task, which is very suitable for use in dialogue recommendation tasks.

[0116] Table 3

[0117]

[0118] In summary, the dialogue generation module encodes and decodes the historical dialogue context, the predicted topic / recommended item, and the knowledge graph based on the GPT-2 large pre-training model, uses the powerful semantic encoding and decoding capability to generate the final reply, so that the generated reply is fluent and natural while fitting the topic and context.

[0119] The above-described embodiments are merely illustrative and are not intended to limit the scope of the present application. These embodiments can be implemented in various other ways, and various omissions, substitutions, and changes can be made without departing from the scope of the technical idea of the present application.

Claims

1. A knowledge-enhanced dialogue recommendation method based on a multi-level attention mechanism, characterized in that, The method includes: Topic prediction: Predict the next topic based on historical conversation context, historical topic sequences, and user preference profiles; Item recommendation: Recommends items that users may be interested in based on historical dialogue context, historical interaction sequences, and user preference profiles; Dialogue generation: Generate relevant responses based on predicted topics or provide reasons for recommending items based on recommended items; The topic predictions specifically include: S11. Encode the historical dialogue context, historical topic sequence, and user preference profile to obtain three different semantic vectors; S12. Query the single-hop subgraph formed by entities directly connected to the topic at the current moment in the external knowledge graph, and encode the single-hop subgraph to obtain the knowledge graph semantic vector of the topic at the current moment; when obtaining the knowledge graph semantic vector of the topic at the current moment, the local attention mechanism of the graph attention network is used to encode the corresponding single-hop subgraph. S13. The semantic vectors of historical dialogue context, historical topic sequence, user preference profile and topic knowledge graph are fused to obtain the topic prediction semantic fusion vector. S14. Calculate the score between the topic prediction semantic fusion vector and each candidate topic vector to obtain the candidate topic probability, and take the candidate topic with the highest probability as the predicted topic. A global attention mechanism is used to fuse multiple different semantic vectors.

2. The knowledge-enhanced dialogue recommendation method based on a multi-level attention mechanism according to claim 1, characterized in that, The recommended items specifically include: S21. Encode the historical dialogue context, historical interaction sequence, and user preference profile to obtain three different semantic vectors; S22. In the external knowledge graph, query the single-hop subgraph formed by entities directly connected to historical interactive items, and encode the single-hop subgraph to obtain the knowledge graph semantic vector of the historical interactive items. S23. The semantic vectors of historical dialogue context, historical interaction sequence, user preference profile and interactive item knowledge graph are fused to obtain the item recommendation semantic fusion vector; S24. Calculate the score by combining the semantic fusion vector of the item recommendation with the vector of each candidate item to obtain the probability of the candidate item, and select the candidate item with the highest probability as the recommended item.

3. The knowledge-enhanced dialogue recommendation method based on a multi-level attention mechanism according to claim 1, characterized in that, The dialogue generation specifically includes: S31. Based on whether the current scenario is a dialogue or a recommendation scenario, select the predicted topic or recommended item, and combine the historical dialogue context and external knowledge graph as input to the dialogue generation model. S32. Use a dialogue generation model to encode and decode to obtain responses that fit the predicted topic or responses that recommend items based on the recommended items.

4. The knowledge-enhanced dialogue recommendation method based on a multi-level attention mechanism according to claim 1, characterized in that, When performing topic prediction, the historical dialogue context, historical interaction sequence, and user preference profile are encoded using the BERT model.

5. The knowledge-enhanced dialogue recommendation method based on a multi-level attention mechanism according to claim 2, characterized in that, When making item recommendations, the historical dialogue context and user preference profile are encoded using the BERT model, and the historical interaction sequence is encoded using the self-attention serialization recommendation model SASREC.

6. The knowledge-enhanced dialogue recommendation method based on a multi-level attention mechanism according to claim 2, characterized in that, When obtaining the semantic vector of the knowledge graph of historical interactive items, the local attention mechanism of the graph attention network is used to encode the corresponding single-hop subgraph.

7. The knowledge-enhanced dialogue recommendation method based on a multi-level attention mechanism according to claim 3, characterized in that, The dialogue generation model mentioned includes the GPT-2 model.

Citation Information

Patent Citations

  • Dialogue type music recommendation method based on movie and television themes

    CN113392261A