Emotion-driven personalized dialogue generation method, system and related device

By quantifying user emotions to generate multi-dimensional feature vectors, calculating style parameter thresholds, filtering personalized dialogues, and combining multimodal hardware responses, the problem of single response style in existing human-computer dialogue systems is solved, realizing emotion-driven personalized dialogue generation and improving interactive experience and adaptability.

CN121561065BActive Publication Date: 2026-04-14SHENZHEN DADAO ZHICHUANG TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN DADAO ZHICHUANG TECH CO LTD
Filing Date
2026-01-20
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing human-computer dialogue systems cannot respond in a personalized way based on the user's emotional state, resulting in a mechanical and rigid interaction method that fails to meet the user's communication needs in different emotional states.

Method used

By acquiring users' emotion types and risk levels, multi-dimensional emotion feature vectors are generated in a quantitative manner. The target threshold of style parameters is calculated, and matching personalized dialogues are selected from a preset corpus. Combined with the synchronous response of multimodal hardware modules, emotion-driven personalized dialogue generation is realized.

Benefits of technology

It achieves personalized responses for human-computer dialogue systems under different emotional states, enhancing the novelty and fluency of interaction. It also achieves adaptive optimization through a feedback iteration mechanism, possessing health orientation and high scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121561065B_ABST
    Figure CN121561065B_ABST
Patent Text Reader

Abstract

The application provides an emotion-driven personalized conversation generation method, system and related equipment, the method comprising: obtaining a user emotion label containing an emotion type and a risk level; generating a multi-dimensional emotion feature vector according to the user emotion label, the multi-dimensional emotion feature vector including three dimensions of antagonism, pacification demand and interest demand; calculating a target threshold for at least one preset style parameter based on the multi-dimensional emotion feature vector, the style parameter including a short sentence proportion, a tone word proportion, a content deviation, a cute word proportion, a rhetorical question proportion, a speech speed and a tone; and selecting a personalized conversation matching the target threshold from a preset corpus according to the target threshold and outputting the personalized conversation. The application solves the problem of a single response style of an existing human-computer conversation system and the difficulty of adapting to complex user emotions by constructing an emotion label to multi-dimensional emotion feature to personalized conversation output path of a style parameter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of human-computer interaction technology, and in particular to an emotion-driven personalized dialogue generation method, system, and related equipment. Background Technology

[0002] With the rapid development of artificial intelligence technology, human-computer dialogue systems (such as chatbots and virtual assistants) have been widely used in customer service, smart homes, emotional companionship, education, and entertainment. Existing human-computer dialogue systems can already engage in relatively fluent natural language interaction with users, but some limitations remain. For example, existing systems often employ fixed or preset dialogue styles, responding with similar tones and expressions regardless of the user's emotional state. This interaction method is very mechanical and rigid, making it difficult to meet users' personalized communication needs under different emotional states.

[0003] Therefore, existing technologies still need to be improved and developed. Summary of the Invention

[0004] This invention provides an emotion-driven personalized dialogue generation method, system, and related equipment. The main objective of this invention is to solve the technical problems mentioned in the background section of the prior art.

[0005] The first aspect of this invention provides an emotion-driven personalized dialogue generation method, comprising:

[0006] Obtain user emotion tags that include emotion type and risk level;

[0007] Based on the user's emotion tags, a multi-dimensional emotion feature vector is generated, which includes three dimensions: antagonism, need for comfort, and need for fun.

[0008] Based on the multi-dimensional emotion feature vector, a target threshold is calculated for at least one preset style parameter, including the proportion of short sentences, the proportion of interjections, the content deviation, the proportion of cute words, the proportion of rhetorical questions, the speech rate, and the tone.

[0009] Based on the target threshold, personalized dialogues that match the target threshold are selected from a preset corpus and output.

[0010] In an optional embodiment of the first aspect of the present invention, the step of generating a multi-dimensional emotion feature vector based on the user emotion tag includes:

[0011] Obtain contextual information associated with the user's emotion tag, the contextual information including user group type and current timestamp;

[0012] Based on the user's emotion tag and the context information, the quantized values ​​of each dimension of the multi-dimensional emotion feature vector are determined through a preset quantization value rule table.

[0013] In an optional embodiment of the first aspect of the present invention, the calculation formula for the target threshold is as follows:

[0014] P_target=[P_base+(e1×w1+ e2×w2+ e3×w3)×ΔP]+ΔP_health

[0015] Wherein, P_target is the target threshold, P_base is the base threshold of the style parameter, e1, e2, and e3 are the quantified values ​​of the antagonism, the soothing need, and the fun need, respectively, w1, w2, and w3 are the feature weights corresponding to the antagonism, the soothing need, and the fun need, respectively, ΔP is the preset parameter adjustment range, and ΔP_health is the health adaptation adjustment amount determined according to the risk level.

[0016] In an optional embodiment of the first aspect of the present invention, the step of filtering out and outputting personalized dialogues that match the target threshold from a preset corpus based on the target threshold includes:

[0017] Multiple candidate dialogues are selected from the corpus, wherein the standard value of each style parameter of each candidate dialogue deviates from the target threshold within a preset first deviation range;

[0018] Based on the matching degree between the standard values ​​of each style parameter of the candidate dialogue and the target threshold, as well as the preset semantic coherence and emotional adaptability, and combined with the preset weights of each style parameter, semantic coherence and emotional adaptability, multiple candidate dialogues are quantitatively scored to obtain a comprehensive score for each candidate dialogue.

[0019] From the multiple candidate dialogues, select one dialogue whose overall score is higher than a preset score threshold as the personalized dialogue.

[0020] In an optional embodiment of the first aspect of the present invention, the step of selecting a dialogue with a comprehensive score higher than a preset score threshold from a plurality of candidate dialogues as the personalized dialogue includes:

[0021] Obtain a preset randomness threshold associated with the user group type;

[0022] Generate a random number and determine whether the random number is less than the randomness threshold;

[0023] If so, select a random interaction type from the preset library of random interaction types associated with the user's emotion tag, and output the random interaction type combined with the personalized dialogue.

[0024] In an optional embodiment of the first aspect of the present invention, the personalized dialogue generation method further includes:

[0025] Generate synchronization instructions containing a unified execution timestamp for multiple hardware modules, including a voice module, a light module, and a vibration module;

[0026] Calculate the early start time for each hardware module based on its respective response delay time.

[0027] The corresponding hardware modules are triggered at the early start time to ensure that multiple hardware modules execute synchronously based on the unified execution timestamp and output a multimodal response that coordinates with the personalized dialogue.

[0028] In an optional embodiment of the first aspect of the present invention, the step of filtering out personalized dialogues that match the target threshold from a preset corpus and outputting them includes:

[0029] After outputting the personalized dialogue, collect the user's active or passive feedback data;

[0030] Based on the active or passive feedback data, calculate and generate a loss function value;

[0031] The feature weights corresponding to the adversarial nature, the appeasement need, and the interest need are iteratively updated using a preset gradient descent algorithm and based on the loss function value.

[0032] A second aspect of the present invention provides an emotion-driven personalized dialogue generation system, the emotion-driven personalized dialogue generation system comprising:

[0033] The emotion tag acquisition module is used to acquire user emotion tags that include emotion type and risk level;

[0034] The emotion vector generation module is used to generate a multi-dimensional emotion feature vector based on the user's emotion tags. The multi-dimensional emotion feature vector includes three dimensions: antagonism, need for comfort, and need for fun.

[0035] The style threshold generation module is used to calculate a target threshold for at least one preset style parameter based on the multi-dimensional emotion feature vector. The style parameters include the proportion of short sentences, the proportion of interjections, the content deviation, the proportion of cute words, the proportion of rhetorical questions, the speech rate, and the tone.

[0036] The personalized dialogue output module is used to filter out and output personalized dialogues that match the target threshold from a preset corpus based on the target threshold.

[0037] A third aspect of the present invention provides an emotion-driven personalized dialogue generation device, the emotion-driven personalized dialogue generation device comprising: a memory and at least one processor, the memory storing instructions, and the memory and the at least one processor being interconnected via a circuit;

[0038] The at least one processor invokes the instructions in the memory to cause the emotion-driven personalized dialogue generation device to perform the emotion-driven personalized dialogue generation method as described in any one of the first aspects of the present invention.

[0039] A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the emotion-driven personalized dialogue generation method as described in any one of the first aspects of the present invention.

[0040] Beneficial Effects: This invention provides an emotion-driven personalized dialogue generation method, system, and related equipment. The method includes acquiring user emotion tags containing emotion type and risk level; quantifying and generating a multi-dimensional emotion feature vector based on the user emotion tags, the multi-dimensional emotion feature vector including three dimensions: adversarial, soothing, and entertaining; calculating a target threshold for at least one preset style parameter based on the multi-dimensional emotion feature vector, the style parameter including the proportion of short sentences, the proportion of interjections, content deviation, the proportion of cute words, the proportion of rhetorical questions, speech rate, and tone; and selecting and outputting personalized dialogues that match the target threshold from a preset corpus based on the target threshold. This invention solves the problem of existing human-computer dialogue systems having a single response style and being unable to adapt to complex user emotions by constructing a personalized dialogue output path from emotion tags to multi-dimensional emotion features and then to style parameters. Attached Figure Description

[0041] Figure 1 This is a schematic diagram of an embodiment of an emotion-driven personalized dialogue generation method according to the present invention.

[0042] Figure 2 This is a schematic diagram of an embodiment of an emotion-driven personalized dialogue generation system according to the present invention.

[0043] Figure 3 This is a schematic diagram of an embodiment of an emotion-driven personalized dialogue generation device according to the present invention. Detailed Implementation

[0044] The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" or "having" and any variations thereof are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0045] For ease of understanding, the specific process of the embodiments of the present invention will be described below. The first aspect of the present invention provides an emotion-driven personalized dialogue generation method, which can be applied to smart devices equipped with hardware such as processors, memory, voice modules, light modules and vibration modules, including but not limited to educational robots or elderly care companion robots.

[0046] Please see Figure 1 The emotion-driven personalized dialogue generation method includes:

[0047] S100. Obtain user emotion tags containing emotion type and risk level. In this invention, the system first obtains the emotion tags output by the emotion recognition algorithm. The tags can be in JSON format, for example: {"emotion":"irritable","risk": "high","user_type": "adult","timestamp":1695918000}, where emotion is the emotion type, including irritable / depressed / neutral, risk is the risk level, including high risk / medium risk / low risk, user_type is the user group type, including teenager / adult, and timestamp is the timestamp.

[0048] S200. Generate a multi-dimensional emotional feature vector based on the user's emotional tags. The multi-dimensional emotional feature vector includes three dimensions: antagonism, need for reassurance, and need for enjoyment. After obtaining the user's emotional tags, the method proceeds to the emotional feature quantification step. According to a preset mapping rule, the user's emotional tags are transformed into a three-dimensional emotional feature vector E=[e1,e2,e3], where e1 represents antagonism, e2 represents need for reassurance, and e3 represents need for enjoyment.

[0049] In an optional embodiment of step S200 of the present invention, the step of generating a multi-dimensional emotion feature vector based on the user emotion tag includes: obtaining context information associated with the user emotion tag, the context information including user group type and current timestamp; and determining the quantization value of each dimension of the multi-dimensional emotion feature vector based on the user emotion tag and the context information, through a preset quantization value rule table.

[0050] In this invention, based on emotion tags, risk levels, and contextual information, three core features are extracted and quantized into a vector E=[e1,e2,e3] with a value of 0.1-1.0. The feature definitions and value ranges are shown in Table 1 below:

[0051] Table 1. Quantitative Table of Multidimensional Emotional Characteristics

[0052]

[0053] In this invention, taking the emotion type as irritability, the risk level as high risk, the user group type as adults, and the timestamp as daytime as an example, the quantification process can be as follows: first, obtain the value range of confrontation, soothing needs, and entertainment needs based on the "irritability-high risk" combination; then determine whether the time is daytime; if it is daytime, take the median value of all values; if it is not daytime, take the maximum and minimum values ​​based on the user group type, for example, take the minimum value for adults and the maximum value for teenagers. Thus, a multi-dimensional emotion feature vector composed of the three dimensions of confrontation, soothing needs, and entertainment needs can be obtained.

[0054] S300. Based on the multi-dimensional emotion feature vector, calculate a target threshold for at least one preset style parameter. The style parameters include the proportion of short sentences, the proportion of interjections, the content deviation, the proportion of cute words, the proportion of rhetorical questions, speech rate, and tone. In this invention, after accurately quantifying emotions, the system needs to determine a specific "style" for dialogue generation. For example, this invention presets seven style parameters, including P1 (proportion of short sentences), P2 (proportion of interjections), P3 (content deviation), P4 (proportion of cute words), P5 (proportion of rhetorical questions), P6 (speech rate), and P7 (tone). The definition tables of each style parameter in this invention are shown in Tables 2 and 3 below:

[0055] Table 2, Style Parameter Definition Table 1

[0056]

[0057] Table 3, Style Parameter Definition Table 2

[0058]

[0059] In this invention, the system uses a target threshold formula to calculate the specific value of each style parameter. The calculation formula for the target threshold is as follows:

[0060] P_target=[P_base+(e1×w1+ e2×w2+ e3×w3)×ΔP]+ΔP_health

[0061] Wherein, P_target is the target threshold, P_base is the base threshold of the style parameter, e1, e2, and e3 are the quantified values ​​of the antagonism, the appeasement need, and the entertainment need, respectively, w1, w2, and w3 are the feature weights corresponding to the antagonism, appeasement need, and entertainment need, respectively, ΔP is the preset parameter adjustment range, and ΔP_health is the health adaptation adjustment amount determined according to the risk level. The meaning of each parameter in the target threshold calculation formula is explained in detail in Table 4 below:

[0062] Table 4. Target Threshold Calculation Formula Parameter Definition Table

[0063]

[0064] The calculation logic for the target threshold in this invention can be as follows:

[0065] Step 1: Calculate the weighted sum of emotion features. By allocating weights, the overall impact of emotion on style parameters is quantified. The formula is: S=e1×w1+ e2×w2+ e3×w3, where S is the weighted sum of emotion features. The larger S is, the stronger the demand for adjusting style parameters due to emotion.

[0066] Step 2: Calculate the emotion adaptation adjustment amount, and combine it with the parameter adjustment magnitude ΔP to obtain the parameter adjustment amount caused by the emotion difference: ΔP_emotion=S×ΔP.

[0067] Step 3: Calculate the base target threshold, and add the emotion adaptation adjustment amount to the base threshold to obtain the base target threshold without considering health needs: Pbase_target=P_base+ΔP_emotion.

[0068] Step 4: Add a health adaptation adjustment. For high-risk scenarios, add a health adaptation adjustment ΔP_health to obtain the final target threshold P_target, ensuring that the parameters are both adapted to emotions and meet health orientation.

[0069] S400. Based on the target threshold, personalized dialogues matching the target threshold are selected from a preset corpus and output. In this step of the invention, the system filters through a corpus with labeled data based on multiple calculated target thresholds. An exemplary corpus structure of the present invention is shown in Table 5 below. The filtering criteria can be that the deviation between the actual values ​​and target values ​​of various style parameters of the candidate dialogues is within a preset range (e.g., 5%).

[0070] Table 5. An exemplary database structure of the present invention

[0071]

[0072] In an optional embodiment of the first aspect of the present invention, the step of selecting and outputting personalized dialogues that match the target threshold from a preset corpus based on the target threshold includes: selecting multiple candidate dialogues from the corpus, wherein the standard values ​​of each style parameter of each candidate dialogue deviate from the target threshold within a preset first deviation range; quantitatively scoring the multiple candidate dialogues based on the matching degree between the standard values ​​of each style parameter of the candidate dialogues and the target threshold, as well as preset semantic coherence and emotional adaptability, and combining preset weights for each style parameter, semantic coherence, and emotional adaptability, to obtain a comprehensive score for each candidate dialogue; and selecting a dialogue from the multiple candidate dialogues whose comprehensive score is higher than a preset score threshold as the personalized dialogue.

[0073] In this invention, the selection rule for candidate dialogues can be to select candidate responses from the corresponding classification corpus, requiring that the actual value (i.e., standard value) of each parameter deviates from the target threshold by ≤5% (percentage parameter) or ≤0.05 (content deviation), and 5-8 dialogues are selected each time. An exemplary dialogue quantitative scoring model of this invention is shown in Table 6 below.

[0074] Table 6. An exemplary dialogue quantitative scoring model of the present invention

[0075]

[0076] Furthermore, in an optional embodiment of the first aspect of the present invention, the step of selecting a dialogue with a comprehensive score higher than a preset score threshold from a plurality of candidate dialogues as the personalized dialogue includes: obtaining a preset randomness threshold associated with user group type; generating a random number and determining whether the random number is less than the randomness threshold; if so, selecting a random interaction type from a preset random interaction type library associated with the user emotion tag, and combining the random interaction type with the personalized dialogue and outputting it.

[0077] In the present invention, for example, the system selects an optimal dialogue as the basic dialogue through a scoring model. For example: "You've had a hard time working overtime today. Let's breathe slowly and relax~". The proportion of short sentences in this dialogue is 100%, and the proportion of modal particles is high, which fully meets the goal of "low cognitive load and high soothing effect".

[0078] Next, a random interaction determination step will also be executed, that is, based on the user group, a randomness threshold is defined to determine whether to trigger a random interaction, so as to achieve precise matching of "group - emotion - randomness": if R < K, a random interaction is triggered; otherwise, only the basic dialogue is output. The meaning of the formula: generate a random number R between 0 and 1, compare it with the randomness threshold K of the user group. If R < K, randomly select 1 interaction type from the "emotion - random interaction type library" and combine it with the basic dialogue for output.

[0079] In one embodiment, the user group type obtained is "adult", and the corresponding randomness threshold K is set between 0.3 and 0.5. In this example, K = 0.4. The system generates a random number R between 0 and 1 through a built - in random number generator. Assume that R = 0.62 is generated this time, and it is determined whether R < K holds. 0.62 is not less than 0.4, so the determination is "no". Therefore, no random interaction is triggered this time, and only the basic dialogue is prepared for output. This avoids excessive interesting interruptions when the user needs quietness and reflects the accuracy of group adaptation.

[0080] Another example: Given that for the adolescent group, K = 0.7, and a random number R = 0.5 is generated; the determination result: 0.5 < 0.7, a random interaction is triggered; random type selection: randomly select "Sleep Aid Music 'Starlight' + 5 - second breathing guidance rhythm" from the "irritable - high - risk" random interaction type library (5 sleep aid music pieces, 3 breathing guidance rhythms) through RNG; final output: basic dialogue "Let's breathe slowly... Listen to the story of the stars?" + random sleep aid music + 5 - second breathing guidance vibration (1 time per second).

[0081] Furthermore, in an optional implementation manner of the first aspect of the present invention, the personalized dialogue generation method further includes: generating synchronization instructions including a unified execution timestamp for multiple hardware modules, where the hardware modules include a voice module, a lighting module, and a vibration module; calculating the respective early start times corresponding to each hardware module according to the respective response delay times of each hardware module; triggering the corresponding hardware modules at the early start times respectively, so as to ensure that the multiple hardware modules are synchronously executed based on the unified execution timestamp and output a multimodal response coordinated with the personalized dialogue.

[0082] In this invention, in order to present the generated dialogue to the user in the most comfortable and immersive way, the system performs multi-module synchronous output. That is, by adopting a timestamp synchronization mechanism, hardware modules with different response delays (such as voice, LED lights, and vibration motors) are coordinated and controlled. By calculating the advance start time, it is ensured that all feedback is triggered at the same moment (error ≤ 20ms), thus avoiding a sense of disjointed experience.

[0083] Generate synchronization instruction: The processor generates a synchronization instruction containing a unified execution timestamp T=200ms. This instruction contains the specific tasks that all hardware modules need to execute: Voice module: Play the text "You worked hard today...", with the speech rate set to 0.6 times and the pitch set to +0.2 octave; Light module: Turn on the warm yellow light, with the brightness set to 50cd / ㎡; Vibration module: Start a slow, gentle vibration of 1 time / second, with an amplitude of 0.3mm.

[0084] Calculate the early start time: The system calculates the early start time of each module based on the hardware response delay of each module (e.g., setting voice 20ms, LED 10ms, vibration 50ms): Voice module: 200ms-20ms=180ms; Light module: 200ms-10ms=190ms; Vibration module: 200ms-50ms=150ms.

[0085] Triggering and Synchronous Execution: The system triggers the vibration module at 150ms, the voice module at 180ms, and the light module at 190ms. Finally, the effects of all modules are precisely synchronized and presented to the user at T=200ms. The user perceives a seamless feedback of sound, light, and touch, resulting in a smooth and uninterrupted experience.

[0086] Furthermore, in an optional embodiment of the first aspect of the present invention, the step of filtering out and outputting personalized dialogues that match the target threshold from a preset corpus according to the target threshold includes: after outputting the personalized dialogue, collecting active or passive feedback data from the user; calculating and generating a loss function value based on the active or passive feedback data; and iteratively updating the feature weights corresponding to the adversarial nature, the need for appeasement, and the need for entertainment using a preset gradient descent algorithm and according to the loss function value.

[0087] Specifically, in this invention, after the dialogue is output, the system enters the feedback and learning phase and collects feedback data: Assuming that after the dialogue ends, the user verbally evaluates "Feels much better, 5 points" (active feedback) and continues to gently interact with the robot for 45 seconds (passive feedback), the system collects S_sat=5 and T_ext=45s, calculates the loss function, and first standardizes the feedback data to obtain S_norm=1.0 and T_norm=0.75. Then, according to the preset weights (active feedback weight 0.6, passive feedback weight 0.4), the system calculates the loss function L=1-(0.6×S_norm+0.4×T_norm)=0.1. A lower loss value L indicates that the user is very satisfied with this interaction.

[0088] The system iteratively updates the weights, employing gradient descent and other gradient descent algorithms. Based on the loss function L, it fine-tunes the feature weights w1, w2, and w3 in the style parameter formula. The formula can be... w n+1 For the feature weights after iteration, w n Here, η represents the current feature weights, and η is the learning rate. The partial derivative of the loss function with respect to the weights reflects the degree of influence of weight changes on the loss, and is calculated using the chain rule. In this invention, positive feedback slightly increases the weight of the "soothing need" w2, making the generated dialogue soothing characteristics more prominent in future scenarios such as "annoyance-high risk". Through continuous iterative optimization, the system can achieve personalized adaptation, increasingly conforming to the usage preferences of specific users.

[0089] This invention's emotion-driven personalized dialogue generation method constructs an intelligent closed loop of "perception-decision-execution-learning." Through a series of innovative quantitative formulas, it transforms the complex and subjective emotional interaction process into a definable, calculable, controllable, and optimizable engineered process, possessing the following core advantages:

[0090] Quantitative approach: Replacing subjective descriptions with mathematical formulas improves the accuracy of emotion and style matching.

[0091] Health-oriented: By linking emotions with health risks, the product possesses health guidance value that goes beyond simple companionship.

[0092] Experience is king: Through randomness in group adaptation and synchronization of multiple modules, the novelty and smoothness of interaction are greatly enhanced.

[0093] Self-evolution: Through a feedback and iteration mechanism, the algorithm achieves personalized self-adaptation, allowing the robot to "understand you better the more you use it".

[0094] High scalability: Its modular design allows it to easily cover a wider range of robotic fields such as education and elderly care.

[0095] See Figure 2 A second aspect of the present invention provides an emotion-driven personalized dialogue generation system, the emotion-driven personalized dialogue generation system comprising:

[0096] The emotion tag acquisition module 10 is used to acquire user emotion tags that include emotion type and risk level;

[0097] The emotion vector generation module 20 is used to generate a multi-dimensional emotion feature vector based on the user's emotion tags. The multi-dimensional emotion feature vector includes three dimensions: antagonism, need for comfort, and need for fun.

[0098] The style threshold generation module 30 is used to calculate a target threshold for at least one preset style parameter based on the multi-dimensional emotion feature vector. The style parameters include the proportion of short sentences, the proportion of interjections, the content deviation, the proportion of cute words, the proportion of rhetorical questions, the speech rate, and the tone.

[0099] The personalized dialogue output module 40 is used to filter out personalized dialogues that match the target threshold from a preset corpus and output them.

[0100] In an optional embodiment of the second aspect of the present invention, the emotion vector generation module includes:

[0101] A context information acquisition unit is used to acquire context information associated with the user's emotion tag, wherein the context information includes user group type and current timestamp;

[0102] The quantization unit is used to determine the quantization values ​​of each dimension of the multi-dimensional emotion feature vector based on the user's emotion tag and the context information, through a preset quantization rule table.

[0103] In an optional embodiment of the second aspect of the present invention, the calculation formula for the target threshold is as follows:

[0104] P_target=[P_base+(e1×w1+ e2×w2+ e3×w3)×ΔP]+ΔP_health

[0105] Wherein, P_target is the target threshold, P_base is the base threshold of the style parameter, e1, e2, and e3 are the quantified values ​​of the antagonism, the soothing need, and the fun need, respectively, w1, w2, and w3 are the feature weights corresponding to the antagonism, the soothing need, and the fun need, respectively, ΔP is the preset parameter adjustment range, and ΔP_health is the health adaptation adjustment amount determined according to the risk level.

[0106] In an optional embodiment of the second aspect of the present invention, the personalized dialogue output module includes:

[0107] The candidate dialogue acquisition unit is used to filter out multiple candidate dialogues from the corpus, wherein the standard value of each style parameter of each candidate dialogue deviates from the target threshold within a preset first deviation range.

[0108] The comprehensive score calculation unit is used to quantitatively score multiple candidate dialogues based on the matching degree between the standard values ​​of each style parameter of the candidate dialogue and the target threshold, as well as the preset semantic coherence and emotional adaptability, and combined with the preset weights of each style parameter, the semantic coherence and the emotional adaptability, to obtain the comprehensive score of each candidate dialogue.

[0109] The target dialogue filtering unit is used to select one dialogue from multiple candidate dialogues whose comprehensive score is higher than a preset score threshold as the personalized dialogue.

[0110] In an optional embodiment of the second aspect of the present invention, the personalized dialogue output module includes:

[0111] The randomness threshold acquisition unit is used to acquire a preset randomness threshold associated with the user group type;

[0112] A random number generation unit is used to generate a random number and determine whether the random number is less than the randomness threshold.

[0113] The interaction type selection unit is used to select a random interaction type from a preset random interaction type library associated with the user's emotion tag if the condition is met, and then combine the random interaction type with the personalized dialogue and output it.

[0114] In an optional embodiment of the second aspect of the present invention, the personalized dialogue generation system further includes a hardware collaboration module, wherein the hardware collaboration module:

[0115] A synchronization instruction generation unit is used to generate synchronization instructions containing a unified execution timestamp for multiple hardware modules, including a voice module, a light module, and a vibration module.

[0116] The startup time calculation unit is used to calculate the early startup time of each hardware module based on the response delay time of each hardware module.

[0117] A multimodal response unit is used to trigger the corresponding hardware modules at the early start time to ensure that multiple hardware modules execute synchronously based on the unified execution timestamp and output a multimodal response that coordinates with the personalized dialogue.

[0118] In an optional embodiment of the second aspect of the present invention, the personalized dialogue generation system further includes an iterative update module, the iterative update module comprising:

[0119] The feedback data acquisition unit is used to collect the user's active or passive feedback data after the personalized dialogue is output.

[0120] The loss function value calculation unit is used to calculate and generate a loss function value based on the active feedback or the passive feedback data.

[0121] The feature weight update unit is used to iteratively update the feature weights corresponding to the adversarial nature, the appeasement need, and the interest need using a preset gradient descent algorithm and based on the loss function value.

[0122] Figure 3 This is a schematic diagram of the structure of an emotion-driven personalized dialogue generation device provided in an embodiment of the present invention. This emotion-driven personalized dialogue generation device can vary significantly due to differences in configuration or performance. It may include one or more processors 50 (central processing units, CPUs) (e.g., one or more processors) and memory 60, and one or more storage media 70 (e.g., one or more mass storage devices) for storing applications or data. The memory and storage media can be temporary or persistent storage. The program stored in the storage media may include one or more modules (not shown in the diagram), each module may include a series of instruction operations on the emotion-driven personalized dialogue generation device. Furthermore, the processor may be configured to communicate with the storage media and execute the series of instruction operations in the storage media on the emotion-driven personalized dialogue generation device.

[0123] The emotion-driven personalized dialogue generation device of the present invention may further include one or more power supplies 80, one or more wired or wireless network interfaces 90, one or more input / output interfaces 100, and / or one or more operating systems, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 3 The illustrated structure of the emotion-driven personalized dialogue generation device does not constitute a limitation on the emotion-driven personalized dialogue generation device, and may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.

[0124] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when the instructions are executed on a computer, cause the computer to perform the steps of the emotion-driven personalized dialogue generation method.

[0125] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system or system / unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0126] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0127] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for generating personalized dialogue driven by emotion, characterized in that, include: Obtain user emotion tags that include emotion type and risk level; Based on the user's emotion tags, a multi-dimensional emotion feature vector is generated, which includes three dimensions: antagonism, need for comfort, and need for fun. Based on the multi-dimensional emotion feature vector, a target threshold is calculated for at least one preset style parameter, including the proportion of short sentences, the proportion of interjections, the content deviation, the proportion of cute words, the proportion of rhetorical questions, the speech rate, and the tone. Based on the target threshold, personalized dialogues that match the target threshold are selected from a preset corpus and output. The step of generating a multi-dimensional emotion feature vector based on the user's emotion tag includes: Obtain contextual information associated with the user's emotion tag, the contextual information including user group type and current timestamp; Based on the user's emotion tag and the context information, the quantization values ​​of each dimension of the multi-dimensional emotion feature vector are jointly determined through a preset quantization value rule table. The formula for calculating the target threshold is as follows: P_target=[P_base+(e1×w1+e2×w2+e3×w3)×ΔP]+ΔP_health Wherein, P_target is the target threshold, P_base is the base threshold of the style parameter, e1, e2, and e3 are the quantified values ​​of the antagonism, the soothing need, and the fun need, respectively, w1, w2, and w3 are the feature weights corresponding to the antagonism, the soothing need, and the fun need, respectively, ΔP is the preset parameter adjustment range, and ΔP_health is the health adaptation adjustment amount determined according to the risk level.

2. The emotion-driven personalized dialogue generation method according to claim 1, characterized in that, The step of filtering and outputting personalized dialogues that match the target threshold from a preset corpus based on the target threshold includes: Multiple candidate dialogues are selected from the corpus, wherein the standard value of each style parameter of each candidate dialogue deviates from the target threshold within a preset first deviation range; Based on the matching degree between the standard values ​​of each style parameter of the candidate dialogue and the target threshold, as well as the preset semantic coherence and emotional adaptability, and combined with the preset weights of each style parameter, semantic coherence and emotional adaptability, multiple candidate dialogues are quantitatively scored to obtain a comprehensive score for each candidate dialogue. From the multiple candidate dialogues, select one dialogue whose overall score is higher than a preset score threshold as the personalized dialogue.

3. The emotion-driven personalized dialogue generation method according to claim 2, characterized in that, The step of selecting a dialogue with a comprehensive score higher than a preset score threshold from multiple candidate dialogues as the personalized dialogue includes: Obtain a preset randomness threshold associated with the user group type; Generate a random number and determine whether the random number is less than the randomness threshold; If so, select a random interaction type from the preset library of random interaction types associated with the user's emotion tag, and output the random interaction type combined with the personalized dialogue.

4. The emotion-driven personalized dialogue generation method according to claim 1, characterized in that, The personalized dialogue generation method also includes: Generate synchronization instructions containing a unified execution timestamp for multiple hardware modules, including a voice module, a light module, and a vibration module; Calculate the early start time for each hardware module based on its respective response delay time. The corresponding hardware modules are triggered at the early start time to ensure that multiple hardware modules execute synchronously based on the unified execution timestamp and output a multimodal response that coordinates with the personalized dialogue.

5. The emotion-driven personalized dialogue generation method according to claim 1, characterized in that, The step of filtering and outputting personalized dialogues that match the target threshold from a preset corpus based on the target threshold includes: After outputting the personalized dialogue, collect the user's active or passive feedback data; Based on the active or passive feedback data, calculate and generate a loss function value; The feature weights corresponding to the adversarial nature, the appeasement need, and the interest need are iteratively updated using a preset gradient descent algorithm and based on the loss function value.

6. An emotion-driven personalized dialogue generation system, characterized in that, The emotion-driven personalized dialogue generation system includes: The emotion tag acquisition module is used to acquire user emotion tags that include emotion type and risk level; The emotion vector generation module is used to generate a multi-dimensional emotion feature vector based on the user's emotion tags. The multi-dimensional emotion feature vector includes three dimensions: antagonism, need for comfort, and need for fun. The style threshold generation module is used to calculate a target threshold for at least one preset style parameter based on the multi-dimensional emotion feature vector. The style parameters include the proportion of short sentences, the proportion of interjections, the content deviation, the proportion of cute words, the proportion of rhetorical questions, the speech rate, and the tone. The personalized dialogue output module is used to filter out and output personalized dialogues that match the target threshold from a preset corpus based on the target threshold. The emotion vector generation module includes: A context information acquisition unit is used to acquire context information associated with the user's emotion tag, wherein the context information includes user group type and current timestamp; The quantization value unit is used to determine the quantization value of each dimension of the multi-dimensional emotion feature vector based on the user emotion tag and the context information, through a preset quantization value rule table. The formula for calculating the target threshold is as follows: P_target=[P_base+(e1×w1+e2×w2+e3×w3)×ΔP]+ΔP_health Wherein, P_target is the target threshold, P_base is the base threshold of the style parameter, e1, e2, and e3 are the quantified values ​​of the antagonism, the soothing need, and the fun need, respectively, w1, w2, and w3 are the feature weights corresponding to the antagonism, the soothing need, and the fun need, respectively, ΔP is the preset parameter adjustment range, and ΔP_health is the health adaptation adjustment amount determined according to the risk level.

7. An emotion-driven personalized dialogue generation device, characterized in that, The emotion-driven personalized dialogue generation device includes: a memory and at least one processor, wherein the memory stores instructions, and the memory and the at least one processor are interconnected via a line; The at least one processor invokes the instructions in the memory to cause the emotion-driven personalized dialogue generation device to perform the emotion-driven personalized dialogue generation method as described in any one of claims 1-5.

8. A computer-readable storage medium storing a computer program thereon, characterized in that, When the computer program is executed by the processor, it implements the emotion-driven personalized dialogue generation method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Dialogue generation method and system based on emotion analysis and generative adversarial network

    CN114492462A

  • Intelligent dialogue method and system

    CN119075300A