Method for constructing a psychological portrait and related products
Patent Information
- Application Number
- CN202610557574.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-24
- Publication Date
- 2026-09-01
AI Technical Summary
[0005]本申请提供了一种心理画像的构建方法及相关产品,用以解决现有技术中,识别得到的用户心理画像准确性低的问题
[0019] Compared with the prior art, the technical solution provided in this application has the following advantages: The method provided in this application obtains dialogue information of a user undergoing psychological counseling; obtains identification prompt information, which is used to instruct a large language model to perform layer-by-layer psychological feature label recognition; inputs the dialogue information and the identification prompt information into the large language model, so that the large language model, according to the identification prompt information, identifies the label recognition result corresponding to the dialogue information under a pre-constructed psychological profile label system, the label recognition result including psychological feature labels and their corresponding label levels; the psychological profile label system includes multiple label levels, each label level being used to represent the user's psychological profile through different dimensions; and determines the user's psychological profile based on the label recognition result. Thus, by utilizing the semantic understanding capability of the large language model, and based on each label level in the psychological profile label system, the user's dialogue information is identified layer by layer according to the label levels, so as to construct the user's profile from different dimensions and improve the accuracy of the user's psychological profile.
Smart Images

Figure CN122677181A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a method for constructing psychological profiles and related products. Background Technology
[0002] In recent years, mental health issues among users have become increasingly serious, becoming a public health issue of great concern to the whole society. According to relevant statistics, there is a risk of depression of varying degrees at all ages; however, there are few professionals engaged in psychiatric treatment, and professional mental health service resources are severely lacking.
[0003] To understand users' psychological state, related technologies typically use rule matching to build user profiles. This involves using a predefined keyword library and a matching rule engine to perform keyword matching on users' psychological dialogue text, extracting corresponding psychological tags, and determining the user's psychological profile.
[0004] However, this method relies entirely on a keyword database, which has limited recognition capabilities. It may lead to matching errors due to inconsistencies between the actual semantics and the content expressed by the keywords, resulting in low accuracy in the identified user psychological profiles. Summary of the Invention
[0005] This application provides a method for constructing psychological profiles and related products to solve the problem of low accuracy in the user psychological profiles identified in the prior art.
[0006] According to a first aspect of the embodiments of this application, a method for constructing a psychological profile is provided, comprising: Obtain dialogue information from users' psychological counseling sessions; Obtain recognition prompt information, which is used to instruct the large language model to perform layer-by-layer psychological feature label recognition; The dialogue information and the recognition prompt information are input into a large language model so that the large language model can identify the label recognition result corresponding to the dialogue information under a pre-constructed psychological profile labeling system according to the recognition prompt information. The label recognition result includes psychological feature labels and their corresponding label levels. The psychological profile labeling system includes multiple label levels, and each label level is used to represent the user's psychological profile through different dimensions. The user's psychological profile is determined based on the tag recognition results.
[0007] Optionally, the identification prompt information includes: the definition of each tag level in the psychological profile tagging system, and a preset set of psychological feature tags; The large language model identifies the label recognition results corresponding to the dialogue information under the pre-constructed mental profile labeling system according to the recognition prompt information, including: Based on the dialogue information, the large language model determines candidate psychological feature labels that conform to the definition of the label level from the preset psychological feature label set; The label recognition result is determined based on the candidate psychological feature labels and their corresponding label levels.
[0008] Optionally, determining the label recognition result based on the candidate psychological feature labels and their corresponding label levels includes: If there is only one label level corresponding to the candidate psychological feature label, then the label level corresponding to the candidate psychological feature label is determined as the target label level. or, When there are multiple tag levels corresponding to the candidate psychological feature tags, the tag levels corresponding to the candidate psychological feature tags are re-determined from a specified dimension based on the dialogue information content corresponding to the candidate psychological feature tags to obtain the target tag level corresponding to the candidate psychological feature tags. The specified dimension includes time dimension and / or context dimension. The candidate psychological feature labels and their corresponding target label levels are determined as the label recognition results.
[0009] Optionally, determining the user's psychological profile based on the tag recognition result includes: The user's historical psychological profile is updated using the tag recognition results.
[0010] Optionally, updating the user's historical psychological profile using the tag recognition results includes: If the tag recognition result contains new psychological feature tags that are not present in the user's historical psychological profile, the new psychological feature tags and their corresponding tag levels are added to the user's psychological profile.
[0011] Optionally, updating the user's historical psychological profile using the tag recognition results includes: Determine whether the tag recognition result matches the same target psychological feature tag in the user's historical psychological profile; Based on the confidence level of the target psychological feature label in the label recognition result and the confidence level of the target psychological feature label in the user's historical psychological profile, the updated confidence level of the target psychological feature label is determined. The confidence level is used to update the confidence level of the target psychological feature label in the user's historical psychological profile.
[0012] Optionally, updating the user's historical psychological profile using the tag recognition results includes: Based on the tag recognition results, psychological feature tags with incorrect tag levels are determined from the user's historical psychological profile, and the tag level of the psychological feature tags with incorrect tag levels is updated based on the tag recognition results. And / or, Based on the tag recognition results, decay psychological feature tags are determined from the user's historical psychological profile; According to the preset confidence decay strategy, the confidence of the corresponding decayed psychological feature label in the user's historical psychological profile is reduced.
[0013] Optionally, updating the user's historical psychological profile using the tag recognition results includes: Determine whether there are logically contradictory psychological feature labels in the updated user's psychological profile; If a logically contradictory psychological feature label is identified, the logically contradictory psychological feature label is marked, and / or a review prompt message is generated.
[0014] Optionally, the method further includes: From the preset psychological crisis paths, the target psychological crisis path matching the psychological profile is determined, and the crisis development stage corresponding to the psychological profile is determined in the target psychological crisis path. The preset psychological crisis path is used to represent the psychological crisis development path in a preset psychological scenario, and one psychological crisis path includes multiple crisis development stages.
[0015] According to a second aspect of the embodiments of this application, a device for constructing a psychological profile is provided, comprising: The first acquisition unit is used to acquire the dialogue information of the user during psychological counseling; The second acquisition unit is used to acquire recognition prompt information, which is used to instruct the large language model to perform layer-by-layer psychological feature label recognition. The recognition unit is used to input the dialogue information and the recognition prompt information into the large language model, so that the large language model can recognize the label recognition result corresponding to the dialogue information under the pre-constructed psychological profile label system according to the recognition prompt information. The label recognition result includes psychological feature labels and their corresponding label levels. The psychological profile label system includes multiple label levels, and each label level is used to represent the user's psychological profile through different dimensions. A construction unit is used to determine the user's psychological profile based on the tag recognition results.
[0016] According to a third aspect of the embodiments of this application, an electronic device is provided, including a memory and a processor; The memory is connected to the processor and is used to store programs; The processor is used to implement the method for constructing a psychological profile as described in the first aspect by running a program in the memory.
[0017] According to a fourth aspect of the embodiments of this application, a storage medium is provided, on which a computer program is stored, and when the computer program is run by a processor, it implements the method for constructing a psychological profile as described in the first aspect.
[0018] According to a fifth aspect of the embodiments of this application, a computer program product is provided, including computer program instructions, which, when executed by a processor, cause the processor to perform the method for constructing a mental profile as described in the first aspect.
[0019] Compared with the prior art, the technical solution provided in this application has the following advantages: The method provided in this application obtains dialogue information of a user undergoing psychological counseling; obtains identification prompt information, which is used to instruct a large language model to perform layer-by-layer psychological feature label recognition; inputs the dialogue information and the identification prompt information into the large language model, so that the large language model, according to the identification prompt information, identifies the label recognition result corresponding to the dialogue information under a pre-constructed psychological profile label system, the label recognition result including psychological feature labels and their corresponding label levels; the psychological profile label system includes multiple label levels, each label level being used to represent the user's psychological profile through different dimensions; and determines the user's psychological profile based on the label recognition result. Thus, by utilizing the semantic understanding capability of the large language model, and based on each label level in the psychological profile label system, the user's dialogue information is identified layer by layer according to the label levels, so as to construct the user's profile from different dimensions and improve the accuracy of the user's psychological profile. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0021] Figure 1 A flowchart of a method for constructing a psychological profile is provided for one embodiment of this application.
[0022] Figure 2 This is a schematic diagram of the identification prompt information provided in an embodiment of this application.
[0023] Figure 3 This is a schematic diagram of a psychological profiling labeling system provided in an embodiment of this application.
[0024] Figure 4 This is a schematic diagram of the label hierarchy determination process provided in an embodiment of this application.
[0025] Figure 5 This is a flowchart illustrating a psychological feature label update mechanism provided in an embodiment of this application.
[0026] Figure 6 This is a schematic diagram illustrating psychological crisis path matching and stage identification provided in one embodiment of this application.
[0027] Figure 7 A flowchart of a method for constructing a psychological profile as provided in another embodiment of this application.
[0028] Figure 8 A schematic diagram of the structure of a psychological profile construction device provided in an embodiment of this application.
[0029] Figure 9 This is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0030] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0031] Exemplary Implementation Environment The method for constructing a psychological profile according to embodiments of this application can be executed by electronic devices such as terminal devices or servers. Terminal devices can be user equipment (UE), mobile devices, user terminals, terminals, cellular phones, cordless phones, personal digital assistants (PDAs), handheld devices, computing devices, in-vehicle devices, wearable devices, etc. Servers can be independent physical servers, server clusters composed of multiple physical servers, or cloud servers capable of cloud computing. This method can be implemented by a processor calling computer-readable program instructions stored in memory. This application uses the execution of the psychological profile construction method by a server as an example for explanation, but does not limit it.
[0032] Exemplary methods Please see Figure 1In one exemplary embodiment, a method for constructing a psychological profile is provided, comprising: Step 101: Obtain the dialogue information of the user during psychological counseling.
[0033] In some embodiments, the dialogue information can be any information carrier that contains user language expressions and reflects their psychological state. For example, it may include, but is not limited to: text chat logs generated during psychological counseling, text records transcribed from speech, open-ended text entered by users on mental health applications, or emails and documents containing user self-reports. The dialogue information is used as the raw data source for psychological feature analysis to complete the construction of a user psychological profile.
[0034] The dialogue information can be obtained in the following ways: from the backend database of the psychological counseling platform, from the dialogue stream received in real time through the API interface, or from the uploaded dialogue text file. The original dialogue is then preprocessed to obtain the dialogue information.
[0035] As a specific implementation method, preprocessing can include role separation, statement segmentation, text cleaning, and context window construction.
[0036] Role separation can be achieved by separating statements by speaker based on role markers (such as "consultant" and "user") in the original dialogue, forming a role-statement sequence. For example, for a text containing multiple rounds of interaction, the user's statements can be identified and extracted separately for analysis. It's understandable that dialogue information is not limited to plain text; for voice consultations, it can first be converted into text using speech recognition technology.
[0037] Sentence segmentation can be used to semantically segment long sentences for each role, ensuring that each segment unit contains complete semantic information.
[0038] Text cleaning can be achieved by removing noise information, such as removing system prompts, timestamps, and irrelevant symbols.
[0039] The context window can be constructed according to the input length limit of the large language model. When the dialogue text exceeds the window limit, a sliding window strategy is used to process it in segments, and the recognition results of each window are deduplicated and merged.
[0040] Understandably, when the dialogue text exceeds the window limit and the last sentence is a long sentence, the semantic information of the segments can be divided into windows based on the results of sentence segmentation to ensure the integrity of the semantics.
[0041] Preprocessing operations can clean up noise, standardize the format, and build structured input data for subsequent analysis.
[0042] Step 102: Obtain recognition prompt information, which is used to instruct the large language model to perform layer-by-layer psychological feature label recognition.
[0043] In some embodiments, the identification prompts can be textual information capable of conveying task instructions, background knowledge, and output format constraints to a large language model. For example, see... Figure 2 It can be a pre-designed prompt word template, which includes system roles, hierarchical analysis tasks, available psychological profile label system definitions, preset psychological feature label set embedding, reasoning methods, confidence calibration, and expected output structure. After the prompt information is identified and input into the large language model, the large language model outputs the psychological feature labels, confidence scores, and label determination basis corresponding to each label level.
[0044] For example, the system role can be set as follows: the large language model is set as a professional psychological profiler analyst, and psychological expertise and psychological profile tag system definition are injected.
[0045] Hierarchical analysis tasks can include designing independent analysis instructions for each level of a psychological profiling labeling system, clarifying the definition, characteristics, and identification criteria of the labels at that level. For example, a psychological profiling labeling system might include a background layer, an event layer, a state layer, and a risk layer. For the background layer, the large language model could be required to identify long-standing individual characteristics and environmental factors, while for the event layer, it could be required to identify recently occurring triggering events.
[0046] The embedding of a predefined set of psychological feature labels can be: embedding a predefined set of psychological feature labels and its descriptions into the prompt information to guide the large language model to recognize within the scope of the predefined set of psychological feature labels, while allowing the large language model to propose new labels outside the predefined set.
[0047] The desired output structure could be: requiring the large language model to output the recognition results in a predefined JSON format, including the tag name, layer, confidence score, evidence, and reasoning.
[0048] The reasoning approach could be to guide the large language model to perform chain-like reasoning analysis first, and then give a label judgment conclusion, so as to improve the accuracy and interpretability of label recognition.
[0049] Confidence calibration can be achieved by embedding confidence scoring calibration rules into the prompts. When there is explicit evidence of a direct statement in the dialogue, the confidence score should be in the high range; when the evidence comes from indirect inference, the confidence score should be in the middle range; and when there are only weak clues, the confidence score should be in the low range. This mechanism improves the comparability and consistency of confidence scores across different dialogue samples.
[0050] By configuring prompts, the reasoning process of large language models can be guided and constrained, enabling them to analyze according to a preset logical framework.
[0051] Among them, the psychological profiling labeling system can be a hierarchical set of concepts constructed based on specific theories or experiences to classify and describe psychological characteristics. For example, this system is based on the susceptibility-stress model and Bronfenbrenner's ecosystem theory, and is constructed according to the logic of susceptibility-stress event-emotional failure-functional collapse.
[0052] For example, a psychological profiling labeling system may include, but is not limited to, a four-layer system based on the susceptibility-stress model, namely "background layer - event layer - state layer - risk layer," where each layer corresponds to a specific stage in the crisis development path, and each layer may further contain a set of labels with different priorities. The function of this system is to provide a structured prior knowledge framework for the identification and organization of psychological characteristics.
[0053] For example, see Figure 3 Taking the psychological profiling tagging system, which includes background, event, state, and risk layers, as an example, the definitions of psychological feature tags at each tag level are as follows: Background layer labels: These represent long-standing individual characteristics and environmental factors, with a weak correlation to specific situations. They are categorized into three priorities based on their contribution to the crisis path: Core background layer psychological characteristic labels (family relationships and structure, parenting styles and psychological control, personal psychological resources, core personality traits such as attachment style and core self-evaluation); Key background layer psychological characteristic labels (cognitive patterns, achievement goal orientation, experience of being left behind, and lack of caregivers); Basic background layer psychological characteristic labels (demographic variables such as gender, grade level, place of origin, and mode of education).
[0054] Event-level tags: These represent recent or ongoing triggering events. They are divided into three priorities: Crisis event psychological characteristic tags (physical or mental harm, possessing absolute early warning factor attributes, capable of bypassing the normal crisis impact path and directly triggering attention); Key event psychological characteristic tags (stressful life events, social exclusion, parental conflict, etc.); General event psychological characteristic tags (contextualized excessively high parental expectations, competition among school classmates, poor daily parent-child communication, etc.).
[0055] State level labels: Represent an individual's current psychological and relational state. They are divided into three priorities: Core crisis state psychological characteristic labels (depressive mood, anxiety, learned helplessness, sense of loss of control, acute decline in self-esteem after an event); Key state psychological characteristic labels (poor teacher-student relationships, poor peer relationships, increased interpersonal pressure, decreased self-efficacy, sense of frustration); and General state psychological characteristic labels (academic pressure, pressure to enter higher education, excessive academic burden, low school satisfaction, inferiority complex).
[0056] Risk layer labels: Impaired representation function and crisis risk, requiring immediate intervention upon appearance. These include: abnormal academic status (e.g., leave of absence), crisis behaviors (e.g., physical or mental harm), and medication status (distinguishing between medication history, current medication use, and medication stability).
[0057] As a specific implementation method, the recognition prompt can be a structured text template, which includes at least: the role played by the large language model (e.g., "You are a professional psychological profiler"), definitions of the various label levels to be recognized, and optionally a pre-set set of psychological feature labels for the model's reference. For example, the prompt could explicitly state: "Please analyze the user's dialogue from the following four levels: 1. Context layer: Identify long-term stable individual characteristics and environmental factors... 2. Event layer: Identify recent or ongoing triggering events..." By transforming the abstract label system into instructions that the large language model can understand, this step injects a priori psychological analysis framework into the model, guiding it to engage in structured thinking.
[0058] Step 103: Input the dialogue information and the recognition prompt information into the large language model, so that the large language model can identify the label recognition result corresponding to the dialogue information under the pre-constructed psychological profile label system according to the recognition prompt information. The label recognition result includes psychological feature labels and their corresponding label levels. The psychological profile label system includes multiple label levels, and each label level is used to represent the user's psychological profile through different dimensions.
[0059] In some embodiments, the large language model can be a remotely invoked API (such as GPT-4, Wenxin Yiyan, etc.) or a locally deployed dedicated model. After acquiring dialogue information and recognition prompts, the large language model performs semantic understanding and logical reasoning internally, and finally outputs a recognition result that meets the requirements. Each level of the psychological profile labeling system portrays different aspects of the user's psychology from a specific dimension (such as time stability, contextual specificity, emotional intensity, and functional level), together forming a three-dimensional profile.
[0060] Specifically, the label recognition results need to include psychological feature labels belonging to at least one of the multiple levels. In a single analysis, the large language model can simultaneously identify features belonging to different developmental stages, or it can identify a single type of feature. For example, from the same dialogue, the model may simultaneously identify the background layer label "low family support" (a long-term factor) and the state layer label "depressive mood" (the current state). This ability to simultaneously identify multiple levels is the foundation for achieving a "snapshot" depiction of psychological development paths.
[0061] The output of a large language model is usually constrained to a structured format, such as a JSON object, in which each identified tag entry contains two key fields: "psychological feature tag" (e.g., "academic frustration") and "tag level" (e.g., "event level"). Additional information such as confidence level and text fragments may also be included.
[0062] In an optional embodiment, the identification prompt information includes: the definition of each tag level in the psychological profile tagging system and a preset set of psychological feature tags; The large language model identifies the label recognition results corresponding to the dialogue information under the pre-constructed mental profile labeling system according to the recognition prompt information, including: Based on the dialogue information, the large language model determines candidate psychological feature labels that conform to the definition of the label level from the preset psychological feature label set; The label recognition result is determined based on the candidate psychological feature labels and their corresponding label levels.
[0063] In some embodiments, the definitions of each tag level in the psychological profile tag system in the identification prompt information and the preset psychological feature tag set provide the model with more accurate and specific analysis guidance and reference range, reduce the uncertainty and deviation that may be caused by its free play, and improve the consistency, repeatability and alignment with psychological theory of the identification results.
[0064] The task of large language models is concretized as a process of filtering and judging from a known candidate set. For example, the recognition prompt may not only state that the background layer is defined as "long-term stable factors," but may also embed a specific list of pre-defined background layer labels (such as "poor family relationships," "low self-efficacy," "left-behind experience"). Large language models need to combine dialogue information to determine which labels appear or are relevant, and confirm which level of definition they conform to, thus making the recognition results more standardized.
[0065] Understandably, the pre-defined set of psychological feature labels can be an exhaustive list or a non-exhaustive list containing typical labels, and large language models are allowed to make suggestions outside the list. Newly proposed labels can be marked through special annotations.
[0066] By using prompts for label recognition, the accuracy and recall of psychometric label recognition can be significantly improved, while ensuring consistency in the name and meaning of the output labels. This further helps to solve the problems of high label noise and inconsistency caused by simple rules or excessive model freedom in related technologies.
[0067] In an optional embodiment, determining the label recognition result based on the candidate psychological feature labels and their corresponding label levels includes: If there is only one label level corresponding to the candidate psychological feature label, then the label level corresponding to the candidate psychological feature label is determined as the target label level. or, When there are multiple tag levels corresponding to the candidate psychological feature tags, the tag levels corresponding to the candidate psychological feature tags are re-determined from a specified dimension based on the dialogue information content corresponding to the candidate psychological feature tags to obtain the target tag level corresponding to the candidate psychological feature tags. The specified dimension includes time dimension and / or context dimension. The candidate psychological feature labels and their corresponding target label levels are determined as the label recognition results.
[0068] In some embodiments, additional decision logic can be introduced to disambiguate situations where the same psychological feature label may belong to different label levels in the dialogue information.
[0069] This determination process can be completed by the large language model under the guidance of prompts, or it can be completed by a separate hierarchical attribution determination module as a post-processing step.
[0070] When making judgments, the two key dimensions of time and context can be used to refine the attribution of the label level. For example, for the candidate label "academic performance," the model might initially consider it to be associated with both the background layer (long-term learning ability) and the event layer (failing an exam). At this point, a re-judgment will be triggered: examine the specific content of the conversation mentioning "academic performance." If the description is "I have always had good grades" (long-term stable feature), it is judged as background based on the time dimension; if the description is "I did poorly on this midterm exam, and I am very upset" (recent change event), it is judged as event. The context dimension judgment is similar. If the description is "The competition among classmates is very fierce" (group environment), it tends to be background; if the description is "My deskmate scored higher than me this time, which put a lot of pressure on me" (individual event), it tends to be event.
[0071] When two specified dimensions conflict, priority rules can be predefined, such as prioritizing the time dimension's result. By employing the aforementioned time- and context-based hierarchical attribution mechanism, the accuracy of complex label hierarchical attribution can be significantly improved, enabling the final constructed psychological profile to more accurately reflect the true position of features within the psychological development path.
[0072] Furthermore, the specified dimensions are not limited to time and context. Based on different psychological theories, other dimensions, such as "changeability" and "intensity of subjective experience," can be introduced to enhance the flexibility of the judgment.
[0073] See Figure 4 During the judgment process, it is determined whether the identified candidate psychological feature labels correspond to multiple label levels. If not, the candidate psychological feature label is directly assigned to the corresponding label level. If so, a judgment is made based on the time dimension: if it is a recent change, it is determined to be at the event level; if it is long-term stable, it is determined to be at the background level. A judgment is also made based on the context dimension: if it is individual perception, it is determined to be at the event level; if it is a group environment, it is determined to be at the background level. If it is still unclear, further judgment is made based on priority (time dimension is given priority). It can also be marked as a multi-level attribute, allowing for subsequent corrections. After the judgment is completed, the psychological feature label, label level, confidence level, and basis are output.
[0074] Step 104: Determine the user's psychological profile based on the tag recognition results.
[0075] In some embodiments, the essence of determining a psychological profile is to integrate and organize the identification results of a single conversation to form or update a structured profile representing the user's psychological characteristics.
[0076] As a basic implementation, the set of tags identified this time and their hierarchical relationships can be directly used as the user's current psychological profile. A more efficient implementation can also integrate and update the current psychological profile with historical profile data.
[0077] In an optional embodiment, determining the user's psychological profile based on the tag recognition result includes: The user's historical psychological profile is updated using the tag recognition results.
[0078] In some embodiments, to enable the psychological profile to reflect the dynamic evolution of the user's psychological state, this application provides a profile maintenance scheme that supports multi-turn dialogues. After obtaining the label recognition result each time, the historical psychological profile is updated, realizing the incremental evolution of the psychological profile, rather than reconstructing an isolated profile for each dialogue. This allows for the accumulation of historical information, reflecting the user's long-term psychological characteristics more comprehensively and stably, while also tracking the latest changes.
[0079] In practice, a separate profile can be maintained for each user. Once a user receives the tag recognition results for a new round of dialogue, their historical profiles are read, and a fusion and update strategy is executed. By employing an incremental update strategy, the problem of one-time assessments failing to track state changes is solved, giving the psychological profile a temporal dynamic quality. This profile serves as a continuous record of the user's evolving psychological state, providing a data foundation for long-term tracking and trend analysis.
[0080] In an optional embodiment, updating the user's historical psychological profile using the tag recognition results includes: If the tag recognition result contains new psychological feature tags that are not present in the user's historical psychological profile, the new psychological feature tags and their corresponding tag levels are added to the user's psychological profile.
[0081] In some embodiments, specific update rules are configured for different situations encountered during the update process. By adding the new psychological feature tags and their corresponding tag levels to the user's psychological profile, it is ensured that the psychological profile can cover newly emerging psychological features. For example, if a user has never mentioned family issues in the previous rounds of conversation, but the "parental conflict" event level tag is identified in this round of conversation, the system will add this new tag to the user's psychological profile file.
[0082] In an optional embodiment, updating the user's historical psychological profile using the tag recognition results includes: Determine whether the tag recognition result matches the same target psychological feature tag in the user's historical psychological profile; Based on the confidence level of the target psychological feature label in the label recognition result and the confidence level of the target psychological feature label in the user's historical psychological profile, the updated confidence level of the target psychological feature label is determined. The confidence level is used to update the confidence level of the target psychological feature label in the user's historical psychological profile.
[0083] In some embodiments, when a psychological feature label appears repeatedly, confidence fusion can be used to reflect the accumulation or change of the psychological feature label.
[0084] Specifically, a weighted average formula can be used for fusion, for example: C_new = α × C_existing + (1-α) × C_current, where C_new is the update confidence score, C_existing is the confidence score in the historical mental profile, C_current is the confidence score in the current label recognition result, and α is a decay factor between 0 and 1 (e.g., 0.7) used to adjust the weight of historical and current information. The closer α is to 1, the more importance is attached to historical information, and the more stable the profile; the closer α is to 0, the more sensitive it is to the latest information. In this way, the user's mental profile can maintain a certain degree of stability while being able to be adjusted according to the new label recognition results.
[0085] In an optional embodiment, updating the user's historical psychological profile using the tag recognition results includes: Based on the tag recognition results, psychological feature tags with incorrect tag levels are determined from the user's historical psychological profile, and the tag level of the psychological feature tags with incorrect tag levels is updated based on the tag recognition results. And / or, Based on the tag recognition results, decay psychological feature tags are determined from the user's historical psychological profile; According to the preset confidence decay strategy, the confidence of the corresponding decayed psychological feature label in the user's historical psychological profile is reduced.
[0086] In some embodiments, updating the label hierarchy of psychological feature labels with erroneous label levels can promptly correct the user's psychological profile and improve accuracy. For example, historically, "parental expectations" might have been classified as the background layer based on limited information, but in a new round of conversation, it might be discovered that the user is emphasizing "the pressure my parents put on me before this exam was particularly great," in which case the level can be corrected to the event layer based on the new context.
[0087] Decaying psychological feature labels can be defined as labels that have not been re-identified or confirmed in multiple rounds of dialogue (e.g., 5 consecutive rounds) or for a preset time period (e.g., one month). The decay strategy can be to multiply by a decay coefficient less than 1 with each update, or to decrease linearly. When the confidence level falls below a certain threshold (e.g., 0.2), it can be marked as "weak evidence" or moved to the history section, rather than being directly deleted from the current active profile. This avoids the problem of old features unduly dominating due to shifts in dialogue topics, making the profile more reflective of current concerns.
[0088] In an optional embodiment, to ensure the rationality of the internal logic of the updated psychological profile, updating the user's historical psychological profile using the tag recognition results includes: Determine whether there are logically contradictory psychological feature labels in the updated user's psychological profile; If a logically contradictory psychological feature label is identified, the logically contradictory psychological feature label is marked, and / or a review prompt message is generated.
[0089] In some embodiments, logical contradictions may occur within the same level or between different levels. For example, "harmonious family relationships" and "broken family relationships" may coexist, or "high self-efficacy" and "learned helplessness" may coexist. Logical contradictions can be checked through a predefined contradiction rule base.
[0090] By examining the labels of logical contradictions in the psychological profile and marking or generating prompts for them, clear directions are provided for manual review, thus improving the usability of the profile.
[0091] It is understandable that the specific update rules mentioned above, such as addition, fusion, correction, decay, and verification, can be executed individually or in combination as needed, effectively solving the technical problem of how to incrementally update and maintain profile consistency in multi-turn dialogue scenarios.
[0092] See Figure 5 After obtaining the label recognition results, it is determined whether the psychological feature labels in the label recognition results exist in the psychological profile. If they exist, the confidence levels of the old and new labels are merged; if they do not exist, the newly added psychological feature labels are merged into the psychological profile. Further, it is determined whether the new dialogue context is clearer. If so, it indicates that the new dialogue context provides more sufficient time or situational cues, allowing for the correction of the hierarchical classification of existing labels, and the correction history is recorded; otherwise, the current hierarchical allocation is maintained. Then, a consistency check is performed to determine whether there are logically contradictory psychological feature labels. If they are inconsistent, the logically contradictory psychological feature labels are marked and a review is triggered; if they are consistent, a decay check is performed on the psychological feature labels, and then the updated psychological profile is output.
[0093] In an optional embodiment, in order to transform the constructed multi-level psychological profile into conclusions that have direct guiding significance for crisis intervention, the method for constructing the psychological profile of this application further includes: From the preset psychological crisis paths, the target psychological crisis path matching the psychological profile is determined, and the crisis development stage corresponding to the psychological profile is determined in the target psychological crisis path. The preset psychological crisis path is used to represent the psychological crisis development path in a preset psychological scenario, and one psychological crisis path includes multiple crisis development stages.
[0094] In some embodiments, each of the preset psychological crisis paths corresponds to a typical crisis development scenario, such as an "academic crisis path," an "interpersonal crisis path," and a "family crisis path." Each psychological crisis path clearly defines the typical crisis development stages from the background layer, event layer, state layer to the risk layer.
[0095] For example, see Figure 6 The user's psychological characteristic tags include: background layer (low self-efficacy, parental discord), event layer (academic setbacks), state layer (depressive mood, feelings of frustration), and risk layer (tendency to drop out of school). These tags are matched with various preset psychological crisis paths to determine the user's current stage: background vulnerability, event trigger, state dysfunction, or functional impairment. Attention suggestions are then provided in a structured manner. The preset psychological crisis paths and their respective crisis development stages can be as follows: Academic risk path: background layer (which may include crisis labels such as low self-efficacy and low family support), event layer (which may include crisis labels such as high pressure for college entrance examination or academic setbacks), state layer (which may include crisis labels such as depressive mood and frustration), and risk layer (which may include crisis labels such as learned helplessness and tendency to drop out of school).
[0096] Interpersonal problem path: Background layer (which may include crisis labels such as insecure attachment), event layer (which may include crisis labels such as physical harm), state layer (which may include crisis labels such as loneliness and depressive mood), and risk layer (which may include crisis labels such as self-harm behavior).
[0097] Family crisis path: Background layer (which may include crisis labels such as long-term discord between parents), event layer (which may include crisis labels such as separation of parents), state layer (which may include crisis labels such as helplessness and self-blame), and risk layer (which may include crisis labels such as dropping out of school and impaired social functioning).
[0098] Each preset psychological crisis path serves as a crisis path template for path matching. During matching, all psychological feature tags in the user's psychological profile are compared with the crisis tags for different stages of crisis development in each preset psychological crisis path. Based on the highest matching level, the stage the user is likely to reach on that path is determined.
[0099] For example, if a user's mental profile primarily matches the crisis tags at the background and event layers of a certain path, it is determined to be in the "event-triggered stage"; if it matches the risk layer, it is determined to be in the "functional impairment stage". When the mental profile partially matches multiple paths simultaneously, the matching probability and stage suggestions for multiple paths can be output.
[0100] By adopting the aforementioned path matching mechanism, automated identification from the set of feature labels to the stage of crisis development is achieved, making the analysis results of psychological profiling more interpretable and action-oriented, and providing key decision-making basis for subsequent risk warning and intervention resource allocation.
[0101] In one specific embodiment, the method for constructing the psychological profile of this application is described in [reference needed]. Figure 7 ,include: Construct a multi-level tagging system: Based on the susceptibility-stress model and ecosystem theory, adopt a four-level tagging structure (including background level, event level, state level, and risk level), and configure the priority classification of tags at each level.
[0102] Dialogue data preprocessing: Separating dialogue information into roles (visitor vs. counselor), as well as segmenting sentences, cleaning text, and constructing context windows (configuring sliding windows).
[0103] Multi-level label recognition based on LLM: Label recognition is performed using system role setting, hierarchical analysis instructions, preset label set embedding, structured output constraints, chain-like reasoning, and confidence calibration prompts.
[0104] Tag hierarchy attribution determination: Determine based on time dimension (long-term vs. recent) and contextual dimension (group vs. individual), and configure determination priority: time dimension takes precedence.
[0105] Psychological profile construction and updating: This is achieved through methods such as adding and merging labels, confidence fusion, hierarchical classification correction, label decay, and consistency verification (contradiction detection).
[0106] Crisis path matching and stage identification: Through path template matching (academic / interpersonal / family), stage identification (susceptibility-trigger-dissonance-impairment), and structured output for use by downstream systems.
[0107] The following example demonstrates the complete operation of this invention dynamically. Assume a user named Zhang (pseudonym) has consulted multiple times on an online platform for adolescent mental health. Initially, in the first round of dialogue, Zhang mentioned, "I'm in a top-tier high school, and my grades have always been average, but my parents always expect me to be in the top ten, which puts a lot of pressure on me." After obtaining the dialogue text, the system combines the recognition prompts, which include a four-layer psychological profile labeling system, with the large language model for analysis. The model identifies the background layer labels "attending a top-tier high school" (basic background layer) and "high parental expectations" (core background layer), the event layer label "academic pressure" (general event layer), and the state layer label "sense of pressure" (general state layer). Since this is the first dialogue, the system directly constructs and stores Zhang's initial psychological profile based on these recognition results.
[0108] A week later, Xiao Zhang underwent a second round of consultation, mentioning, "My ranking dropped significantly in the last monthly exam, and I was talked to by my homeroom teacher. I haven't been able to sleep these past few days; I feel very useless." New dialogue was obtained, and tag identification was performed again. This round identified the event-level tag "academic setback event" (key event layer), the state-level tags "anxiety" (core crisis state layer), and "low self-esteem" (key state layer). The psychological profile update module was activated, first adding the new tags "academic setback event," "anxiety," and "low self-esteem" to the psychological profile. For the existing "stress" tag, based on its old and new confidence scores (e.g., historical 0.7, current 0.8), a weighted fusion with α=0.6 was performed, resulting in an updated confidence score of approximately 0.74. Simultaneously, based on the description of the recent event "my ranking dropped significantly in the monthly exam," it was confirmed that "academic stress" is more of a specific event, therefore it may be revised from the background layer to the event layer, or an event-level instance may be added.
[0109] Two weeks later, during his third consultation, Xiao Zhang said, "I've applied for a temporary leave of absence from school, but I feel very depressed around my parents every day, and I don't know what to do." The system identified the risk layer label "leave of absence" (impaired social functioning). The update module added this high-risk label to the psychological profile. At this point, the psychological crisis path matching module began working. It matched Xiao Zhang's current profile label set with the template library. It found a high match with the "Academic Risk Path Template" (Background: High academic pressure, high parental expectations; Event: Academic setback; State: Anxiety, low self-esteem; Risk: Leave of absence), and the match reached the highest level, the risk layer. Therefore, it was determined that Xiao Zhang had entered the "impaired functioning stage" in the academic crisis path. Simultaneously, labels related to "family relationships" in the profile (such as "repression") may also partially match the "family crisis path." The system output a structured report, including the current multi-level psychological profile, the main matched crisis path "academic risk path," the current stage "impaired functioning stage," and generated high-attention recommendations. This report was pushed to the platform's psychological crisis warning dashboard in real time through a standardized interface, prompting the psychological counselor to immediately intervene proactively.
[0110] In this scenario, this application upgrades mental health services from passive dialogue and response to proactive, dynamic risk assessment based on a theoretical framework. The system no longer views each user's statement in isolation, but rather connects them into a logical developmental path, identifying in advance the evolutionary trend from "stress" to "frustration" and then to "dropping out of school." This significantly improves the timeliness and accuracy of crisis early warning, enabling limited intervention resources to be more precisely targeted at high-risk individuals, demonstrating significant user value and social benefits.
[0111] Exemplary device Accordingly, embodiments of this application also provide a device for constructing a psychological profile, comprising: The first acquisition unit is used to acquire the dialogue information of the user during psychological counseling; The second acquisition unit is used to acquire recognition prompt information, which is used to instruct the large language model to perform layer-by-layer psychological feature label recognition. The recognition unit is used to input the dialogue information and the recognition prompt information into the large language model, so that the large language model can recognize the label recognition result corresponding to the dialogue information under the pre-constructed psychological profile label system according to the recognition prompt information. The label recognition result includes psychological feature labels and their corresponding label levels. The psychological profile label system includes multiple label levels, and each label level is used to represent the user's psychological profile through different dimensions. A construction unit is used to determine the user's psychological profile based on the tag recognition results.
[0112] The apparatus for constructing psychological profiles provided in this embodiment belongs to the same concept as the method for constructing psychological profiles provided in the above embodiments of this application. It can execute the method provided in any of the above embodiments of this application and has the corresponding functional modules and beneficial effects for executing the method. Technical details not described in detail in this embodiment can be found in the specific processing content of the method for constructing psychological profiles provided in the above embodiments of this application, and will not be repeated here.
[0113] In one specific embodiment, the psychological profile construction apparatus of this application is described in [reference needed]. Figure 8 ,include: The dialogue preprocessing module is used for role separation, statement segmentation, text cleaning, and context window construction. The tag system construction module is used to build a four-layer tag library, define tags for each layer, and configure inter-layer rules; The label recognition module is used to perform LLM, multi-level prompt word templates, and confidence calibration. The hierarchy attribution determination module is used for time-based determination, context-based determination, and priority rules. The profile management module is used for incremental updates, merging, fusion, correction, attenuation, and verification of psychological feature tags; The crisis path matching module is used to provide path templates, perform template matching and stage identification, and output structured data to obtain structured profile data.
[0114] The system identifies the stage of output, provides suggestions for improvement, and outputs the results to downstream platforms, such as psychological crisis early warning systems and clinical decision support systems.
[0115] The functions implemented by each unit in the above-mentioned psychological profiling construction device can be implemented by the same or different processors, and this application embodiment does not limit this.
[0116] It should be understood that each unit in the above device can be implemented by a processor calling software. For example, the device includes a processor connected to a memory containing instructions. The processor calls the instructions stored in the memory to implement any of the above methods or to implement the functions of each unit in the device. The processor can be a general-purpose processor, such as a CPU or microprocessor, and the memory can be internal or external to the device. Alternatively, the units in the device can be implemented as hardware circuits. By designing the hardware circuits, some or all of the unit functions can be implemented. The hardware circuits can be understood as one or more processors. For example, in one implementation, the hardware circuit is an ASIC, and the functions of some or all of the above units are implemented by designing the logical relationships between the components within the circuit. In another implementation, the hardware circuit can be implemented using a PLD, such as an FPGA, which can include a large number of logic gates. The connection relationships between the logic gates are configured through configuration files to implement the functions of some or all of the above units. All units in the above device can be implemented entirely by a processor calling software, entirely by hardware circuits, or partially by a processor calling software with the remaining parts implemented by hardware circuits.
[0117] In this application embodiment, a processor is a circuit with signal processing capabilities. In one implementation, the processor can be a circuit with instruction reading and execution capabilities, such as a CPU, microprocessor, GPU, or DSP. In another implementation, the processor can implement certain functions through the logical relationships of hardware circuits. These logical relationships are fixed or reconfigurable. For example, the processor may be a hardware circuit implemented as an ASIC or PLD, such as an FPGA. In a reconfigurable hardware circuit, the process of the processor loading a configuration document and configuring the hardware circuit can be understood as the processor loading instructions to implement the functions of some or all of the above units. Furthermore, it can also be a hardware circuit designed for artificial intelligence, which can be understood as an ASIC, such as an NPU, TPU, or DPU.
[0118] As can be seen, each unit in the above device can be one or more processors (or processing circuits) configured to implement the above methods, such as: CPU, GPU, NPU, TPU, DPU, microprocessor, DSP, ASIC, FPGA, or a combination of at least two of these processor forms.
[0119] Furthermore, the units in the above devices can be integrated in whole or in part, or they can be implemented independently. In one implementation, these units are integrated together and implemented in the form of a System-on-Chip (SoC). The SoC may include at least one processor for implementing any of the above methods or implementing the functions of the units in the device. The at least one processor may be of different types, such as CPU and FPGA, CPU and artificial intelligence processor, CPU and GPU, etc.
[0120] Exemplary electronic devices Another embodiment of this application also provides an electronic device, see [link to relevant documentation] Figure 9 As shown, the device includes: Memory 900 and processor 910; The memory 900 is connected to the processor 910 and is used to store programs; The processor 910 is used to implement the method for constructing a psychological profile disclosed in any of the above embodiments by running the program stored in the memory 900.
[0121] Specifically, the aforementioned psychological profiling construction device may also include: a bus, a communication interface 920, an input device 930, and an output device 940.
[0122] The processor 910, memory 900, communication interface 920, input device 930, and output device 940 are interconnected via a bus. Among them: A bus can include a pathway for transmitting information between various components of a computer system.
[0123] The processor 910 can be a general-purpose processor, such as a general-purpose central processing unit (CPU), a microprocessor, etc., or an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of the program of the present invention. It can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0124] The processor 910 may include a main processor, as well as a baseband chip, modem, etc.
[0125] The memory 900 stores a program that executes the technical solution of this invention, and may also store an operating system and other key business functions. Specifically, the program may include program code, which includes computer operation instructions. More specifically, the memory 900 may include read-only memory (ROM), other types of static storage devices capable of storing static information and instructions, random access memory (RAM), other types of dynamic storage devices capable of storing information and instructions, disk storage, flash memory, etc.
[0126] Input device 930 may include a device for receiving user input data and information, such as a keyboard, mouse, camera, scanner, light pen, voice input device, touch screen, pedometer, or gravity sensor.
[0127] Output device 940 may include devices that allow information to be output to a user, such as a display screen, printer, speaker, etc.
[0128] The communication interface 920 may include a device that uses any transceiver to communicate with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), Wireless Local Area Network (WLAN), etc.
[0129] The processor 910 executes the program stored in the memory 900 and calls other devices, which can be used to implement the various steps of any of the psychological profile construction methods provided in the above embodiments of this application.
[0130] Exemplary computer program products and storage media In addition to the methods and devices described above, embodiments of this application may also be computer program products, which include computer program instructions that, when executed by a processor, cause the processor to perform the steps in the methods for constructing psychological profiles according to various embodiments of this application as described in any of the foregoing embodiments of this specification.
[0131] The computer program product can be written in any combination of one or more programming languages to perform the operations of the embodiments of this application. The programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0132] Furthermore, embodiments of this application may also be storage media storing a computer program, which is executed by a processor to perform the steps in the method for constructing a psychological profile according to various embodiments of this application described in any of the above embodiments of this specification. Specifically, the following steps can be implemented: Obtain dialogue information from users' psychological counseling sessions; Obtain recognition prompt information, which is used to instruct the large language model to perform layer-by-layer psychological feature label recognition; The dialogue information and the recognition prompt information are input into a large language model so that the large language model can identify the label recognition result corresponding to the dialogue information under a pre-constructed psychological profile labeling system according to the recognition prompt information. The label recognition result includes psychological feature labels and their corresponding label levels. The psychological profile labeling system includes multiple label levels, and each label level is used to represent the user's psychological profile through different dimensions. The user's psychological profile is determined based on the tag recognition results.
[0133] For the foregoing method embodiments, in order to simplify the description, they are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, because according to this application, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0134] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For apparatus embodiments, since they are basically similar to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0135] The steps in the methods of the various embodiments of this application can be adjusted, merged, or deleted in order according to actual needs, and the technical features described in each embodiment can be replaced or combined.
[0136] The modules and sub-modules in the apparatus and terminal in the various embodiments of this application can be merged, divided, and deleted according to actual needs.
[0137] It should be understood that the disclosed terminals, devices, and methods can be implemented in other ways, given the several embodiments provided in this application. For example, the terminal embodiments described above are merely illustrative. For instance, the division of modules or sub-modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple sub-modules or modules may be combined or integrated into another module, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or modules, and may be electrical, mechanical, or other forms.
[0138] The modules or submodules described as separate components may or may not be physically separate. The components that constitute a module or submodule may or may not be physical modules or submodules; that is, they may be located in one place or distributed across multiple network modules or submodules. Some or all of the modules or submodules can be selected to achieve the purpose of this embodiment's solution, depending on actual needs.
[0139] Furthermore, the functional modules or sub-modules in the various embodiments of this application can be integrated into one processing module, or each module or sub-module can exist physically separately, or two or more modules or sub-modules can be integrated into one module. The integrated modules or sub-modules described above can be implemented in hardware or in the form of software functional modules or sub-modules.
[0140] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0141] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software unit executed by a processor, or a combination of both. The software unit can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0142] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0143] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for constructing a psychological profile, characterized in that, include: Obtain dialogue information from users' psychological counseling sessions; Obtain recognition prompt information, which is used to instruct the large language model to perform layer-by-layer psychological feature label recognition; The dialogue information and the recognition prompt information are input into a large language model so that the large language model can identify the label recognition result corresponding to the dialogue information under a pre-constructed psychological profile labeling system according to the recognition prompt information. The label recognition result includes psychological feature labels and their corresponding label levels. The psychological profile labeling system includes multiple label levels, and each label level is used to represent the user's psychological profile through different dimensions. The user's psychological profile is determined based on the tag recognition results.
2. The method according to claim 1, characterized in that, The identification prompt information includes: the definition of each tag level in the psychological profile tag system and a preset set of psychological feature tags; The large language model identifies the label recognition results corresponding to the dialogue information under the pre-constructed mental profile labeling system according to the recognition prompt information, including: Based on the dialogue information, the large language model determines candidate psychological feature labels that conform to the definition of the label level from the preset psychological feature label set; The label recognition result is determined based on the candidate psychological feature labels and their corresponding label levels.
3. The method according to claim 2, characterized in that, The step of determining the label recognition result based on the candidate psychological feature labels and their corresponding label levels includes: If there is only one label level corresponding to the candidate psychological feature label, then the label level corresponding to the candidate psychological feature label is determined as the target label level. or, When there are multiple tag levels corresponding to the candidate psychological feature tags, the tag levels corresponding to the candidate psychological feature tags are re-determined from a specified dimension based on the dialogue information content corresponding to the candidate psychological feature tags to obtain the target tag level corresponding to the candidate psychological feature tags. The specified dimension includes time dimension and / or context dimension. The candidate psychological feature labels and their corresponding target label levels are determined as the label recognition results.
4. The method according to claim 1, characterized in that, Determining the user's psychological profile based on the tag recognition results includes: The user's historical psychological profile is updated using the tag recognition results.
5. The method according to claim 4, characterized in that, The step of updating the user's historical psychological profile using the tag recognition results includes: If the tag recognition result contains new psychological feature tags that are not present in the user's historical psychological profile, the new psychological feature tags and their corresponding tag levels are added to the user's psychological profile.
6. The method according to claim 4, characterized in that, The step of updating the user's historical psychological profile using the tag recognition results includes: Determine whether the tag recognition result matches the same target psychological feature tag in the user's historical psychological profile; Based on the confidence level of the target psychological feature label in the label recognition result and the confidence level of the target psychological feature label in the user's historical psychological profile, the updated confidence level of the target psychological feature label is determined. The confidence level is used to update the confidence level of the target psychological feature label in the user's historical psychological profile.
7. The method according to claim 4, characterized in that, The step of updating the user's historical psychological profile using the tag recognition results includes: Based on the tag recognition results, psychological feature tags with incorrect tag levels are determined from the user's historical psychological profile, and the tag level of the psychological feature tags with incorrect tag levels is updated based on the tag recognition results. And / or, Based on the tag recognition results, decay psychological feature tags are determined from the user's historical psychological profile; According to the preset confidence decay strategy, the confidence of the corresponding decayed psychological feature label in the user's historical psychological profile is reduced.
8. The method according to claim 4, characterized in that, The step of updating the user's historical psychological profile using the tag recognition results includes: Determine whether there are logically contradictory psychological feature labels in the updated user's psychological profile; If a logically contradictory psychological feature label is identified, the logically contradictory psychological feature label is marked, and / or a review prompt message is generated.
9. The method according to claim 1, characterized in that, The method further includes: From the preset psychological crisis paths, the target psychological crisis path matching the psychological profile is determined, and the crisis development stage corresponding to the psychological profile is determined in the target psychological crisis path. The preset psychological crisis path is used to represent the psychological crisis development path in a preset psychological scenario, and one psychological crisis path includes multiple crisis development stages.
10. An electronic device, characterized in that, Including memory and processor; The memory is connected to the processor and is used to store programs; The processor is used to implement the method for constructing a psychological profile as described in any one of claims 1 to 9 by running a program in the memory.
11. A storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the method for constructing a psychological profile as described in any one of claims 1 to 9.
12. A computer program product, characterized in that, include: Computer program instructions, when executed by a processor, cause the processor to perform the method for constructing a mental profile as described in any one of claims 1 to 9.