User emotion recognition and psychological intervention system and method based on large language model

By combining a large language model with a psychological knowledge base to perform multi-round conversation semantic modeling, the deficiencies in emotion recognition and intervention in existing mental health assistance systems are addressed, high-precision personalized psychological intervention is achieved, and the intelligence and sustainability of mental health management are improved.

CN120764557APending Publication Date: 2025-10-10CHANGCHUN UNIV OF TECH
View PDF 0 Cites 10 Cited by

Patent Information

Application Number
CN202510848260.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-24
Publication Date
2025-10-10

AI Technical Summary

Technical Problem

Existing mental health assistance systems have problems in emotion recognition and psychological intervention, such as insufficient language comprehension depth, weak personalized dialogue generation capabilities, lack of continuous learning and long-term user state modeling, making it difficult to achieve high-precision and personalized mental health management.

Method used

By combining a large language model (such as GPT-4) with a psychological knowledge base, and through multi-round conversation context semantic modeling, it can identify the user's emotional state and generate personalized psychological intervention content, supporting continuous learning and user profile construction, and improving the accuracy and timeliness of emotion recognition and intervention.

Benefits of technology

It has achieved high-precision recognition of complex emotions and personalized psychological intervention, improved the intelligence and sustainability of mental health management, and enhanced the system's personalized service capabilities and psychological risk warning capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

Aiming at the problems of insufficient language understanding depth, weak personalized dialogue generation ability, lack of continuous learning and long-term user state modeling and the like in the current emotion recognition and psychological intervention technology, the invention provides a user emotion recognition and psychological intervention method combined with a large language model (LLM). According to the method, the potential emotional state is identified by analyzing free text information input by a user by utilizing the powerful capabilities of a large language model in the aspects of natural language understanding, emotional modeling and text generation; constructing a multi-round dialogue context, and reasoning a psychological change trend of the user; in combination with a psychological knowledge base, personalized and mild psychological intervention dialogue content with a dredging effect is generated. The system supports recognition and classification of various emotional states such as depression, anxiety and alonity, is suitable for various interaction scenes (such as APPs, webpages and social robots), and can greatly improve the precision of emotion recognition and the timeliness and effectiveness of psychological intervention. The emotion recognition and psychological intervention method based on the large language model provides solid technical support for constructing an intelligent, continuous and personalized psychological health management system, and has wide application prospects and profound social significance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for user emotion recognition and intervention, and in particular to a system and method for user emotion recognition and psychological intervention based on a large language model. Background Art

[0002] With the accelerating pace of society and rising stress levels, mental health issues are becoming a growing global concern. The incidence of psychological problems such as depression, anxiety, and loneliness continues to rise, particularly among adolescents and those in the workplace. The development of mental health intervention technologies relies on the accurate identification and timely intervention of users' emotional states, which are key to achieving individual mental health management and preventing psychological crises. Emotion recognition and intervention technologies primarily rely on the collection and analysis of user interaction information. Leveraging advanced algorithms such as natural language processing, affective computing, and artificial intelligence, they enable dynamic perception of user emotions and personalized psychological intervention.

[0003] Currently, commonly used mental health support systems primarily perform sentiment analysis through questionnaires, keyword recognition, or rule-based matching. While these methods have some value, they suffer from weak contextual understanding, insufficient emotional nuance, and limited interactive flexibility when processing natural language input. With the advancement of deep learning, sentiment classification models (such as CNN, BiLSTM, and Transformer) have been gradually introduced into the field of emotion recognition, enabling automated analysis of emotional features in user text and speech. Multimodal emotion recognition has also garnered widespread attention, utilizing multi-source data fusion techniques such as speech, facial expressions, and physiological signals to improve recognition accuracy. However, significant bottlenecks remain in the depth of emotion modeling, the degree of personalization of mental state inference, and the diversity and adaptability of intervention techniques. Furthermore, existing systems often lack the ability to continuously learn and develop user profiling, making it difficult to achieve long-term, dynamic, and closed-loop mental health management.

[0004] To address the challenges of current emotion recognition and psychological intervention technologies, including insufficient language understanding depth, weak personalized dialogue generation capabilities, and a lack of continuous learning and long-term user state modeling, this paper proposes a user emotion recognition and psychological intervention method that integrates a large language model (LLM). Leveraging the LLM's powerful capabilities in natural language understanding, sentiment modeling, and text generation, this method parses user input in free text to identify underlying emotional states. It then constructs multi-turn dialogue context to infer user psychological trends. Furthermore, it integrates with a psychological knowledge base to generate personalized, gentle, and effective psychological intervention dialogue content. The system supports the recognition and classification of multiple emotional states, including depression, anxiety, and loneliness, and is applicable to a variety of interactive scenarios (such as apps, web pages, and social robots). It significantly improves the accuracy of emotion recognition and the timeliness and effectiveness of psychological intervention. This LLM-based emotion recognition and psychological intervention method provides solid technical support for building an intelligent, sustainable, and personalized mental health management system, with broad application prospects and profound social significance. Summary of the Invention

[0005] This paper proposes a user emotion recognition and psychological intervention method based on a large language model. By performing multi-dimensional emotion analysis on natural language input from users and integrating it with a psychological knowledge base for semantic reasoning and intervention script generation, the accuracy of emotion recognition and the effectiveness of intervention are improved. The large language model possesses powerful semantic understanding and generation capabilities, capable of processing the emotional information implicit in complex language expressions and dynamically generating personalized psychological counseling texts, thereby enabling intelligent mental health intervention services tailored to different users and their varying emotional states.

[0006] The present invention describes a user emotion recognition and psychological intervention method based on a large language model. First, the method collects user natural language information through text input or speech transcription. It then uses a pre-trained large language model (such as GPT-4 or Deepseek) and fine-tunes it using mental health corpus to enable it to recognize emotional states such as anxiety, depression, loneliness, and anger. The system then infers the changing trends of the user's psychological state through semantic modeling of multi-round conversation contexts. Combined with a psychological intervention knowledge graph, it generates personalized psychological counseling content. Furthermore, the system continuously collects semantic data during user interactions, constructing a long-term user emotional profile and supporting the dynamic optimization of personalized intervention strategies. Furthermore, the present invention utilizes the large language model to generate diverse psychological scenario simulation data for iterative model training and adaptability testing, enhancing the system's emotion recognition and intervention capabilities across diverse user contexts.

[0007] The present invention has the following advantages: S1 utilizes a large language model to perform high-dimensional semantic analysis of user natural language input. Through a combination of pre-training and instruction fine-tuning, it is equipped with the ability to accurately identify complex emotional expressions and dynamically infer the user's psychological state during multiple rounds of conversation. S2 combines the large language model with a psychological knowledge base and a semantic tagging system to automatically generate high-quality psychological intervention content. The output script can adapt to different emotional types and user backgrounds, improving the targetedness and comfort of intervention. S3 utilizes the large language model to model the user's long-term interaction trajectory, enabling continuous tracking of emotional changes and intelligent optimization of intervention strategies, enhancing the system's personalized service capabilities and psychological risk warning capabilities. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] Figure 1 This is the overall network structure diagram of the present invention; Figure 2 This is a diagram of the transformer structure of the present invention; Figure 3 This is the structure diagram of the self-attention mechanism of the present invention; DETAILED DESCRIPTION

[0009] The present invention will be described in further detail below with reference to the accompanying drawings.

[0010] Refer to Figure 1 for the overall network structure model of the present invention. The data acquisition module receives user natural language input in the form of text (such as chat logs, comments, and diaries) or voice input (using automatic speech recognition (ASR) technology to transcribe the user's voice content into text in real time). The acquisition module uniformly encodes the user input and passes it to the preprocessing module for standardization. The processed data is fed into a large language model for real-time text detection and analysis and emotion recognition. Based on the current interaction content and user status, the model can perform real-time emotion assessment and identify potential emotional states. The emotion recognition module classifies and scores the semantic output of the large language model, outputting emotion categories (such as anxiety, depression, anger, loneliness, etc.), emotion intensity scores, and emotion trends. If a negative emotional state is identified, an intervention plan is generated. The emotional state and suggested responses are then passed to the psychological intervention generation module to generate counseling speech, mindfulness suggestions, or cognitive restructuring content, completing the closed loop from emotion recognition to intervention. By analyzing user emotion recognition and intervention, the model can continuously learn and improve its algorithm, achieving system feedback. In addition, during the system training phase, the large language model is used to generate diverse emotional scenario data, including converting natural language descriptions into simulated conversations, emotional fragments, etc., for training and testing emotion recognition models to enhance the system's generalization capabilities under real complex emotional states.

[0011] The large language model processing module of the present invention utilizes the GPT-4.0 large language model based on the Transformer architecture, implemented through unsupervised pre-training and fine-tuning methods. This model possesses excellent semantic understanding, scenario generation, and multimodal processing capabilities. It utilizes the large language model to annotate and enhance data, reducing the number of parameters in the emotion detection process and thus improving the real-time performance of detection. The large language model generates rare emotional scenarios for emotion recognition training and testing, improving the accuracy and effectiveness of detecting special emotional states during the emotion detection process. When a special emotional state is detected, the large language model can assist in generating corresponding psychological intervention content to ensure timely guidance of the user's emotions. Simultaneously, the model can continuously learn and improve its emotion recognition algorithm, achieving system feedback. The combination of the large language model with emotion recognition and psychological intervention technologies significantly improves the performance and reliability of emotion recognition.

[0012] Transformer structure diagram reference Figure 2 It is a model based on the Encoder-Decoder framework, mainly composed of self-attention mechanism, multi-head attention mechanism, position encoding, residual connection and layer normalization, with the core being the self-attention mechanism. This mechanism performs weighted calculations on the interdependencies between different words in the input text, enabling the model to focus on key emotional expression points in the conversation, such as emotionally loaded phrases such as "I'm tired" and "I don't want to talk," thereby enhancing the ability to perceive the user's current psychological state. In addition, the self-attention mechanism can maintain semantic consistency across multiple rounds of interaction, improving the system's ability to track and predict user emotional trends.

[0013] Reference diagram of the self-attention mechanism Figure 3 Its calculation steps include: S1, input representation: given an input sequence X, which contains n words, each word is represented as a d-dimensional vector. The shape of the input matrix is .

[0014] S2, calculates Query, Key, and Value: Through linear transformations, the input X is mapped to the Query (Q), Key (K), and Value (V) spaces respectively. These transformations can be expressed as: Where W Q ,W K ,W V Is the weight matrix to be learned, and its shape is .

[0015] S3, calculate the attention score: by calculating the dot product of the query and the key, we get the attention score of each word to other words. In order to avoid the value being too large, we usually divide it by To zoom: Here, the softmax function ensures that the sum of the attention weights is 1.

[0016] S4, weighted summation: Use the attention weight to perform weighted summation on Value to obtain a new representation. The shape of the attention score matrix is , represents the attention weight of each position in the sequence to other positions. After weighted summation, the resulting matrix shape is .

[0017] To enhance the model's expressiveness, the Transformer uses a multi-head attention mechanism. The basic idea is to split the self-attention mechanism into multiple "heads," each of which independently computes attention and merges their results. The specific steps are as follows: S1, multi-head computation: Subtract the input X from the weight matrix X from the weight matrix X. , and Mapped to different Query, Key and Value spaces. Each head calculates self-attention independently: in , , .

[0018] S2, splicing results: splice the outputs of all heads together: in It is a learnable linear transformation matrix used to adjust the concatenated dimensions.

[0019] The emotion recognition module of this invention integrates an optimized large language model and combines efficiency, accuracy, and ease of use in a design suitable for diverse terminals and service scenarios. This module incorporates multiple optimization techniques, including data augmentation strategies, feature extraction mechanisms, and sentiment loss function design, significantly improving the performance and robustness of emotion recognition. The emotion analysis model consists of the following submodules: a data processing terminal, a feature extraction network, a feature fusion network, a large language model processing module, and an emotion recognition network.

[0020] The data processing end standardizes collected user input data, including operations such as text cleaning, speech transcription, syntactic analysis, word tagging, context integration, and data enhancement. This module serves as the pre-input unit of the feature extraction network, ensuring that the emotion feature extraction and fusion module receives uniformly standardized semantically structured data. This enables the model to recognize emotions in a richer context and detect and identify various emotional states, such as anxiety and depression.

[0021] This invention incorporates a feature extraction network into the user emotion recognition module to extract features from natural language text (or speech data) input by the user. This feature extraction network, which can be a pre-trained deep network such as BERT, RoBERTa, or Wav2Vec, uses a multi-layer attention mechanism to extract context-dependent features, emotion representation information, and semantic clues related to psychological states from the input sentence. The extracted feature vector serves as input to a large language model and is further used for emotion classification, risk warning, and psychological intervention response generation. This architecture effectively improves the system's ability to understand complex emotional expressions and the accuracy of its responses.

[0022] In the system architecture of the present invention, a feature fusion network is introduced to integrate emotional clues from different modalities and contexts. The feature fusion network module is located between the feature extraction network and the large language model, and has a multi-layer convolutional structure or an attention mechanism structure. Its functions include: fusing semantic features from user text input, emotional trajectories in the dialogue context, and emotional tone features in the voice signal; while realizing the aggregation of multi-scale features and context consistency modeling, thereby providing a more accurate and rich semantic basis for the emotion recognition module and the intervention generation module. While enhancing the expression of key emotions, the feature fusion network module effectively alleviates the feature mismatch problem caused by multi-source heterogeneous input, thereby improving the overall recognition and response capabilities of the system.

[0023] The emotion recognition network is a key component of the emotion recognition module of the present invention. It is responsible for classifying and scoring the high-dimensional features output by the model and outputting the final emotion recognition results. The emotion recognition network can adopt the form of multi-layer perceptron, attention pooling or dual-tower structure, and output emotion category labels, emotion intensity scores, and multi-label results of complex emotions according to task requirements. By jointly modeling with the user's historical conversation emotion trajectory, the recognition network can also predict the user's emotional evolution trend and provide a decision-making basis for the subsequent psychological intervention module. This module has high accuracy and interpretability, and can effectively support the system's accurate judgment of the user's emotional state and dynamic adjustment of the intervention strategy.

[0024] In the psychological intervention module, this module is based on the user's emotional state (including category, intensity, trend, etc.) output by the emotion recognition network, combined with the generation capability of the large language model, to intelligently generate targeted psychological intervention content, such as emotional soothing statements, self-regulation suggestions (such as deep breathing, meditation guidance), psychological counseling suggestions or questionnaires, and cognitive reconstruction dialogues for specific emotions (such as anxiety and anger).

[0025] In the process of user emotion recognition and psychological intervention, multi-source user data is labeled and integrated through a large language model, which greatly reduces the number of model parameters and is more conducive to a lightweight emotion recognition model. The preprocessed data and rare emotion scene data automatically generated by the large language model are sent to the large language model for pre-training and fine-tuning, and the emotional state is preliminarily identified and classified. Finally, the data is sent to the emotion recognition model for further emotional state detection. The user emotion recognition and psychological intervention method based on a large language model of the present invention can greatly enhance the system's semantic understanding, emotion analysis, intervention content generation, multi-source data fusion, emotion state detection, feedback learning and other capabilities, thereby improving the system's overall emotion recognition accuracy and psychological intervention effectiveness.

Claims

1. A system and method for user emotion recognition and psychological intervention based on a large language model, characterized in that: include: Data acquisition, preprocessing, large language model module, emotion recognition module and psychological intervention generation.

2. First, use the data collection module to receive the user's natural language input, which can be in the form of text input (such as chat records, comments, diaries) or voice input (using speech recognition (ASR) technology to transcribe the user's voice content into text in real time).

3. The acquisition module uniformly encodes user input and passes it to the preprocessing module for standardization. This processed data is fed into a large language model for real-time text detection and analysis, as well as emotion recognition. Based on the current interaction content and user status, the model can perform real-time emotion assessment and identify potential emotional states.

4. The emotion recognition module classifies and scores the processed output of the large language model, outputting emotion categories (such as anxiety, depression, anger, loneliness, etc.), emotion intensity scores, and emotion trends. If a negative emotional state is identified, an intervention plan is generated. At the same time, the emotional state and suggested responses are handed over to the psychological intervention generation module to generate guiding discourse, mindfulness suggestions, or cognitive reconstruction content, completing the closed loop from emotion recognition to intervention. By analyzing user emotion recognition and intervention, the model can continuously learn and improve the algorithm to achieve system feedback.

5. The large language model processing module in the system and method for user emotion recognition and psychological intervention based on a large language model is characterized by: It uses the GPT-4.0 large language model based on the Transformer architecture, which is implemented through unsupervised pre-training and fine-tuning methods; Using large language models to annotate and enhance data reduces the number of parameters in the emotion detection process, thereby improving the real-time and accuracy of detection; Large language models generate rare emotional scenes for emotion recognition training and testing, improving the accuracy and effectiveness of detecting special emotional states during the emotion detection process; When a special emotional state is detected, the large language model can assist in generating corresponding psychological intervention content to ensure timely guidance of the user's emotions; at the same time, the model can continuously learn and improve its emotion recognition algorithm to achieve system feedback.

Citation Information

Cited By

  • Real-time emotion perception and voice interaction system for intelligent cockpit

    CN121009400A

  • Method for generating AI intelligent marketing promotion strategy based on word-of-mouth trend

    CN121258611A

  • AI intelligent marketing promotion strategy generation method based on word-of-mouth trend

    CN121258611B

  • Cognitive reconstruction psychological intervention system and device based on large language model

    CN121328740A

  • AI interaction-based personalized knowledge graph dialogue generation method for old people

    CN121658617A