Dialogue recommendation method and system capable of perceiving hidden emotion preference of user

By obtaining user conversation history and using multi-dimensional feature embedding and multi-type node tree structure, combining sentiment analysis and background knowledge enhancement technology, the problem that user intentions are difficult to capture in the existing conversation recommendation methods is solved, and more accurate and personalized recommendation results are achieved.

CN120448601APending Publication Date: 2025-08-08SUN YAT SEN UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510367251.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-26
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

Existing dialogue recommendation methods are difficult to accurately capture the user's true intentions, especially when user needs are blurred or emotional expressions are implicit, resulting in inaccurate recommendation results.

Method used

By obtaining user dialogue history, using multi-dimensional feature embedding and multi-type node tree structure, combining sentiment analysis and background knowledge enhancement technology, dynamically update the recommended paths to generate personalized emotional replies.

Benefits of technology

It improves the accuracy and personalization of the dialogue recommendation results, and can accurately capture the user's true intentions and implicit emotional preferences.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120448601A_ABST
    Figure CN120448601A_ABST
Patent Text Reader

Abstract

The invention provides a dialogue recommendation method and system capable of perceiving hidden emotion preferences of a user, and relates to the technical field of dialogue recommendation. Performing background knowledge enhancement on the user dialogue history to obtain multi-dimensional feature embedding, and preprocessing the multi-dimensional feature embedding to obtain final preference embedding representation; performing adaptive mechanism dynamic updating on the final preference embedding representation by using a multi-type node tree structure to obtain a comprehensive representation of the recommended path; and performing emotional reply generation on the multi-dimensional feature embedding and the comprehensive representation to obtain a dialogue recommendation result. The real intention of the user can be accurately captured, the accuracy of the dialogue recommendation result is effectively improved, and the dialogue recommendation effect is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of conversation recommendation, and in particular to a conversation recommendation method and system for perceiving a user's implicit emotional preferences. Background Art

[0002] With the rapid development of artificial intelligence (AI) technology, conversational recommendation, as an emerging form of human-computer interaction, has become a research hotspot. Through multiple rounds of natural language dialogue with users, conversational recommendation proactively guides them to express their needs, gaining a deeper understanding of their preferences, needs, and constraints, thereby providing more accurate and personalized recommendations. For example, in a travel recommendation scenario, conversations can be used to understand a user's travel destination, timeframe, budget, interests, and other information, and recommend suitable itineraries, attractions, and hotels. This more natural and efficient interaction method can effectively enhance the user experience, and has therefore garnered widespread attention in academia in recent years.

[0003] At present, most conversational recommendation methods rely on the user's explicit expression of needs. They retrieve similar products or services for recommendation by identifying and analyzing the entities or attributes mentioned by the user. Although this method can meet user needs to a certain extent, its limitations are also very obvious. First, it is only applicable to scenarios where users have clear needs. In real life, user needs are often implicit and vague, and even the users themselves are not clear about their specific needs. For example, a user may say "I feel very tired recently and want to watch some relaxing movies", but does not specify what specific elements or types "relaxing movies" include. Secondly, existing methods are mainly based on entity matching. When dealing with such vague needs, it is difficult to accurately capture the user's true intentions due to the inability to match and extract them literally, resulting in poor recommendation effects. In addition, existing conversational recommendation methods often ignore the user's emotional factors and cannot make personalized recommendations based on the user's implicit emotional preferences, resulting in inaccurate recommendation results. Summary of the Invention

[0004] In order to solve the problem that the above-mentioned existing technologies are difficult to accurately capture the user's true intentions, resulting in poor accuracy of dialogue recommendation results, the present invention proposes a dialogue recommendation method and system that perceives the user's implicit emotional preferences, which can accurately capture the user's true intentions, effectively improve the accuracy of dialogue recommendation results, and ensure the dialogue recommendation effect.

[0005] In order to achieve the above technical effects, the technical solutions of the present invention are as follows:

[0006] A conversation recommendation method based on perceiving a user's implicit emotional preference includes the following steps:

[0007] S1. Get user conversation history;

[0008] S2. Enhance the user conversation history with background knowledge to obtain a multi-dimensional feature embedding, and preprocess the multi-dimensional feature embedding to obtain a final preference embedding representation;

[0009] S3. dynamically updating the final preference embedding representation using an adaptive mechanism using a multi-type node tree structure to obtain a comprehensive representation of the recommended path;

[0010] S4. Generate an emotional response based on the multi-dimensional feature embedding and the comprehensive representation to obtain a dialogue recommendation result.

[0011] Preferably, the multi-dimensional feature embedding includes the sentiment embedding representation X Emo , contextual embedding representation X C , entity embedding representation X e and word embedding representation X w .

[0012] Preferably, the background knowledge of the user conversation history is enhanced to obtain the emotion embedding representation X Emo ,include:

[0013] S211. Define the user conversation history as H = {U1, U2, ..., U n}, where n represents the number of conversation rounds, U i represents the content embedding of the i-th round of user conversation;

[0014] S212. Extract the emotional information embedded in the content of each round of user dialogue and obtain the corresponding emotional state representation S i The calculation expression is as follows:

[0015] S i =LLM-EmotionAnalysis(U i ,C i )

[0016] Among them, C i Represents the context information of the conversation history, LLM-EmotionAnalysis(·) represents the sentiment analysis module, which is used for the preset large language model LLM to analyze U i and C i Joint analysis;

[0017] S213. The emotional state is represented by S i The content of the conversation with the user in round i is embedded in U i Fusion is performed to obtain a rich dialogue representation R i The calculation expression is as follows:

[0018] R i =f fusion (Ui ,S i )

[0019] Among them, f fusion (·) represents the weighted addition fusion function;

[0020] S214. The dialogue is represented by R i Input to the multi-layer Transformer encoder for encoding, and obtain the first embedding representation h of the l-th layer Transformer encoder l The calculation expression of (R) is as follows:

[0021] h l (R)=MHA(h l-1 (R),h l-1 (R),h l-1 (R)

[0022] Among them, MHA(·) represents the multi-head attention mechanism, h l-1 (R) represents the first output representation of the l-1th layer Transformer encoder; after being encoded by multiple layers of Transformer encoders, the emotional embedding representation X is obtained. Emo The calculation expression is as follows:

[0023] X Emo =h L (R)

[0024] Where L represents the total number of layers of the Transformer encoder.

[0025] Preferably, the user conversation history is enhanced with background knowledge to obtain the context embedding representation X C ,include:

[0026] S221. Embed U according to the content of the i-th round of user dialogue i , using the retrieval enhancement generation method to retrieve the U i The calculation expression of the relevant knowledge fragment is as follows:

[0027] K i =Retrieve(U i )

[0028] Among them, K i The retrieved content of the conversation with the user in the i-th round is embedded in U ii A collection of related knowledge fragments, Retrieve(.) represents the retrieval enhancement function;

[0029] S222. Based on the knowledge fragment set K iThe content of the conversation with the user in the i-th round is embedded in U i , generate context-related background information C i The calculation expression is as follows:

[0030] C i =Generate(U i ,K i )

[0031] Among them, Generate(.) represents the generation function;

[0032] S223. The background information C i Input to the multi-layer Transformer encoder for encoding, and obtain the second embedding representation h of the l-th layer Transformer encoder l The calculation expression of (C) is as follows:

[0033] h l (C)=MHA(h l-1 (C),h l-1 (C),h l-1 (C)

[0034] Among them, h l-1 (C) represents the second output representation of the l-1th layer Transformer encoder; after being encoded by multiple layers of Transformer encoders, the context embedding representation X is obtained. C The calculation expression is as follows:

[0035] X C =h L (C).

[0036] Preferably, the background knowledge of the user conversation history is enhanced to obtain the entity embedding representation X e ,include:

[0037] S231. Extract entities in the current conversation context using the DBpedia knowledge graph;

[0038] S232. Use a preset relational graph convolutional network to semantically encode the entity and generate the entity embedding representation X e The calculation expression is as follows:

[0039]

[0040] Among them, RGCN(.) represents the relational graph convolutional network, e i represents the initial embedding of the i-th entity in the conversation, k is the number of entities extracted in the current conversation, represents the i-th entity embedding after being encoded by the relational graph convolutional network.

[0041] Preferably, the background knowledge of the user conversation history is enhanced to obtain the word embedding representation X w ,include:

[0042] S241. Extract the semantic relationship of words from the current conversation using the ConceptNet knowledge graph to obtain semantic relationship information;

[0043] S242. Use the preset multi-layer semantic graph convolutional network for encoding to obtain the word embedding w of the l+1th layer semantic graph convolutional network l+1 The calculation expression is as follows:

[0044]

[0045] Among them, σ(·) represents the activation function, represents the normalized adjacency matrix, w l represents the word embedding of the l-th layer semantic graph convolutional network, M l is the learnable weight matrix of the l-th layer semantic graph convolutional network; after propagation through the multi-layer semantic graph convolutional network, the final word embedding w is generated L ;

[0046] S243. Embed the final word into w L Set, get all word embedding representation set X w The calculation expression is as follows:

[0047]

[0048] in, represents the final embedding of the jth word after being encoded by the L-layer semantic graph convolutional network, and m is the total number of words involved in the current conversation.

[0049] Preferably, the preprocessing of the multi-dimensional feature embedding includes:

[0050] S251. Calculate the sentiment embedding representation X Emo , contextual embedding representation X C , entity embedding representation X e and word embedding representation X w The weight ratio is as follows:

[0051] w emo ,w C ,w e ,w w =softmax(g(X emo ),g(X C ),g(Xe ),g(X w ))

[0052] Among them, w emo ,w C ,w e ,w w Denote sentiment embedding representation X Emo , contextual embedding representation X C , entity embedding representation X e and word embedding representation X w The weight ratio, Softmax represents the activation function, and g(·) represents the weight generation function;

[0053] S252. The sentiment embedding representation X is represented according to the weight ratio Emo , contextual embedding representation X C , entity embedding representation X e and word embedding representation X w Perform weighted summation to obtain the final fusion embedding representation The calculation expression is as follows:

[0054]

[0055] S253. Final fusion embedding representation Perform layer normalization and nonlinear activation to obtain the final preference embedding representation P multi The calculation expression is as follows:

[0056]

[0057] Among them, LayerNorm(.) represents the layer normalization function, and tanh(.) represents the nonlinear activation function.

[0058] Preferably, the multi-type node tree structure includes recommendation type nodes, sub-type nodes, sentiment feature nodes and user feedback nodes, and the multi-type node tree structure is used to dynamically update the final preference embedding representation through an adaptive mechanism, including:

[0059] S311. Embedding representation P based on the final preference multi The calculation expression of the attention weight P of each recommended path calculated by the adaptive path optimization algorithm in the multi-type node tree structure is as follows:

[0060]

[0061] in, represents the comprehensive representation of the recommended path, α represents the parameter term, and Attn(.) represents the attention weight generation function;

[0062] The calculation expression of α is as follows:

[0063]

[0064] Among them, W s represents the training parameters;

[0065] S312. Based on the attention weight P, the expression for the comprehensive representation P~ of the recommended path is calculated as follows:

[0066]

[0067] Among them, W r and W c Represents a trainable parameter.

[0068] Preferably, generating an emotional response based on the multi-dimensional feature embedding and the comprehensive representation includes:

[0069] S411. Embed the emotion into representation X Emo , contextual embedding representation X C , entity embedding representation X e and word embedding representation X w As the input of the L-layer decoder, the calculation expression for the output representation of the l-th layer decoder is as follows:

[0070]

[0071] Among them, Decoder(.) represents the decoder, Z l-1 represents the output representation of the l-1 layer decoder, T represents the embedding matrix, and H represents the user conversation history matrix;

[0072] S412. The output of the l-th layer decoder is represented by Z l The calculation expression for inputting the feedforward network and outputting the dialogue recommendation result is as follows:

[0073] Y i =FFN(ReLU([Z L ;X]W1+b1)W2+b2)

[0074] Among them, Y i represents the final dialogue recommendation result, FFN(.) represents the feedforward network, RELU(.) represents the activation function, X represents the additional feature vector, W1 and W2 represent the trainable weight matrices, b1 represents the first bias term, and b2 represents the second bias term.

[0075] The present invention also proposes a conversational recommendation system that perceives users' implicit emotional preferences, including:

[0076] Acquisition module, used to obtain user conversation history;

[0077] A background knowledge enhancement module is used to enhance the background knowledge of the user conversation history to obtain a multi-dimensional feature embedding, and pre-process the multi-dimensional feature embedding to obtain a final preference embedding representation;

[0078] a preference strategy reasoning module, configured to dynamically update the final preference embedding representation using an adaptive mechanism to obtain a comprehensive representation of the recommended path;

[0079] The emotional response generation module is used to generate emotional responses based on the multi-dimensional feature embedding and the comprehensive representation to obtain a dialogue recommendation result.

[0080] Compared with the prior art, the beneficial effects of the technical solution of the present invention are:

[0081] The present invention proposes a conversation recommendation method and system for perceiving users' implicit emotional preferences. First, by obtaining users' conversation histories and using background knowledge enhancement technology to construct multi-dimensional feature embedding, background information is effectively supplemented, and the ability to understand users' true intentions and emotional preferences is improved, thereby comprehensively understanding users' implicit needs. Then, a multi-type node tree structure is used to dynamically update the final preference embedding representation through an adaptive mechanism, and the final preference embedding representation is embedded in the multi-type node tree structure for reasoning, ensuring that the comprehensive representation of the recommended path can reflect changes in user interests in real time. Furthermore, the multi-dimensional feature embedding and comprehensive representation are combined to generate emotional responses, which not only enhances the personalization of conversation recommendation results, but also accurately captures users' true intentions, effectively improves the accuracy of conversation recommendation results, and ensures the conversation recommendation effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0082] Figure 1 A flowchart showing a method for dialog recommendation based on perception of user implicit emotional preferences, according to an embodiment of the present invention;

[0083] Figure 2 Another flowchart showing a method for dialog recommendation based on perception of user implicit emotional preferences proposed in an embodiment of the present invention;

[0084] Figure 3 A schematic diagram of a background knowledge enhancement process proposed in an embodiment of the present invention is shown;

[0085] Figure 4 A structural block diagram of a conversational recommendation system for perceiving users' implicit emotional preferences, proposed in an embodiment of the present invention. DETAILED DESCRIPTION

[0086] The accompanying drawings are for illustrative purposes only and are not to be construed as limiting this patent;

[0087] It is understandable to those skilled in the art that some well-known contents may be omitted in the drawings;

[0088] To facilitate understanding of this embodiment, first, the prior art information of this embodiment is introduced as follows:

[0089] With the rise of applications such as intelligent customer service, virtual assistants, psychological support systems, and social robots, the demand for human-computer interaction and personalized services continues to increase. As a key technology in this field, conversational recommendation systems have seen rapid development in recent years. These systems can help users find desired products among a vast array of products. For example, if a user wants to buy a piece of clothing on a shopping website, the system will often first ask the user about their preferences, such as "What style do you prefer? Casual or formal?" Based on the user's answers, the system recommends clothing that meets the user's style, size, and price requirements. During the conversation, the system gradually understands the user's needs, such as color preferences and brand preferences, and continuously optimizes the recommendations to better reflect the user's needs. This technology can also recommend movies, music, games, and more to users, for example, recommending movies they might be interested in.

[0090] Traditional methods typically rely on matching users' literal expressions to retrieve relevant services and products. The first approach is rule-based or template-based, using predefined keywords, sentence templates, and question trees to provide responses. For example, when a user asks, "I want a book," the system will match the keyword "book" based on the rules to make recommendations. This approach is simple, low-cost, and suitable for scenarios with clear requirements. However, rule design often relies on manual experience and has poor scalability. The second approach uses knowledge graph technology to identify user needs by establishing relationships between entities. For example, when a user asks, "I want to watch a lighthearted and funny movie," the system uses the "funny" attribute to find relevant movies from the graph. However, this approach requires extracting entities and attributes to retrieve content. When user needs are vague, such as "I want to watch something cheerful," there is a lack of extractable content, making it difficult to provide accurate recommendations. Another approach, based on neural networks, uses sequence-to-sequence (Seq2Seq) and Transformer models to directly generate responses in an attempt to match user needs. However, these models lack the ability to model users' emotional states and implicit preferences, making it difficult to accurately capture users' true needs.

[0091] The above traditional methods are primarily used in scenarios where user needs are clear and directly expressed. However, user expressions are often diverse, complex, and even implicit. People often express their preferences using emotions and feelings. For example, a user might express, "I'm feeling stressed lately. Can you recommend a movie?" hoping to relieve stress by watching a movie. However, this need is abstract and subjective, and does not explicitly express a specific type or attribute of a movie. Therefore, traditional conversational recommendation methods cannot retrieve relevant movies by simply matching the type or attribute, and it is difficult to infer the user's underlying needs. In other words, user preferences are subjective and emotional, while movie attributes are objective and descriptive. This mismatch makes it difficult for the system to effectively meet user needs. Furthermore, emotions are often implicit and ambiguous, and users express their preferences in a variety of ways. Given the complexity of these expressions, inferring user preferences is not easy. Furthermore, user needs are often difficult to express all at once and may be unclear. Gradually guiding these unclear needs is challenging. Research on this emotion-based conversational recommendation task is relatively limited, but it holds enormous commercial potential. For example, in e-commerce, this technology can help users clarify their needs and find products.

[0092] In academia, existing approaches can be broadly categorized into two types. The first type involves question-based user preference guidance, which uses system-generated questions to understand user needs. This approach focuses on asking users predefined attribute-based questions to gather more detailed preference information, often referred to as clarification questions. Zhang Y et al. introduced multiple-choice questions, allowing users to select attribute options based on their interests, especially when they are unsure of their preferences. However, these conversational recommendation approaches often prioritize recommendations over the conversation, limiting users to predefined options. Deng Y et al. proposed a hint-based learning strategy to enhance the multi-task learning capabilities of unified multi-objective conversational recommendation approaches. However, these strategies often rely on predefined task partitioning, ignoring the potential interdependencies and dynamic relationships between tasks. Furthermore, Dai X et al. explored the use of dynamic graphs and set-based clustering methods to address errors in preference modeling. However, these models often rely on predefined clustering methods and struggle to capture implicit user preferences. The second type of approach involves conversation-driven user preference guidance, following the pattern of user speech and system understanding. This approach emphasizes the importance of conversation and infers user preferences through semantic analysis of the conversational content. Because the information provided by the conversation itself is limited, external knowledge sources are often incorporated. For example, Lu et al. used review datasets to analyze user speech and sentiment, Zhou et al. combined vocabulary-oriented and entity-oriented knowledge graphs for semantic embedding, and Li et al. emphasized the importance of similar users, assuming that retrieved similar users share similar characteristics or behaviors with the target user. Recent research by Radlinski F et al. emphasized the importance of subjective attributes in recommender systems, and Long et al. addressed this issue by constructing a dataset containing such attributes. However, these methods lack scalability and require extensive manual effort, making them difficult to handle the dynamics and complexity of subjective conversational scenarios.

[0093] In the patent field, several related patents have explored and improved conversational recommendation methods to varying degrees. For example, Ren Zhaochun et al. proposed a method and system for conversational recommendation based on user preferences. This method uses a preset user preference model to analyze user feedback in real time during the conversation to recommend items that match the user's preferences. However, this method relies on predefined preference attributes and cannot effectively process the emotional information implicit in user preferences, limiting the personalization and flexibility of recommendations. Huang Jiadong and Xie Zhifeng proposed an emotional conversational method for recommendation, focusing on analyzing the user's emotional state for recommendation. This method uses emotion recognition technology to analyze the user's emotional expressions during the conversation and recommends items based on their emotional state. However, this method has limitations in the accuracy of emotion recognition and the correlation between emotion and recommended items, making it difficult to achieve high-precision recommendations. Wen Yan et al. proposed a conversational recommendation method based on topic enhancement, which improves recommendation effectiveness through topic enhancement technology. This method identifies key topics in the conversation and makes recommendations based on this topic information, thereby enhancing the relevance of the recommendations. However, this method lacks the depth of topic recognition and dynamic adjustment, making it difficult to adapt to the rapid changes and complex expressions of user needs. Pu Juhua et al. proposed a conversational recommendation method based on enhanced fusion of multiple user preferences, and proposed a method for enhancing recommendations by combining multiple user preferences. This method integrates multiple user preference information and improves the accuracy of recommendations through multi-dimensional analysis. However, this method still has room for improvement in the fusion and weight allocation of multiple preference information, and is susceptible to preference conflicts and information redundancy. Kong Chao et al. proposed a context-enhanced conversational recommendation method based on contrastive learning, which uses contrastive learning to enhance the contextual understanding of conversational recommendations. This method uses contrastive learning technology to improve the system's understanding of conversational context and the accuracy of recommendations. However, this method faces challenges in adapting to context changes and the training efficiency of contrastive learning models, which limit its application in real-time recommendation scenarios.

[0094] To overcome these challenges, this paper proposes a conversational recommendation method and system that perceives users' implicit emotional preferences. Without explicit goals, this method infers users' implicit emotional preferences from conversations, thereby recommending better services or products to meet their needs. The method first uses natural language processing techniques to identify and analyze users' emotional expressions in conversations and extract effective features. Considering that implicit needs often involve external background knowledge, this method introduces large-scale models (LLMs) and utilizes retrieval augmentation (RAG) techniques to supplement this missing common sense, thereby achieving a more comprehensive understanding of users' implicit needs. Furthermore, the method constructs a tree-like preference structure to capture the relationship between emotions and item attributes. This preference structure, through a node and edge structure, captures the user's preference for various item attributes under different emotional states. During each conversation, the method dynamically updates the preference structure based on real-time user feedback by adding and removing nodes, adjusting node weights, and redefining node relationships, ensuring that the preference structure best reflects the user's latest emotional state and preference changes. Based on the updated tree-like preference structure, the method generates a personalized recommendation list, comprehensively considering the user's emotional characteristics and preference relationships, and prioritizing items that match the user's emotional state and preferences. By introducing sentiment analysis and implicit preference reasoning technology, combined with user emotional expression and contextual dynamic adjustment strategy, the present invention realizes a smarter and more considerate dialogue recommendation system.

[0095] The technical solution of the present invention is further described below with reference to the accompanying drawings and embodiments.

[0096] Example 1

[0097] like Figure 1 and Figure 2 As shown, the present invention proposes a conversation recommendation method based on perceiving the user's implicit emotional preference, comprising the following steps:

[0098] S1. Get user conversation history;

[0099] S2. Enhance the user conversation history with background knowledge to obtain a multi-dimensional feature embedding, and preprocess the multi-dimensional feature embedding to obtain a final preference embedding representation;

[0100] S3. dynamically updating the final preference embedding representation using an adaptive mechanism using a multi-type node tree structure to obtain a comprehensive representation of the recommended path;

[0101] S4. Generate an emotional response based on the multi-dimensional feature embedding and the comprehensive representation to obtain a dialogue recommendation result.

[0102] Here, firstly, by obtaining the user conversation history and using background knowledge enhancement technology to construct multi-dimensional feature embedding, the background information is effectively supplemented, and the ability to understand the user's true intentions and emotional preferences is improved, so as to fully understand the user's implicit needs; then, the final preference embedding representation is dynamically updated by an adaptive mechanism using a multi-type node tree structure, and the final preference embedding representation is embedded in the multi-type node tree structure for reasoning, ensuring that the comprehensive representation of the recommended path can reflect the changes in user interests in real time; further, the combination of multi-dimensional feature embedding and comprehensive representation is used to generate emotional responses, which not only enhances the personalization of the conversation recommendation results, but also can accurately capture the user's true intentions, effectively improve the accuracy of the conversation recommendation results, and ensure the conversation recommendation effect.

[0103] Sentiment analysis has garnered widespread attention in the field of natural language processing in recent years. In particular, in conversational scenarios, users' emotional expressions often carry multiple layers of implicit information, such as emotional state, tone intensity, and underlying intent. However, analysis methods that rely solely on surface-level linguistic content struggle to capture these deeper emotional characteristics. User emotional expressions often lack sufficient contextual information, potentially leading to biased or inadequate models' understanding of emotions. This problem is particularly pronounced in open-domain conversations, where user expressions are often unstructured and emotion-driven expressions can be highly dependent on the conversation context and implicit commonsense knowledge.

[0104] To address this issue, S2 proposed using a large language model (LLM). This model, pre-trained on a large corpus, learns a wealth of external knowledge, including semantics, commonsense reasoning, and sentiment associations, providing a powerful tool for handling complex sentiment analysis tasks. The LLM not only performs in-depth semantic analysis of the user's current conversation content, but also injects external knowledge and contextual information to compensate for the lack of context in emotional expressions, thereby improving the accuracy of sentiment analysis. Figure 3 In S2, the multi-dimensional feature embedding includes the sentiment embedding representation X Emo , contextual embedding representation X C , entity embedding representation X e and word embedding representation X w ; The background knowledge enhancement of the user conversation history is performed to obtain the emotion embedding representation X Emo ,include:

[0105] S211. Define the user conversation history as H = {U1, U2, ..., U n}, where n represents the number of conversation rounds, U i represents the content embedding of the i-th round of user conversation;

[0106] S212. Extract the emotional information embedded in the content of each round of user dialogue through a pre-trained large language model LLM and obtain the corresponding emotional state representation S i The calculation expression is as follows:

[0107] S i =LLM-EmotionAnalysis(U i ,C i )

[0108] Among them, C i Represents the context information of the conversation history, which is used to provide contextual support for the current round of conversation. LLM-EmotionAnalysis(·) represents the sentiment analysis module, which is used for the preset large language model LLM to analyze U i and C i Joint analysis of , generates fine-grained emotional state representation S i In this process, the Large Language Model (LLM) is able to leverage its large-scale semantic and external knowledge capabilities (e.g., social context, common sense reasoning) to more accurately identify implicit emotions and potential intentions in conversations.

[0109] S213. The emotional state is represented by S i The content of the conversation with the user in round i is embedded in U i Fusion is performed to obtain a rich dialogue representation R i The calculation expression is as follows:

[0110] R i =f fusion (U i ,S i )

[0111] Among them, f fusion (·) represents the weighted addition fusion function; in this way, R i It contains the semantic and emotional information of the conversation, and can more comprehensively represent the user's emotional state and the deep meaning behind it.

[0112] S214. In order to further refine the hierarchical features of emotional information and enhance the model's understanding of global semantics, the dialogue is represented by R i Input to the multi-layer Transformer encoder for encoding, and obtain the first embedding representation h of the l-th layer Transformer encoder l The calculation expression of (R) is as follows:

[0113] h l (R)=MHA(h l-1 (R),h l-1 (R),h l-1 (R)

[0114] Among them, MHA(·) represents the multi-head attention mechanism, h l-1 (R) represents the first output representation of the l-1th layer Transformer encoder; after being encoded by multiple layers of Transformer encoders, the emotional embedding representation X is obtained. Emo The calculation expression is as follows:

[0115] X Emo =h L (R)

[0116] Where L represents the total number of layers of the Transformer encoder.

[0117] In conversational scenarios, users' expressions are often emotional and lack sufficient contextual support, especially in open-domain conversations. This deficiency can lead to biased or even inaccurate understanding of semantics and emotions in the model. Therefore, to compensate for the lack of contextual information in conversations, S3 introduces the Retrieval-Augmented Generation (RAG) approach. By combining the retrieval capabilities of an external knowledge base with the generation capabilities of a generative language model, it supplements the conversation with contextually relevant background knowledge, thereby enriching the representation of conversation content and improving the accuracy of semantic understanding.

[0118] The RA model can dynamically obtain background information related to the conversation context by combining a generative language model (such as GPT) and an external retrieval module.

[0119] S3 performs background knowledge enhancement on the user conversation history to obtain the context embedding representation X C ,include:

[0120] S221. In the retrieval phase, the RAG model first embeds U according to the content of the i-th round of user dialogue i , using the retrieval enhancement generation method to retrieve the U i The calculation expression of the relevant knowledge fragment is as follows:

[0121] K i =Retrieve(U i )

[0122] Among them, K i The retrieved content of the conversation with the user in the i-th round is embedded in U ii A collection of related knowledge fragments, which can come from open domain knowledge bases (such as Wikipedia, domain knowledge bases, or conversation logs). Retrieve(.) represents the retrieval enhancement function.

[0123] S222. In the generation phase, the RAG model is based on the knowledge fragment set Ki The content of the conversation with the user in the i-th round is embedded in U i , generate context-related background information C i The calculation expression is as follows:

[0124] C i =Generate(U i ,K i )

[0125] Among them, Generate(.) represents the generation function;

[0126] The core of the generation phase is to use a generative language model (such as GPT) to model the conversation content and retrieval information, generating more detailed and contextually relevant background knowledge. Through this dual-stage retrieval and generation process, the RAG model can dynamically supplement the background information of the conversation content, including not only explicit knowledge but also potential implicit context.

[0127] In order to further extract the deep features and global semantic relationships in the fusion representation, S223 uses a multi-layer Transformer model to i Encode as follows:

[0128] S223. The background information C i Input to the multi-layer Transformer encoder for encoding, and obtain the second embedding representation h of the l-th layer Transformer encoder l The calculation expression of (C) is as follows:

[0129] h l (C)=MHA(h l-1 (C),h l-1 (C),h l-1 (C)

[0130] Among them, h l-1 (C) represents the second output representation of the l-1th layer Transformer encoder; after being encoded by multiple layers of Transformer encoders, the context embedding representation X is obtained. C The calculation expression is as follows:

[0131] X C =h L (C).

[0132] To capture fine-grained semantic and contextual information in a conversation, the model processes entities and words simultaneously and uses an external knowledge graph to supplement the relationship and attribute information between entities, providing a structured semantic context. In this method, the DBpedia knowledge graph is introduced to enrich the information related to entities. The entity embedding representation X is generated by extracting entities from the current conversation context and semantically encoding them using a relational graph convolutional network (R-GCN). e The final layer of R-GCN represents e L As a comprehensive entity embedding, e captures all contextual and relational information. The specific process is as follows:

[0133] S231. Extract entities in the current conversation context using the DBpedia knowledge graph;

[0134] S232. Use a preset relational graph convolutional network to semantically encode the entity and generate the entity embedding representation X e The calculation expression is as follows:

[0135]

[0136] Among them, RGCN(.) represents the relational graph convolutional network, e i represents the initial embedding of the i-th entity in the conversation, k is the number of entities extracted in the current conversation, Represents the i-th entity embedding after encoding by the relational graph convolutional network. The R-GCN model can effectively capture the complex relationships between entities and their contextual dependencies, making entity embedding more semantically expressive.

[0137] To supplement the semantic information related to words, we introduce the ConceptNet knowledge graph to extract the semantic relationships of words (such as synonyms, antonyms, etc.). This information is encoded through the Graph Convolutional Network (GCN). The specific calculation process is as follows:

[0138] The background knowledge enhancement of the user conversation history is performed to obtain the word embedding representation X w ,include:

[0139] S241. Extract the semantic relationship of words from the current conversation using the ConceptNet knowledge graph to obtain semantic relationship information;

[0140] S242. Use the preset multi-layer semantic graph convolutional network for encoding to obtain the word embedding w of the l+1th layer semantic graph convolutional network l+1The calculation expression is as follows:

[0141]

[0142] Among them, σ(·) represents the activation function, represents the normalized adjacency matrix, w l represents the word embedding of the l-th layer semantic graph convolutional network, M l is the learnable weight matrix of the l-th layer semantic graph convolutional network; after propagation through the multi-layer semantic graph convolutional network, the final word embedding w is generated L , whose representation captures the contextual semantic information of a word and its relationship with other words.

[0143] S243. Embed the final word into w L Set, get all word embedding representation set X w The calculation expression is as follows:

[0144]

[0145] in, represents the final embedding of the jth word after being encoded by the L-layer semantic graph convolutional network, and m is the total number of words involved in the current conversation.

[0146] After obtaining the information-enhanced multi-dimensional embedding content, this method introduces a fusion strategy based on adaptive weight allocation to more comprehensively capture the multi-dimensional features of user emotion-driven expressions. By dynamically calculating the weight ratios of the four different embeddings, the final multi-dimensional fused embedding representation is generated. The specific process is as follows:

[0147] The preprocessing of the multi-dimensional feature embedding includes:

[0148] S251. Calculate the sentiment embedding representation X Emo , contextual embedding representation X C , entity embedding representation X e and word embedding representation X w The weight ratio is as follows:

[0149] w emo ,w C ,w e ,w w =softmax(g(X emo ),g(X C ),g(X e ),g(X w ))

[0150] Among them, w emo ,w C ,w e ,ww Denote sentiment embedding representation X Emo , contextual embedding representation X C , entity embedding representation X e and word embedding representation X w The weight ratio, Softmax represents the activation function, g(·) represents the weight generation function; the four embedding layers generate adaptive weights w for each embedding through a weight generation function g(·) and a Softmax function. emo ,w C ,w e ,w w Among them, g(X) = W·X+b represents a learnable linear transformation, W is the weight matrix, b is the bias term, and Softmax ensures weight normalization to satisfy w emo +w C +w e +w w =1.

[0151] S252. The sentiment embedding representation X is represented according to the weight ratio Emo , contextual embedding representation X C , entity embedding representation X e and word embedding representation X w Perform weighted summation to obtain the final fusion embedding representation The calculation expression is as follows:

[0152]

[0153] S253. Final fusion embedding representation Perform layer normalization and nonlinear activation to obtain the final preference embedding representation P multi The calculation expression is as follows:

[0154]

[0155] Among them, LayerNorm(.) represents the layer normalization function, and tanh(.) represents the nonlinear activation function.

[0156] Example 2

[0157] This embodiment further explains S3 proposed in the above embodiment; in order to optimize the expression of user preference information, S3 designs a multi-type node tree structure. The multi-type node tree structure is constructed using a hierarchical dialogue node framework. By systematically parsing and refining user preference information, a dynamically updated multi-type node tree structure is constructed, aiming to provide more accurate reasoning capabilities for dialogue recommendations by capturing the details of user emotions and preference expressions. Specifically, the multi-type node tree structure includes recommendation type nodes, sub-type nodes, emotional feature nodes, and user feedback nodes; recommendation type nodes refer to organizing recommended content based on the specific needs of users; sub-type nodes refer to further sub-classifying recommended types; emotional feature nodes refer to exploring the emotional features of items in each sub-type; user feedback nodes refer to capturing and integrating users' positive and negative feedback in multiple rounds of dialogue to continuously adjust and optimize recommendation strategies; this multi-type node tree structure helps to retain users' historical preferences and establish associations between user emotions and item attributes.

[0158] See also Figure 1 and Figure 2 , S3 initializes a root node as a pseudo-node, which does not correspond to any specific entity in the conversation and exists only as a structural placeholder. The multi-type node tree structure and its associated recommendation paths are dynamically updated through an adaptive mechanism, enabling the system to gradually optimize the recommendation results based on user feedback during the conversation. For example, when a user explicitly expresses a preference or aversion to certain elements, the system will adjust the corresponding path weights and even prune certain paths. At the same time, the multi-type node tree structure uses an adaptive path optimization algorithm to dynamically recalibrate the weights of the recommended paths, calculate the attention weight of each path, and select the path with the highest weight for further reasoning. The specific process is as follows

[0159] The final preference embedding representation is dynamically updated by an adaptive mechanism using the multi-type node tree structure, including:

[0160] S311. Embedding representation P based on the final preference multi The calculation expression of the attention weight P of each recommended path calculated by the adaptive path optimization algorithm in the multi-type node tree structure is as follows:

[0161]

[0162] in, represents the comprehensive representation of the recommended path, α represents the parameter term, and Attn(.) represents the attention weight generation function;

[0163] The calculation expression of α is as follows:

[0164]

[0165] Among them, W s represents the training parameters;

[0166] In addition, as the conversation progresses, the structure will continue to adapt. After each round of conversation, the system will re-evaluate the effectiveness of each path and recalculate the comprehensive representation of the recommended path. and their corresponding attention weights. This re-evaluation process can identify and prioritize paths that better meet user needs, ensuring that they are emphasized in subsequent reasoning.

[0167] S312. Calculate the comprehensive representation of the recommended path based on the attention weight P The expression is as follows:

[0168]

[0169] Among them, W r and W c represents a trainable parameter, and attention weights P are also used to represent the embedding set of recommended paths. Through dynamic interaction with path embeddings, the system can efficiently capture and represent the relationship between reasoning branches, thereby continuously optimizing the recommendation strategy in multiple rounds of dialogue.

[0170] Example 3

[0171] This embodiment further explains S4 proposed in the above embodiment; see Figure 1 and Figure 2 , S4 generating an emotional response based on the multi-dimensional feature embedding and the comprehensive representation, including:

[0172] S411. Embed the emotion into representation X Emo , contextual embedding representation X C , entity embedding representation X e and word embedding representation X w As the input of the L-layer decoder, the calculation expression for the output representation of the l-th layer decoder is as follows:

[0173]

[0174] Among them, Decoder(.) represents the decoder, Z l-1 represents the output representation of the l-1 layer decoder, T represents the embedding matrix, and H represents the user conversation history matrix;

[0175] S412. The output of the l-th layer decoder is represented by Z l The calculation expression for inputting the feedforward network and outputting the dialogue recommendation result is as follows:

[0176] Y i=FFN(ReLU([Z L ;X]W1+b1)W2+b2)

[0177] Among them, Y i Represents the final dialogue recommendation result, FFN(.) represents the feedforward network, RELU(.) represents the activation function, X represents the additional feature vector, and the decoder output Z l After splicing and processing, W1 and W2 represent trainable weight matrices, b1 represents the first bias term, and b2 represents the second bias term.

[0178] In S4, in order to effectively complete the dialogue task and generate responses that are highly relevant to the expected questions and entities, the decoder network receives as input a set of feature embeddings, including the sentiment-enhanced embedding X Emo , Conversational Embedding X C , entity embedding X e , word embedding X w By integrating these multi-dimensional embeddings, the decoder is able to generate semantically accurate and context-sensitive responses. The decoder output is then further processed by a fully connected feed-forward network (FNN) to improve the accuracy and fluency of the generated responses.

[0179] During the decoder training process, the cross entropy loss function is used to optimize the accuracy of response generation. The loss function for the dialogue generation task is defined as:

[0180]

[0181] Among them, N represents the number of dialogue rounds, y t is the response generated in round t, {y 1:t-1} represents the response sequence generated in the first t-1 rounds, P(y t |{y 1:t-1}) is to generate the next response y t The conditional probability of .

[0182] Generate the next response y t The conditional probability is further decomposed into the joint probability of dialogue, entity, and word information, as follows:

[0183] P(y t |{y 1:t-1})=P w (y t |Y)+P e (y t |Y,K)+P C (y t |Y,C)

[0184] Among them, P w (y t|Y) is the generation probability based on word embedding, P e (y t |Y,K) is the generation probability of combining entity embedding and entity set K, P C (y t |Y,C) combines the generation probability of context embedding and context information C, where Y is the decoded representation of the current input, K is the enhanced entity set, and C is the extended context information.

[0185] Based on the above embodiments, the present invention proposes a novel conversational recommendation method based on perceived emotional needs. This method not only uses natural language processing to analyze users' emotional expressions in conversations and extract their emotional preferences, but also addresses potential background knowledge gaps in conversations by employing large-scale models (LLMs) to capture users' underlying emotional states and supplementing them with contextual information using retrieval augmentation (RAG) techniques, thereby comprehensively understanding users' implicit needs. This knowledge can supplement missing but critical clues in users' emotional descriptions and more accurately infer their preferences. To bridge the gap between projects and user needs, the present invention proposes a tree-like preference structure. This tree is hierarchically organized with multiple node types, with parent-child relationships representing fine-grained details. For example, a node might represent "comedy," with a child node labeled "humor," indicating a specific subgenre of comedy. Given that user needs are often ambiguous, constructing a complete tree structure in one go is challenging. Therefore, this method employs an adaptive tree structure that dynamically adjusts the tree based on user feedback and historical interactions. The tree structure is constructed incrementally based on the conversation context, clarifying the user's true needs by asking relevant questions at each step. Through this process, the present invention is able to filter out irrelevant requests, infer the items most likely to satisfy the user, and ultimately generate appropriate conversational responses. Specifically, this method combines generative knowledge supplementation with knowledge augmentation techniques, utilizing large language models (LLMs) to capture the user's emotional state and supplementing background information through retrieval-augmented generation (RAG) technology to fully understand the user's implicit needs. This method embeds preference information into a multi-type node tree structure for inference and seamlessly integrates it into the generated responses. This emotion-aware conversational recommendation method can dynamically adjust the conversation content and continuously optimize the recommendation strategy based on real-time user feedback, ensuring more accurate and personalized recommendation results. Through this approach, the present invention not only addresses the shortcomings of existing methods in handling implicit and emotional needs, but also enhances the interactivity and user experience of the conversation. This invention fills a gap in the theory and application of emotional conversational recommendation methods and has significant commercial potential and broad application prospects.

[0186] Compared with the existing technology, the dialogue recommendation method based on the perception of user implicit emotional preferences proposed in this invention has the following advantages:

[0187] Existing technologies have significant shortcomings in processing users' implicit needs and emotional expressions, especially when dealing with ambiguous language or emotionally charged expressions, making it difficult to accurately understand and satisfy users' true intentions. This paper addresses this issue by proposing a method that accurately perceives implicit emotions and preferences. Through dynamic optimization, this method comprehensively improves the accuracy, coherence, and personalization of conversation generation and recommendations.

[0188] The present invention addresses the limitations of traditional systems in extracting user privacy needs. By capturing the potential information in the user's emotional state and subjective language expression, it can effectively infer the user's real needs that are not explicitly expressed. For example, when a user expresses "I feel very low recently and want to find something to do", the present invention can not only analyze the user's current emotional state, but also infer their implicit needs, such as recommending activities suitable for relaxation or mood improvement. This combination of emotion and needs makes the recommendation results closer to the user's actual intentions, and can generate personalized high-quality responses even when the user does not provide clear entities or attributes. This capability significantly surpasses the limitations of existing technologies that rely solely on explicit demand modeling.

[0189] The present invention deeply integrates the user's emotional information in the dialogue recommendation process, and by establishing a correlation between emotional state and demand preferences, it can provide more humane services for the different emotional states of users. For example, when a user expresses emotions such as "depressed" or "stressed", the system can combine emotional characteristics to generate recommendations or replies that match the user's state, thereby showing higher adaptability and intimacy in emotional interaction scenarios. Compared with the existing technology that ignores emotional factors or simply models emotional classification, the present invention deeply integrates emotional embedding into the recommendation and generation logic, achieving comprehensive optimization from semantics to emotion.

[0190] For multi-round dialogue scenarios where user needs gradually become clear, the present invention also adopts a dynamic feedback mechanism, which can adjust the recommendation strategy in real time after each round of user input, and gradually optimize the recommendation path, thereby achieving more coherent dialogue generation. Traditional systems usually find it difficult to dynamically combine context to make comprehensive judgments on user needs. The present invention introduces dynamic weight allocation and path optimization through strategy tree reasoning, making full use of user feedback information in multi-round dialogues. For example, when the user gradually supplements the expression of needs, such as "I want a mobile phone", "cheap", "better photo taking", the present invention can dynamically combine context to make comprehensive inferences, and gradually converge to the recommendation results that best meet the user's needs. At the same time, through the dynamic optimization of recommendation paths and weights, the present invention effectively solves the problem of incoherent recommendation results in traditional technologies.

[0191] The present invention also significantly expands the ability to utilize background knowledge. By dynamically introducing multi-dimensional background knowledge, it provides the system with a stronger ability to understand fuzzy expressions. For example, when a user expresses "recommend some lively places" or "find some activities that can make me happy", the present invention combines emotional reasoning with the correlation between background knowledge and can derive reasonable recommendation options from the semantic associations of "lively" and "entertainment places" and "parties", rather than relying solely on static rule matching or fixed knowledge bases. This expansion of dynamic background knowledge greatly improves the ability to understand fuzzy semantics, making the recommendation results more comprehensive and reasonable.

[0192] In terms of personalization, this invention significantly improves adaptability to user preferences and status by deeply integrating emotional information with the inference strategy tree. Unlike traditional recommendation logic based on general rules, this invention dynamically adjusts recommendation strategies based on the user's emotional state, context, and historical interaction records, providing highly personalized services. This personalization capability ensures that the system can flexibly adjust its generation logic to meet diverse user needs, thereby improving user experience satisfaction.

[0193] By integrating sentiment analysis, multi-round dialogue optimization, and dynamic background knowledge expansion, the present invention excels in scenarios involving emotional interaction and fuzzy demand expression. This improvement not only significantly enhances the accuracy of recommendations and generation, but also enables the system to be applied more broadly in multiple fields, including intelligent customer service, mental health support, and virtual assistants. The present invention's emotional response generation capabilities, dynamic adaptation mechanisms, and personalized recommendation strategies provide users with a more natural, intelligent, and thoughtful human-computer interaction experience, filling a gap in existing technologies for processing emotional and implicit demands.

[0194] Example 4

[0195] See also Figure 4 This embodiment proposes a conversational recommendation system that perceives users' implicit emotional preferences, including:

[0196] Acquisition module, used to obtain user conversation history;

[0197] A background knowledge enhancement module is used to enhance the background knowledge of the user conversation history to obtain a multi-dimensional feature embedding, and pre-process the multi-dimensional feature embedding to obtain a final preference embedding representation;

[0198] a preference strategy reasoning module, configured to dynamically update the final preference embedding representation using an adaptive mechanism to obtain a comprehensive representation of the recommended path;

[0199] The emotional response generation module is used to generate emotional responses based on the multi-dimensional feature embedding and the comprehensive representation to obtain a dialogue recommendation result.

[0200] In this embodiment, first, by obtaining the user conversation history and using background knowledge enhancement technology to construct multi-dimensional feature embedding, background information is effectively supplemented, and the ability to understand the user's true intentions and emotional preferences is improved, thereby fully understanding the user's implicit needs; then, the final preference embedding representation is dynamically updated by an adaptive mechanism using a multi-type node tree structure, and the final preference embedding representation is embedded in the multi-type node tree structure for reasoning, ensuring that the comprehensive representation of the recommended path can reflect changes in user interests in real time; further, combining multi-dimensional feature embedding and comprehensive representation to generate emotional responses not only enhances the personalization of conversation recommendation results, but also accurately captures the user's true intentions, effectively improves the accuracy of conversation recommendation results, and ensures the conversation recommendation effect.

[0201] Obviously, the above embodiments of the present invention are merely examples for the purpose of clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. A person skilled in the art would be able to make other variations or modifications based on the above description. It is not necessary and impossible to enumerate all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the claims of the present invention.

Claims

1. A conversation recommendation method based on the perception of user implicit emotional preferences, characterized by: The following steps are involved: S1. Get user conversation history; S2. Enhance the user conversation history with background knowledge to obtain a multi-dimensional feature embedding, and preprocess the multi-dimensional feature embedding to obtain a final preference embedding representation; S3. dynamically updating the final preference embedding representation using an adaptive mechanism using a multi-type node tree structure to obtain a comprehensive representation of the recommended path; S4. Generate an emotional response based on the multi-dimensional feature embedding and the comprehensive representation to obtain a dialogue recommendation result.

2. The method for recommending conversations based on user implicit emotional preferences according to claim 1, characterized in that: The multi-dimensional feature embedding includes the sentiment embedding representation X Emo , contextual embedding representation X C , entity embedding representation X e and word embedding representation X w .

3. The method for recommending conversations based on user implicit emotional preferences according to claim 2, characterized in that: The background knowledge enhancement of the user conversation history is performed to obtain the emotion embedding representation X Emo ,include: S211. Define the user conversation history as H = {U1, U2, ..., U n }, where n represents the number of conversation rounds, U i represents the content embedding of the i-th round of user conversation; S212. Extract the emotional information embedded in the content of each round of user dialogue and obtain the corresponding emotional state representation S i The calculation expression is as follows: S i =LLM-EmotionAnalysis(U i ,C i ) Among them, C i Represents the context information of the conversation history, LLM-EmotionAnalysis(·) represents the sentiment analysis module, which is used for the preset large language model LLM to analyze U i and C i Joint analysis; S213. The emotional state is represented by S i The content of the conversation with the user in round i is embedded in U i Fusion is performed to obtain a rich dialogue representation R i The calculation expression is as follows: R i =f fusion (U i ,S i ) Among them, f fusion (·) represents the weighted addition fusion function; S214. The dialogue is represented by R i Input to the multi-layer Transformer encoder for encoding, and obtain the first embedding representation h of the l-th layer Transformer encoder l The calculation expression of (R) is as follows: h l (R)=MHA(h l-1 (R), h l-1 (R), h l-1 (R)) where MHA(·) represents the multi-head attention mechanism, h l-1 (R) represents the first output representation of the l-1th layer Transformer encoder; after being encoded by multiple layers of Transformer encoders, the emotional embedding representation X is obtained. Emo The calculation expression is as follows: X Emo =h L (R) Where L represents the total number of layers of the Transformer encoder.

4. The method for recommending conversations based on user implicit emotional preferences according to claim 3, characterized in that: The background knowledge enhancement of the user conversation history is performed to obtain the context embedding representation X C ,include: S221. Embed U according to the content of the i-th round of user dialogue i , using the retrieval enhancement generation method to retrieve the U i The calculation expression of the relevant knowledge fragment is as follows: K i =Retrieve(U i ) Among them, K i The retrieved content of the conversation with the user in the i-th round is embedded in U ii A collection of related knowledge fragments, Retrieve(.) represents the retrieval enhancement function; S222. Based on the knowledge fragment set K i The content of the conversation with the user in the i-th round is embedded in U i , generate context-related background information C i The calculation expression is as follows: C i =Generate(U i ,K i ) Among them, Generate(.) represents the generation function; S223. The background information C i Input to the multi-layer Transformer encoder for encoding, and obtain the second embedding representation h of the l-th layer Transformer encoder l The calculation expression of (C) is as follows: h l (C)=MHA(h l-1 (C),h l-1 (C),h l-1 (C)) Among them, h l-1 (C) represents the second output representation of the l-1th layer Transformer encoder; after being encoded by multiple layers of Transformer encoders, the context embedding representation X is obtained. C The calculation expression is as follows: X C =h L (C)。 5. The method for recommending conversations based on user implicit emotional preferences according to claim 3, characterized in that: The background knowledge enhancement of the user conversation history is performed to obtain the entity embedding representation X e ,include: S231. Extract entities in the current conversation context using the DBpedia knowledge graph; S232. Use a preset relational graph convolutional network to semantically encode the entity and generate the entity embedding representation X e The calculation expression is as follows: Among them, RGCN(.) represents the relational graph convolutional network, e i represents the initial embedding of the i-th entity in the conversation, k is the number of entities extracted in the current conversation, represents the i-th entity embedding after being encoded by the relational graph convolutional network.

6. The method for recommending conversations based on user implicit emotional preferences according to claim 3, characterized in that: The background knowledge enhancement of the user conversation history is performed to obtain the word embedding representation X w ,include: S241. Extract the semantic relationship of words from the current conversation using the ConceptNet knowledge graph to obtain semantic relationship information; S242. Use the preset multi-layer semantic graph convolutional network for encoding to obtain the word embedding w of the l+1th layer semantic graph convolutional network l+1 The calculation expression is as follows: Among them, σ(·) represents the activation function, represents the normalized adjacency matrix, w l represents the word embedding of the l-th layer semantic graph convolutional network, M l is the learnable weight matrix of the l-th layer semantic graph convolutional network; after propagation through the multi-layer semantic graph convolutional network, the final word embedding w is generated L ; S243. Embed the final word into w L Set, get all word embedding representation set X w The calculation expression is as follows: in, represents the final embedding of the jth word after being encoded by the L-layer semantic graph convolutional network, and m is the total number of words involved in the current conversation.

7. The method for recommending conversations based on user implicit emotional preferences according to any one of claims 2 to 6, characterized in that: The preprocessing of the multi-dimensional feature embedding includes: S251. Calculate the sentiment embedding representation X Emo , contextual embedding representation X C , entity embedding representation X e and word embedding representation X w The weight ratios are as follows: w emo ,w C ,w e ,w w =softmax(g(X emo ),g(X C ),g(X e ),g(X w )) Among them, w emo ,w C ,w e ,w w Denote sentiment embedding representation X Emo , contextual embedding representation X C , entity embedding representation X e and word embedding representation X w The weight ratio, Softmax represents the activation function, and g(·) represents the weight generation function; S252. The sentiment embedding representation X is represented according to the weight ratio Emo , contextual embedding representation X C , entity embedding representation X e and word embedding representation X w Perform weighted summation to obtain the final fusion embedding representation The calculation expression is as follows: S253. Final fusion embedding representation Perform layer normalization and nonlinear activation to obtain the final preference embedding representation P multi The calculation expression is as follows: Among them, LayerNorm(.) represents the layer normalization function, and tanh(.) represents the nonlinear activation function.

8. The method for recommending conversations based on user implicit emotional preferences according to claim 7, characterized in that: The multi-type node tree structure includes a recommendation type node, a sub-type node, a sentiment feature node, and a user feedback node. The multi-type node tree structure is used to dynamically update the final preference embedding representation through an adaptive mechanism, including: S311. Embedding representation P based on the final preference multi The calculation expression of the attention weight P of each recommended path calculated by the adaptive path optimization algorithm in the multi-type node tree structure is as follows: in, represents the comprehensive representation of the recommended path, α represents the parameter term, and Attn(.) represents the attention weight generation function; The calculation expression of α is as follows: Among them, W s represents the training parameters; S312. Calculate the comprehensive representation of the recommended path based on the attention weight P The expression is as follows: Among them, W r and W c Represents a trainable parameter.

9. The method for recommending conversations based on user implicit emotional preferences according to claim 8, characterized in that: Generating an emotional response based on the multi-dimensional feature embedding and the comprehensive representation includes: S411. Embed the emotion into representation X Emo , contextual embedding representation X C , entity embedding representation X e and word embedding representation X w As the input of the L-layer decoder, the calculation expression for the output representation of the l-th layer decoder is as follows: Among them, Decoder(.) represents the decoder, Z l-1 represents the output representation of the l-1 layer decoder, T represents the embedding matrix, and H represents the user conversation history matrix; S412. The output of the l-th layer decoder is represented by Z l The calculation expression for inputting the feedforward network and outputting the dialogue recommendation result is as follows: <h2 style=";text-align:left;direction:ltr">Y<h2 style=";text-align:left;direction:ltr"> i <h2 style=";text-align:left;direction:ltr"> =FFN(ReLU([Z<h2 style=";text-align:left;direction:ltr"> L <h2 style=";text-align:left;direction:ltr"> (X)W1+b1)W2+b2 Among them, Y i represents the final dialogue recommendation result, FFN(.) represents the feedforward network, RELU(.) represents the activation function, X represents the additional feature vector, W1 and W2 represent the trainable weight matrices, b1 represents the first bias term, and b2 represents the second bias term.

10. A conversational recommendation system that perceives users’ implicit emotional preferences, characterized by: include: Acquisition module, used to obtain user conversation history; A background knowledge enhancement module is used to enhance the background knowledge of the user conversation history to obtain a multi-dimensional feature embedding, and pre-process the multi-dimensional feature embedding to obtain a final preference embedding representation; a preference strategy reasoning module, configured to dynamically update the final preference embedding representation using an adaptive mechanism to obtain a comprehensive representation of the recommended path; The emotional response generation module is used to generate emotional responses based on the multi-dimensional feature embedding and the comprehensive representation to obtain a dialogue recommendation result.

Citation Information

Cited By

  • Document analysis method and system based on dialogue reasoning

    CN121212119A