A personalized emotion generation method oriented to dialogue behavior

Through the personalized emotion generation method oriented towards dialogue behavior, PEPC and PAPC are used to predict the emotions and behaviors of the dialogue system, and through AEES expansion, the problem of neglecting the correlation between dialogue behavior and emotion generation in the existing technology is solved, and the anthropomorphism and diversification of emotions generation is achieved, and the emotional intelligence of the dialogue system is improved.

CN119783817BActive Publication Date: 2025-08-05INNER MONGOLIA UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411835240.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-08-05
Estimated Expiration
2044-12-13

AI Technical Summary

Technical Problem

In the prior art, the emotion generation model ignores the correlation between dialogue behavior and emotion generation, resulting in the generated emotion category not applicable to the current dialogue behavior, lacks the ability to reason autonomous emotions, and is difficult to provide anthropomorphic and diversified emotion generation.

Method used

The personalized emotion generation method oriented by dialogue behavior is adopted. The personalized emotion prediction cell PEPC and personalized behavior prediction cell PAPC respectively predict the emotions and dialogue behavior of the dialogue system under specified personality traits, and the behavioral emotion expansion subunit AEES is expanded multiple times to finally output personalized emotions.

Benefits of technology

Capture the user's emotional state and dialogue behavior changes in multiple rounds of dialogue interactions, and combine personality-oriented goals to generate emotions, which improves the accuracy and diversity of emotions generation and improves the emotional intelligence of the dialogue system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119783817B_ABST
    Figure CN119783817B_ABST
Patent Text Reader

Abstract

The present invention discloses a personalized emotion generation method oriented to dialogue behavior, which relates to the field of artificial intelligence. The present invention includes the following steps: taking the dialogue history of the user statement as input, and respectively predicting the emotion and dialogue behavior of the dialogue system under the specified personality characteristics through a personalized emotion prediction cell (PEPC) and a personalized behavior prediction cell (PAPC); through a behavior emotion expansion subunit (AEES), expanding the generated personalized emotion according to the emotional tendency of the dialogue behavior, expanding multiple times, and selecting the final output. The present invention regards the long-term personality characteristics of the dialogue system as additional reasoning conditions to narrow the search space of emotions and dialogue behaviors, and predicts the emotions and behaviors of the dialogue system; secondly, further expands the predicted emotions through the emotional tendency implied in the dialogue behavior to achieve more appropriate dialogue emotion generation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence, and more specifically, to a personalized emotion generation method oriented by dialogue behavior. Background Art

[0002] Emotional intelligence is a key concept in the field of human intelligence. As an aspect of emotional intelligence, emotional expression can be traced back to the 1960s. The artificial intelligence natural language therapy instrument Eliza developed by the Artificial Intelligence Laboratory of the Massachusetts Institute of Technology used encouraging words to interact with users, enabling users to unload burdens and relax physically and mentally. With the development of deep learning, emotional factors have been incorporated into the dialogue generation model based on deep learning, which has improved the empathy and anthropomorphism of the dialogue system to a certain extent. However, the lack of its autonomous emotional reasoning ability limits the development of the emotional intelligence of the dialogue system. With the advent of large language models, the language understanding and expression abilities of AI have been greatly improved. How to improve the emotional intelligence of AI has become a key issue in the field of artificial intelligence. As a psychological concept with stable attributes, different personalities lead to different ways of emotional perception and response. Research shows that personalities such as extroversion, agreeableness, conscientiousness, and openness are positively correlated with positive emotions, while neuroticism is positively correlated with negative emotions. Therefore, it can be considered that the emotional conversion in the dialogue is stably affected by personality characteristics. Some previous studies have explored how to combine personality modeling with emotion generation, but the correlation between dialogue behavior and emotion generation has been ignored in the prior art, resulting in the generated emotion categories conforming to the specified personality characteristics but not necessarily being applicable to the current dialogue behavior. Summary of the Invention

[0003] In view of this, the present invention provides a personalized emotion generation method oriented by dialogue behavior, aiming to provide more anthropomorphic and diverse emotion generation for the dialogue system and improve the emotional intelligence of the dialogue system.

[0004] To achieve the above object, the present invention adopts the following technical solutions:

[0005] A personalized emotion generation method oriented by dialogue behavior includes the following steps:

[0006] Taking the dialogue history of the user statement as input, and respectively predicting the emotion and dialogue behavior of the dialogue system under the specified personality characteristics through a personalized emotion prediction cell (PEPC) and a personalized behavior prediction cell (PAPC);

[0007] Through an action-emotion expansion subunit (AEES), expanding the generated personalized emotion according to the emotional tendency of the dialogue behavior, expanding multiple times, and selecting the final output.

[0008] Optionally, the personalized emotion prediction cell PEPC and the personalized behavior prediction cell PAPC are improved based on LSTM and maintain a high degree of symmetry.

[0009] Optionally, the personalized emotion prediction cell PEPC is improved based on LSTM, specifically:

[0010] Use the emotion state of the dialogue system at the previous moment as the first input, the second input is used to input the emotion interaction input gate of the user at the previous moment, and the third input is used to input the personality emotion memory input gate of the personality characteristics of the dialogue system;

[0011] There are different unit outputs for the next moment memory. The first unit state represents the personalized long-term emotion memory from different personalities, the second unit state represents the medium-term emotion state interaction memory of different personalities, and the hidden unit state represents the short-term emotion memory from the previous moment.

[0012] Optionally, use the emotion state of the dialogue system at the previous moment as the first input, and the calculation formula is as follows:

[0013]

[0014] f T ' = f T *C T-1 ;

[0015] Among them, is the emotion at the previous moment, which is the first input parameter, and C T-1 is the second unit state at the previous moment.

[0016] Optionally, the calculation process of the emotion state input gate is as follows:

[0017]

[0018] Among them, is the emotion at the previous moment, which is the first input parameter, is the emotion of the user at the current moment, h T-1 is the hidden state at the previous moment, o T represents the activation value of an output gate, W o , respectively represent different weight matrices, b o represents the bias term, and o T ' represents the final value of the output gate.

[0019] Optionally, the calculation of the emotion interaction input gate is as follows for the personality emotion memory input gate:

[0020]

[0021] Among them, The emotion at the previous moment is the first input parameter, i T : The output of the emotion interaction input gate, P R is the personality of the dialogue system, W pi , W ei , are both weight matrices, used for weighted summation of different inputs, h T-1 is the hidden state at the previous moment, r T ' is the updated emotion gate, responsible for controlling the update of the emotion state, M T-1 is the memory information or state at the previous moment, f T ' is the updated input gate, indicating the modification or influence on the emotion state at the current moment, N T is the emotion output at the current moment, reflecting the prediction or generation result of the system on the individual's emotion state, o T ' is the emotion output gate at the current moment.

[0022] Optionally, different units are set to output the memory of the next moment, and the calculation formula is as follows:

[0023]

[0024] C T = C T-1 + o T '+ i T ';

[0025] M T = M T-1 + f T '+ i T ';

[0026] Among them, is the emotion memory, which is the emotion information related to the current moment saved in the model, N T is the emotion output at the current moment, which is the final emotion response calculated based on the emotion input and memory state, h T is the hidden state, M T-1 、C T-1 are the first unit state and the second unit state at the previous moment respectively, f T ' is the forgetting gate at the current moment, C T is the memory unit state at the current moment, which is the part responsible for saving long-term emotion information in the emotion system, C T-1 is the memory unit state at the previous moment, saving the previous emotion information, o T ' is the output gate at the current moment, i T ' is the input gate at the current moment, M Tis the emotional memory at the current moment, used to record and adjust the long-term and short-term memories related to emotional responses, M T-1 is the emotional memory at the previous moment, containing historical emotional information, f T ' is the forgetting gate at the current moment.

[0027] Optionally, the formula of the behavioral emotion expansion subunit AEES is as follows:

[0028]

[0029] where is the personality-emotion interaction matrix composed of the predicted emotion up to time T and the personality P of the dialogue system R ; is the personality-emotion interaction matrix composed of the behavior-expanded emotion up to time T and the personality P of the dialogue system R ;

[0030] Optionally, the emotion expansion range is jointly determined by the emotional polarity of the user's behavior at the current moment and the emotional polarity of the dialogue system's behavior at the previous moment. The formula is as follows:

[0031]

[0032] where w U and w R respectively refer to the hyperparameters used to coordinate the influence degrees of the emotional polarity of the user's behavior at the current moment and the emotional polarity of the dialogue system's behavior at the previous moment on emotion expansion.

[0033] Optionally, the singular value decomposition (SVD) is used to decompose the personality-emotion interaction matrix. The calculation process is as shown in the formula:

[0034]

[0035] where P and Q are the left and right singular matrices respectively, and ∑ (t) is the diagonal matrix composed of the top t largest singular values.

[0036] As can be seen from the above technical solutions, compared with the prior art, the present invention provides a personalized emotion generation method oriented to dialogue behavior, which can capture the user's emotional state and the changes in dialogue behavior during the interaction process of multi-round dialogue, and generate emotions by combining the personality-oriented goal and dialogue behavior. Personality characteristics and dialogue behavior can effectively improve the emotion generation ability, and the evaluation indexes of the present invention in terms of emotion prediction and dialogue behavior prediction both exceed or are approximately equal to the optimal baseline. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on the provided drawings.

[0038] Figure 1 It is the architecture diagram of the dialogue behavior-oriented personalized emotion generation model of the present invention;

[0039] Figure 2 It is the structural diagram of the personalized maintenance prediction subunit of the present invention;

[0040] Figure 3 It is the structural diagram of the behavioral emotion extension subunit of the present invention;

[0041] Figure 4 It is the experimental result diagram of the correlation between behavior and emotion. Specific embodiments

[0042] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, rather than all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.

[0043] The embodiments of the present invention disclose a dialogue behavior-oriented personalized emotion generation method, which regards the long-term personality characteristics of the dialogue system as additional inference conditions to narrow the search space of emotions and dialogue behaviors, and predicts the emotions and behaviors of the dialogue system; secondly, through the emotional tendency implicit in the dialogue behavior, the predicted emotions are further extended to achieve more appropriate dialogue emotion generation, specifically including the following steps:

[0044] Take the dialogue history of the user statement as the input, and respectively predict the emotion and dialogue behavior of the dialogue system under the specified personality characteristics through the personalized emotion prediction cell PEPC and the personalized behavior prediction cell PAPC;

[0045] Through the behavioral emotion extension subunit AEES, extend the generated personalized emotions according to the emotional tendency of the dialogue behavior, extend multiple times, and select the final output.

[0046] Furthermore, a typical dialogue process involves multiple interactors. In the present invention, only dialogues involving two interactors are concerned, and scenarios involving multiple interactors are not considered.

[0047] The personalized emotion generation task in the dialogue system aims to effectively simulate the emotional state of the dialogue system under specified personality traits, thereby improving its emotional expression ability. Combining the dialogue history Context={U1, R1, U2, R2,..., U i-1 , R i-1} and the specified Big Five personality traits P R =[O, C, E, A, N], the goal is to generate emotion categories that conform to the specified Big Five personality traits

[0048] Among them, refers to the j-th word of the user's utterance in the i-th round of dialogue, and the sequence length is Among them refers to the j-th word of the response statement in the i-th round of dialogue, and the sequence length is

[0049] The formal expression of the task is shown in formula (1):

[0050]

[0051] Aiming at the problem that the existing personalized emotion generation methods ignore the correlation between dialogue behaviors and emotion generation, a dialogue behavior-oriented personalized emotion generation model PEGDA is proposed, which consists of a personalized maintenance prediction subunit (Personalised Maintain Prediction Subunit, PMPS) and an act-emotion extension subunit (ActEmotion Extension Subunit, AEES). Among them, PMPS is composed of a personalized emotion prediction cell (Personalised Emotion Prediction Cell, PEPC) and a personalized act prediction cell (PersonalisedActPrediction Cell, PAPC). The working process of PEGDA is as follows: First, take the dialogue history containing the user's utterance at time T as the input, and respectively predict the emotion and dialogue behavior of the dialogue system under the specified personality traits through the personalized emotion prediction cell PEPC and the personalized act prediction cell PAPC. Then, through AEES, expand the generated personalized emotion according to the emotional tendency of the dialogue behavior. In this embodiment, three expansions are performed, and the expanded emotion with the highest probability is selected as the final output. The architecture of the dialogue behavior-oriented personalized emotion generation model PEGDA is as Figure 1 shown.

[0052] Different from previous personalized emotion generation methods, the present invention focuses on the following two aspects: (1) Considering the correlation between emotions and dialogue behaviors, the emotions and dialogue behaviors of a dialogue system with specified personality traits are modeled simultaneously; (2) Based on the theoretical support of cognitive behavioral theory, in this embodiment, it is considered that in the same dialogue context, emotions and dialogue behaviors have the same emotional tendency. Therefore, the predicted emotions are diversified based on the emotional tendency implied by the dialogue behaviors.

[0053] Since the personalized emotion generation task can be regarded as a time series prediction task, in this embodiment, significant improvements have been made to the commonly used LSTM units in time series prediction tasks to achieve the prediction of the emotions and dialogue behaviors of a dialogue system with specified personality traits. The PMPS structure is as Figure 2 shown.

[0054] The PMPS subunit includes PEPC and PAPC. Both PEPC and PAPC are improved based on LSTM and maintain a high degree of symmetry. Therefore, the implementation details of PEPC are introduced in detail in this embodiment, and the PAPC unit is the same. First, to achieve the basic function of emotion prediction, this embodiment uses the emotion state of the dialogue system at the previous moment as the first input, as shown in formulas (2) - (3). To maintain the personality traits of the dialogue system and enhance the emotional interaction between the dialogue system and the user, this embodiment adds 2 input gates, namely the emotion interaction input gate for inputting the emotion of the user at the previous moment and the personality emotion memory input gate for inputting the personality traits of the dialogue system. The calculation process of the emotion state input gate is as shown in formulas (2) - (3), and the calculation of the emotion interaction input gate and the personality emotion memory input gate is as shown in formulas (6) - (9).

[0055]

[0056] f T ' = f T *C T-1 (3)

[0057]

[0058] where, W * and b * are the weight matrix and bias respectively, is the first input parameter of the emotion at the previous moment, providing the emotion state information of the most recent moment for the model; the current emotion category of the user is the second input, providing the current interaction emotion information; the personality trait P R for maintaining the personality emotion state is the third input parameter of the model, used to provide personality guidance information for the model.

[0059] Secondly, in order to enhance the emotion prediction sensitivity of the model, this embodiment involves the output of three units, namely the memory of the next moment. The calculation process is shown in formulas (10) to (12).

[0060]

[0061] C T = C T-1 + o T '+ i T '(11)

[0062] M T = M T-1 + f T '+ i T '(12)

[0063] Where M T-1 , C T-1 and h T-1 are the state of the first unit, the state of the second unit and the hidden state at the previous moment respectively. The state of the first unit represents the personalized long-term emotional memory from different personalities, the state of the second unit represents the medium-term emotional state interaction memory of different personalities, and the hidden unit state represents the short-term emotional memory from the previous moment.

[0064] In order to diversify the emotional features according to the emotional tendency in the prediction behavior and maintain the continuity of the personality characteristics of the dialogue system during the expansion process. This embodiment designs a behavioral emotion expansion subunit AEES. In the personalized emotion generation model oriented by dialogue behavior, there are a total of 3 AEES units. The structure of the AEES unit is as Figure 3 shown.

[0065] The AEES subunit can be expressed as formula (13).

[0066]

[0067] Specifically, based on the composite emotional polarity of the user's emotion and the dialogue behavior at the current moment, is expanded. At the same time, in order to maintain the emotional continuity of the dialogue system, the expanded emotion should not deviate too much from the emotion of the dialogue system at the previous moment and the dialogue behavior corresponding to it. Therefore, the emotional polarity of the user's behavior at the current moment and the emotional polarity of the dialogue system's behavior at the previous moment jointly determine the emotional expansion range of the model, as shown in formula (14).

[0068]

[0069] Where wU and w R respectively refer to the hyperparameters used to coordinate the influence degree of the emotional polarity of the user's behavior at the current moment and the emotional polarity of the dialogue system's behavior at the previous moment on emotion expansion.

[0070] is the personality-emotion interaction matrix composed of the predicted emotion as of time T and the dialogue system personality P R ; is the personality-emotion interaction matrix composed of the behavior-expanded emotion as of time T and the dialogue system personality P R . AEES uses singular value decomposition (SVD) to construct multiple feature subgraphs G i =(N, E), where i represents the subgraph number. If the elements in the interaction matrix and are non-zero, there is an edge between personality and emotion, and personality and emotion categories are regarded as graph nodes. The process of decomposing the personality-emotion interaction matrix using SVD is shown in formulas (15)-(16).

[0071]

[0072] where P and Q are the left and right singular matrices respectively, and ∑ (t) is a diagonal matrix composed of the top t largest singular values; then, a similarity matrix is generated according to the structural correlation scores between personality and the top t relevant emotions When the similarity score between a certain type of personality and emotion is low, it can be considered that this emotion does not tend to be expressed in this emotion, so the corresponding edge can be removed to generate different views. The calculation of the structural correlation scores of matrices P and Q is shown in formulas (17)-(18), and the similarity matrix is calculated as shown in formula (19).

[0073]

[0074] The behavior-expanded emotion and the predicted emotion are respectively added to the representation process of the model to maintain the continuity of personality characteristics and emotions. The initial embeddings of personality characteristics and user characteristics in LightGCN are shown in formulas (20)-(21), and the compound calculation process using LightGCN is shown in formulas (22)-(24).

[0075]

[0076] where and are respectively the embeddings of personality and emotion in the k-th learning iteration, The emotional state calculated by comprehensively computing the predicted emotions and personality traits at time t, N P and N i respectively represent the total number of personality traits and the total number of emotions.

[0077] The emotional state mapped by behavioral emotional polarity is the same as that of emotions in terms of calculation. Finally, the two are fused with co-attention, and the calculation is shown in formula (25).

[0078]

[0079] To further verify the effectiveness of the present invention, the following comparative experiments are also disclosed in this embodiment:

[0080] DailyDialog dataset: It contains 11,118 conversations for training, 1,000 validation conversations, and 1,000 conversations for testing; 7 emotional categories and 4 dialogue behavior categories.

[0081] CPED dataset: It contains 8,085 groups of training conversations, 933 groups of validation conversations, and 2,814 groups of testing conversations; each utterance is annotated with the Big Five personality traits; 13 emotional categories and 19 dialogue behavior categories.

[0082] Since the emotion generation task is subjective, for the same dialogue scenario, there may be multiple appropriate emotions. Therefore, this embodiment adopts a combination of automatic evaluation and manual evaluation to evaluate the emotion generation and extension capabilities of the model. Among them, the automatic evaluation mainly focuses on the final result of emotion generation. Because the emotion prediction stage can obtain the gold label of emotions from the dataset, while the manual evaluation mainly focuses on emotion extension. Because there is only 1 emotion label in the dataset, but this embodiment finally extends to 3 emotion categories that conform to the context.

[0083] This embodiment selects Precision, Recall, and F1 as the automatic evaluation indicators for emotion prediction.

[0084] Precision (Precision, P): In terms of precision, the model precision evaluation index of machine learning is used. The higher the score, the higher the precision of the emotion generation model, as shown in formula (26).

[0085]

[0086] Among them, refers to the number of artificial emotions that are predicted correctly and the category is e, and m e refers to the number of artificial emotions with the predicted category of e.

[0087] Recall (R): In terms of recall, the recall evaluation metric of the machine learning model is used. The higher the score, the higher the recall of the emotion generation model, as shown in Equation (27).

[0088]

[0089] Among them, lable e refers to the artificial emotion with the query label e.

[0090] F1 value (F1, F): The F1 value is the harmonic mean of precision and recall, and it is the weighted harmonic mean of the results of both. The higher the score, the higher the quality of the emotion generation model, as shown in Equation (28).

[0091]

[0092] Since emotions are subjective, in this embodiment, 5 volunteers were randomly invited to conduct artificial evaluations on the generated emotions. The artificial evaluations mainly focused on the following two aspects:

[0093] Personality Matching Score (PMS) is used to evaluate whether the generated emotion conforms to the specified personality characteristics. The score range is [0, 10], and the higher the score, the more the extended emotion conforms to the specified personality characteristics.

[0094] Context Matching Score (CMS) is used to evaluate whether the generated emotion conforms to the current dialogue context. The score range is [0, 10], and the higher the score, the more the extended emotion conforms to the current dialogue context.

[0095] Since there is little existing work on the artificial emotion generation task, in order to verify the effectiveness of the PEGDA model and increase its credibility. In this embodiment, some time series prediction models that perform well in some dialogue scenarios are selected as baselines to more intuitively judge the effectiveness of the PEGDA model.

[0096] LSTM: LSTM is a classic time series prediction model that can learn long-term dependencies and reduce the gradient explosion problem in long sequence learning.

[0097] DialogueRNN: DialogueRNN is a model for dialogue emotion detection, which is an improvement of RNN.

[0098] DialogueGCN: DialogueGCN is a graph convolutional neural network model for dialogue emotion detection, which solves the context propagation problem in RNN-based methods.

[0099] IDS-ECM: IDS-ECM is an interactive dual-state emotion cell model for dialogue emotion prediction, which is an improvement over LSTM.

[0100] ECCM: ECCM is a model for emotional dialogue generation, but emotion prediction is one of its stages. Therefore, the emotion prediction part of it is used as the baseline.

[0101] PET-CLS: PET-CLS is a personalized emotion generation model based on the emotion personality model, which models personality and emotion simultaneously in the VAD space.

[0102] GEPR: GEPR is an emotional dialogue generation model incorporating the Big Five personality, but emotion generation is one of its stages. Therefore, the emotion generation part of it is used as the baseline.

[0103] CEM: CEM is an empathy response generation model incorporating external common sense knowledge, but emotion generation is one of its stages. Therefore, the emotion generation part of it is used as the baseline.

[0104] To verify whether behavior helps predict the emotional state, the behavior category labels are masked and trained at 20%, 40%, 60%, 80%, and 100% using the CPED training set. The results of the correlation experiment are as Figure 4 shown. From the experimental results, it can be seen that as the masking rate of the behavior label increases, the emotion prediction performance shows a steady downward trend. Therefore, behavior and emotion have a certain correlation, and the behavior label helps improve the performance of emotion prediction.

[0105] To verify the effectiveness of the PEGDA model in the emotion generation task, this embodiment shows the comparison experiment results of the emotion generation task in Table 1. From the experimental results, it can be obtained that the automatic evaluation indicators of the PEGDA unit on the two data sets are better than or approximate to the optimal baseline. Especially in the CPED data set, the Precision, Recall, and F1 indicators are improved by 1.0%, 1.2%, and 1.1% respectively compared to the optimal baseline. At the same time, the PMS of PEGDA exceeds all the baselines of personalized emotion generation, and the CMS also obtains a score approximate to the baseline model.

[0106] Table 1 Comparison experiment of emotion generation

[0107]

[0108] To further analyze the differences in fine-grained emotion prediction, Table 2 summarizes the comparative experiment results of fine-grained emotion generation in the DailyDialog dataset. From the experimental results, it can be seen that PEGDA achieved the optimal results in most emotion categories. In addition, the impact of data imbalance on the results is significant. The performance of the model in categories with more training examples is significantly better than that in categories with fewer training examples. For example, the results in "Neutral" and "Surprise" are significantly better than other categories.

[0109] Table 2 Comparative Experiments on Emotion Fine-Grainedness

[0110]

[0111] The improvement in the accuracy of behavior prediction helps to better associate the implicit emotions therein, expand the original emotion categories, and improve the accuracy of compound emotion prediction. To further analyze the emotion expansion ability of the model, in this embodiment, the experimental results of behavior prediction in PEGDA are presented, and the experimental results are shown in Table 3. The experimental results show that in the DailyDialog dataset, PEGDA increased by 0.5%, 0.6%, and 0.9% respectively in the Precision, Recall, and F1 metrics, and in the CPED dataset, PEGDA increased by 0.3%, 0.6%, and 0.4% respectively in the Precision, Recall, and F1 metrics. This indicates that continuous personality memory is effective for behavior prediction and provides a good foundation for subsequent emotion expansion.

[0112] Table 3 Comparative Experiments on Behavior Prediction

[0113]

[0114]

[0115] The emotion generation task is different from other objective tasks. Although this embodiment has added a specified personality as a constraint condition, there are still multiple appropriate emotion expressions in the same situation. However, the dataset only contains one gold label for emotion generation. Therefore, this embodiment designs a behavioral emotion expansion sub-unit AEES, which uses the emotional tendency implicit in the dialogue behavior to expand the generated emotion, and conducts manual evaluations on the three types of emotions expanded therefrom. In addition, this embodiment also explores the emotion expansion effect of combining AEES with other personalized emotion generation models. This embodiment records the average value of the manual evaluations of the three types of emotions obtained by expansion in Table 4. From the manual evaluation results, it can be seen that in the two datasets, the average value of the emotions expanded by AEES is approximately equal to the manual evaluation score of the emotions finally generated by the PEGDA model. This shows that the emotion expansion of AEES maximally maintains the personality matching degree and context matching degree of emotions while improving emotion diversity. At the same time, the combination of AEES and other personalized emotion generation models also improves the PMS and CMS of other personalized emotion generation models, which also demonstrates the effectiveness of AEES in assisting personalized emotion generation.

[0116] Table 4 Average value of manual evaluation of expanded emotions

[0117]

[0118] To further verify the impact of PEPC, PAPS, and AEES on the emotion generation results, ablation experiments were conducted on the above modules in this embodiment, and Table 5 presents the ablation experiment results of the emotion generation task. First, when PEPC was removed in this embodiment, Neutral was directly used to replace the output of PEPC for subsequent reasoning. Compared with the PEGDA model, Precision, Recall, and F1 in the two datasets decreased by 4.2%, 4.4%, 4.4% and 8.8%, 12.1%, 10.4% respectively. In addition, after removing PEPC, both PMS and CMS of the generated emotions showed an obvious downward trend, especially CMS, which indicates that PEPC not only plays a crucial role in emotion generation but is also essential for enhancing the model's understanding of the context. Second, when PAPC was removed in this embodiment, Statement-opinion was directly used to replace the output of PAPC for subsequent reasoning. Compared with the PEGDA model, Precision, Recall, and F1 in the two datasets decreased by 3.3%, 3.7%, 4.4% and 7.4%, 10.6%, 9.3% respectively. In addition, the CMS of the model also showed an obvious decline, which indicates that PAPC is also equally important for the model's context understanding. Finally, when AEES was removed in this embodiment, the Precision, Recall, and F1 of the model did not show as large a downward trend as when PEPC and PAPC were removed, but there were significant decreases in both PMS and CMS of the generated emotions, which indicates that AEES is crucial for the model to generate emotions that match the personality and context.

[0119] Table 5 Ablation Experiment Results of Emotion Generation Task

[0120]

[0121] To better demonstrate the emotion generation ability, behavior prediction ability, and behavior-emotion extension ability of PEGDA, case tests were conducted on the emotion prediction ability, behavior prediction ability, and behavior-emotion extension ability using the CPED dataset, as shown in Tables 6, 7, and 8. To observe the cases more intuitively, the emotion categories "Happy, Grateful, Relaxed, Positive-other, Neutral, Anger, Sadness, Fear, Depress, Disgust, Astonished, Worried, Negative-other" were marked as 1-13 in sequence for easy visual observation of the cases. The test results show that under a specified personality, PEGDA is better at capturing stable emotion changes, such as the emotion sequence "11, 11, 10, 10, 12". However, for emotions with large fluctuations, there are still biases in the prediction results of PEGDA, which may be because emotions with large fluctuations do not conform to the emotion change rules learned by the model.

[0122] Table 6 Case Demonstration of Emotion Generation

[0123]

[0124] To observe the cases more intuitively, the 19 dialogue behaviors in the CPED dataset, namely "Greeting, Question, Answer, Statement-opinion, Statement-non-opinion, Apology, Command, Agreement, Disagreement, Acknowledge, Appreciation, Interjection, Conventional-closing, Thanking, Quotation, Reject, Irony, Comfort, Other", were marked as 1-19 in sequence. In the cases of behavior prediction, the performance of the model in some behavior categories does not meet expectations, which may be due to data imbalance. In addition, time-series-based prediction is not only affected by the personality characteristics of the subject but also by the behavior of the subject at the previous moment. Therefore, there are biases between the prediction results of the model and the expectations.

[0125] Table 7 Cases of Behavior Prediction

[0126]

[0127] To more intuitively demonstrate the amplifying effect of behavior on emotion, an emotion amplification case test was conducted. In the test cases, the negative or positive emotional tendencies implicit in the behavior would cause the emotion prediction results to expand towards the negative or positive side, thereby achieving more accurate predictions.

[0128] Table 8 Behavior Emotion Amplification Test Cases

[0129]

[0130]

[0131] In this specification, each embodiment is described in a progressive manner. The key point of each embodiment is to illustrate the differences from other embodiments. For the same or similar parts among the embodiments, reference can be made to each other. For the apparatuses disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple. For the relevant parts, reference can be made to the description in the method section.

[0132] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be obvious to those skilled in the art. The general principles defined in the present invention can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to these embodiments shown in the present invention, but will conform to the broadest scope consistent with the principles and novel features disclosed in the present invention.

Claims

1. A dialogue behavior-oriented personalized emotion generation method, characterized by: The following steps are involved: The user's conversation history is used as input, and personalized emotion prediction cells (PEPC) and personalized behavior prediction cells (PAPC) are used to predict the emotions and conversation behaviors of the dialogue system under specified personality traits. The personalized emotion prediction cell PEPC and the personalized behavior prediction cell PAPC are improved based on LSTM and maintain a high degree of symmetry; The personalized emotion prediction cell PEPC is improved based on LSTM, specifically: The emotional state of the dialogue system at the last moment is used as the first input, the second input is used to input the user's emotional interaction input gate at the last moment, and the third input is used to input the personality emotion memory input gate of the personality characteristics of the dialogue system; Different units are set up to output the memory of the next moment. The first unit state represents the personalized long-term emotional memory from different personalities, the second unit state represents the interactive memory of the medium-term emotional state of different personalities, and the hidden unit state represents the short-term emotional memory from the previous moment; Through the behavior emotion expansion sub-unit AEES, the generated personalized emotions are expanded according to the emotional tendency of the dialogue behavior, and the expansion is repeated multiple times to select the final output; Emotion extension subunit AEES,In the dialogue behavior-oriented personalized emotion generation model, there are three AEES units in total.,The AEES subunit is expressed as formula (13); Based on the current user sentiment and dialogue acts The composite emotional polarity of Expand the emotion. The expanded emotion cannot deviate too much from the emotion of the dialogue system at the previous moment. and dialogue acts The corresponding composite emotion polarity, the user behavior emotion polarity at the current moment, and the behavior emotion polarity of the dialogue system at the previous moment jointly determine the emotion extension range of the model, as shown in formula (14): where w U and w R They refer to the hyperparameters used to coordinate the influence of the current user behavior emotion polarity and the previous dialogue system behavior emotion polarity on emotion expansion; The predicted sentiment as of time T is With the dialogue system personality P R The personality-emotion interaction matrix composed of Emotions are expanded from behaviors up to time T With the dialogue system personality P R The personality-emotion interaction matrix composed of AEES uses singular value decomposition to construct multiple feature subgraphs G i =(N,E), where i represents the subgraph number. If the interaction matrix and If the elements in are non-zero, there is an edge between personality and emotion, and the personality and emotion categories are regarded as graph nodes. The decomposition and calculation process of the personality-emotion interaction matrix using SVD is shown in formulas (15) to (16): Among them, P and Q are left and right singular matrices respectively, ∑ (t) A diagonal matrix consisting of the top t largest singular values; a similarity matrix is generated based on the structural correlation scores of personality and the top t related emotions When the similarity score between a certain personality and emotion is low, it is considered that the emotion is not inclined to be expressed, so the corresponding edge is removed to generate a different view; the structural correlation score calculation of the matrix P and Q is shown in formulas (17)-(18), and the similarity matrix The calculation is shown in formula (19): Behavior-extended emotions and predicted emotions are added to the representation process of the model to maintain the continuity of personality traits and emotions. The initial embedding representation of personality traits and user features in LightGCN is shown in formulas (20) to (21). The composite calculation process using LightGCN is shown in formulas (22) to (24): in and are the embeddings of personality and emotion in the kth learning iteration, is the emotional state calculated by combining the predicted emotions and personality traits at time t, N P and N i The total number of personalities and emotions respectively; Emotional states from behavioral-emotion polarity mapping and emotions The calculation is similar. Finally, the two are fused for common attention. The calculation is shown in formula (25):

2. The method for generating personalized emotions based on dialogue behavior according to claim 1, characterized in that: Using the emotional state of the dialogue system at the previous moment as the first input, the calculation formula is as follows: f T '=f T *C T-1 ; in, The emotion of the previous moment is the first input parameter, C T-1 It is the state of the second unit at the previous moment.

3. The method for generating personalized emotions guided by dialogue behavior according to claim 1, characterized in that: The calculation process of the emotional state input gate is as follows: in, The emotion of the previous moment is the first input parameter, is the user's emotion at the current moment, h T-1 is the hidden state at the previous moment, o T Represents the activation value of an output gate, W o , W oT' Represent different weight matrices, b o represents the bias term, o T ' represents the value of the final output gate.

4. The method for generating personalized emotions guided by dialogue behavior according to claim 1, characterized in that: The calculation of the emotion interaction input gate, such as the personality emotion memory input gate, is as follows: in, The emotion of the previous moment is the first input parameter, i T : Output of the emotion interaction input gate, P R is the personality of the dialogue system, W pi , W ei , Both are weight matrices, used for weighted summation of different inputs, h T-1 is the hidden state at the previous moment, r T ' is the updated emotion gate, responsible for controlling the update of the emotion state, M T-1 is the memory information or state of the previous moment, f T ' is the updated input gate, which represents the modification or influence of the current emotional state, N T is the emotional output at the current moment, reflecting the system's prediction or generation of the individual's emotional state. T 'Output gate for the current moment's emotions.

5. The method for generating personalized emotions guided by dialogue behavior according to claim 1, characterized in that: Different units are set to output the next moment memory, and the calculation formula is as follows: C T =C T-1 +o T '+i T '; M T =M T-1 +f T '+i T '; in, Emotional memory is the emotional information related to the current moment stored in the model. T is the emotional output at the current moment, which is the final emotional response calculated based on the emotional input and memory state. T is the hidden state, M T-1 、C T-1 They are the first unit state and the second unit state at the previous moment, respectively, f T ' is the forget gate at the current moment, C T is the current state of the memory unit, which is the part of the emotional system responsible for storing long-term emotional information. T-1 is the memory unit state of the previous moment, saving the previous emotional information, o T ' is the output gate at the current moment, i T ' is the input gate at the current moment, M T It is the emotional memory of the current moment, used to record and adjust the long-term and short-term memory related to emotional responses. T-1 is the emotional memory of the previous moment, including historical emotional information, f T ' is the forget gate of the current moment.

Citation Information

Patent Citations

  • Emotion Detection Device and Method for Use in Distributed Systems

    US20100036660A1

  • Emotionally Responsive Artificial Intelligence Interactive Character

    US20240135202A1