Method and system for identifying abnormal psychological states of social media users based on psychological scale

By introducing a psychological scale as a prompt basis on the social media platform and combining it with the LLM model for multiple rounds of questioning, the problem of low accuracy in identifying abnormal mental states in existing technologies was solved, and more accurate identification of abnormal mental states was achieved.

CN119446378BActive Publication Date: 2025-09-30HARBIN INST OF TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411559178.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-04
Publication Date
2025-09-30
Estimated Expiration
2044-11-04

AI Technical Summary

Technical Problem

Existing abnormal mental state recognition methods only identify posts through a basic understanding of abnormal mental states, and fail to deeply explore posts closely related to abnormal mental states, resulting in low recognition accuracy.

Method used

A psychological scale is introduced as a prompt basis. The relevance between posts and scale items is screened and spliced ​​through a small embedding model. The LLM model is used for multiple rounds of questioning to identify the symptoms in the scale items corresponding to the posts. The abnormal psychological state is identified by combining the symptom definition of the psychological scale.

Benefits of technology

The accuracy of abnormal psychological state identification has been improved, and a more detailed and in-depth understanding of user posts has been achieved through rich scale item information, thereby improving the accuracy of identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119446378B_ABST
    Figure CN119446378B_ABST
Patent Text Reader

Abstract

A method and system for identifying abnormal psychological states of social media users based on a psychological scale, relating to the field of artificial intelligence technology, addresses the issue. Existing methods for identifying abnormal psychological states rely solely on a basic understanding of posts and abnormal psychological states, failing to deeply identify posts closely related to abnormal psychological states. This results in low accuracy in identifying abnormal psychological states. This application introduces a psychological scale to provide rich scale item information for abnormal psychological state identification, enabling the identification method to gain a more detailed and in-depth understanding of user posts, thereby enabling more accurate identification and improving the accuracy of abnormal psychological state identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method and system for identifying abnormal psychological states of social media users based on a psychology scale. Background Art

[0002] Social media data is massive, with strong social network relationships and a large number of posts. Sentiment analysis on social media can identify abnormal psychological states of users when they post and classify their emotions. However, identifying abnormal psychological states is a crucial part of sentiment analysis, which can affect its accuracy.

[0003] In the field of abnormal mental state recognition, tasks are generally divided into two categories: post-level recognition and user-level recognition. Post-level recognition involves identifying abnormal mental states within a single social media post; user-level recognition involves comprehensive recognition across multiple posts by a single user. Existing abnormal mental state recognition methods rely solely on a basic understanding of posts and abnormal mental states, failing to deeply identify posts closely related to abnormal mental states. This results in low accuracy in abnormal mental state recognition. Summary of the Invention

[0004] The purpose of this invention is to address the problem of low accuracy in identifying abnormal psychological states by addressing existing methods that rely solely on a basic understanding of posts and abnormal psychological states. This method proposes a method and system for identifying abnormal psychological states in social media users based on a psychological scale.

[0005] The technical solution adopted by the present invention to solve the above technical problems is:

[0006] The method for identifying abnormal psychological states of social media users based on a psychological scale includes the following steps:

[0007] Step 1: Determine whether the recognition task is a post-level task or a user-level task. The post-level task involves identifying abnormal psychological states in a single post on social media, while the user-level task involves identifying abnormal psychological states in multiple posts by a user.

[0008] For post-level tasks, a single post obtained from social media is directly input into the LLM model. For user-level tasks, all posts of a user are first obtained. Then, posts are filtered based on their correlation with the scale items in the psychological scale. The filtered posts are concatenated and used as the input of the LLM model.

[0009] Step 2: Introduce the psychological scale into the LLM model as a prompt basis, and conduct multiple rounds of inquiries to the LLM model based on the input of step 1 to obtain the symptoms in the scale items corresponding to the post, and obtain the abnormal psychological state identification results based on each abnormal psychological state and its corresponding symptoms.

[0010] Furthermore, in step 1, the posts are screened according to their correlation with the scale items in the psychological scale, and the screened posts are concatenated and used as the input of the LLM model. The specific steps are as follows:

[0011] Step 1: Obtain the psychology scale and extract all scale items from the psychology scale;

[0012] Step 1 and 2: Paginate each post of the user i and each scale item s j are converted into post vectors V(p i ) and scale item vector V(s j );

[0013] Step 1 and 3: Calculate the cosine similarity between each post vector and each scale item vector, and get the similarity score CosSim(p i ,s j ), expressed as:

[0014]

[0015] Step 14: For each post, select the highest similarity score as the integrated similarity score AggSim(p i );

[0016]

[0017] Where M is the total number of scale items, j is the jth scale item;

[0018] Step 15: Sort all posts according to the integrated similarity score and select K posts according to the ranking, expressed as:

[0019] Top-KPosts=argmax K ({AggSim(p i )|p i ∈P})

[0020] Among them, the total number of tokens of K posts is less than the input upper limit of the LLM model, and Top-KPosts is the K posts with the highest integrated similarity score. K Indicates selecting the posts corresponding to the largest K values;

[0021] Step 16: After splicing the selected K posts, input them into the LLM model. The input is represented as:

[0022] Input User-level =Concat(Top-KPosts)

[0023] Among them, Input User-level is the input of the user-level task, and Concat means concatenation.

[0024] Furthermore, the small embedding model is paraphrase-MiniLM-L6-v2.

[0025] Furthermore, in step 2, the psychological scale is introduced into the LLM model as a prompt basis, and based on the input of step 1, the LLM model is queried multiple times to obtain the symptoms in the scale items corresponding to the post. The specific steps are:

[0026] According to the input post, the LLM model is used to obtain the response r of the input post and each scale item. i , and then get the response set R corresponding to the input post, and get the symptoms in the scale items corresponding to the post based on the response set R. The response set R is expressed as:

[0027]

[0028] Among them, r i =0 means that the scale item s does not exist in the post i The symptoms reflected, and r i =1 indicates that the scale item s exists in the post i The symptoms reflected, i∈{1,2,...,N}, N represents the total number of scale items.

[0029] Furthermore, the abnormal mental state recognition result is expressed as:

[0030]

[0031] Among them, (p,R) is a single post p and reply R, (Top-K Posts,R) is the most relevant K posts and reply R, Identify results of abnormal mental states.

[0032] A social media user abnormal psychological state identification system based on a psychological scale, the system comprising a task identification module, an inquiry module, and an identification module;

[0033] The task identification module is used to determine whether the identification task is a post-level task or a user-level task. The post-level task is to identify abnormal psychological states for a single post on social media, and the user-level task is to identify abnormal psychological states for multiple posts of a user.

[0034] For post-level tasks, a single post obtained from social media is directly input into the LLM model. For user-level tasks, all posts of a user are first obtained. Then, posts are filtered based on their correlation with the scale items in the psychological scale. The filtered posts are concatenated and used as the input of the LLM model.

[0035] The inquiry module is used to introduce the psychology scale into the LLM model as a prompt basis, and based on the input of the LLM model, perform multiple rounds of inquiries on the LLM model to obtain the symptoms in the scale items corresponding to the post, and obtain the abnormal psychological state identification results based on each abnormal psychological state and its corresponding symptoms.

[0036] Furthermore, the task identification module screens posts based on their relevance to items in the psychological scale, and concatenates the screened posts as input to the LLM model. The specific steps are as follows:

[0037] Step 1: Obtain the psychology scale and extract all scale items from the psychology scale;

[0038] Step 1 and 2: Paginate each post of the user i and each scale item s j are converted into post vectors V(p i ) and scale item vector V(s j );

[0039] Step 1 and 3: Calculate the cosine similarity between each post vector and each scale item vector, and get the similarity score CosSim(p i ,s j ), expressed as:

[0040]

[0041] Step 14: For each post, select the highest similarity score as the integrated similarity score AggSim(p i );

[0042]

[0043] Where M is the total number of scale items, j is the jth scale item;

[0044] Step 15: Sort all posts according to the integrated similarity score and select K posts according to the ranking, expressed as:

[0045] Top-KPosts=argmax K ({AggSim(p i )|p i ∈P})

[0046] Among them, the total number of tokens of K posts is less than the input upper limit of the LLM model, and Top-KPosts is the K posts with the highest integrated similarity score. K Indicates selecting the posts corresponding to the largest K values;

[0047] Step 16: After concatenating the K selected posts, input them into the LLM model, expressed as:

[0048] Input User-level =Concat(Top-KPosts)

[0049] Among them, Input User-level is the input of the user-level task, and Concat means concatenation.

[0050] Furthermore, the small embedding model is paraphrase-MiniLM-L6-v2.

[0051] Furthermore, the query module specifically performs the following steps:

[0052] According to the input post, the LLM model is used to obtain the response r of the input post and each scale item. i , and then get the response set R corresponding to the input post, and get the symptoms in the scale items corresponding to the post based on the response set R. The response set R is expressed as:

[0053]

[0054] Among them, r i =0 means that the scale item s does not exist in the post i The symptoms reflected, and r i =1 indicates that the scale item s exists in the post i The symptoms reflected, i∈{1,2,...,N}, N represents the total number of scale items.

[0055] Furthermore, the abnormal mental state recognition result is expressed as:

[0056]

[0057] Among them, (p,R) is a single post p and reply R, (Top-K Posts,R) is the most relevant K posts and reply R, Identify results of abnormal mental states.

[0058] The beneficial effects of the present invention are:

[0059] This application provides rich scale item information for abnormal psychological identification by introducing psychological scales, so that the identification method can have a more detailed and in-depth understanding of the user's posts, thereby making more accurate identification, thereby improving the accuracy of abnormal psychological state identification. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 This is the overall structure diagram of this application. DETAILED DESCRIPTION

[0061] It should be noted that, unless there is any conflict, the various embodiments disclosed in this application can be combined with each other.

[0062] Specific implementation method 1: refer to Figure 1 Specifically describing this embodiment, the method for identifying abnormal psychological states of social media users based on a psychological scale described in this embodiment includes the following steps:

[0063] Step 1: Determine whether the recognition task is a post-level task or a user-level task. The post-level task involves identifying abnormal psychological states in a single post on social media, while the user-level task involves identifying abnormal psychological states in multiple posts by a user.

[0064] For post-level tasks, a single post obtained from social media is directly fed into the LLM model. For user-level tasks, all posts of a user are first obtained, and then the posts are filtered based on their correlation with the scale items in the psychological scale. The filtered posts are then concatenated and fed into the LLM model.

[0065] Step 2: Introduce the psychological scale into the LLM model as a prompt basis, and conduct multiple rounds of interrogation on the LLM model based on the input of step 1 to obtain the symptoms in the scale items corresponding to the post;

[0066] Step 3: Input the symptoms obtained in step 2 and the input in step 1 into the LLM model together to obtain the output abnormal mental state recognition results.

[0067] In step 1, the posts are screened based on their correlation with the items in the psychological scale, and the screened posts are concatenated and input into the LLM model. The specific steps are as follows:

[0068] Step 1: Get the psychology scale and extract all the scale items from the psychology scale, that is, all N scale items S = {s1, s2, ...s N};

[0069] Step 1 and 2: Define a single post of the post-level task as p, and define the task goal as identifying the abnormal psychological state reflected in post p Define the post set of a user U in the user-level task as P = {p1,p2,…,p L}, L is the number of posts, then the task goal is to identify the abnormal psychological state of the user as a whole based on the post set P

[0070] Each post of the user p i and each scale item s j are converted into post vectors V(p i ) and scale item vector V(s j );

[0071] Step 1 and 3: Calculate the cosine similarity between each post vector and each scale item vector, and get the similarity score CosSim(p i ,s j ), expressed as:

[0072]

[0073] Step 14: For each post, select the highest similarity score as the integrated similarity score AggSim(p i );

[0074]

[0075] Where M is the total number of scale items, j is the jth scale item;

[0076] Step 15: Sort all posts according to the integrated similarity score and select K posts according to the ranking, expressed as:

[0077] Top-KPosts=argmax K ({AggSim(p i )| p i∈P})

[0078] Among them, the total number of tokens of K posts is less than the input upper limit of the LLM model, and Top-KPosts is the K posts with the highest integrated similarity score. K Indicates selecting the posts corresponding to the largest K values;

[0079] Step 16: After concatenating the K selected posts, input them into the LLM model, expressed as:

[0080] Input User-level =Concat(Top-KPosts)

[0081] Among them, Input User-level is the input of the user-level task, and Concat means concatenation.

[0082] The small embedding model is paraphrase-MiniLM-L6-v2.

[0083] The specific steps of step 2 are:

[0084] According to the input post, the LLM model is used to obtain the response r of the input post and each scale item. i , and then get the reply set R corresponding to the input post, expressed as:

[0085]

[0086] Among them, r i =0 means that the scale item s does not exist in the post i The symptoms reflected, and r i =1 indicates that the scale item s exists in the post i The symptoms reflected, i∈{1,2,...,N}, N represents the total number of scale items.

[0087] During implementation, the task requirements for identifying abnormal mental states are input to the LLM, for example: "You are an AI assistant specializing in text analysis, and I am a human. This application will complete a text analysis task through multiple rounds of dialogue. The task is as follows: This application has user-written posts. In each round of dialogue, I will give you a statement about the author. Based on the author's text, you need to score this statement. After scoring all statements, I will ask you which level of suicide risk you think the author is more likely to be at, and then you need to give your choice." The scoring format for each round is also explained: the score is 0 or 1, where 0 means disagreement and 1 means agreement.

[0088] The psychological scale is used as a prompt basis to collect symptoms. In order to maximize the use of scale items, save tokens and collection time, this application selects the 6 scale items with the highest relevance to the current post from all N scale items S as prompt basis. The selection method is similar to the above content, that is, calculate the cosine similarity between the scale item and the current post, and select the 6 scale items with the highest similarity. Subsequently, this application adopts the method of prompting item by item. In the i-th round of inquiry, the scale item s i Used to ask if the symptom exists in the LLM post.

[0089] In step three, the LLM response set R is submitted to the LLM together with the user post, and the subdivision definition of each abnormal mental state classification is introduced to the LLM.

[0090] For example, in the risk assessment of the abnormal psychological state of suicide, this application will define five suicide risk levels based on the original five categories of the CSSRS suicide risk scale. They are (ranked from least risk to greatest risk):

[0091] Support(SU) <Indicator(IN)<Ideation(ID)<Behavior(BR)<Attempt(AT)

[0092] 1) SU: (Suicide Support) does not exhibit any risk factors and does not include any suicidal thoughts or ideas.

[0093] 2) IN: (Suicide Indicator) shows some risk factors that may lead to suicide.

[0094] 3) ID: (Suicide Ideation) Having thoughts about death or suicide, but without any actual behavior.

[0095] 4) BR: (Suicide Behavior) Attempting suicide or dangerous behavior that may lead to death, or preparing to implement a suicide plan.

[0096] 5) AT (Suicide Attempt): Any suicide attempt, regardless of whether it resulted in injury.

[0097] Finally, the definitions of each category are input into the LLM.

[0098] Final prediction of abnormal psychological state using LLM:

[0099]

[0100] Among them, in the post-level task, LLM analyzes a single post p and reply R, while in the user-level task, LLM analyzes the most relevant K posts and R. Finally, the recognition result of abnormal psychological state is obtained

[0101] This application is used to identify abnormal psychological states at the user or post level on social media platforms (such as Twitter and Reddit), including depression, suicidal thoughts, anxiety, and other abnormal psychological states. Our proposed thought chain prompting method, based on a psychological scale, can be deployed directly using a large language model API (such as GPT-3.5-turbo), eliminating the need for model training and GPU resources, making it very convenient.

[0102] This application uses scales corresponding to abnormal psychological states as prompts. For example, for identifying depression, the PHQ-9 Depression Scale can be used; for identifying suicidal states, the C-SSRS Suicide Risk Assessment Scale can be used; for identifying anxiety, the BAI Anxiety Scale can be used. Key scale items are extracted from the scales and used as prompts in the LLM to collect relevant symptoms and identify abnormal psychological states.

[0103] This application selected four social media datasets corresponding to different abnormal psychological states for experiments. The information of these four datasets is shown in Table 1:

[0104]

[0105] Table 1 Statistics of four datasets

[0106] DR and Dreaddit are post-level datasets for identifying depression and anxiety, respectively, using the weighted F1 score as the evaluation metric. CSSRS and eRisk 2018 are user-level datasets for identifying suicidal and depressive states, respectively. The evaluation metric for CSSRS is the grade F1 score, while that for eRisk 2018 is the binary F1 score.

[0107] The proposed prompting method is compared with the following six existing advanced prompting methods:

[0108] (1) V_sen: Use the VADER dictionary to assign sentiment polarity labels to posts. Then design prompts by adding sentiment polarity labels to zero-shot prompts.

[0109] (2) N_sen: Use the NRC EmoLex dictionary to assign sentiment polarity labels to posts. Then design prompts by adding sentiment polarity labels to zero-shot prompts.

[0110] (3) N_emo: Use the NRC EmoLex dictionary to assign sentiment labels to posts. Then design prompts by adding sentiment labels to zero-shot prompts.

[0111] (4) CoT_ZS: Enhances zero-shot prompts by introducing a thought chain component to guide the LLM to generate a step-by-step explanation of its decision.

[0112] (5) CoT_emo_ZS: Integrates the emotion enhancement component and the thought chain component into zero-shot prompts to help LLM pay attention to emotional cues and generate a detailed step-by-step explanation of its decision-making process.

[0113] (6) CoT_emo_FS: Based on the CoT_emo_ZS method, it guides LLM to make more standard predictions by adding response examples written by domain experts.

[0114] Some of these methods consider the relationship between emotions and abnormal psychological states and provide examples of expert annotation. However, only the method of this application incorporates professional psychological scales into the prompt design. For different abnormal situations, this application uses the corresponding scale as the basis for zero-shot prompts. For depressive state identification, this application uses the PHQ-9 depression scale, which consists of 9 items to assess the severity of depression. For anxiety state identification, this application uses the BAI scale, which consists of 21 items. However, using all 21 scale items would generate too many query rounds and consume a large number of tokens. Moreover, many of these scale items are completely irrelevant to the content of the post and can be directly omitted. Therefore, this application selects 9 scale items from the BAI based on the relevance of the scale items to the post to prompt LLM. For suicidal state identification, this application uses the C-SSRS scale, which consists of 6 items and is designed to assess the severity of suicide risk by exploring suicidal signs, suicidal ideation, suicidal plans, and suicidal behaviors.

[0115] In the prompt experiment, this application chooses GPT-3.5-turbo for the experiment. The comparison of the results of this application's method and six baseline methods is shown in Table 2:

[0116]

[0117] Table 2 Results of the main experiment (Scale_CoT_ZS represents the method of this application, and the best results are highlighted in bold)

[0118] This application's hinting method, based on psychological scales, achieved top performance on all four datasets, demonstrating significant performance improvements. Previous hinting methods only provided a basic understanding of posts and abnormal psychological states, failing to delve into posts closely related to abnormal psychological states. This resulted in the LLM lacking reliable prediction basis and ultimately leading to incorrect predictions. In contrast, the introduction of psychological scales provides LLM predictions with rich scale item information, enabling the model to gain a more detailed and in-depth understanding of user posts, thereby enabling more accurate recognition.

[0119] It is worth noting that even in the zero-sample setting, the method of the present application is significantly better than the few-sample CoT method CoT_emo_FS. The present application believes that although previous few-sample CoT methods have combined examples written by experts as guidance, LLMs usually have difficulty understanding the deeper reasoning logic contained in these examples. Therefore, the model cannot grasp the key points of predicting abnormal psychological states. In contrast, the method of the present application collects symptoms through psychological scales, providing LLMs with detailed and theoretically supported reasoning basis, enabling the model to make correct inferences.

[0120] In addition, the method of the present application is also superior to all emotion enhancement methods. Although these methods incorporate emotion-related information, whether adding emotion labels or letting the model focus on analyzing the user's emotions, they are too simple and cannot reveal deeper emotional information. The present application believes that although emotional information can reflect certain aspects of the user's psychological state and may reveal certain signs of abnormal psychological states, it cannot capture all the manifestations required to identify abnormal psychological states. Emotional information usually cannot reflect physical symptoms (such as abdominal pain or insomnia), deeper psychological states (such as guilt or jealousy), and certain objective factors (such as criticism from others), and therefore lacks many key elements necessary to identify abnormal psychological states. The method of the present application comprehensively collects this information through a scale, providing a solid foundation for prediction.

[0121] Currently, research on large-model-based prompt engineering has become a significant trend in the field of artificial intelligence, with widespread application in fields such as natural language processing and image recognition. The ubiquity of this type of work is reflected in its significant improvements in the performance and adaptability of large language models (LLMs). By precisely designing prompts, researchers can guide models to better understand task requirements, thereby generating more accurate and professional results. This not only promotes technological advancement but also provides new ideas and methods for practical applications. In particular, in fields such as education, healthcare, and customer service, optimized prompt engineering can significantly improve interaction efficiency and user experience.

[0122] In line with this trend, this application introduces a psychological scale to identify abnormal mental states, focusing on the design of prompts based on the psychological scale and the construction of the entire process. This not only improves the efficiency of LLM use but also ensures its scientific and professional nature in mental health assessment. By combining the psychological scale with the LLM, this application can systematically collect and analyze user data, providing a quantitative basis for the identification of abnormal mental states. This innovative approach optimizes the application scenarios of large models and provides new solutions for the field of mental health, demonstrating how to effectively utilize this powerful tool to promote the accuracy and interpretability of mental health assessments.

[0123] It should be noted that the specific embodiments are merely explanations and illustrations of the technical solutions of the present invention and cannot be used to limit the scope of protection. Any minor changes made based on the claims and description of the present invention shall still fall within the scope of protection of the present invention.

Claims

1. A method for identifying abnormal psychological states of social media users based on a psychological scale, characterized by The following steps are involved: Step 1: Determine whether the recognition task is a post-level task or a user-level task. The post-level task involves identifying abnormal psychological states in a single post on social media, while the user-level task involves identifying abnormal psychological states in multiple posts by a user. For post-level tasks, a single post obtained from social media is directly input into the LLM model. For user-level tasks, all posts of a user are first obtained. Then, posts are filtered based on their correlation with the scale items in the psychological scale. The filtered posts are concatenated and used as the input of the LLM model. Step 2: Introduce the psychological scale into the LLM model as a prompt basis, and conduct multiple rounds of querying the LLM model based on the input of step 1 to obtain the symptoms in the scale items corresponding to the post, and obtain the abnormal psychological state identification results based on each abnormal psychological state and its corresponding symptoms; In step 2, the psychological scale is introduced into the LLM model as a prompt basis, and based on the input of step 1, the LLM model is queried multiple times to obtain the symptoms in the scale items corresponding to the post. The specific steps are: According to the input post, the LLM model is used to obtain the response r of the input post and each scale item. i , and then get the response set R corresponding to the input post, and get the symptoms in the scale items corresponding to the post based on the response set R. The response set R is expressed as: Among them, r i =0 means that the scale item s does not exist in the post i The symptoms reflected, and r i =1 indicates that the scale item s exists in the post i Symptoms reflected, i∈{1,2,...,N}, N represents the total number of scale items; The abnormal mental state recognition result is expressed as: Among them, (p,R) is a single post p and reply set R, (Top-KPosts,R) is the most relevant K posts and reply set R, Identify results of abnormal mental states.

2. The method for identifying abnormal psychological states of social media users based on a psychological scale according to claim 1 is characterized in that In step 1, the posts are screened based on their correlation with the items in the psychological scale, and the screened posts are concatenated to serve as the input of the LLM model. The specific steps are as follows: Step 1: Obtain the psychology scale and extract all scale items from the psychology scale; Step 1 and 2: Paginate each post of the user i and each scale item s j are converted into post vectors V(p i ) and scale item vector V(s j ); Step 1 and 3: Calculate the cosine similarity between each post vector and each scale item vector, and get the similarity score CosSim(p i ,s j ), expressed as: Step 14: For each post, select the highest similarity score as the integrated similarity score AggSim(p i ); Where M is the total number of scale items, j is the jth scale item; Step 15: Sort all posts according to the integrated similarity score and select K posts according to the ranking, expressed as: Top-KPosts=argmax K ({AggSim(p i )|p i ∈P}) Among them, the total number of tokens of K posts is less than the input upper limit of the LLM model, and Top-KPosts is the K posts with the highest integrated similarity score. K Indicates selecting the posts corresponding to the largest K values; Step 16: After splicing the selected K posts, input them into the LLM model. The input is represented as: Input User-level =Concat(Top-KPosts) Among them, Input User-level is the input of the user-level task, and Concat means concatenation.

3. The method for identifying abnormal psychological states of social media users based on a psychological scale according to claim 2 is characterized in that The small embedding model is paraphrase-MiniLM-L6-v2.

4. A social media user abnormal psychological state identification system based on a psychological scale, characterized by The system includes a task identification module, an inquiry module, and an identification module; The task identification module is used to determine whether the identification task is a post-level task or a user-level task. The post-level task is to identify abnormal psychological states for a single post on social media, and the user-level task is to identify abnormal psychological states for multiple posts of a user. For post-level tasks, a single post obtained from social media is directly input into the LLM model. For user-level tasks, all posts of a user are first obtained. Then, posts are filtered based on their correlation with the scale items in the psychological scale. The filtered posts are concatenated and used as the input of the LLM model. The query module is used to introduce the psychology scale into the LLM model as a prompt basis, and according to the input of the LLM model, conduct multiple rounds of query on the LLM model to obtain the symptoms in the scale items corresponding to the post, and obtain the abnormal psychological state identification results based on each abnormal psychological state and its corresponding symptoms; The query module specifically performs the following steps: According to the input post, the LLM model is used to obtain the response r of the input post and each scale item. i , and then get the response set R corresponding to the input post, and get the symptoms in the scale items corresponding to the post based on the response set R. The response set R is expressed as: Among them, r i =0 means that the scale item s does not exist in the post i The symptoms reflected, and r i =1 indicates that the scale item s exists in the post i Symptoms reflected, i∈{1,2,...,N}, N represents the total number of scale items; The abnormal mental state recognition result is expressed as: Among them, (p,R) is a single post p and reply set R, (Top-KPosts,R) is the most relevant K posts and reply set R, Identify results of abnormal mental states.

5. The social media user abnormal psychological state identification system based on the psychological scale according to claim 4 is characterized in that The specific steps of screening posts based on the correlation between posts and items in the psychological scale and combining the screened posts as input to the LLM model are as follows: Step 1: Obtain the psychology scale and extract all scale items from the psychology scale; Step 1 and 2: Paginate each post of the user i and each scale item s j are converted into post vectors V(p i ) and scale item vector V(s j ); Step 1 and 3: Calculate the cosine similarity between each post vector and each scale item vector, and get the similarity score CosSim(p i ,s j ), expressed as: Step 14: For each post, select the highest similarity score as the integrated similarity score AggSim(p i ); Where M is the total number of scale items, j is the jth scale item; Step 15: Sort all posts according to the integrated similarity score and select K posts according to the ranking, expressed as: Top-KPosts=argmax K ({AggSim(p i )|p i ∈P}) Among them, the total number of tokens of K posts is less than the input upper limit of the LLM model, and Top-KPosts is the K posts with the highest integrated similarity score. K Indicates selecting the posts corresponding to the largest K values; Step 16: After concatenating the K selected posts, input them into the LLM model, expressed as: Input User-level =Concat(Top-KPosts) Among them, Input User-level is the input of the user-level task, and Concat means concatenation.

6. The social media user abnormal psychological state identification system based on the psychological scale according to claim 5 is characterized in that The small embedding model is paraphrase-MiniLM-L6-v2.

Citation Information

Patent Citations

  • Large language model and small model cascade-based depressive disorder detection algorithm

    CN118213068A