Intelligent dialogue generation method and system based on multidimensional sentiment analysis

The intelligent dialogue generation method based on multi-dimensional sentiment analysis solves the problem of single sentiment analysis in existing technologies, achieves high consistency between dialogue content and contextual emotions and coherence of emotional expression, and improves the naturalness and emotional adaptability of user interaction experience.

CN119938849BActive Publication Date: 2025-09-23BEIJING MAHA PULSE TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510032009.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-09
Publication Date
2025-09-23
Estimated Expiration
2045-01-09

AI Technical Summary

Technical Problem

The sentiment analysis in existing technologies is too simplistic and cannot fully portray emotional changes, resulting in insufficient fit between the conversation content and the contextual emotions, lack of coherence in emotional expression in multiple rounds of conversations, insufficient tone analysis and emotional weight adjustment, affecting the emotional adaptability and content resonance in the user experience.

Method used

An intelligent dialogue generation method based on multidimensional sentiment analysis is adopted. By evaluating the sentiment value, arousal value, dominance value and semantic strength value, combined with user portraits, the offset change range of sentiment characteristics is calculated, sentiment offset features are generated, and a sentiment change matrix is ​​constructed. The global sentiment change amplitude is calculated, the weight value is smoothed, the tone type and content consistency are adjusted, and the sentiment feature parameters are dynamically corrected to achieve continuity and progressiveness of sentiment expression.

Benefits of technology

It achieves refinement and adaptability of sentiment analysis, ensures high consistency in sentiment matching and tone expression in generated dialogues, enhances the emotional fit and dynamic responsiveness in multi-round interactions, and improves the naturalness and emotional resonance of user interaction experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119938849B_ABST
    Figure CN119938849B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of sentiment analysis technology, specifically to an intelligent dialogue generation method and system based on multi-dimensional sentiment analysis, comprising the following steps: evaluating sentiment efficacy, arousal, and dominance values ​​through user input, obtaining semantic strength values ​​through semantic content analysis, merging sentiment preference parameters in user portraits, calculating the offset variation range of sentiment features, and generating sentiment offset features. In the present invention, through the analysis and fusion of multi-dimensional sentiment parameters, including the combination of sentiment efficacy, arousal, dominance, and semantic strength, the sentiment feature offset is dynamically captured, making sentiment analysis more refined and adaptable. Based on the dynamic weight distribution of sentiment, the relationship between tone type and content prompt is accurately analyzed to ensure a high degree of consistency in sentiment matching and tone expression in the generated dialogue. By correcting the differences in sentence sentiment features and smoothing sentiment changes, the problem of incoherent sentiment expression is solved, forming a continuous response with multiple rounds of sentiment progression.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of sentiment analysis, and in particular to a method and system for generating intelligent dialogues based on multidimensional sentiment analysis. Background Art

[0002] Sentiment analysis is a natural language processing technology that aims to identify, extract, and understand the emotions and subjective attitudes inherent in text, speech, or other forms of data. This technology combines machine learning, deep learning, and linguistics, and is commonly used to analyze user sentiment, its intensity, and the classification of positive and negative emotions. Sentiment analysis is widely used in areas such as customer review analysis, public opinion monitoring, intelligent customer service systems, and marketing, helping businesses and individuals better understand user feedback and social sentiment, thereby optimizing decision-making and services.

[0003] Intelligent dialogue generation captures and analyzes multi-dimensional emotional information to generate natural language dialogue content that aligns with the user's emotions and context. This technology aims to enhance the naturalness and emotional adaptability of human-computer interaction. It is primarily used in scenarios such as intelligent customer service, virtual assistants, and emotional companion robots, providing users with a more humane communication experience and personalized services.

[0004] Existing technologies are overly simplistic in their capture of emotional features and are unable to fully capture emotional changes. Their emotion matching methods rely on static emotional data, resulting in a lack of consistency between conversation content and contextual emotions, manifesting as a lack of coherence in emotional expression across multiple rounds of conversation. Furthermore, deficiencies in tone analysis and emotional weight adjustment make it difficult for generated sentences to accurately convey the target emotion, leading to harsh tones or deviations in emotional expression. In multi-round interaction scenarios, the lack of effective processing of emotional progression and dynamic smoothness makes it difficult to achieve natural and coherent emotional expression, impacting the emotional adaptability and content resonance in the user experience. Summary of the Invention

[0005] The purpose of the present invention is to solve the shortcomings of the prior art and to propose an intelligent dialogue generation method and system based on multi-dimensional sentiment analysis.

[0006] To achieve the above objectives, the present invention adopts the following technical solution: an intelligent dialogue generation method based on multidimensional sentiment analysis, comprising the following steps:

[0007] S1: Evaluate the emotional efficacy, arousal, and dominance values ​​based on user input, obtain the semantic intensity value through semantic content analysis, merge the emotional preference parameters in the user portrait, calculate the offset variation range of the emotional feature, and generate the emotional offset feature;

[0008] S2: Based on the emotion shift feature, compare the current emotion trend, construct an emotion change matrix, calculate the global emotion change amplitude, smooth the weight value to obtain the current round emotion weight set, and generate the emotion dynamic weight distribution value;

[0009] S3: Based on the emotional dynamic weight distribution value, extract the conversation intention classification value, analyze the target tone type, calculate the prompt content weight, check the consistency weight with the conversation context emotion, integrate the prompt content emotion and consistency distribution parameters, adjust the adaptation weight, and generate the adaptation prompt weight distribution value;

[0010] S4: Based on the adaptation prompt weight distribution value, analyzing the difference between the emotional feature value in the generated sentence and the target emotional intensity, calculating the adjustment coefficient, dynamically correcting the emotional feature parameters of the current sentence, recalibrating the emotional weight matrix of the content, and generating optimized emotional response content;

[0011] S5: Based on the optimized emotional response content, the progressive emotional change matrix is ​​analyzed, the difference between the progressive parameters and the emotional weight distribution value is compared, the emotional expression smooth curve is reconstructed, and the continuous parameters of multiple rounds of emotional responses are generated by dynamic smoothing operations to generate recursive emotional generation response values.

[0012] The emotional offset features include emotional effectiveness value offset, arousal value offset, dominance value offset, semantic intensity value change range, and emotional preference parameters. The emotional dynamic weight distribution value includes the global emotional change amplitude, emotional change matrix, current round emotional weight set, and smoothing weight value. The adaptation prompt weight distribution value includes the dialogue intention classification value, target tone type, prompt content weight, emotional consistency distribution parameter, and adaptation weight. The optimized emotional response content includes emotional feature value, target emotional intensity difference, adjustment coefficient, and emotional weight matrix. The recursive emotional generation response value includes progressive emotional change matrix, emotional weight distribution value difference, emotional expression smoothing curve, and continuous parameter.

[0013] As a further solution of the present invention, the steps of acquiring the emotion shift feature are specifically as follows:

[0014] S111: Analyze user input, evaluate the emotional efficacy value, arousal value, and dominance value, and obtain a comprehensive emotional index by calculating the weighted average of the indicators;

[0015] S112: Performing semantic analysis on the text input by the user, extracting a semantic strength value, combining the comprehensive sentiment index, analyzing the difference between the text and the sentiment preference in the user portrait, and obtaining a sentiment difference value;

[0016] S113: Based on the emotion difference value and the emotion comprehensive index, the formula is adopted:

[0017]

[0018] Calculate the sentiment offset feature;

[0019] Among them, E represents the emotional deviation feature, E sd Represents the emotional difference value, E ci represents the comprehensive emotional index, a represents the adjustment coefficient of the emotional difference value, which is used to adjust the weight influence of the emotional offset feature on the emotional difference value, b represents the adjustment coefficient of the comprehensive emotional index, which is used to adjust the weight influence of the emotional offset feature on the comprehensive emotional index, and c represents the total adjustment parameter, which is used to normalize the calculation results of the entire formula.

[0020] As a further solution of the present invention, the step of obtaining the emotional dynamic weight distribution value is specifically as follows:

[0021] S211: establishing an emotion change matrix by comparing the current emotion trend with the emotion shift feature, performing a normalization operation on the multi-unit element values ​​in the matrix, calculating the average change value of the normalized matrix, and generating an emotion change amplitude value;

[0022] S212: Based on the emotion change amplitude value, multiple emotion weight factors are processed by weight smoothing calculation, using the formula:

[0023]

[0024] Calculate the smoothed weight set to generate the sentiment weight set;

[0025] Among them, W i represents the smoothed sentiment weight value, C i represents the initial emotional weight factor, F represents the emotional change amplitude value, P i It represents the emotional preference weight factor associated with the current emotional trend, providing reverse adjustment to balance the intensity of preference. k is the adjustment coefficient, which controls the amplitude of the overall weight adjustment.

[0026] S213: performing a normalization operation on the emotion weight set, integrating the dynamic relationship between multiple normalized weights and weight factors, and calculating the emotion dynamic weight distribution value.

[0027] As a further solution of the present invention, the step of obtaining the adaptation prompt weight distribution value is specifically as follows:

[0028] S311: Analyzing the emotional dynamic weight distribution value, extracting the conversation intention classification value, calculating the weight of the conversation intention and the emotional trend matching, and generating a conversation intention weight set;

[0029] S312: Analyze the target tone type, integrate the conversation intention weight set, use a quantitative analysis method to compare the consistency of the target tone with the context emotion, calculate the tone matching weight, and generate a tone adaptation weight set;

[0030] S313: Based on the prompt content weight and the tone adaptation weight set, the formula is adopted:

[0031]

[0032] Calculate and generate the adaptation prompt weight distribution value;

[0033] Among them, W c It represents the weight obtained based on content analysis, reflecting the importance and influence of the content itself. t Represents the tone matching weight, showing the matching degree between the target tone and the current conversation emotion, W m Indicates the inverse strength of context emotion matching, and adjusts the weight influence by calculating the inverse ratio of the matching degree. p Indicates the adaptation prompt weight distribution value.

[0034] As a further solution of the present invention, the step of obtaining the optimized emotional response content is specifically as follows:

[0035] S411: Based on the adaptation prompt weight distribution value, analyzing the emotional feature value of the generated sentence, comparing the emotional feature value with the preset target emotional intensity, identifying the difference between the two, calculating the difference index, and generating an emotional difference evaluation result;

[0036] S412: Quantitatively calculating the required adjustment coefficients based on the emotion difference evaluation results, dynamically adjusting the emotion feature parameters of the current sentence, and generating an adjustment coefficient set;

[0037] S413: Apply the adjustment coefficient set to modify the emotional characteristic parameters of the current sentence using the formula:

[0038]

[0039] By adjusting the index of the difference value, the emotional parameters are optimized, the emotions are adjusted, and the adjusted emotional feature results are generated;

[0040] Among them, E old represents the original emotional feature value, which refers to the quantitative value of the emotional state before sentence analysis. ΔE represents the difference in emotional intensity, which measures the gap between the current emotional state and the target emotional state. α represents the main adjustment coefficient, which is used to amplify or reduce the impact of emotional adjustment. β represents the adjustment coefficient, which adjusts the impact of ΔE to make the emotional adjustment smoother and avoid sudden changes.

[0041] S414: Utilizing the adjusted emotional feature results, recalculate and calibrate the emotional weight matrix of the content, integrate all associated emotional data, and generate optimized emotional response content.

[0042] As a further solution of the present invention, the step of obtaining the recursive emotion generation response value is specifically as follows:

[0043] S511: Based on the optimized emotional response content, analyzing the progressive emotional change matrix, recording the change of emotional state after each round of dialogue, calculating the progressive value of emotional intensity, and generating emotional progressive parameters;

[0044] S512: Compare the emotion progression parameter with the existing emotion weight distribution value, identify and quantify the difference between the two, calculate the difference index through comparative analysis, and generate an emotion weight difference result;

[0045] S513: Reconstruct the emotion expression smooth curve based on the emotion weight difference result, using the formula:

[0046]

[0047] Adjust the emotional intensity of each point, make a natural transition of emotional expression, and generate a smooth curve of emotional expression;

[0048] Among them, S new Represents the smooth curve of emotional expression, S old Represents the original emotional expression curve, representing the emotional output before adjustment, S target represents the target emotional state, α i is the coefficient adjusted based on the sentiment difference, k is the smoothing adjustment parameter, and n represents the number of sentiment points involved in the calculation;

[0049] S514: Using the emotion expression smoothing curve, a dynamic smoothing operation is performed to continuously adjust the emotion response parameters in multiple rounds of dialogue to generate a recursive emotion generation response value.

[0050] An intelligent dialogue generation system based on multidimensional sentiment analysis, wherein the intelligent dialogue generation system based on multidimensional sentiment analysis is used to execute the above-mentioned intelligent dialogue generation method based on multidimensional sentiment analysis, and the system comprises:

[0051] The emotional feature extraction module evaluates the emotional value, arousal value, and dominance value based on the text content input by the user, analyzes the semantic strength value of the text, combines the emotional preference parameters in the user profile, analyzes the extraction results, calculates the offset variation range of the emotional feature, and generates the emotional offset feature;

[0052] The sentiment weight distribution module compares the sentiment trend of the current input text based on the sentiment shift feature, establishes a sentiment change matrix, calculates the global sentiment change amplitude, performs smoothing processing, obtains the current round sentiment weight set, performs distribution analysis, and generates a sentiment dynamic weight distribution value;

[0053] The adaptation prompt generation module extracts the target intent classification and target tone type based on the emotional dynamic weight distribution value, calculates the emotional weight of the prompt content, performs context consistency check, adjusts the adaptation weight, and generates an adaptation prompt weight distribution value;

[0054] The recursive emotion optimization module calculates the difference between the emotion feature value in the generated sentence and the target emotion intensity based on the adaptation prompt weight distribution value, adjusts the difference value, dynamically corrects the emotion feature parameters, recalibrates the emotion weight matrix, and generates a recursive emotion generation response value.

[0055] Compared with the prior art, the advantages and positive effects of the present invention are:

[0056] In the present invention, through the analysis and fusion of multi-dimensional emotional parameters, including the combination of emotional efficacy value, arousal value, dominance value and semantic intensity, the emotional feature offset is dynamically captured, making the emotional analysis more refined and adaptable. Based on the dynamic weight distribution of emotions, the relationship between tone type and content prompts is accurately analyzed to ensure a high degree of consistency in emotional matching and tone expression in the generated dialogue. By correcting the differences in emotional features of sentences and smoothing emotional changes, the problem of incoherent emotional expression is solved, forming a continuous response with multiple rounds of emotional progression. In multiple rounds of interaction, the system realizes the natural progression and adjustment of emotional expression, enhancing the emotional fit and dynamic response capability of the interactive content. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 It is a schematic diagram of the workflow of the present invention;

[0058] Figure 2 Flowchart of the steps for obtaining the emotion shift feature of the present invention;

[0059] Figure 3 This is a flow chart of the steps for obtaining the emotional dynamic weight distribution value of the present invention;

[0060] Figure 4 A flowchart of the steps for obtaining the weight distribution value of the adaptive prompt of the present invention;

[0061] Figure 5 A flowchart of the steps for obtaining the content of the optimized emotional response of the present invention;

[0062] Figure 6 Flowchart of the steps for obtaining the recursive emotion generation response value of the present invention. DETAILED DESCRIPTION

[0063] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0064] In the description of the present invention, it should be understood that the terms "length," "width," "up," "down," "front," "back," "left," "right," "vertical," "horizontal," "top," "bottom," "inside," "outside," and the like, indicating positions or relationships, are based on the positions or relationships shown in the accompanying drawings and are intended only to facilitate the description of the present invention and simplify the description. They do not indicate or imply that the devices or elements referred to must have a specific orientation, be constructed, or operate in a specific orientation. Therefore, they should not be construed as limiting the present invention. Furthermore, in the description of the present invention, "plurality" means two or more, unless otherwise expressly and specifically defined.

[0065] Example 1

[0066] See also Figure 1 The present invention provides a technical solution: an intelligent dialogue generation method based on multi-dimensional sentiment analysis, comprising the following steps:

[0067] S1: Evaluate the emotional efficacy, arousal, and dominance values ​​based on user input, obtain the semantic intensity value through semantic content analysis, merge the emotional preference parameters in the user portrait, calculate the offset variation range of the emotional feature, and generate the emotional offset feature;

[0068] S2: Based on the emotion shift feature, compare the current emotion trend, construct the emotion change matrix, calculate the global emotion change amplitude, smooth the weight value to obtain the emotion weight set of the current round, and generate the emotion dynamic weight distribution value;

[0069] S3: Based on the dynamic emotional weight distribution value, extract the conversation intent classification value, analyze the target tone type, calculate the prompt content weight, check the emotional consistency weight with the conversation context, integrate the prompt content emotion and consistency distribution parameters, adjust the adaptation weight, and generate the adaptation prompt weight distribution value;

[0070] S4: Based on the adaptive prompt weight distribution value, analyze the difference between the emotional feature value in the generated sentence and the target emotional intensity, calculate the adjustment coefficient, dynamically modify the emotional feature parameters of the current sentence, recalibrate the emotional weight matrix of the content, and generate optimized emotional response content;

[0071] S5: Based on the optimization of emotional response content, the progressive emotional change matrix is ​​analyzed, the difference between the progressive parameters and the emotional weight distribution value is compared, the emotional expression smooth curve is reconstructed, and the dynamic smoothing operation is used to generate continuous parameters of multiple rounds of emotional responses, and the recursive emotional generation response value is generated.

[0072] Emotional offset features include emotional effectiveness value offset, arousal value offset, dominance value offset, semantic intensity value change range, and emotional preference parameters. Emotional dynamic weight distribution values ​​include global emotional change amplitude, emotional change matrix, current round emotional weight set, and smoothing weight value. Adaptation prompt weight distribution values ​​include dialogue intention classification value, target tone type, prompt content weight, emotional consistency distribution parameter, and adaptation weight. Optimization of emotional response content includes emotional feature value, target emotional intensity difference, adjustment coefficient, and emotional weight matrix. Recursive emotion generation response values ​​include progressive emotional change matrix, emotional weight distribution value difference, emotional expression smoothing curve, and continuous parameters.

[0073] See also Figure 2 ,The steps for acquiring sentiment offset features are as follows:

[0074] S111: Analyze user input, evaluate the emotional efficacy value, arousal value, and dominance value, and obtain a comprehensive emotional index by calculating the weighted average of the indicators;

[0075] These values ​​are weighted and averaged using weight coefficients to obtain a comprehensive emotional index. The weight coefficients are adjusted based on previous emotional research and user feedback to ensure that each coefficient can reflect the importance of a specific emotional dimension. The weights are adjusted through real-time data monitoring and previous data comparison to ensure that the obtained comprehensive emotional index can truly reflect the user's current emotional state. This method can accurately capture the user's emotional state, thereby providing basic data for subsequent emotional analysis.

[0076] S112: Perform semantic analysis on the text input by the user, extract the semantic strength value, combine it with the comprehensive emotional index, analyze the difference between it and the emotional preference in the user portrait, and obtain the emotional difference value;

[0077] This process uses natural language processing technology to accurately parse language elements, such as keywords and phrases, and match them with preset patterns in the sentiment database to ensure that the emotional tone of the text can be accurately captured. The difference analysis is mainly based on the comparison between semantic intensity and emotional preferences in user portraits. The emotional difference value is calculated through algorithmic calculation. This value reflects the deviation between the user's actual expression and his or her emotional preferences, thereby providing a reference for adjusting personalized content or recommendation systems.

[0078] S113: Based on the emotional difference value and the emotional comprehensive index, the formula is:

[0079]

[0080] Calculate the sentiment offset feature;

[0081] Among them, E represents the emotional deviation feature, E sd Represents the emotional difference value, E ci represents the comprehensive emotional index, a represents the adjustment coefficient of the emotional difference value, which is used to adjust the weight influence of the emotional offset feature on the emotional difference value, b represents the adjustment coefficient of the comprehensive emotional index, which is used to adjust the weight influence of the emotional offset feature on the comprehensive emotional index, and c represents the total adjustment parameter, which is used to normalize the calculation results of the entire formula.

[0082] formula:

[0083]

[0084] The benefit of the formula is that it combines the sentiment difference value E sd and emotional comprehensive index E ci The weighted sum of the weighted parameters a, b, and divisor c can be adjusted to reflect more personalized emotional shift characteristics based on the data analysis results.

[0085] Detailed explanation of the formula and the process of formula calculation and derivation:

[0086] Assumption E sd =0.3, E ci =0.7, weight parameters a=2, b=3, divisor c=5, the calculation process is:

[0087]

[0088] The results show that by weighting the emotional difference value and the emotional comprehensive index, the emotional offset feature obtained is 0.54, which means that there is a certain degree of offset between the user's emotional state and his personalized preferences. This value can be used to analyze the changing trend of user emotions and adjust the recommendation system's response strategy to his emotions.

[0089] See also Figure 3 ,The steps for obtaining the emotional dynamic weight distribution value are as follows:

[0090] S211: By comparing the current emotion trend with the emotion deviation feature, an emotion change matrix is ​​established, multi-unit element values ​​in the matrix are normalized, and an average change value of the normalized matrix is ​​calculated to generate an emotion change amplitude value;

[0091] This process involves converting the raw data of emotional changes into a standard format that can be used for further analysis. Normalization is a necessary step to eliminate scale effects in the data and ensure the accuracy of subsequent processing. After normalization, data comparison and calculation will be more accurate, which provides an accurate data basis for calculating the overall emotional change amplitude. The calculated average change value reflects the average degree of change in emotional state from one time point to another, providing a quantitative evaluation benchmark for subsequent emotional trend analysis.

[0092] S212: Based on the emotion change amplitude value, multiple emotion weight factors are processed through weight smoothing calculation, using the formula:

[0093]

[0094] Calculate the smoothed weight set to generate the sentiment weight set;

[0095] Among them, W i represents the smoothed sentiment weight value, C i represents the initial emotional weight factor, F represents the emotional change amplitude value, P i It represents the emotional preference weight factor associated with the current emotional trend, providing reverse adjustment to balance the intensity of preference. k is the adjustment coefficient, which controls the amplitude of the overall weight adjustment.

[0096] formula:

[0097]

[0098] The formula is beneficial because it adds the sentiment weight factor C i The square root and absolute value processing are performed to enhance the sensitivity of the model to changes in sentiment weights. i The inverse form of is adjusted to increase the adaptability of the model to individual preference differences, and the overall normalization is performed through the k coefficient to make the weight distribution more refined.

[0099] Detailed explanation of the formula and the process of formula calculation and derivation:

[0100] Assume that in a specific case, C i =0.3, F=2.5, P i =0.8, k=3.

[0101] First calculate C i The square root of

[0102] Multiplying by F gives 0.5477·2.5≈1.36925;

[0103] After taking the absolute value, it remains unchanged, and then calculate P i The reciprocal of

[0104] Adding these two parts gives 1.36925 + 1.25 = 2.61925;

[0105] Finally, divide by k to get

[0106] Therefore, the smoothed sentiment weight value W i ≈0.873.

[0107] The result shows that the sentiment weight value after smoothing is 0.873, which will be used for further sentiment analysis to help the system understand and predict the user's emotional state more accurately.

[0108] S213: Performing a normalization operation on the emotion weight set, integrating the dynamic relationship between multiple normalized weights and weight factors, and calculating the emotion dynamic weight distribution value.

[0109] Through standardization, we ensure that all emotional weight values ​​are compared and analyzed on the same scale. This can eliminate the magnitude differences in the original data and make the comparison between weight factors more fair and reasonable. The dynamic relationship between weight factors is integrated by calculating the correlation and interactive influence of weight factors. This process requires accurate grasp of the contribution of each weight factor to the change in emotional state, and calculates the dynamic emotional weight distribution value. This value provides a dynamically adjusted perspective for emotional state analysis, reflecting the dynamic distribution of emotional weights over time and context.

[0110] See also Figure 4 , the steps for obtaining the adaptation prompt weight distribution value are as follows:

[0111] S311: Analyze the dynamic emotional weight distribution value, extract the conversation intention classification value, calculate the weight of the conversation intention and the emotional trend matching, and generate a conversation intention weight set;

[0112] This step relies primarily on existing sentiment data. Conversational intent is identified through natural language processing technology, which involves parsing sentence structure and extracting keywords. Machine learning models, such as decision trees, are also used to classify different conversational intents, such as inquiries, commands, and requests. Furthermore, the classification of conversational intent requires reference to contextual information to ensure classification accuracy. These methods allow accurate extraction of conversational intent from a large number of user conversations, and further adjustments to conversation management strategies based on intent to enhance the user interaction experience. The above processing steps generate a set of conversational intent weights.

[0113] S312: Analyze the target tone type, integrate the conversation intention weight set, use quantitative analysis methods to compare the consistency of the target tone with the context emotion, calculate the tone matching weight, and generate the tone adaptation weight set;

[0114] The parsing of the target tone type relies on the training of a deep learning model. This model learns language patterns of different tones, such as commands, requests, and inquiries, by analyzing a large corpus. The calculation of the tone matching weight is based on the comparison of the parsed target tone type with the tone actually used by the user. Statistical methods, such as frequency analysis, are used to determine the most common tone type. Consistency algorithms, such as cosine similarity, are used to compare the degree of match between the target tone and the contextual emotion. This method allows the system to more accurately evaluate and adjust the tone to adapt to the user's emotional state, improving the naturalness and fluency of the dialogue system. Through this series of calculations and analyses, a set of tone adaptation weights is generated.

[0115] S313: Based on the prompt content weight and the tone adaptation weight set, the formula is used:

[0116]

[0117] Calculate and generate the adaptation prompt weight distribution value;

[0118] Among them, W c It represents the weight obtained based on content analysis, reflecting the importance and influence of the content itself. t Represents the tone matching weight, showing the matching degree between the target tone and the current conversation emotion, W m Indicates the inverse strength of context emotion matching, and adjusts the weight influence by calculating the inverse ratio of the matching degree. p Indicates the adaptation prompt weight distribution value.

[0119] formula:

[0120]

[0121] The benefit of the formula is that by combining the differences between content weight and tone matching weight, adding the inverse strength of contextual emotion matching, and using the square root and absolute value methods, it increases the dynamic responsiveness and adaptability of the calculation, thereby making the prompt weight more in line with the actual conversation situation.

[0122] Detailed explanation of the formula and the process of formula calculation and derivation:

[0123] Set content weight W c =0.6, tone matching weight W t =0.8, the reverse strength W of contextual sentiment matching m =0.5.

[0124]

[0125]

[0126] The results show that by adjusting the weights of tone and content, and considering feedback on emotional consistency, we can obtain an adaptation prompt weight distribution value that comprehensively considers multiple factors. This helps improve the effectiveness of the dialogue system in practical applications and enables the system to more flexibly adapt to the emotional and contextual needs of different users.

[0127] See also Figure 5 ,The specific steps for optimizing the acquisition of emotional response content are:

[0128] S411: Based on the adaptation prompt weight distribution value, perform sentiment feature value analysis on the generated sentence, compare the sentiment feature value with the preset target sentiment intensity, identify the difference between the two, calculate the difference index, and generate a sentiment difference evaluation result;

[0129] Through a detailed sentiment analysis process, the specific differences between the current emotional state and the expected emotional expression are determined. Calculating these differences will help determine the direction and intensity of the next adjustment, ensuring that the sentence expression is closer to the user's actual emotional state. The emotional labels involved in sentiment analysis include joy, anger, sorrow, and happiness. Through quantitative sentiment analysis models, such as the sentiment intensity detection algorithm, accurate quantification of sentiment intensity is achieved. This process includes the weight allocation of sentiment words and the accumulation of sentiment intensity. The generated sentiment difference assessment results will directly affect the subsequent sentiment adjustment strategy.

[0130] S412: Quantitatively calculate the required adjustment coefficients based on the sentiment difference assessment results, dynamically adjust the sentiment feature parameters of the current sentence, and generate a set of adjustment coefficients;

[0131] This step involves complex mathematical calculations and adjustment of the sentiment model. The calculation of the adjustment coefficient is based on multi-factor analysis, including the size of the sentiment difference, user feedback, and sentiment trend analysis. The determination of the adjustment coefficient is completed through a series of optimization algorithms, such as the gradient descent method, to ensure that the adjusted sentiment expression is as close to the user's true feelings as possible. The specific value of the adjustment coefficient is determined by the actual measurement value of the sentiment difference. The parameters involved in this process include sentiment difference measurement, user feedback sensitivity, etc. The generated adjustment coefficient set will be used for the next step of dynamic adjustment of sentiment features.

[0132] S413: Apply the adjustment coefficient set to modify the emotional feature parameters of the current sentence using the formula:

[0133]

[0134] By adjusting the index of the difference value, the emotional parameters are optimized, the emotions are adjusted, and the adjusted emotional feature results are generated;

[0135] Among them, E old represents the original emotional feature value, which refers to the quantitative value of the emotional state before sentence analysis. ΔE represents the difference in emotional intensity, which measures the gap between the current emotional state and the target emotional state. α represents the main adjustment coefficient, which is used to amplify or reduce the impact of emotional adjustment. β represents the adjustment coefficient, which adjusts the impact of ΔE to make the emotional adjustment smoother and avoid sudden changes.

[0136] formula:

[0137]

[0138] The benefit of the formula is that it allows for fine-grained control of the sensitivity of emotional adjustment through the adjustment factors α and β, adapting to different degrees of emotional differences, thereby achieving more refined adjustment of emotional expression.

[0139] Detailed explanation of the formula and the process of formula calculation and derivation:

[0140] Assume that the original emotional feature value E old =0.5, emotional difference ΔE=0.3, and adjustment factors α=2 and β=5.

[0141] 1. Calculate the exponential part: e -β·ΔE =e -5×0.3 =e -1.5 ≈0.2231;

[0142] 2. Calculate the denominator: 1 + 0.2231 = 1.2231;

[0143] 3. Calculate the total adjustment:

[0144] 4. Calculate E new =0.5+0.490=0.99;

[0145] The results show that by applying this formula, the emotional feature value is adjusted from 0.5 to close to 1, which significantly enhances the emotional expression intensity and brings it closer to the target emotional intensity, demonstrating the practicality and effectiveness of the formula in adjusting emotional feature parameters.

[0146] S414: Using the adjusted emotional feature results, recalculate and calibrate the emotional weight matrix of the content, integrate all related emotional data, and generate optimized emotional response content.

[0147] This process involves advanced data integration technology and sentiment analysis methods. The calibration of the sentiment weight matrix is ​​based on the latest sentiment feature parameters, which are dynamically updated through advanced sentiment analysis models. The calibration process takes into account multiple factors, such as contextual relevance, coherence of language expression, and user interaction. Complex algorithms are used to ensure the rationality of the sentiment weight distribution. These algorithms include linear regression analysis, classification algorithms in machine learning, etc. The adjusted sentiment weight matrix is ​​used to generate highly targeted and responsive sentiment response content, so that it can more accurately reflect and respond to users' emotional needs. The generated optimized sentiment response content is closer to user expectations, thereby improving user satisfaction and system interaction efficiency.

[0148] See also Figure 6 ,The specific steps for obtaining the recursive emotion generation response value are:

[0149] S511: Based on the optimized emotional response content, the progressive emotional change matrix is ​​analyzed, the changes in emotional state after each round of dialogue are recorded, and the progressive values ​​of emotional intensity are obtained by calculation to generate emotional progressive parameters;

[0150] The calculation process based on the emotional progression parameters involves extracting detailed data on changes in emotional states from continuous conversations. This data is processed by specialized sentiment analysis tools, and the frequency and intensity of emotional words in the text are analyzed using natural language processing technology to construct a serialized representation of the emotional state. This method not only extracts the emotional component of each conversation, but also compares the gradual changes in emotions, thus laying the data foundation for the next step of calculating the emotional progression parameters. This process ensures the accuracy and continuity of the obtained data, so that the subsequent adjustment of the emotional weight can more accurately reflect the actual emotional transition.

[0151] S512: Compare the sentiment progression parameter with the existing sentiment weight distribution value, identify and quantify the difference between the two, calculate the difference index through comparative analysis, and generate a sentiment weight difference result;

[0152] By comparing with the existing emotion weight distribution values, detailed comparison and analysis, especially by calculating the change value and standard deviation of emotion intensity, the specific degree and trend of emotion change can be quantified. The mathematical models used in this process include linear regression and standard deviation calculation, which are all based on actual monitoring data. Through this method, a quantitative emotion weight difference result is obtained, which provides a quantitative basis for adjusting emotion expression.

[0153] S513: Based on the emotion weight difference results, the emotion expression smooth curve is reconstructed using the formula:

[0154]

[0155] Adjust the emotional intensity of each point, make a natural transition of emotional expression, and generate a smooth curve of emotional expression;

[0156] Among them, S new Represents the smooth curve of emotional expression, S old Represents the original emotional expression curve, representing the emotional output before adjustment, S target represents the target emotional state, α i is the coefficient adjusted based on the sentiment difference, k is the smoothing adjustment parameter, and n represents the number of sentiment points involved in the calculation;

[0157] formula:

[0158]

[0159] The benefit of the formula is that it allows for dynamic smoothing of emotional transitions by recursively calculating the emotional state at each time point, achieving natural fluency in emotional expression regardless of the magnitude of the emotional change.

[0160] Detailed explanation of the formula and the process of formula calculation and derivation:

[0161] Assume that the emotional state changes from neutral (0) to happy (1) during a conversation. The original emotional state S old =0, target emotional state S target =1, adjustment coefficient α = 0.5, smoothing parameter k = 0.1, and the formula is used for calculation:

[0162] First evaluate each expression

[0163] Then add up all the items to get S new =0+0.452=0.452;

[0164] This approach allows us to see how gradual adjustments in affective states are achieved. This result demonstrates that the formula successfully models gradual changes in affective states, providing a computational basis for refining affective responses.

[0165] S514: Using the emotion expression smoothing curve, a dynamic smoothing operation is performed to continuously adjust the emotion response parameters in multiple rounds of dialogue to generate a recursive emotion generation response value.

[0166] Through dynamic smoothing operations, continuous emotional response parameters are integrated into a multi-level emotional change matrix. In this process, the emotional response values ​​of each round of dialogue are first collected, and then these emotional data are smoothed using time series analysis techniques, such as moving average or exponential smoothing methods, to ensure the continuity and smoothness of emotions. In addition, by gradually adjusting the smoothing parameters, it is possible to observe how the emotional response curve changes under different parameter settings, thereby selecting the smoothing strategy that best suits the current dialogue scenario and ensuring that emotional expression is highly consistent with the actual emotional state. This method not only enhances the adaptability of the model, but also optimizes the naturalness of emotional interaction.

[0167] An intelligent dialogue generation system based on multidimensional sentiment analysis is used to execute the above-mentioned intelligent dialogue generation method based on multidimensional sentiment analysis. The system includes:

[0168] The emotional feature extraction module evaluates the emotional value, arousal value, and dominance value based on the text content input by the user, analyzes the semantic strength value of the text, combines the emotional preference parameters in the user profile, analyzes the extraction results, calculates the offset variation range of the emotional feature, and generates the emotional offset feature;

[0169] The sentiment weight distribution module compares the sentiment trend of the current input text based on the sentiment offset feature, establishes a sentiment change matrix, calculates the global sentiment change amplitude, performs smoothing processing, obtains the current round sentiment weight set, performs distribution analysis, and generates the sentiment dynamic weight distribution value;

[0170] The adaptation prompt generation module extracts the target intent classification and target tone type based on the emotional dynamic weight distribution value, calculates the emotional weight of the prompt content, performs context consistency verification, adjusts the adaptation weight, and generates the adaptation prompt weight distribution value;

[0171] The recursive emotion optimization module calculates the difference between the emotion feature value in the generated sentence and the target emotion intensity based on the adaptation prompt weight distribution value, adjusts the difference value, dynamically modifies the emotion feature parameters, recalibrates the emotion weight matrix, and generates the recursive emotion generation response value.

[0172] The above are merely preferred embodiments of the present invention and do not limit the present invention in any other form. Any technician familiar with the profession may use the technical content disclosed above to change or modify it into an equivalent embodiment with equivalent changes and apply it to other fields. However, any simple modification, equivalent change and modification made to the above embodiment based on the technical essence of the present invention without departing from the content of the technical solution of the present invention shall still fall within the scope of protection of the technical solution of the present invention.

Claims

1. An intelligent dialogue generation method based on multi-dimensional sentiment analysis, characterized in that: The following steps are involved: Evaluate the emotional effectiveness, arousal, and dominance values ​​through user input, obtain the semantic strength value through semantic content analysis, merge the emotional preference parameters in the user portrait, calculate the offset variation range of the emotional feature, and generate the emotional offset feature; The steps for obtaining the emotion shift feature are specifically as follows: Analyze user input, evaluate emotional effectiveness, arousal, and dominance, and calculate the weighted average of the indicators to obtain a comprehensive emotional index; Performing semantic analysis on the text input by the user, extracting the semantic strength value, combining it with the emotional comprehensive index, analyzing the difference between it and the emotional preference in the user portrait, and obtaining the emotional difference value; Based on the emotional difference value and the emotional comprehensive index, the formula is adopted: ; Calculate the sentiment offset feature; in, Represents the emotional deviation feature, represents the sentiment difference value, represents the comprehensive emotional index, a represents the adjustment coefficient of the emotional difference value, which is used to adjust the weight of the emotional difference value on the emotional offset feature. Represents the adjustment coefficient of the comprehensive emotional index, which is used to adjust the weight of the comprehensive emotional index on the emotional deviation feature. Represents the total adjustment parameter, which is used to normalize the calculation results of the entire formula; Based on the emotion shift feature, the current emotion trend is compared, an emotion change matrix is ​​constructed, the global emotion change amplitude is calculated, the weight value is smoothed to obtain the emotion weight set of the current round, and an emotion dynamic weight distribution value is generated; The steps for obtaining the emotional dynamic weight distribution value are specifically as follows: By comparing the current emotional trend with the emotional deviation characteristics, an emotional change matrix is ​​established, multi-unit element values ​​in the matrix are normalized, and an average change value of the normalized matrix is ​​calculated to generate an emotional change amplitude value; Based on the emotion change amplitude value, the multi-emotion weight factor is processed by weight smoothing calculation, using the formula: ; Calculate the smoothed weight set to generate the sentiment weight set; in, represents the smoothed sentiment weight value, represents the initial sentiment weight factor, Indicates the magnitude of emotional change. Represents the sentiment preference weight factor associated with the current sentiment trend, providing reverse adjustment to balance the strength of preference, is the adjustment coefficient, which controls the amplitude of the overall weight adjustment; The emotional weight set is normalized, the dynamic relationship between multiple normalized weights and weight factors is integrated, and the emotional dynamic weight distribution value is calculated; Based on the emotional dynamic weight distribution value, the conversation intention classification value is extracted, the target tone type is analyzed, the prompt content weight is calculated, and the emotional consistency weight is checked with the conversation context. The prompt content emotion and consistency distribution parameters are integrated, the adaptation weight is adjusted, and an adaptation prompt weight distribution value is generated; The steps for obtaining the adaptation prompt weight distribution value are specifically as follows: By analyzing the emotional dynamic weight distribution value, extracting the conversation intention classification value, calculating the weight of the conversation intention and the emotional trend matching, and generating a conversation intention weight set; Analyze the target tone type, synthesize the conversation intention weight set, use quantitative analysis methods to compare the consistency of the target tone with the context emotion, calculate the tone matching weight, and generate the tone adaptation weight set; According to the prompt content weight, combined with the tone adaptation weight set, the formula is adopted: ; Calculate and generate the adaptation prompt weight distribution value; in, It represents the weight obtained based on content analysis, reflecting the importance and influence of the content itself. Represents the tone matching weight, which shows the degree of matching between the target tone and the current conversation emotion. Indicates the inverse strength of context emotion matching, and adjusts the weight influence by calculating the inverse ratio of the matching degree. Indicates the weight distribution value of the adaptation prompt; Based on the adaptation prompt weight distribution value, the difference between the emotional feature value in the generated sentence and the target emotional intensity is analyzed, the adjustment coefficient is calculated, the emotional feature parameters of the current sentence are dynamically corrected, the emotional weight matrix of the content is recalibrated, and the optimized emotional response content is generated; The steps for obtaining the optimized emotional response content are specifically as follows: Based on the adaptation prompt weight distribution value, the generated sentence is analyzed for emotional feature values, the emotional feature values ​​are compared with the preset target emotional intensity, the difference between the two is identified, the difference index is calculated, and the emotional difference evaluation result is generated; According to the emotion difference evaluation result, quantitatively calculate the required adjustment coefficient, dynamically adjust the emotion feature parameters of the current sentence, and generate an adjustment coefficient set; Apply the adjustment coefficient set to modify the emotional feature parameters of the current sentence using the formula: ; By adjusting the index of the difference value, the emotional parameters are optimized, the emotions are adjusted, and the adjusted emotional feature results are generated; in, Represents the original emotional feature value, which refers to the quantitative value of the emotional state before sentence analysis. Indicates the difference in emotional intensity, measuring the gap between the current emotional state and the target emotional state, Represents the main adjustment coefficient, which is used to amplify or reduce the impact of emotional adjustment. Indicates the adjustment coefficient, adjustment the impact of; Using the adjusted emotional feature results, recalculating and calibrating the emotional weight matrix of the content, integrating all related emotional data, and generating optimized emotional response content; Based on the optimized emotional response content, the progressive emotional change matrix is ​​analyzed, the difference between the progressive parameters and the emotional weight distribution value is compared, the emotional expression smooth curve is reconstructed, and the continuous parameters of multiple rounds of emotional responses are generated by dynamic smoothing operation to generate a recursive emotional generation response value; The steps for obtaining the recursive emotion generation response value are specifically as follows: Based on the optimized emotional response content, the progressive emotional change matrix is ​​analyzed, the changes in emotional state after each round of dialogue are recorded, and the progressive values ​​of emotional intensity are obtained by calculation to generate emotional progressive parameters; Comparing the sentiment progression parameter with the existing sentiment weight distribution value, identifying and quantifying the difference between the two, calculating the difference index through comparative analysis, and generating a sentiment weight difference result; According to the emotion weight difference results, the emotion expression smooth curve is reconstructed using the formula: ; Adjust the emotional intensity of each point, make a natural transition of emotional expression, and generate a smooth curve of emotional expression; in, Indicates a smooth curve of emotional expression, Represents the original emotional expression curve, representing the emotional output before adjustment, represents the target emotional state, is a coefficient adjusted based on sentiment differences, is the smoothing adjustment parameter, Represents the number of emotion points involved in the calculation; The emotion expression smoothing curve is used to perform dynamic smoothing operations, continuously adjust emotion response parameters in multiple rounds of dialogue, and generate recursive emotion generation response values.

2. The intelligent dialogue generation method based on multidimensional sentiment analysis according to claim 1 is characterized in that: The emotional offset features include emotional effectiveness value offset, arousal value offset, dominance value offset, semantic intensity value change range, and emotional preference parameters. The emotional dynamic weight distribution value includes the global emotional change amplitude, emotional change matrix, current round emotional weight set, and smoothing weight value. The adaptation prompt weight distribution value includes the dialogue intention classification value, target tone type, prompt content weight, emotional consistency distribution parameter, and adaptation weight. The optimized emotional response content includes emotional feature value, target emotional intensity difference, adjustment coefficient, and emotional weight matrix. The recursive emotional generation response value includes progressive emotional change matrix, emotional weight distribution value difference, emotional expression smoothing curve, and continuous parameter.

3. Intelligent dialogue generation system based on multi-dimensional sentiment analysis, characterized by: The method for generating intelligent dialogue based on multidimensional sentiment analysis according to any one of claims 1 to 2, wherein the system comprises: The emotional feature extraction module evaluates the emotional value, arousal value, and dominance value based on the text content input by the user, analyzes the semantic strength value of the text, combines the emotional preference parameters in the user profile, analyzes the extraction results, calculates the offset variation range of the emotional feature, and generates the emotional offset feature; The sentiment weight distribution module compares the sentiment trend of the current input text based on the sentiment shift feature, establishes a sentiment change matrix, calculates the global sentiment change amplitude, performs smoothing processing, obtains the current round sentiment weight set, performs distribution analysis, and generates a sentiment dynamic weight distribution value; The adaptation prompt generation module extracts the target intent classification and target tone type based on the emotional dynamic weight distribution value, calculates the emotional weight of the prompt content, performs context consistency check, adjusts the adaptation weight, and generates an adaptation prompt weight distribution value; The recursive emotion optimization module analyzes the difference between the emotion feature value in the generated sentence and the target emotion intensity based on the adaptation prompt weight distribution value, calculates the adjustment coefficient, dynamically modifies the emotion feature parameters of the current sentence, recalibrates the emotion weight matrix of the content, and generates optimized emotion response content; The recursive emotion generation module analyzes the progressive emotion change matrix based on the optimized emotion response content, compares the difference between the progressive parameters and the emotion weight distribution value, reconstructs the emotion expression smooth curve, dynamically smoothes the operation to generate continuous parameters of multiple rounds of emotion responses, and generates a recursive emotion generation response value.

Citation Information

Patent Citations

  • Intelligent calling method based on large language model

    CN117336410A

  • Agent system

    JP2024159687A