User character analysis method and system based on dialogue content

By introducing emotional characteristics and emotional regulation characteristics into user personality detection, using large language models and historical dialogue data reference databases, the problem of neglecting emotions in the existing technology is solved, and the accuracy and robustness of personality detection is improved.

CN119416794APending Publication Date: 2025-02-11INFORMATION COMM COMPANY STATE GRID SHANDONG ELECTRIC POWER
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411446968.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-16
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

The prior art ignores the key psychological concept of emotional regulation in user personality detection, resulting in insufficient detection accuracy and robustness.

Method used

By introducing emotional characteristics and emotional regulation characteristics in the personality detection process, extracting these characteristics using a large language model, generating user feature vectors, retrieving the most similar samples from the historical dialogue data reference library, and generating thinking chains to classify user personality.

Benefits of technology

The model's understanding of personality is improved, the accuracy and robustness of personality detection is enhanced, and the accuracy is improved by 5 to 10%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119416794A_ABST
    Figure CN119416794A_ABST
Patent Text Reader

Abstract

The invention provides a dialogue content-based user character analysis method and system, and relates to the field of text content understanding in natural language processing, and the specific scheme comprises the following steps: obtaining the dialogue content of a to-be-analyzed user; extracting emotional features and emotional regulation features in the dialogue content by using a large language model to form a user feature vector, retrieving a most similar sample from a historical dialogue data reference library by using the user feature vector, and generating a thinking chain of the most similar sample; performing user character classification based on dialogue contents, most similar samples and thinking chains of the most similar samples; the method is inspired by psychological research results, the emotion features and the emotion regulation features are introduced in the character detection process, understanding of the model on characters is enhanced, and the accuracy and robustness of model character detection are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of text content understanding in natural language processing, and in particular relates to a user personality analysis method and system based on conversation content. Background Art

[0002] The purpose of personality detection is to identify and infer the user's personality traits from texts such as conversations. It is one of the important steps in sentiment analysis and user attribute identification in natural language processing. The traditional personality detection method is to directly perform personality detection on the entire conversation text content, such as treating all the words said by the customer service in the conversation as a whole and performing personality detection uniformly. However, these methods often ignore key psychological concepts related to personality. For example, the importance of emotions and emotion regulation in personality prediction is often overlooked.

[0003] In psychology, the importance of emotions and emotion recognition has been widely studied; Reisenzein et al proposed a theory linking personality traits with emotional experiences, laying the foundation for using emotions to infer personality; in order to better understand and apply these psychological theories, researchers proposed methods to link emotions with personality traits; Mohammad et al proposed a method to use emotions to improve personality detection, showing that fine-grained emotions can enhance personality detection, and Li et al proposed a method to improve the accuracy of personality detection by combining emotion recognition with personality recognition through multi-task learning.

[0004] However, when applied to customer service and user conversations, these methods still ignore emotion regulation, a key psychological concept related to personality. Unlike emotions, which are usually expressed in a short-term manner, emotion regulation is a stable, long-term state of managing and controlling emotional responses. Psychological research has shown that there is a clear correlation between personality and emotion regulation, but currently known personality detection methods in natural language processing have not yet utilized this feature, resulting in deficiencies in accuracy and robustness. Summary of the invention

[0005] In order to overcome the deficiencies of the above-mentioned prior art, the present invention provides a user personality analysis method and system based on conversation content. Inspired by the results of psychological research, the method introduces emotional characteristics and emotional regulation characteristics into the personality detection process to enhance the model's understanding of personality and improve the accuracy and robustness of the model's personality detection.

[0006] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions:

[0007] A first aspect of the present invention provides a method for analyzing user personality based on conversation content.

[0008] A user personality analysis method based on conversation content, comprising:

[0009] Obtain the conversation content of the user to be analyzed;

[0010] Using a large language model, we extract emotional features and emotional regulation features from the conversation content to form a user feature vector. We use the user feature vector to retrieve the most similar samples from the historical conversation data reference library and generate a thought chain of the most similar samples.

[0011] User personality classification is performed based on the conversation content, the most similar samples and their thought chains.

[0012] Furthermore, the extraction of emotional features and emotional regulation features in the conversation content is specifically as follows:

[0013] All sentences of the user to be analyzed in a conversation are used as the input text of the large language model, and the sentences are classified into emotional sentences and emotion regulation sentences. They are encoded separately to obtain the emotional features and emotion regulation features in the conversation.

[0014] Furthermore, the large language model uses the pre-trained language model Roberta-Large to calculate the features of the emotional sentences and the emotion regulation sentences, and obtains the user feature vector by weighted embedding.

[0015] Furthermore, the historical conversation data reference library is composed of historical conversation samples belonging to different personality types, and a user feature vector is generated for each sample.

[0016] Furthermore, the method of retrieving the most similar sample from the historical conversation data reference library using the user feature vector is to evaluate the similarity of two vectors by calculating the cosine value of the angle between them.

[0017] Furthermore, the thought chain of generating the most similar sample is generated by using a large language model.

[0018] Furthermore, the user personality classification is to input the conversation content, the most similar samples and their thought chains into the large language model to obtain the personality type of the user to be analyzed.

[0019] A second aspect of the present invention provides a user personality analysis system based on conversation content.

[0020] A user personality analysis system based on conversation content, including a content acquisition module, a sample retrieval module and a personality classification module:

[0021] The content acquisition module is configured to: acquire the conversation content of the user to be analyzed;

[0022] The sample retrieval module is configured to: use the large language model to extract the emotional features and emotional regulation features in the conversation content to form a user feature vector, use the user feature vector to retrieve the most similar sample from the historical conversation data reference library, and generate a thought chain of the most similar sample;

[0023] The personality classification module is configured to classify user personality based on the conversation content, the most similar samples and their thought chains.

[0024] The third aspect of the present invention provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the steps of a method for analyzing user personality based on conversation content as described in the first aspect of the present invention.

[0025] The fourth aspect of the present invention provides an electronic device, including a memory, a processor, and a program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps in a method for analyzing user personality based on conversation content as described in the first aspect of the present invention are implemented.

[0026] One or more of the above technical solutions have the following beneficial effects:

[0027] The present invention combines the emotions and emotion regulation features of users in conversations, uses a small sample learning method, and provides a small number of examples to guide the model in user personality detection, so that it can effectively learn how to use the emotions and emotion regulation features in the conversation text, thereby further improving the personality detection performance of the large language model on the customer service and user conversation data set; after measurement, on two labeled data sets, compared with previous methods, the model architecture proposed by the present invention can improve the accuracy by 5-10%.

[0028] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0030] Figure 1 This is a framework diagram of user personality analysis based on a large language model in the first embodiment. DETAILED DESCRIPTION

[0031] It should be noted that the following detailed descriptions are illustrative and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used in the present invention have the same meanings as those commonly understood by those skilled in the art to which the present application belongs.

[0032] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0033] Embodiment 1

[0034] In one embodiment of the present disclosure, a method for analyzing user personality based on conversation content is provided, comprising the following steps:

[0035] Step S1: Obtain the conversation content of the user to be analyzed.

[0036] Step S2: Using the large language model, extract the emotional features and emotional regulation features in the conversation content to form a user feature vector. Using the user feature vector, retrieve the most similar samples from the historical conversation data reference library and generate a thought chain of the most similar samples.

[0037] Furthermore, the extraction of emotional features and emotional regulation features in the conversation content is specifically as follows:

[0038] All sentences of the user to be analyzed in a conversation are used as the input text of the large language model, and the sentences are classified into emotional sentences and emotion regulation sentences. They are encoded separately to obtain the emotional features and emotion regulation features in the conversation.

[0039] The large language model here defines what are emotional sentences and emotion regulation sentences by setting the prompt word prompt, specifically:

[0040] The prompt word for "emotional sentences" is defined as: These sentences should be clearly linked to an immediate, temporary feeling generated by a specific, recent event or current situation. The emotion should be an obvious reaction to a recent event rather than indicative of a deeper, long-standing characteristic or belief; A more detailed definition: Look for signs that the emotion is an immediate reaction to a specific event, is temporary, and does not reflect an ongoing pattern of thought or behavior.

[0041] The prompt definition of "emotion regulation sentences" is: these sentences must always reflect the speaker's enduring characteristics; they should not be affected by the immediate environment, but should indicate a sustained and characteristic ability to control emotions; a more detailed definition: determine whether the expression reflects a long-term personality trait of emotion control that is consistent over time, rather than a response to a specific recent situation.

[0042] Furthermore, the large language model uses the pre-trained language model Roberta-Large to calculate the features of the emotional sentences and the emotion regulation sentences, and obtains the user feature vector by weighted embedding.

[0043] Furthermore, the historical conversation data reference library is composed of historical conversation samples belonging to different personality types, and a user feature vector is generated for each sample.

[0044] Furthermore, the method of retrieving the most similar sample from the historical conversation data reference library using the user feature vector is to evaluate the similarity of two vectors by calculating the cosine value of the angle between them.

[0045] Furthermore, the thought chain of generating the most similar sample is generated by using a large language model.

[0046] Step S3: Classify the user's personality based on the conversation content, the most similar samples and their thought chains.

[0047] Furthermore, the user personality classification is to input the conversation content, the most similar samples and their thought chains into the large language model to obtain the personality type of the user to be analyzed.

[0048] The following is a detailed description of the implementation process of a method for analyzing user personality based on conversation content in this embodiment.

[0049] When analyzing the conversations between customer service and users, a user personality analysis framework based on a large language model was constructed by combining emotion and emotion regulation features to detect user personality. This framework not only enhances the model's understanding of personality, but also improves the accuracy and robustness of the model's personality detection.

[0050] This framework uses a small sample learning method based on emotion and emotion regulation sample retrieval to improve the model's ability to distinguish different emotional features. Inspired by the results of psychological research, this framework enhances the model's ability to recognize personality traits by introducing emotion traits and emotion regulation traits in the personality detection process.

[0051] Taking the analysis and detection of user's personality as an example, in this framework, all the sentences of customer service in a conversation are first taken as an input text, and the sentences are classified into emotional sentences and emotion regulation sentences, which are encoded separately to obtain the emotion vector and emotion regulation vector (i.e., emotion features and emotion regulation features) of the customer service in the conversation. Subsequently, these feature vectors are combined to retrieve a small number of samples that are most similar to the user's features from the conversation history data reference library; using the small sample learning method, a small number of examples are provided in the personality detection of the user to guide the model so that it can effectively learn how to use the emotion and emotion regulation features in the conversation text; each retrieved sample also contains the corresponding chain of thought (CoT) explanation to guide the large language model to focus on these aspects. In addition, because the personality detection of the conversation between customer service and users involves the model's reasoning about emotional aspects such as emotions and emotion regulation in the text, the method of retrieving small samples based on the emotions and emotion regulation of customer service or user feature vectors can improve the model's reasoning ability, thereby avoiding the model from extracting incorrect emotional basis from the input, and then obtaining incorrect personality prediction results.

[0052] To provide a specific example, the conversation between customer service and the user is as follows:

[0053] Table 1 Dialogue content

[0054]

[0055]

[0056] Taking the actual case in Table 1 as an example, the steps for analyzing the personality of the user are:

[0057] A. First, determine the personality dimension model to be tested (for example, if it needs to be tested as MBT I), select a reference library with the same personality dimension model, and generate a thinking chain interpretation for the data in the reference library.

[0058] In psychology, there are many ways to model personality, such as MBT I, Big Five Personality, etc. The personality dimension model here refers to a certain way of personality modeling.

[0059] The thought chain here is generated using a large language model, and the generated thought chain is as follows:

[0060] "From this passage, it can be seen that this person is an ISFJ for the following reasons:

[0061] The E / I dimension is I because in the conversation…;

[0062] The N / S dimension is S because in the conversation…;

[0063] The T / F dimension is F because in a conversation…;

[0064] The P / J dimension is J because in conversation….”

[0065] B. Extract the customer service conversation content from the conversation data and use the large language model to classify the text sentences:

[0066] {X} 客服 ={D1,D3,D5,D7,D9,D 11 ,D 13 ,D 15 ,D 17 ,D 19}

[0067] {X e} 客服 ={…,D i ,…},{X r} 客服 ={…,D j ,…}

[0068] in:

[0069] {X e} 客服 +{X r} 客服 ={X} 客服

[0070] And also classify the text in the reference library:

[0071] {CX}={…,CX i ,…}

[0072] {CX e}={…,CX i ,…},{CX r}={…,CX j ,…}

[0073] in:

[0074] {CX e}+{CX r}={CX}

[0075] C. Using the classification statement in the previous step, we will retrieve the examples in the few samples, that is, the most similar samples.

[0076] Using the roberta-large model, we can obtain the embedding representation of emotions and emotion regulation sentences in customer service conversations: For a given text {X} 客服 Emotional sentences {X e} 客服 and emotion regulation sentences {X r} 客服, using the pre-trained language model roberta-large to calculate their respective vector representations and And the weighted embedding representation is calculated by the hyperparameter α, so that:

[0077] V X客服 =αV Xe客服 +(1-α)V Xr客服

[0078] The hyperparameter α allows for adjustable emphasis on the effects of emotion and emotion regulation in the representation, thereby exploring their importance in personality detection; similarly, each text in the reference library is also processed to obtain a corresponding weighted embedding representation:

[0079]

[0080] Then, the cosine similarity is calculated using the following formula to identify the two texts in the reference library that are most similar to the customer service conversation content:

[0081] Sim(V X客服 ,V CX )=1-cosine(V X客服 ,V CX )

[0082] These selected texts and their associated thought chain explanations are used as few-shot learning examples when the large language model performs inference to improve the accuracy of personality detection.

[0083] When constructing personality detection prompts, this embodiment combines the psychological knowledge of the personality dimension model to which the detection target belongs, uses few-sample learning and chain thinking strategies to generate model prompts, emphasizes the role of emotions and emotion regulation, and guides the model to focus on these aspects. In the prompt, each personality dimension is introduced with a precise psychological definition. Subsequently, two examples retrieved from the reference library, i.e., the two samples most similar to the current sample to be detected, are combined with the thought chain explanation generated in the previous steps to show how specific personality traits are reflected in the text through emotions and emotion regulation.

[0084] Through the above steps, this embodiment uses a small sample learning strategy for retrieval of emotion and emotion regulation examples to implement a user personality analysis method based on understanding of customer service conversation history content.

[0085] Embodiment 2

[0086] In one embodiment of the present disclosure, a user personality analysis system based on conversation content is provided, including a content acquisition module, a sample retrieval module and a personality classification module:

[0087] The content acquisition module is configured to: acquire the conversation content of the user to be analyzed;

[0088] The sample retrieval module is configured to: use the large language model to extract the emotional features and emotional regulation features in the conversation content to form a user feature vector, use the user feature vector to retrieve the most similar sample from the historical conversation data reference library, and generate a thought chain of the most similar sample;

[0089] The personality classification module is configured to classify user personality based on the conversation content, the most similar samples and their thought chains.

[0090] Embodiment 3

[0091] The purpose of this embodiment is to provide a computer-readable storage medium.

[0092] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps in a method for analyzing user personality based on conversation content as described in Embodiment 1 of the present disclosure.

[0093] Embodiment 4

[0094] The purpose of this embodiment is to provide an electronic device.

[0095] An electronic device includes a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, the steps in a method for analyzing user personality based on conversation content as described in Embodiment 1 of the present disclosure are implemented.

[0096] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A user personality analysis method based on conversation content, characterized in that: include: Obtain the conversation content of the user to be analyzed; Using a large language model, we extract emotional features and emotional regulation features from the conversation content to form a user feature vector. We use the user feature vector to retrieve the most similar samples from the historical conversation data reference library and generate a thought chain of the most similar samples. User personality classification is performed based on the conversation content, the most similar samples and their thought chains.

2. A method for analyzing user personality based on conversation content as claimed in claim 1, characterized in that: The extraction of emotional features and emotional regulation features in the conversation content is specifically as follows: All sentences of the user to be analyzed in a conversation are used as the input text of the large language model, and the sentences are classified into emotional sentences and emotion regulation sentences. They are encoded separately to obtain the emotional features and emotion regulation features in the conversation.

3. A method for analyzing user personality based on conversation content as claimed in claim 2, characterized in that: The large language model uses the pre-trained language model roberta-large to calculate the features of the emotional sentences and the emotion regulation sentences, and obtains the user feature vector by weighted embedding.

4. A method for analyzing user personality based on conversation content as claimed in claim 1, characterized in that: The historical conversation data reference library is composed of historical conversation samples belonging to different personality types, and a user feature vector is generated for each sample.

5. The method for analyzing user personality based on conversation content as claimed in claim 1, characterized in that: The method of using the user feature vector to retrieve the most similar sample from the historical conversation data reference library is to evaluate the similarity of two vectors by calculating the cosine value of the angle between them.

6. A method for analyzing user personality based on conversation content as claimed in claim 1, characterized in that: The thought chain for generating the most similar samples is generated by using a large language model.

7. A method for analyzing user personality based on conversation content as claimed in claim 1, characterized in that: The user personality classification is to input the conversation content, the most similar samples and their thought chains into the large language model to obtain the personality type of the user to be analyzed.

8. A user personality analysis system based on conversation content, characterized in that: Including content acquisition module, sample retrieval module and personality classification module: The content acquisition module is configured to: acquire the conversation content of the user to be analyzed; The sample retrieval module is configured to: use the large language model to extract the emotional features and emotional regulation features in the conversation content to form a user feature vector, use the user feature vector to retrieve the most similar sample from the historical conversation data reference library, and generate a thought chain of the most similar sample; The personality classification module is configured to classify user personality based on the conversation content, the most similar samples and their thought chains.

9. An electronic device, comprising: a memory for non-transitory storage of computer readable instructions; a processor for executing the computer-readable instructions; Wherein, when the computer-readable instructions are executed by the processor, the method according to any one of claims 1 to 7 is executed.

10. A storage medium, characterized in that: The computer-readable instructions are non-transitorily stored, wherein when the computer-readable instructions are executed by a computer, the method of any one of claims 1 to 7 is performed.