Intelligent psychological state identification method, device, equipment, medium and product

Through the combination of large language model and emotional classification model, users' psychological states are efficiently and accurately identified in human-computer dialogue, solving the problems of time-consuming, labor-intensive and low accuracy of traditional methods, and improving the efficiency and accuracy of psychological state recognition.

CN120492589APending Publication Date: 2025-08-15AIR FORCE MEDICAL CENT PLA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510645134.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-19
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

In the prior art, the diagnosis method of professional psychologists is time-consuming and labor-intensive, unable to meet the mental state assessment needs of large-scale populations, and the traditional self-service assessment method is low in accuracy and is affected by the subjective attitude of the tester.

Method used

A large language model is used to conduct multiple rounds of dialogue with users, combined with the emotion classification model, the user's emotional category is determined through a pre-trained emotion analysis corpus, and the psychological state is identified based on the emotion category, and a two-way transformer model such as BERT is used for emotion classification, and a psychological state evaluation is used for structural dialogue.

Benefits of technology

It improves the accuracy and efficiency of psychological state recognition, reduces users' resistance, and can pay close attention to mental health status in free human-computer dialogue.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120492589A_ABST
    Figure CN120492589A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent psychological state recognition method and device, equipment, a medium and a product, and relates to the field of intelligent dialogues, and the method comprises the steps: carrying out multiple rounds of dialogues with a user based on a large language model; in each round of dialogue, according to a text input by the user, determining an emotion category of the user by adopting an emotion classification model; the sentiment classification model is obtained by training by adopting a sentiment analysis corpus in advance; the sentiment analysis corpus comprises a plurality of dialogue texts and a sentiment category label of each dialogue text; and determining the psychological state of the user according to the emotion category of the user in each round of dialogue. According to the method, psychological state recognition is fused into free interpersonal dialogues, the psychological health state of the user can be closely concerned, the influence of the subjective attitude of the user is avoided, and the accuracy and efficiency of psychological state recognition are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent dialogue, and in particular to a method, device, equipment, medium and product for intelligent recognition of psychological state based on human-computer dialogue. Background Art

[0002] Professional psychologists typically identify mental health issues through conversations with patients. This method is accurate for diagnosing mental health issues, but it is time-consuming and labor-intensive, and cannot meet the needs of large-scale population mental health assessments. Traditional self-guided mental health assessments rely primarily on professional psychology scales. However, their content is rigid, and the results are easily influenced by the test-taker's subjective attitude, resulting in low accuracy. Summary of the Invention

[0003] The purpose of this application is to provide a method, device, equipment, medium and product for intelligent recognition of mental state, which can improve the accuracy and efficiency of mental state recognition.

[0004] To achieve the above objectives, this application provides the following solutions:

[0005] In a first aspect, the present application provides a method for intelligently identifying mental states, comprising:

[0006] Conduct multi-round conversations with users based on a large language model;

[0007] In each round of conversation, a sentiment classification model is used to determine the user's sentiment category based on the text input by the user. The sentiment classification model is pre-trained using a sentiment analysis corpus. The sentiment analysis corpus includes multiple conversation texts and a sentiment category label for each conversation text.

[0008] Determine the user's mental state based on the user's emotion category in each round of conversation.

[0009] In a second aspect, the present application provides a mental state intelligent recognition device, comprising:

[0010] The dialogue module is used to conduct multi-round dialogues with users based on a large language model;

[0011] The sentiment classification module is used to determine the user's sentiment category in each round of dialogue based on the text input by the user using a sentiment classification model. The sentiment classification model is pre-trained using a sentiment analysis corpus. The sentiment analysis corpus includes multiple dialogue texts and a sentiment category label for each dialogue text.

[0012] The mental state recognition module is used to determine the user's mental state based on the user's emotion category in each round of conversation.

[0013] In a third aspect, the present application provides a computer device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-mentioned method for intelligent recognition of mental states.

[0014] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the above-mentioned method for intelligent recognition of mental states when executed by a processor.

[0015] In a fifth aspect, the present application provides a computer program product, including a computer program, which implements the above-mentioned method for intelligent recognition of mental states when executed by a processor.

[0016] According to the specific embodiments provided in this application, this application has the following technical effects:

[0017] The present application provides a method, apparatus, device, medium and product for intelligent recognition of mental state, which conducts multiple rounds of conversations with users based on a large language model. In each round of conversation, the emotional category of the user is automatically determined based on the text input by the user using an emotion classification model. The user's mental state is determined based on the emotional category of the user in each round of conversation. The mental state recognition is integrated into free interpersonal conversations, which can closely monitor the user's mental health status without being affected by the user's subjective attitude, thereby improving the accuracy and efficiency of mental state recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0019] Figure 1 This is a diagram of an application environment of a method for intelligently identifying a mental state in an embodiment of the present application;

[0020] Figure 2 A flowchart of a method for intelligently identifying a mental state according to an embodiment of the present application is provided;

[0021] Figure 3 A diagram illustrating the execution process of a method for intelligently identifying a mental state according to an embodiment of the present application;

[0022] Figure 4 This is a network structure diagram of a bidirectional converter model in one embodiment of the present application;

[0023] Figure 5This is a diagram showing the internal structure of an encoder and a decoder in one embodiment of the present application;

[0024] Figure 6 This is a schematic diagram of the process of sentiment classification performed by a bidirectional transformer model in one embodiment of the present application;

[0025] Figure 7 A schematic diagram of the functional modules of a mental state intelligent recognition device provided in one embodiment of the present application;

[0026] Figure 8 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0027] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0028] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0029] The mental state intelligent recognition method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be set up separately, integrated on the server 104, or placed on the cloud or other servers. The server 104 builds a sentiment classification model and conducts multiple rounds of dialogue with the user based on the large language model. The terminal 102 can send the text input by the user to the server 104. After receiving the text, the server 104 uses the sentiment classification model to determine the user's emotion category, and determines the user's psychological state based on the user's emotion category in each round of dialogue. The server 104 can feedback the user's psychological state to the terminal 102. In addition, in some embodiments, the psychological state intelligent recognition method can also be implemented separately by the server 104 or the terminal 102.

[0030] Terminal 102 may include, but is not limited to, various desktop computers, laptops, smartphones, tablet computers, IoT devices, and portable wearable devices. IoT devices may include smart speakers, smart TVs, smart air conditioners, and smart car devices. Portable wearable devices may include smart watches, smart bracelets, and head-mounted devices. Server 104 may be implemented as a standalone server or a server cluster consisting of multiple servers, or may be a cloud server.

[0031] In an exemplary embodiment, Figure 2 and Figure 3 As shown, a method for intelligent recognition of mental state is provided. The method is executed by a computer device, specifically a computer device such as a terminal or a server, or a terminal and a server. In the embodiment of the present application, the method is applied to Figure 1 The server 104 in the example is used for explanation, including the following steps 201 to 203.

[0032] Step 201: Conduct multiple rounds of dialogue with the user based on a large language model (LLM).

[0033] The LLM was fine-tuned to address the specific needs of psychological counseling conversations, making the dialogue model more suitable for counseling scenarios and enabling multi-round interactions. After training the LLM on publicly annotated data, it was able to recognize subtle changes in emotions, thought patterns, and emotional expressions, acquiring a certain level of psychological counseling capabilities.

[0034] In step 202, in each round of conversation, a sentiment classification model is used to determine the user's sentiment category based on the text input by the user. The sentiment classification model is pre-trained using a sentiment analysis corpus. The sentiment analysis corpus includes multiple conversation texts and a sentiment category label for each conversation text.

[0035] To meet the application needs of text-based mental state recognition, this application first constructs a large-scale, high-quality sentiment analysis corpus for judging the sentiment of user input text in intelligent dialogue systems. Emotional category labels include seven categories: like, disgust, surprise, happiness, fear, sadness, and anger.

[0036] In an exemplary embodiment, the sentiment analysis corpus includes a general corpus and a special corpus. The training process of the sentiment classification model includes the following steps 301 to 305.

[0037] Step 301: Obtain public conversation text corpus from social networking sites. Specifically, obtain public conversation text corpus from social networking sites such as Weibo and Douban.

[0038] Step 302 : Screen the conversation text corpus to obtain multiple conversation texts, and mark the emotion category label of each conversation text to construct a general corpus.

[0039] Specifically, the conversation text corpus undergoes a preliminary screening to remove meaningless text, such as text containing numerous emoticons, repeated interjections, and repeated punctuation. To further improve the quality of the sentiment analysis corpus, the conversation texts that pass this initial screening undergo further text cleaning, including removing special symbols, emoticons, excess whitespace, converting the text to simplified Chinese, and removing stop words. This process further reduces the noise in the sentiment analysis corpus and allows the language model to focus more on meaningful vocabulary during training. Text cleaning utilizes regular expression search and replacement.

[0040] Step 303: collect conversation texts specifically for a special group of people, and label each conversation text with an emotional category label to construct a special corpus.

[0041] To improve the accuracy of text sentiment classification, we will use a combination of casual conversation and professional Q&A, using face-to-face interviews and chat tools to collect real-world data related to the work and daily lives of airborne troops. This will form a dedicated corpus for airborne troops. Given the unique characteristics of these personnel, the volume of dedicated corpus for airborne troops will be significantly smaller than that of general-purpose corpus. This dedicated corpus will be used for final fine-tuning of the sentiment classification model to produce the final result.

[0042] In order to further increase the amount of training data sets and better train the sentiment classification model, the sentiment analysis corpus is augmented using data augmentation methods. The proposed data augmentation methods include synonym replacement and text back translation.

[0043] Synonym replacement involves randomly selecting non-stop words from a sentence and replacing them with synonyms. Synonym selection can be based on a synonym dictionary or by using word embeddings to select words that are similar in a high-dimensional word vector space. Text back-translation involves translating Chinese text into a foreign language, then translating that foreign language into another foreign language, and finally translating it back into Chinese. Thanks to advances in various translation models, text back-translation can achieve data augmentation while preserving the semantic information of the text.

[0044] By entrusting psychology practitioners to annotate the sentiment categories in general corpora and special corpora, we finally obtained the required sentiment analysis corpus. The number of valid texts in the final constructed sentiment analysis corpus is no less than 150,000.

[0045] Step 304: The sentiment classification model is trained using the general corpus to obtain a pre-trained sentiment classification model. The sentiment classification model is a Bidirectional Encoder Representations from Transformers (BERT) model.

[0046] This application uses the BERT model as the core network for text analysis. The BERT model is a sequence information processing framework based on a bidirectional transformer (Transformer). Figure 4 As shown in , the Transformer encoding unit consists of 6 encoders stacked together, and the decoding layer has the same structure. Figure 5 As shown, an encoder consists of two layers: a self-attention layer and a feedforward neural network layer. The self-attention layer helps the current node focus not only on the current word but also on the contextual semantics. A decoder also contains a self-attention layer and a feedforward neural network layer, but with an additional attention layer between them to help the current node focus on the key content it currently needs to focus on. The Transformer uses a self-attention mechanism to replace the recurrent structure in recurrent neural networks (RNNs). This multi-layer self-attention mechanism replaces traditional RNNs and convolutional neural networks (CNNs), effectively addressing the long-term dependency problem in natural language processing. The core idea of the self-attention mechanism is to calculate the relationship between each word in a sentence and all other words in the sentence. Using these relationships, the weight of each word is adjusted to obtain a higher-dimensional meaning for each word within the sentence. It also implies the relationship between the word and other words in the sentence, thus providing a global representation of the entire sentence.

[0047] like Figure 6 As shown in the figure, the BERT model first performs word embedding on the input text (such as "I like this place very much"), then feeds the result into the encoder for self-attention processing and feedforward neural network calculations. The result is then fed into the next encoder. The decoder operates similarly to the encoder, ultimately determining the sentiment category (such as "like").

[0048] Step 305: Use the dedicated corpus to train the pre-trained sentiment classification model to obtain a final sentiment classification model.

[0049] Because the BERT model has a large number of parameters, training it from scratch consumes a significant amount of computing resources. Therefore, this application downloads a pre-trained language model trained on the Chinese Wikipedia corpus from the internet. Based on this pre-trained model, the output layer network is rebuilt according to the needs of the text analysis task, so that the output layer can output the probabilities of each sentiment category. On this basis, 80% of the data is used as the training set, 10% of the data is used as the training and testing set, and 10% of the data is used as the validation set. The prediction accuracy of the validation set is used to evaluate the performance of the BERT model.

[0050] Step 203: Determine the user's psychological state based on the user's emotion category in each round of conversation.

[0051] Specifically, the user's negative emotions are determined based on their emotional categories in each round of conversation. When the user's negative emotions are greater than or equal to a set threshold, a structured conversation is conducted with the user, and the user's psychological state is determined based on the results of the structured conversation.

[0052] Among them, structured dialogue uses computers to give some fixed questions in the dialogue, and users answer them in the form of dialogue to complete the identification of psychological states such as anxiety, depression, stress and sleep disorders.

[0053] This application integrates mental state recognition into free human-computer dialogue, which can closely monitor the user's mental health status, facilitate the implementation of mental health assessment, reduce the user's resistance to frequent mental health assessments, and automatically analyze the user's mental health status, thereby improving the accuracy and efficiency of mental state recognition.

[0054] Based on the same inventive concept, embodiments of the present application also provide a mental state intelligent recognition device for implementing the aforementioned mental state intelligent recognition method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more mental state intelligent recognition device embodiments provided below can be found in the limitations of the mental state intelligent recognition method above and will not be further elaborated here.

[0055] In an exemplary embodiment, Figure 7 As shown, a mental state intelligent recognition device is provided, including: a dialogue module 701, an emotion classification module 702 and a mental state recognition module 703.

[0056] The dialogue module 701 is used to conduct multiple rounds of dialogue with the user based on the large language model.

[0057] The sentiment classification module 702 is used to determine the user's sentiment category in each round of conversation based on the text input by the user using a sentiment classification model. The sentiment classification model is pre-trained using a sentiment analysis corpus. The sentiment analysis corpus includes multiple conversation texts and the sentiment category label for each conversation text.

[0058] The psychological state identification module 703 is used to determine the psychological state of the user based on the emotion category of the user in each round of dialogue.

[0059] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 8 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store a sentiment analysis corpus. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a method for intelligent recognition of psychological states is implemented.

[0060] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure 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 shown in the figure, or combine certain components, or have a different component arrangement.

[0061] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0062] In an exemplary embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0063] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0064] In this application, all actions to obtain signals, information or data are carried out in compliance with the relevant data protection laws and policies of the country where they are located and with the authorization given by the owner of the corresponding device.

[0065] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0066] The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processors involved in the various embodiments provided herein may include, but are not limited to, general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic units, data processing logic units based on quantum computing, and the like.

[0067] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0068] This document uses specific examples to illustrate the principles and implementation methods of this application. The description of the above examples is only intended to help understand the method and core concept of this application. At the same time, for those skilled in the art, based on the concept of this application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.

Claims

1. A method for intelligent recognition of mental states, characterized in that: The mental state intelligent recognition method comprises: Conduct multi-round conversations with users based on a large language model; In each round of conversation, a sentiment classification model is used to determine the user's sentiment category based on the text input by the user. The sentiment classification model is pre-trained using a sentiment analysis corpus. The sentiment analysis corpus includes multiple conversation texts and a sentiment category label for each conversation text. Determine the user's mental state based on the user's emotion category in each round of conversation.

2. The method for intelligently identifying mental states according to claim 1, characterized in that: The sentiment analysis corpus includes a general corpus and a special corpus; The training process of the sentiment classification model includes: Obtain public conversation text corpus from social networking sites; Screening the conversation text corpus to obtain multiple conversation texts, and marking the emotion category label of each conversation text to construct a general corpus; Collect conversation texts specifically for special groups of people, label each conversation text with an emotional category label, and build a dedicated corpus; Using the general corpus to train the sentiment classification model to obtain a pre-trained sentiment classification model; The pre-trained sentiment classification model is trained using the dedicated corpus to obtain a final sentiment classification model.

3. The method for intelligently identifying mental states according to claim 2, characterized in that: The special group mentioned is the airborne troops.

4. The method for intelligently identifying mental states according to claim 2, wherein: The training process of the sentiment classification model also includes: The general corpus and the special corpus are augmented by synonym replacement and text back translation.

5. The method for intelligently identifying mental states according to claim 1, characterized in that: The sentiment classification model is a bidirectional transformer model.

6. The method for intelligently identifying mental states according to claim 1, characterized in that: Determine the user's psychological state based on the user's emotional category in each round of conversation, including: Determine the number of negative emotions of users based on their emotion categories in each round of conversation; When the number of negative emotions of the user is greater than or equal to the set threshold, a structured dialogue is conducted with the user, and the user's psychological state is determined based on the results of the structured dialogue.

7. A mental state intelligent recognition device, applied to the mental state intelligent recognition method according to any one of claims 1 to 6, characterized in that: The mental state intelligent recognition device comprises: The dialogue module is used to conduct multi-round dialogues with users based on a large language model; The sentiment classification module is used to determine the user's sentiment category in each round of dialogue based on the text input by the user using a sentiment classification model. The sentiment classification model is pre-trained using a sentiment analysis corpus. The sentiment analysis corpus includes multiple dialogue texts and a sentiment category label for each dialogue text. The mental state recognition module is used to determine the user's mental state based on the user's emotion category in each round of conversation.

8. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method for intelligently identifying a mental state according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for intelligently identifying a mental state according to any one of claims 1 to 6 is implemented.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method for intelligently identifying a mental state according to any one of claims 1 to 6 is implemented.