Dialogue sentiment analysis method and device, computer equipment and storage medium

By obtaining the scoring consistency of human experts and scoring models and determining the target scoring strategy, the problem of subjective bias in sentiment analysis and insufficient understanding of AI models in delicate emotional expression is solved, and the accuracy and efficiency of sentiment analysis results are improved.

CN120144976APending Publication Date: 2025-06-13SHENZHEN YUANZHI INFORMATION TECHNOLOGY DEVELOPMENT CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510146273.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-08
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

In the prior art, the analysis and labeling of emotional companion dialogues rely on subjective assessments by human experts, and there are inconsistencies. Moreover, the AI ​​model lacks understanding and accuracy in delicate emotional expressions (such as humor, irony, etc.), resulting in low efficiency and accuracy of emotional analysis results.

Method used

By obtaining the score consistency of human experts and preset scoring models in each preset evaluation dimension of emotional companion dialogue, the target scoring strategy is determined, and based on this strategy, the sentiment analysis results are obtained.

Benefits of technology

The subjective bias in sentiment analysis is reduced, the accuracy of evaluation results is improved, and the scoring efficiency and accuracy are improved by determining the optimal scoring strategy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120144976A_ABST
    Figure CN120144976A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of sentiment analysis, and particularly discloses a dialogue sentiment analysis method and device, computer equipment and a storage medium. Obtaining the score consistency of the human experts and a preset scoring model in each preset evaluation dimension of the emotion accompanying dialogue, and determining a target scoring strategy of the emotion accompanying dialogue in each dimension based on a consistency threshold value; and based on the target scoring strategy, scoring the emotional accompanying dialogue, obtaining a dimension score of the emotional accompanying dialogue in each preset evaluation dimension, and generating an emotional analysis result of the emotional accompanying dialogue. According to the method, the score consistency is obtained by performing consistency evaluation on the scores of the human experts and the scoring model, so that the subjective deviation in emotion analysis is reduced, and the accuracy of the evaluation result is improved; and secondly, the optimal scoring strategy is determined as the target scoring strategy according to the consistency threshold and the scoring consistency, so that each preset evaluation dimension has the optimal scoring strategy, and then the scoring efficiency and accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of sentiment analysis, and particularly to a method, device, computer device, and storage medium for analyzing dialogue sentiment. Background Art

[0002] The current analysis and annotation work of emotional companion conversations is widely applied in fields such as intelligent chatbots and virtual assistants. In the prior art, the annotation of emotional companion conversation data mainly relies on the subjective evaluation of human experts. Due to the differences in subjective consciousness among different experts, there are inconsistencies in the evaluation results among experts, and the emotional analysis and annotation efficiency of human experts is relatively low. In addition, although the application of AI (Artificial Intelligence) models in sentiment analysis has gradually matured, the sentiment analysis of AI models mainly relies on deep learning algorithms, which identify and predict sentiment tendencies through a large amount of training data, and lack sufficient understanding and accuracy for some delicate emotional expressions (such as humor, sarcasm, etc.).

[0003] Therefore, how to improve the efficiency of sentiment analysis results while ensuring the accuracy of sentiment analysis results has become an urgent problem to be solved. Summary of the Invention

[0004] This application provides a method, device, computer device, and storage medium for analyzing dialogue sentiment to ensure the accuracy of sentiment analysis results while improving the efficiency of sentiment analysis results.

[0005] In the first aspect, this application provides a method for analyzing dialogue sentiment, and the method includes:

[0006] Obtain the scoring consistency of human experts and a preset scoring model in each preset evaluation dimension of an emotional companion conversation;

[0007] Based on a preset consistency threshold and the scoring consistency, determine the target scoring strategy for the emotional companion conversation in each preset evaluation dimension;

[0008] Based on the target scoring strategy, score the emotional companion conversation to obtain the dimension scores of the emotional companion conversation in each preset evaluation dimension, and based on the dimension scores of each preset evaluation dimension, obtain the sentiment analysis result of the emotional companion conversation.

[0009] In the second aspect, this application also provides a device for analyzing dialogue sentiment, and the device includes:

[0010] A scoring consistency acquisition module, configured to obtain the scoring consistency of human experts and a preset scoring model in each preset evaluation dimension of an emotional companion conversation;

[0011] A target scoring strategy determination module, configured to determine a target scoring strategy for the emotional companionship dialogue in each preset evaluation dimension based on a preset consistency threshold and the scoring consistency;

[0012] An emotional analysis result obtaining module, configured to score the emotional companionship dialogue based on the target scoring strategy, obtain a dimension score of the emotional companionship dialogue in each preset evaluation dimension, and obtain an emotional analysis result of the emotional companionship dialogue based on the dimension scores of each preset evaluation dimension.

[0013] In a third aspect, the present application further provides a computer device, which includes a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and implement the dialogue emotional analysis method as described above when executing the computer program.

[0014] In a fourth aspect, the present application further provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the processor is caused to implement the dialogue emotional analysis method as described above.

[0015] The present application discloses a dialogue emotional analysis method, device, computer device and storage medium, which obtains the scoring consistency of a human expert and a preset scoring model in each preset evaluation dimension of an emotional companionship dialogue; determines the target scoring strategy of the emotional companionship dialogue in each preset evaluation dimension based on a preset consistency threshold and the scoring consistency; scores the emotional companionship dialogue based on the target scoring strategy, obtains the dimension score of the emotional companionship dialogue in each preset evaluation dimension, and obtains the emotional analysis result of the emotional companionship dialogue based on the dimension scores of each preset evaluation dimension. By evaluating the consistency of the scores of a human expert and a scoring model, the present application obtains the scoring consistency, reduces the subjective deviation in emotional analysis, and improves the accuracy of the evaluation result; secondly, determining the optimal scoring strategy as the target scoring strategy according to the consistency threshold and the scoring consistency can enable each preset evaluation dimension to have an optimal scoring strategy, thereby improving the scoring efficiency and accuracy. Description of the Drawings

[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0017] Figure 1 It is a schematic flowchart of a dialogue emotional analysis method provided by the first embodiment of the present application;

[0018] Figure 2 It is a schematic flowchart of a dialogue sentiment analysis method provided by the second embodiment of the present application;

[0019] Figure 3 It is a schematic block diagram of a dialogue sentiment analysis device provided by an embodiment of the present application;

[0020] Figure 4 It is a schematic block diagram of the structure of a computer device provided by an embodiment of the present application. Detailed implementation manners

[0021] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0022] The flowchart shown in the accompanying drawings is only an example illustration, and does not necessarily include all the content and operations / steps, nor does it necessarily execute in the described order. For example, some operations / steps can also be decomposed, combined, or partially merged. Therefore, the actual execution order may be changed according to the actual situation.

[0023] It should be understood that the terms used in the specification of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the specification of the present application and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an", and "the" are intended to include the plural forms.

[0024] It should also be understood that the term "and / or" used in the specification of the present application and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0025] Embodiments of the present application provide a dialogue sentiment analysis method, device, computer device, and storage medium. Among them, the dialogue sentiment analysis method can be applied to a server. By evaluating the consistency of the scores of human experts and the scoring model, the scoring consistency is obtained, reducing the subjective deviation in sentiment analysis and improving the accuracy of the evaluation results. Secondly, determining the optimal scoring strategy as the target scoring strategy according to the consistency threshold and the scoring consistency can ensure that each preset evaluation dimension has an optimal scoring strategy, thereby improving the scoring efficiency and accuracy. Among them, the server can be an independent server or a server cluster.

[0026] The following will describe in detail some embodiments of the present application with reference to the accompanying drawings. Without conflict, the following embodiments and the features in the embodiments can be combined with each other.

[0027] Please refer to Figure 1 , Figure 1 which is a schematic flowchart of a dialogue sentiment analysis method provided by the first embodiment of the present application.

[0028] As Figure 1 shown, the dialogue sentiment analysis method specifically includes steps S101 to S103.

[0029] S101. Obtain the scoring consistency of human experts and a preset scoring model in each preset evaluation dimension of the emotional companionship dialogue;

[0030] Further, the obtaining of the scoring consistency of human experts and a preset scoring model in each preset evaluation dimension of the emotional companionship dialogue includes: obtaining the historical expert scores and historical model scores of historical dialogues in each preset evaluation dimension; based on a preset consistency evaluation algorithm, processing the historical expert scores and the historical model scores to obtain the scoring consistency of human experts and the preset scoring model in each preset evaluation dimension.

[0031] In one embodiment, the emotional companionship dialogue includes single-round dialogue, multi-round dialogue, long dialogue and short dialogue, character-set dialogue and plot dialogue, etc.

[0032] In one embodiment, the preset evaluation dimensions may include interestingness, colloquialism, content richness, interactivity, etc.

[0033] In one embodiment, a scoring model is used to automatically score the emotional companionship dialogue. The scoring model is based on a pre-trained large-scale sentiment analysis and language understanding model, and comprehensively evaluates the dialogue through multiple dimensions such as tone, emotional fluctuation, and discourse structure. On this basis, for a specific emotional companionship dialogue task, the AI model not only analyzes the emotional tendency, but also gives a separate score for each dimension such as the interactivity, interestingness, colloquialism, and content richness of the dialogue.

[0034] Obtain the annotation and scoring of human experts for the same batch of historical dialogues. Human experts mainly conduct a comprehensive evaluation from perspectives such as emotional expression, dialogue coherence, and interaction quality. When annotating, human experts will conduct detailed scoring and annotation for each dimension of each dialogue according to the preset evaluation dimensions.

[0035] The scores of the scoring model and human experts can be aggregated through weighted voting, and the scoring consistency of the scoring model and human experts can be calculated. Specifically, the scoring consistency of the historical expert scores and the historical model scores can be calculated according to the consistency evaluation algorithm.

[0036] In one embodiment, the consistency evaluation algorithm can be Pearson correlation coefficient, intra-class correlation coefficient, Kappa consistency test, percentage consistency, etc.

[0037] In another embodiment, data preprocessing can also be performed on historical conversations to remove missing values and outliers, and standardize the scoring data to the same scale, such as between 0 and 1.

[0038] S102. Determine the target scoring strategy of the emotional companionship conversation in each preset evaluation dimension based on the preset consistency threshold and the scoring consistency;

[0039] Further, the consistency threshold includes a first preset threshold and a second preset threshold. The determining the target scoring strategy of the emotional companionship conversation in each preset evaluation dimension based on the preset consistency threshold and the scoring consistency includes: when the scoring consistency is less than the first preset threshold and greater than or equal to the second preset threshold, using the preset fusion scoring strategy as the target scoring strategy; when the scoring consistency is greater than or equal to the first preset threshold, using the preset model scoring strategy as the target scoring strategy.

[0040] In one embodiment, the first preset threshold is a relatively high threshold, indicating a very high scoring consistency. The second preset threshold is a relatively low threshold, indicating a medium scoring consistency.

[0041] In one embodiment, when the scoring consistency is greater than or equal to the first preset threshold, it indicates that the scoring consistency is very high, that is, the score of the AI scoring model is highly consistent with the score of the human expert. At this time, using the model scoring strategy as the target scoring strategy, the model scoring strategy can directly use the score of the AI scoring model as the final score to avoid the time cost of expert scoring and improve the scoring efficiency.

[0042] In one embodiment, when the scoring consistency is less than the first preset threshold and greater than or equal to the second preset threshold, it indicates that the scoring consistency is medium, that is, there are certain differences between the score of the AI scoring model and the score of the human expert, but it still has certain reference value. At this time, using the fusion scoring strategy as the target scoring strategy, the fusion scoring strategy combines the scores of the AI scoring model and the human expert to obtain a more reliable scoring result and improve the accuracy of the scoring result.

[0043] Further, after obtaining the scoring consistency of the human expert and the preset scoring model in each preset evaluation dimension of the emotional companionship conversation, it further includes: when the scoring consistency is less than the second preset threshold, optimizing the scoring model based on the historical expert scores until the scoring consistency is greater than or equal to the second preset threshold.

[0044] In one embodiment, when the scoring consistency is less than the second preset threshold, it indicates that the scoring consistency is low. That is, the score of the AI scoring model is significantly inconsistent with the score of the human expert. At this time, further investigation or multiple votes are required to ensure the reliability of the evaluation. In addition, the historical expert scores can also be used to guide the alignment of the AI scoring model with the human expert, so that it outputs a unified judgment score as much as possible.

[0045] Specifically, the historical expert scores of the human experts need to be fed back to the AI scoring model, and these feedbacks are used as new training data to retrain the AI model with new labeled data and adjust the model parameters. The validation set is used to evaluate the consistency between the scores of the retrained scoring model and the scores of the human experts until the scoring consistency is greater than or equal to the second preset threshold to ensure the improvement effect of the model.

[0046] S103. Based on the target scoring strategy, score the emotional companionship dialogue to obtain the dimension scores of the emotional companionship dialogue in each preset evaluation dimension, and based on the dimension scores of each preset evaluation dimension, obtain the emotional analysis result of the emotional companionship dialogue.

[0047] In one embodiment, according to the target scoring strategy of each preset evaluation dimension, score the emotional companionship dialogue to obtain the dimension scores of each dimension of the emotional companionship dialogue.

[0048] Specifically, if the target scoring strategy of the current preset evaluation dimension is the model scoring strategy, then use the scoring model to score the emotional companionship dialogue to obtain the dimension score of the current preset evaluation dimension. If the target scoring strategy of the current preset evaluation dimension is the fusion scoring strategy, then calculate the weighted scores of the human expert and the scoring model to obtain the final score of the current preset evaluation dimension.

[0049] Further, after scoring the emotional companionship dialogue based on the target scoring strategy to obtain the dimension scores of the emotional companionship dialogue in each preset evaluation dimension and obtaining the emotional analysis result of the emotional companionship dialogue based on the dimension scores of each preset evaluation dimension, it further includes: obtaining the user's emotional companionship needs; based on the emotional analysis result and the user's emotional companionship needs, screening the emotional companionship dialogue to obtain the target emotional companionship dialogue that meets the user's emotional companionship needs.

[0050] In one embodiment, the emotional companionship needs of the user are obtained. Specifically, the input content of the user is classified emotionally, such as happy, sad, angry, anxious, etc., the intensity of the user's emotion is evaluated, such as slight, medium, strong. Finally, the specific needs of the user are identified, such as the need for comfort, encouragement, advice, etc. For example, when the user inputs "I am very sad today", it can be analyzed that the current emotional classification of the user is "sad", the intensity is "medium", and the emotional companionship need is "comfort".

[0051] In one embodiment, the emotional companionship dialogues can be stored in an emotional companionship dialogue set, and the emotional analysis results are marked for each emotional companionship dialogue in the emotional companionship dialogue set.

[0052] According to the emotional state and needs of the user, selections are made from the emotional companionship dialogue set to dynamically generate emotional companionship dialogues. Specifically, according to the emotional classification of the user and the emotional analysis results of each emotional companionship dialogue in the emotional companionship dialogue set, the dialogues that match the user's emotional state are screened out. According to the specific needs of the user, among the dialogues that match the user's emotional state, the dialogues that can meet the user's needs are screened out. According to the intensity of the user's emotion, the tone and content of the selected dialogues are adjusted to make them more in line with the user's emotional intensity.

[0053] The above embodiment provides a method, device, computer device and storage medium for dialogue emotional analysis, which obtains the scoring consistency of human experts and a preset scoring model in each preset evaluation dimension of the emotional companionship dialogue; based on the preset consistency threshold and the scoring consistency, determines the target scoring strategy of the emotional companionship dialogue in each preset evaluation dimension; based on the target scoring strategy, scores the emotional companionship dialogue to obtain the dimension scores of the emotional companionship dialogue in each preset evaluation dimension, and based on the dimension scores of each preset evaluation dimension, obtains the emotional analysis result of the emotional companionship dialogue. Through the consistency evaluation of the scores of human experts and the scoring model in the present application, the scoring consistency is obtained, reducing the subjective deviation in emotional analysis and improving the accuracy of the evaluation results; secondly, according to the consistency threshold and the scoring consistency, the optimal scoring strategy is determined as the target scoring strategy, which can make each preset evaluation dimension have an optimal scoring strategy, thereby improving the scoring efficiency and accuracy.

[0054] Please refer to Figure 2 , Figure 2 which is a schematic flowchart of a method for dialogue emotional analysis provided by the second embodiment of the present application.

[0055] As Figure 2 shown, the method for dialogue emotional analysis specifically includes steps S201 to S204.

[0056] S201. When the target scoring strategy for the preset evaluation dimension is the fusion scoring strategy, obtain the model score of the scoring model for the preset evaluation dimension and the expert score of the human expert for the preset evaluation dimension;

[0057] S202. Obtain the first evaluation accuracy of the scoring model for the preset evaluation dimension and the second evaluation accuracy of the human expert for the preset evaluation dimension;

[0058] S203. Based on a preset accuracy threshold, the first evaluation accuracy, and the second evaluation accuracy, determine the first weight coefficient of the model score and the second weight coefficient of the expert score;

[0059] S204. Based on the first weight coefficient and the second weight coefficient, weight the model score and the expert score to obtain the dimension score of the emotional companionship dialogue for the preset evaluation dimension.

[0060] In one embodiment, obtain the historical score data of the scoring model and the human expert for historical dialogues in each preset evaluation dimension. Calculate the evaluation accuracy according to the score data. Specifically, it can be determined whether the evaluations of the scoring model and the human expert are accurate through user feedback, and then the evaluation accuracy is calculated.

[0061] It can be understood that for emotional annotation tasks in different fields, the accuracy of the scoring model and the accuracy of the human expert are different. Therefore, the scores of the scoring model and the human expert are weighted. For dimensions with a higher accuracy of the scoring model, the weight of the scoring model is larger; while for dimensions with a more obvious preference of the human expert for annotation, the weight of the expert score is larger.

[0062] For example, a weight calculation formula can be used to calculate the first weight coefficient of the scoring model and the second weight coefficient of the human expert. When the first evaluation accuracy is equal to the second evaluation accuracy, the first weight coefficient w 1 and the second weight coefficient w 2 The calculation formula can be:

[0063]

[0064] where A 1 is the first evaluation accuracy of the scoring model, and A 2 is the second evaluation accuracy of the human expert.

[0065] To improve the accuracy of the fusion result of the scores of the scoring model and the human expert, adjust the above formula according to the magnitudes of the first evaluation accuracy and the second evaluation accuracy to obtain the optimal first weight coefficient and second weight coefficient.

[0066] When the first evaluation accuracy is greater than the second evaluation accuracy, it indicates that the scoring model is more accurate than the human expert evaluation. Then, increase the weight of the model score. At this time, the first weight coefficient w 1 and the second weight coefficient w 2 can be calculated by the following formulas:

[0067]

[0068] When the first evaluation accuracy is less than the second evaluation accuracy, it indicates that the human expert is more accurate than the scoring model. Then, increase the weight of the expert score. At this time, the first weight coefficient w 1 and the second weight coefficient w 2 can be calculated by the following formulas:

[0069]

[0070] In one embodiment, use the calculated weight coefficients to weight the model score and the expert score to obtain the dimension scores of each preset evaluation dimension finally. The formula for calculating the dimension score can be: Dimension score = w 1 × Model score + w 2 × Expert score.

[0071] It can be understood that under different preset evaluation dimensions, the evaluation accuracies of the scoring model and the human expert can be different. Therefore, the first weight coefficient and the second weight coefficient under different dimensions can also be different. For example, in the dimension of colloquialism, the evaluation accuracy of the human expert is higher than that of the scoring model; while in the dimension of content richness, the evaluation accuracy of the human expert is lower than that of the scoring model.

[0072] Further, based on the target scoring strategy, score the emotional companionship conversation to obtain the dimension scores of the emotional companionship conversation in each preset evaluation dimension, including: when the target scoring strategy in the preset evaluation dimension is the model scoring strategy, based on the evaluation criteria of the preset evaluation dimension and the scoring model, obtain the dimension score of the emotional companionship conversation in the preset evaluation dimension.

[0073] In one embodiment, when the scoring consistency is greater than or equal to the first preset threshold, it indicates that the scoring consistency is very high, that is, the score of the AI scoring model is highly consistent with the score of the human expert. At this time, use the model scoring strategy as the target scoring strategy. The model scoring strategy can directly use the score of the AI scoring model as the final score to avoid the time cost of expert scoring and improve the scoring efficiency.

[0074] In one embodiment, when the target scoring strategy is a model scoring strategy, the emotional companionship dialogue can be directly transmitted to the scoring model, and the scoring model scores the emotional companionship dialogue according to the evaluation criteria of the preset evaluation dimensions to obtain the dimension scores of the preset evaluation dimensions.

[0075] In one embodiment, the evaluation criteria for each preset evaluation dimension can be defined by the user according to actual needs. The preset evaluation dimensions may include interestingness, colloquialism, content richness, interactivity, etc. Interestingness refers to whether the dialogue content can attract users and stimulate their continuous participation and interaction. An emotional companionship dialogue should not only complete the basic communication function, but also make users feel interesting or pleasant, thereby enhancing the user's sense of participation and loyalty. Colloquialism refers to whether the language of the dialogue conforms to the daily communication habits and can make users feel kind and natural. People are used to communicating orally in a natural and fluent way, so the emotional companionship dialogue should be as close as possible to human daily conversations in terms of tone, grammar, and expression. Content richness evaluates whether the dialogue can convey appropriate information, whether it involves sufficient depth and breadth to meet the user's needs for emotional companionship. Emotional companionship is not just simple verbal comfort, but should be able to provide supportive dialogue content to help users better handle emotions or think about problems. Interactivity refers to whether there is effective interaction in the dialogue, especially whether it can respond and guide according to the user's emotional changes, language expressions, etc. The core of emotional companionship lies in establishing a connection and interaction with the user, rather than one-way information transmission. Good interaction can increase the user's sense of participation and trust, making the dialogue more emotionally profound.

[0076] For example, for the interestingness dimension, the evaluation criteria may include:

[0077] Language style: Whether the language of the dialogue has a sense of humor and relaxation, and can relieve the user's emotions in a humorous or witty way, enhancing the fun of interaction;

[0078] Topic design: Whether the dialogue content is designed according to the user's interests, whether it tries to explore areas that the user may be interested in, and avoid single and boring communication content;

[0079] Emotional resonance: Whether the dialogue can resonate with the user's emotional state, such as providing encouragement or comfort when the user is in a low mood, and making appropriate responses when the user is in a happy mood, increasing the attraction of interaction.

[0080] For the colloquialism dimension, the evaluation criteria may include:

[0081] Grammar and structure: Whether simple and clear sentence patterns are used, avoiding complex language structures or overly written expressions to ensure the fluency and comprehensibility of the dialogue;

[0082] Tone and Diction: Whether the language is warm and amiable, capable of expressing understanding and care for the user's emotions, and avoiding overly rigid or mechanical conversation styles;

[0083] Intonation and Rhythm: Although this is a text-based dialogue evaluation, the length of sentences, the setting of pauses, etc. can also be considered to simulate intonation changes in daily communication and make the dialogue more personable.

[0084] For the dimension of content richness, the evaluation criteria can include:

[0085] Depth and Breadth of Information: Whether the dialogue content contains diverse information, not limited to emotional comfort, but also covering areas such as life, interests, mental health, etc., to increase the level of the dialogue;

[0086] Emotional Value: Whether the dialogue can provide emotional support, such as effectively responding to the user's emotional fluctuations, guiding the user to express their feelings, and giving appropriate emotional feedback;

[0087] Situation Adaptability: Whether the content is adapted to the user's current emotional state and needs, and whether it can promptly identify the user's emotional changes and make corresponding adjustments.

[0088] For the dimension of interactivity, the evaluation criteria can include:

[0089] Emotion Perception and Response: Whether it can accurately identify the user's emotional fluctuations (such as happiness, sadness, anxiety, etc.) and give appropriate responses according to the user's emotional state, showing understanding and empathy;

[0090] Guiding Questions: Whether there are guiding questions or open-ended questions in the dialogue to encourage the user to share more feelings or opinions, enhance interactivity, and avoid a fixed response pattern;

[0091] User Engagement: Whether it stimulates the user's sense of participation through changes in the dialogue form (such as question and answer, emotional response, story sharing, etc.), making the dialogue more than just a simple response but a two-way communication.

[0092] In the above embodiments, the scoring models and the scores of human experts can automatically adjust the weights according to the evaluation accuracies of the scoring models and human experts, making the dimension scores obtained by weighting more accurate. Secondly, the task of annotating emotional companionship dialogues is refined into multiple dimensions, and specific criteria are formulated for each dimension, making the evaluation more objective, reducing the bias caused by a single evaluation dimension, and improving the scoring accuracy.

[0093] Please refer to Figure 3 , Figure 3FIG. 0 is a schematic block diagram of a dialogue sentiment analysis device provided by an embodiment of the present application. The dialogue sentiment analysis device is used to execute the foregoing dialogue sentiment analysis method. Among them, the dialogue sentiment analysis device can be configured in a server.

[0094] As Figure 3 shown, the dialogue sentiment analysis device 300 includes:

[0095] A scoring consistency acquisition module 301, configured to acquire the scoring consistency between a human expert and a preset scoring model in each preset evaluation dimension of an emotional companionship dialogue;

[0096] A target scoring strategy determination module 302, configured to determine a target scoring strategy of the emotional companionship dialogue in each preset evaluation dimension based on a preset consistency threshold and the scoring consistency;

[0097] An emotion analysis result acquisition module 303, configured to score the emotional companionship dialogue based on the target scoring strategy, obtain a dimension score of the emotional companionship dialogue in each preset evaluation dimension, and obtain an emotion analysis result of the emotional companionship dialogue based on the dimension scores of each preset evaluation dimension.

[0098] Further, the consistency threshold includes a first preset threshold and a second preset threshold. The target scoring strategy determination module 302 specifically includes: when the scoring consistency is less than the first preset threshold and greater than or equal to the second preset threshold, using a preset fusion scoring strategy as the target scoring strategy; when the scoring consistency is greater than or equal to the first preset threshold, using a preset model scoring strategy as the target scoring strategy.

[0099] Further, the emotion analysis result acquisition module 303 includes:

[0100] A scoring acquisition unit, configured to acquire a model score of the scoring model in the preset evaluation dimension and an expert score of a human expert in the preset evaluation dimension when the target scoring strategy of the preset evaluation dimension is the fusion scoring strategy;

[0101] An evaluation accuracy acquisition unit, configured to acquire a first evaluation accuracy of the scoring model in the preset evaluation dimension and a second evaluation accuracy of a human expert in the preset evaluation dimension;

[0102] A weight coefficient determination unit, configured to determine a first weight coefficient of the model score and a second weight coefficient of the expert score based on a preset accuracy threshold, the first evaluation accuracy, and the second evaluation accuracy;

[0103] A dimension score obtaining unit, configured to obtain a dimension score of the emotional companionship dialogue in the preset evaluation dimension by weighting the model score and the expert score based on the first weight coefficient and the second weight coefficient.

[0104] Further, the emotional analysis result obtaining module 303 includes:

[0105] A dimension score obtaining unit, configured to obtain a dimension score of the emotional companionship dialogue in the preset evaluation dimension based on the evaluation criteria of the preset evaluation dimension and the scoring model when the target scoring strategy of the preset evaluation dimension is the model scoring strategy.

[0106] Further, the scoring consistency obtaining module 301 includes:

[0107] A score obtaining unit, configured to obtain historical expert scores and historical model scores of historical dialogues in each preset evaluation dimension;

[0108] A scoring consistency obtaining unit, configured to process the historical expert scores and the historical model scores based on a preset consistency evaluation algorithm to obtain the scoring consistency between human experts and the preset scoring model in each preset evaluation dimension.

[0109] Further, the dialogue emotional analysis device 300 further includes:

[0110] A model optimization module, configured to optimize the scoring model based on the historical expert scores until the scoring consistency is greater than or equal to the second preset threshold when the scoring consistency is less than the second preset threshold.

[0111] Further, the dialogue emotional analysis device 300 further includes a dialogue screening module, and the dialogue screening module includes:

[0112] A requirement obtaining unit, configured to obtain user emotional companionship requirements;

[0113] A dialogue screening unit, configured to screen the emotional companionship dialogue based on the emotional analysis result and the user emotional companionship requirements to obtain a target emotional companionship dialogue that meets the user emotional companionship requirements.

[0114] It should be noted that those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described device and each module can refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein.

[0115] The above device can be implemented in the form of a computer program, and the computer program can run on a computer device as shown in Figure 4 shown.

[0116] Please refer to Figure 4 , Figure 4 which is a schematic block diagram of a computer device provided by an embodiment of the present application. The computer device may be a server.

[0117] Refer to Figure 4 , the computer device includes a processor, a memory, and a network interface connected by a system bus. Among them, the memory may include a non-volatile storage medium and an internal memory.

[0118] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, which when executed, can cause the processor to execute any one of the dialogue sentiment analysis methods.

[0119] The processor is used to provide computing and control capabilities to support the operation of the entire computer device.

[0120] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, it can cause the processor to execute any one of the dialogue sentiment analysis methods.

[0121] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art can understand that Figure 4 the structure shown in [[ ]] is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0122] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0123] Among them, in one embodiment, the processor is used to run the computer program stored in the memory to implement the following steps:

[0124] Obtain the scoring consistency between human experts and a preset scoring model in each preset evaluation dimension of the emotional companionship conversation;

[0125] Based on a preset consistency threshold and the scoring consistency, determine the target scoring strategy of the emotional companionship conversation in each preset evaluation dimension;

[0126] Based on the target scoring strategy, score the emotional companionship conversation to obtain the dimension scores of the emotional companionship conversation in each preset evaluation dimension, and based on the dimension scores of each preset evaluation dimension, obtain the emotional analysis result of the emotional companionship conversation.

[0127] In one embodiment, the consistency threshold includes a first preset threshold and a second preset threshold. When the processor realizes determining the target scoring strategy of the emotional companionship conversation in each preset evaluation dimension based on the preset consistency threshold and the scoring consistency, it is used to realize:

[0128] When the scoring consistency is less than the first preset threshold and greater than or equal to the second preset threshold, use the preset fusion scoring strategy as the target scoring strategy;

[0129] When the scoring consistency is greater than or equal to the first preset threshold, use the preset model scoring strategy as the target scoring strategy.

[0130] In one embodiment, when the processor realizes scoring the emotional companionship conversation based on the target scoring strategy to obtain the dimension scores of the emotional companionship conversation in each preset evaluation dimension, it is used to realize:

[0131] When the target scoring strategy of the preset evaluation dimension is the fusion scoring strategy, obtain the model score of the scoring model in the preset evaluation dimension and the expert score of the human expert in the preset evaluation dimension;

[0132] Obtain the first evaluation accuracy of the scoring model in the preset evaluation dimension and the second evaluation accuracy of the human expert in the preset evaluation dimension;

[0133] Based on a preset accuracy threshold, the first evaluation accuracy, and the second evaluation accuracy, determine the first weight coefficient of the model score and the second weight coefficient of the expert score;

[0134] Based on the first weight coefficient and the second weight coefficient, weight the model score and the expert score to obtain the dimension score of the emotional companionship conversation in the preset evaluation dimension.

[0135] In one embodiment, when the processor implements scoring the emotional companionship dialogue based on the target scoring strategy to obtain the dimension scores of the emotional companionship dialogue in each preset evaluation dimension, it is used to implement:

[0136] When the target scoring strategy for the preset evaluation dimension is the model scoring strategy, based on the evaluation criteria for the preset evaluation dimension and the scoring model, obtain the dimension scores of the emotional companionship dialogue in the preset evaluation dimension.

[0137] In one embodiment, when the processor implements obtaining the scoring consistency between a human expert and a preset scoring model in each preset evaluation dimension of an emotional companionship dialogue, it is used to implement:

[0138] Obtain the historical expert scores and historical model scores of historical dialogues in each preset evaluation dimension;

[0139] Based on a preset consistency evaluation algorithm, process the historical expert scores and the historical model scores to obtain the scoring consistency between the human expert and the preset scoring model in each preset evaluation dimension.

[0140] In one embodiment, after the processor implements obtaining the scoring consistency between a human expert and a preset scoring model in each preset evaluation dimension of an emotional companionship dialogue, it is further used to implement:

[0141] When the scoring consistency is less than a second preset threshold, optimize the scoring model based on the historical expert scores until the scoring consistency is greater than or equal to the second preset threshold.

[0142] In one embodiment, after the processor implements scoring the emotional companionship dialogue based on the target scoring strategy to obtain the dimension scores of the emotional companionship dialogue in each preset evaluation dimension, and obtaining the emotional analysis result of the emotional companionship dialogue based on the dimension scores of each preset evaluation dimension, it is further used to implement:

[0143] Obtain the user's emotional companionship needs;

[0144] Based on the emotional analysis result and the user's emotional companionship needs, screen the emotional companionship dialogue to obtain a target emotional companionship dialogue that meets the user's emotional companionship needs.

[0145] An embodiment of the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and the computer program includes program instructions. The processor executes the program instructions to implement any one of the dialogue emotional analysis methods provided by the embodiments of the present application.

[0146] Among them, the computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiments, such as the hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. equipped on the computer device.

[0147] As described above, the foregoing is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of various equivalent modifications or substitutions, and these modifications or substitutions should all be covered within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims

1. A method for analyzing conversational sentiment, characterized in that: include: Obtain the scoring consistency between human experts and preset scoring models in each preset evaluation dimension of emotional companionship dialogue; Based on a preset consistency threshold and the score consistency, determining a target score strategy for the emotional companionship dialogue in each preset evaluation dimension; Based on the target scoring strategy, the emotional companionship conversation is scored to obtain dimension scores of the emotional companionship conversation in each preset evaluation dimension, and based on the dimension scores of each preset evaluation dimension, the emotional analysis result of the emotional companionship conversation is obtained.

2. The method for analyzing conversational sentiment according to claim 1, characterized in that: The consistency threshold includes a first preset threshold and a second preset threshold, and the target scoring strategy for the emotional companionship dialogue in each preset evaluation dimension is determined based on the preset consistency threshold and the scoring consistency, including: When the scoring consistency is less than the first preset threshold and greater than or equal to the second preset threshold, using the preset fusion scoring strategy as the target scoring strategy; When the scoring consistency is greater than or equal to the first preset threshold, the preset model scoring strategy is used as the target scoring strategy.

3. The method for analyzing conversational sentiment according to claim 2, characterized in that: Scoring the emotional companionship dialogue based on the target scoring strategy to obtain the dimension scores of the emotional companionship dialogue in each preset evaluation dimension includes: When the target scoring strategy of the preset evaluation dimension is the fusion scoring strategy, obtaining the model score of the scoring model in the preset evaluation dimension and the expert score of the human expert in the preset evaluation dimension; Obtaining a first evaluation accuracy of the scoring model in the preset evaluation dimension and a second evaluation accuracy of the human expert in the preset evaluation dimension; Determining a first weight coefficient of the model score and a second weight coefficient of the expert score based on a preset accuracy threshold, the first evaluation accuracy, and the second evaluation accuracy; Based on the first weight coefficient and the second weight coefficient, the model score and the expert score are weighted to obtain the dimension score of the emotional companionship dialogue in the preset evaluation dimension.

4. The method for analyzing conversational sentiment according to claim 2, characterized in that: Scoring the emotional companionship dialogue based on the target scoring strategy to obtain the dimension scores of the emotional companionship dialogue in each preset evaluation dimension includes: When the target scoring strategy of the preset evaluation dimension is the model scoring strategy, the dimension score of the emotional companionship dialogue in the preset evaluation dimension is obtained based on the evaluation criteria of the preset evaluation dimension and the scoring model.

5. The method for analyzing conversational sentiment according to claim 1, characterized in that: The obtaining of the scoring consistency between the human expert and the preset scoring model in each preset evaluation dimension of the emotional companionship dialogue includes: Obtain historical expert scores and historical model scores for historical conversations in each preset evaluation dimension; Based on a preset consistency evaluation algorithm, the historical expert scores and the historical model scores are processed to obtain the score consistency of the human experts and the preset scoring model in each preset evaluation dimension.

6. The method for analyzing conversational sentiment according to claim 5, characterized in that: After obtaining the consistency of the scores of the human expert and the preset scoring model in each preset evaluation dimension of the emotional companionship dialogue, the method further includes: When the score consistency is less than a second preset threshold, the score model is optimized based on the historical expert scores until the score consistency is greater than or equal to the second preset threshold.

7. The method for analyzing conversational sentiment according to any one of claims 1 to 6, characterized in that: After scoring the emotional companionship dialogue based on the target scoring strategy, obtaining the dimension scores of the emotional companionship dialogue in each preset evaluation dimension, and obtaining the emotional analysis result of the emotional companionship dialogue based on the dimension scores of each preset evaluation dimension, the method further includes: Acquire users’ emotional companionship needs; Based on the emotion analysis result and the user's emotional companionship needs, the emotional companionship conversations are screened to obtain target emotional companionship conversations that meet the user's emotional companionship needs.

8. A conversation sentiment analysis device, characterized in that: include: A scoring consistency acquisition module is used to obtain the scoring consistency of human experts and preset scoring models in each preset evaluation dimension of emotional companionship dialogue; A target scoring strategy determination module, used to determine the target scoring strategy of the emotional companionship dialogue in each preset evaluation dimension based on a preset consistency threshold and the scoring consistency; The sentiment analysis result acquisition module is used to score the emotional companionship dialogue based on the target scoring strategy, obtain the dimension scores of the emotional companionship dialogue in each preset evaluation dimension, and obtain the sentiment analysis result of the emotional companionship dialogue based on the dimension scores of each preset evaluation dimension.

9. A computer device, characterized in that: The computer device includes a memory and a processor; The memory is used to store computer programs; The processor is used to execute the computer program and implement the conversation sentiment analysis method as described in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the conversation sentiment analysis method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Quality evaluation method for model generated medical record and storage medium

    CN122417264A