Emotion support dialogue method based on user belief
Through a method based on user beliefs, using large language models and knowledge graphs to dynamically update the belief database, the existing emotional support system is solved, and the problem that it is difficult for the existing emotional support system to understand user emotional needs and generate personalized replies is achieved, and a highly targeted emotional support and trust is achieved. promote.
Patent Information
- Application Number
- CN202411094919.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-11
- Publication Date
- 2024-12-10
AI Technical Summary
The existing emotional support dialogue system is difficult to accurately capture and understand the user's emotional needs, generate natural and empathetic responses, and it is difficult to maintain appropriate emotional expression in different dialogue scenarios, and lacks personalized responses to different user beliefs.
Using a method based on user beliefs, through dialogue information acquisition, divergence expansion module and belief consistency shrinking module, the divergence expansion model is generated using large language model agents and knowledge graphs to simulate the cognitive process between people and systems, and dynamically update it. Belief library ensures consistency and coherence of information flows and generates highly targeted emotional support conversations.
It realizes highly targeted emotional support dialogue, which can quickly adjust and update the belief database in real time according to user beliefs, reduce user psychological pressure, improve user trust in the system, and provide more personalized and high-quality emotional support.
Smart Images

Figure CN119106687A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of emotion support dialogue, and in particular relates to an emotion support dialogue method based on user belief. Background Art
[0002] Designing AI services that can provide psychological and emotional support has attracted a lot of research interest. Emotional support dialogue aims to provide psychological comfort and support by simulating human emotional communication, which is the focus of computer natural language processing today. Because of the great potential of the system in providing mental health services, researchers have invested a lot of effort in building many related data sets, and have made some progress in sentiment analysis, empathetic dialogue, and dilemma suggestions.
[0003] There are four key steps in emotional support dialogue: sentiment analysis, feature extraction, strategic response, and generative response. Sentiment analysis is to extract the user's emotional expression words, analyze them, and then conduct a quantitative analysis of the user's current stress situation. Feature extraction is to make a more comprehensive judgment on the user's situation based on the semantic scene of the user's context, the problems faced, etc. Strategic response is to choose an appropriate communication method based on the user's situation and emotions, such as emotional sympathy and comfort or rational advice and guidance. Generative response is to accumulate the expression of corresponding words in the process of learning a large number of previous cases, and generate words to provide emotional support to users.
[0004] (1) Early conversational robots
[0005] In the early development of artificial intelligence, the idea of conversational robots began in 1950, when Alan M. Turing published a landmark article "Computing Machinery and Intelligence" in the magazine "Mind" and proposed the famous "Turing Test". In 1966, Joseph Weizenbaum of MIT developed Eliza, an early chatbot based on keyword matching and rules, marking the birth of conversational robots. Subsequently, in 1972, Kenneth Colby, a psychiatrist at Stanford University, created Parry, the first chatbot with emotional color. In 1995, Richard S. Wallace developed ALICE, a robot that adopted a heuristic template matching conversation strategy. These early conversational robots laid the foundation for the later development of emotional conversation response technology.
[0006] (2) Emotional intelligence and dialogue systems: the development of emotion support technology from early rules to deep learning
[0007] In the further development of emotional dialogue systems, researchers began to try to incorporate emotional factors into dialogue systems in order to achieve more natural and empathetic communication. These systems are usually based on a series of predefined rules and statistical methods to identify and respond to the user's emotional state. For example, by analyzing the keywords and intonation in the user's input, the system can judge the user's emotional tendency and select the corresponding response strategy accordingly.
[0008] However, such systems are often limited by the fixedness of their rules and the limitations of statistical models, and are unable to flexibly cope with complex and changing dialogue scenarios. They may perform well in specific situations, but are difficult to generalize to a wider range of application scenarios. In addition, rule-based methods usually require a lot of manual intervention to design and adjust rules, which not only increases development costs but also limits the scalability of the system.
[0009] Over time, advances in deep learning and natural language processing have brought new opportunities for the development of emotional dialogue systems. Researchers have begun to explore data-driven methods to overcome the limitations of traditional rule-based and statistical methods by training models to automatically identify and express emotions. These deep learning methods can learn complex patterns of emotions from large amounts of annotated data and generate more natural and emotional dialogue responses.
[0010] (3) Emotional dialogue based on convolutional neural network (CNN)
[0011] With the development of deep learning technology, convolutional neural networks (CNN) have attracted attention due to their excellent performance in the field of image processing, and have gradually been introduced into natural language processing (NLP), including emotional dialogue tasks. Compared with traditional rule-based and statistical methods, CNN can automatically learn local features from text data, thereby capturing the subtle differences in emotions and achieving more accurate emotion perception.
[0012] In the field of emotional dialogue, CNN models perform deep emotional analysis on input text by building a neural network structure that can recognize emotional features. These models usually contain multiple convolutional layers and pooling layers, which can automatically extract key information from the text and convert it into emotion-related representations. Subsequently, these emotional representations can be used to generate dialogue replies with corresponding emotional colors, thereby realizing emotional communication between machines and users.
[0013] However, it should be noted that CNN-based emotional dialogue systems focused more on the ability to perceive emotions rather than deep empathetic dialogue in the early days. This means that although the systems can recognize and respond to users' emotional states, they are still limited in understanding the complex emotions and social context behind users' emotions. As research deepens, researchers have begun to explore how to combine CNN with other technologies such as recurrent neural networks (RNNs) and attention mechanisms to improve the performance of the model in empathetic dialogues, allowing machines to participate in emotionally rich conversations more naturally.
[0014] (4) Empathetic dialogue based on artificial neural network (ANN)
[0015] Empathetic dialogue is an advanced form of dialogue system, which requires the system to deeply understand the user's emotional state and respond in an empathetic way. This form of dialogue is particularly important in specific environments, such as during the COVID-19 epidemic, when people are generally facing psychological depression due to long-term home isolation. During this period, the demand for emotional support dialogue has surged, prompting researchers to develop dialogue models that can provide psychological comfort.
[0016] In this context, the Sowmya Rasipuram team in India conducted an in-depth exploration of emotional support conversations related to the epidemic in their 2022 research. In their work "Towards Generating Contextual and Empathetic Response for Covid-related Queries", they created a new dataset containing more than 1,200 COVID-related questions. This dataset not only enriches the training resources for empathetic dialogues, but also provides the model with dialogue samples that are closer to real-life situations.
[0017] Based on this dataset, Sowmya Rasipuram's team proposed a dialogue generation model based on reinforcement learning. This model generates empathetic responses by learning how to better adapt to the user's specific needs and emotional state. Figure 2 As shown, the model uses reinforcement learning methods to continuously optimize dialogue strategies to generate responses that can provide psychological support and help to people who suffer from psychological distress during the epidemic.
[0018] This ANN-based empathetic dialogue model can automatically learn emotional expressions and empathetic communication methods from a large amount of dialogue data through deep learning technology. They usually contain multiple layers of neural networks that can process complex emotional information, identify emotional states, and select appropriate response strategies. The key to these models is the ability to generate empathetic responses, rather than simply identifying and responding to emotions.
[0019] There are many challenges in achieving effective empathetic dialogue, including how to more accurately capture and understand users' emotional needs, how to generate natural and empathetic responses, and how to maintain appropriate emotional expression in different dialogue scenarios. With the continuous development of deep learning technology, the ANN-based empathetic dialogue model is expected to provide more accurate and humane emotional support in the future, especially in special situations such as responding to public health emergencies, showing its unique value and potential.
[0020] (5) Emotional support dialogue based on the Large Language Model (LLM)
[0021] Significant progress has been made in sentiment-supported conversations based on large language models (LLMs). In recent years, with the rapid development of large language models and the continuous increase in model size, the fluency of model discourse has been significantly improved. However, there are some problems with widespread LLMs, such as the "lost in the middle" phenomenon when processing long contexts, which refers to the fact that the model may ignore information in the middle part of the input sequence, resulting in reduced adherence to the strategy. In addition, LLMs also show an excessive preference for specific strategies, which may affect the diversity and adaptability of conversations.
[0022] Despite these challenges, the vast knowledge base of LLM itself brings great potential to the field of emotional support conversation (ESC). Many studies have begun to focus on how to combine LLM with relevant strategies of ESC and integrate multiple strategies to improve the quality of conversation. For example, in previous studies, researchers have explored how to reveal the challenges of choosing appropriate strategies and the significant preference for specific strategies by analyzing the performance of LLM in emotional support conversations.
[0023] In addition, there are studies focusing on how to use the knowledge reserve of LLM to enhance the multi-strategy fusion of emotional support dialogues. This includes improving the performance and adaptability of LLM in handling emotional support dialogues by improving the model architecture, optimizing the training process, and introducing external knowledge bases. Through these methods, researchers hope to build a more flexible and empathetic dialogue system to provide higher quality emotional support and mental health services.
[0024] In recent years, emotional support conversations have gradually developed and their application scenarios are very wide, but the modeling of different users' mental beliefs is still insufficient. In many cases, emotional support conversations cannot make common-sense inferences and responses to individual situations.
[0025] Liu et al. divided the emotional support dialogue into three stages and seven strategies based on the matching strategy method, and established an emotional support dialogue system with multiple rounds of long dialogues. During the dialogue, the system will respond to empathetic dialogue and emotional dialogue according to the user's speech matching stage and strategy. This solution makes it difficult to generate targeted responses for people with different beliefs by universally annotating the strategies in advance, which easily leads to low user trust in the system.
[0026] Sabour et al. used ATOMIC as a common sense database for training based on the COMET model, added common sense reasoning to empathetic dialogue, and trained the knowledge selector to select emotional and rational knowledge. This solution enhances the system's understanding of the user's problem scenario and makes the user's chat more informative, but the user can only feel the system's empathy in this process, and this method lacks how to integrate emotional dialogue, making it difficult to provide targeted comfort to the user's emotions and form the task effect of emotional support.
[0027] Based on the Encoder-Decoder architecture, Cheng et al. extracted individual preference information from user conversations during the encoding process and integrated it into the conversation context. In the decoding process, they controlled the output content of the conversation based on policy selection. This solution improves the relevance of the system's responses to the user's conversation content and the empathy of the responses. However, this method requires a large number of data sets to be labeled to extract preference information, and there is no targeted distinction and speculation on people with different beliefs. It lacks content scalability and has poor conversation effects.
[0028] The above researchers have proposed a series of effective solutions for emotional support dialogues, but the user feature extraction of these solutions is relatively limited. For example, only giving responses such as "I believe you will be fine" and "I am very sorry to hear this" cannot meet the needs of responding to user beliefs. Users can only receive some general sympathy and suggestions that lack scenario-based and personalized suggestions. Summary of the invention
[0029] In order to overcome the shortcomings of the prior art, the present invention provides an emotional support dialogue method based on user beliefs, which uses past dialogue information, user personality, emotions, and scenes to jointly form the user's feature vector, and then generates a divergent expansion model based on a large language model agent and a knowledge graph to obtain a user scenario vector. Based on the consistency algorithm of the theory of mind, a consistency verification model is generated under the premise of consistency and coherence of information flow, and the scenario vector is mapped to the user's belief vector and added to the belief library. From the perspective of generative artificial intelligence, this method simulates the cognitive process between people and systems, which is generally divided into three steps: perception, guessing, and verification. After dynamically acquiring the basic information of the conversation, the divergent expansion model is used to generate detailed description texts and knowledge chains to enhance the cognition of the user. Subsequently, the consistency model ensures that the dynamic update of the belief information is highly correlated with the actual situation of the user.
[0030] The technical solution adopted by the present invention to solve the technical problem is as follows:
[0031] Step 1: Acquisition of dialogue information;
[0032] By receiving text information through chat conversations to obtain feature vectors, the system creates, updates and improves the user's belief library;
[0033] Step 2: Divergent expansion module: The system expands based on the acquired conversation feature vector to obtain preliminary modeling data of the user;
[0034] Introducing the mind-based information vector cognitive information;
[0035] Use the large language model agent LLM-Agent to generate text S that describes the individual's mental characteristics; use the pre-trained keyword extraction model to process S and identify concepts that can represent the individual's mind;
[0036] Using the COMET model and the ConceptNet5 knowledge graph, we can generate relevant knowledge chains {SC1, SC2, SC3…SC n}, where n is the number of knowledge chains;
[0037] K=Bert(S)
[0038] SC i = Cme(K i ),K i ∈K
[0039] Among them, Bert represents the pre-training model for extracting keywords, Cme represents the expansion of the knowledge chain through the knowledge graph; K i represents the keywords extracted from the mental feature text;
[0040] Step 3: Belief consistency contraction module;
[0041] Define a belief base representation to model the user:
[0042] I s ={[d1,d2…d n ],[e1,e2…e n ],[u1,u2…u n ],[b1,b2…b n-1 ]}
[0043] Where s represents the number of rounds the user has spoken; d represents the user's objective state, including problems and current situations; e represents the user's emotional state, including stress index and emotional type; u represents the conversation content input by the user; and b represents the belief extracted from the user's conversation.
[0044] Linking existing information with knowledge i Combined to form a new estimate of the user's belief I s+1 ;
[0045] Consider the following key performance indicators as parameters:
[0046] 1) Update success rate: The updated model gives a new input K that can output the corresponding belief b i proportion;
[0047] 2) Retention rate: the proportion of updated models that keep the predicted value of the original belief b unchanged, excluding the influence of the new input u;
[0048] 3) Random retention rate: the proportion of updated models whose predicted values for randomly generated neutral beliefs b remain unchanged;
[0049] For each update, its parameters change once:
[0050]
[0051] The loss function is defined as:
[0052]
[0053] Among them I s Represents the data of the original information flow, D K Represents the newly input knowledge data, D R represents random neutral data, L tsk is used to find f θ Gradient loss; λ i Represents the weight parameter of model learning; KL(P|Q) represents the Kullback-Leibler divergence, which is used to measure the distribution difference between P and Q;
[0054] When performing gradient descent, in order to ensure the consistency of the previous and subsequent beliefs, the range of gradient descent is limited, that is, each gradient descent stops at θ t-1 , to ensure the stability of the model and the consistency of beliefs;
[0055] Step 4: Decoding of dialogue responses;
[0056] Targeted at user beliefs, make responses more targeted.
[0057] Preferably, the objective status includes problems and current situations.
[0058] Preferably, the emotional condition includes a stress index and an emotional type.
[0059] The beneficial effects of the present invention are as follows:
[0060] 1) Provide users with more targeted emotional support dialogues, so that the system can quickly adjust according to different beliefs of users and update the belief library in real time;
[0061] 2) Emotional support is more effective. The responses are based on beliefs such as environmental factors, personality factors, and background factors. They are highly targeted to the user and his or her situation, which can easily reduce the user's psychological pressure and increase the user's trust in the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 It is the overall flow chart of the present invention;
[0063] Figure 2 Dialogue generation model diagram for reinforcement learning of COVID-related questions;
[0064] Figure 3 Schematic diagram of the details of the belief consistency contraction module formation process of the present invention. DETAILED DESCRIPTION
[0065] The present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0066] The present invention proposes a modeling method for user beliefs in emotional support dialogues based on the theory of mind and the large language model, which can be used in computer-simulated psychological counseling, psychological companionship and other scenarios. Previous emotional support lacked in-depth analysis of the context, such as the background of the event, the long-term and short-term experiences of the characters, the environmental background and other factors, and only analyzed isolated emotions such as joy, anger, sorrow and happiness. The present invention collectively refers to this factor as a belief premise (referred to as belief), and the belief comprehensively considers environmental factors, background factors, personality factors and the like. The method uses past dialogue information, user personality, emotion, and scene to jointly constitute the user's feature vector, and then generates a divergent expansion model based on the large language model agent and knowledge graph to obtain the user scenario vector. Based on the consistency algorithm of the theory of mind, under the premise of information flow consistency and coherence, a consistency verification model is generated, and the scenario vector is mapped to the user's belief vector and added to the belief library. From the perspective of generative artificial intelligence, this method simulates the cognitive process between people and systems, which is generally divided into three steps: perception, guessing, and verification. After dynamically acquiring the basic information of the conversation, the divergent expansion model is used to generate detailed description text and knowledge chains to enhance the understanding of the user. Then, the consistency model is used to ensure that the dynamic update of belief information is highly relevant to the user's actual situation.
[0067] The present invention can provide an emotional support dialogue method based on the user's belief characteristics, and can provide comfort, sympathy, suggestions, etc. according to the user's personalization, such as "Your reflection on your past experiences shows that you have a particularly strong ability to reflect. This kind of thing will definitely be fine as long as you are more careful", "It is really frustrating to not do well in the exam. Is it because the content you reviewed is not related to the content the teacher tested?" At the same time, the method realizes real-time belief update and belief consistency judgment of users, has higher personalized modeling, stronger ability to reduce psychological pressure, and improves the user's interest in participation and trust in the system.
[0068] The above-mentioned purpose of the present invention is mainly achieved through the following technical solutions:
[0069] like Figure 1As shown, the method includes four parts: conversation information acquisition, divergent expansion, belief consistency contraction, and conversation response decoding. The feature vector is obtained by receiving text information through the chat conversation, and the user's belief library is created, updated and improved. In the divergent expansion module, expansion is performed based on the various conversation feature vectors obtained to obtain the user's preliminary modeling data. In the belief consistency contraction module, the modeling data of the divergent expansion module is checked for consistency with the data in the previous belief library, and is screened according to the long and short-term memory method to obtain effective modeling data and map it to a belief vector. What is finally completed is targeted emotional support based on the mental algorithm, which can meet the different emotional needs of users, add or modify belief data in real time, and combine relevant knowledge graphs or large language model agents to realize emotional support applications for specific scenarios and personalities.
[0070] A method based on mental information vector Aims to enhance cognitive information related to individual mental characteristics. Although existing emotion support models can process general emotional information, they are not optimized for the specific cognition of individual minds. Existing models usually ignore the multidimensionality and complexity of mental information vectors, and directly inputting them into the model may result in the potential value of the information not being fully utilized.
[0071] To address this problem, a novel approach is proposed, which uses a large language model agent (LLM-Agent) to generate a text S describing the mental characteristics of an individual. This description not only explains the specific meaning of each dimension, but also provides a comprehensive summary of the individual's overall mind.
[0072] In addition, in order to further enrich the semantic information of the descriptive text S, a pre-trained keyword extraction model is used to process S to identify key concepts that can represent the individual mind. Subsequently, the COMET model is used in combination with the ConceptNet5 knowledge graph to generate relevant knowledge chains {SC1, SC2, SC3…SC n}, where n is the number of knowledge chains.
[0073] K = Bert(S);
[0074] SC i = Cme(K i ),K i ∈K;
[0075] Belief consistency contraction
[0076] A dialogue system that dynamically updates information flow is proposed, aiming to constrain the high correlation between enhanced information and the user's true situation. Specifically, a belief base representation is defined to model the user:
[0077] Is ={[d1,d2…d n ],[e1,e2…e n ],[u1,u2…u n ],[b1,b2…b n-1 ]}
[0078] In the past research on emotional support dialogue, d, e, and u have been well analyzed, while the present invention mainly models the user's mind. The existing information is integrated with the knowledge chain k to form a new estimate of the user's belief I s+1 (like Figure 3 To train the model, the following key performance indicators were considered as parameters:
[0079] 1. Update success rate: The updated model gives a new input K that can output the corresponding belief b i proportion.
[0080] 2. Retention rate: The proportion of updated models that keep the predicted value of the original belief b unchanged, excluding the influence of the new input u.
[0081] 3. Random retention rate: the proportion of updated model predictions for randomly generated neutral beliefs b that remain unchanged.
[0082] For each update, its parameters change once:
[0083]
[0084] The loss function is defined as:
[0085]
[0086] When performing gradient descent, in order to ensure the consistency of the previous and subsequent beliefs, the range of gradient descent is limited, that is, each gradient descent stops at θ t-1 , to ensure the stability of the model and the consistency of beliefs.
[0087] Based on the divergent expansion model and the consistent contraction model, the present invention optimizes the existing model of emotional support, decompiles user beliefs and performs common-sense diffusion-contraction information enhancement, proposes a dynamic and universal mental principle, and uses user beliefs as feature vectors so that the dialogue system can respond and reply to the user in a personalized way, achieve more targeted comfort, encouragement and empathy, and better reduce the user's psychological pressure, reflecting the value of emotional support in application scenarios such as computer simulation of emotional companionship and psychological counseling.
Claims
1. A method for emotional support dialogue based on user beliefs, It is characterized in that The steps include: Step 1: Acquisition of dialogue information; By receiving text information through chat conversations to obtain feature vectors, the system creates, updates and improves the user's belief library; Step 2: Divergent expansion module: The system expands based on the acquired conversation feature vector to obtain preliminary modeling data of the user; Introducing the mind-based information vector cognitive information; Use the large language model agent LLM-Agent to generate text S that describes the individual's mental characteristics; use the pre-trained keyword extraction model to process S and identify concepts that can represent the individual's mind; Using the COMET model and the ConceptNet5 knowledge graph, we can generate relevant knowledge chains from keywords. 1 ,SC 2 ,SC 3 …SC n }, where n is the number of knowledge chains; K=Bert(S) SC i =Cme(K i ),K i ∈K Among them, Bert represents the pre-training model for extracting keywords, Cme represents the expansion of the knowledge chain through the knowledge graph; K i represents the keywords extracted from the mental feature text; Step 3: Belief consistency contraction module; Define a belief base representation to model the user: I s ={[d 1 ,d 2 …d n ],[e 1 ,e 2 …e n ],[u 1 ,u 2 …u n ],[b 1 ,b 2 …b n-1 ]} Where s represents the number of rounds the user has spoken; d represents the user's objective state, including problems and current situations; e represents the user's emotional state, including stress index and emotional type; u represents the conversation content input by the user; and b represents the belief extracted from the user's conversation. Linking existing information with knowledge i Combined to form a new estimate of the user's belief I s+1 ; Consider the following key performance indicators as parameters: 1) Update success rate: The updated model gives a new input K that can output the corresponding belief b i proportion; 2) Retention rate: the proportion of updated models that keep the predicted value of the original belief b unchanged, excluding the influence of the new input u; 3) Random retention rate: the proportion of updated models whose predicted values for randomly generated neutral beliefs b remain unchanged; For each update, its parameters change once: The loss function is defined as: Among them I s Represents the data of the original information flow, D K Represents the newly input knowledge data, D R represents random neutral data, L tsk is used to find f θ Gradient loss; λ i Represents the weight parameter of model learning; KL(P|Q) represents the Kullback-Leibler divergence, which is used to measure the distribution difference between P and Q; When performing gradient descent, in order to ensure the consistency of the previous and subsequent beliefs, the range of gradient descent is limited, that is, each gradient descent stops at θ t-1 , to ensure the stability of the model and the consistency of beliefs; Step 4: Decoding of dialogue responses; Targeted at user beliefs, make responses more targeted.
2. The method for emotional support dialogue based on user belief according to claim 1, It is characterized in that The objective state includes problems and current situations.
3. The method for emotional support dialogue based on user belief according to claim 1, It is characterized in that The emotional condition includes a stress index and an emotional type.
Citation Information
Cited By
Cognitive chain enhanced college student group psychological health dialogue system construction method
CN119785979A
Light control method and system, electronic equipment and storage medium
CN120614727A
Dynamic psychological coping ability evaluation method and system based on multi-agent collaboration
CN121122596A
