Open psychological evaluation method, medium and system
By identifying user intentions and slots in open conversations, adjusting conversation paths and generating scores, it solves the closed-ended response and cultural adaptability issues of traditional scales and achieves personalized psychological assessment.
Patent Information
- Application Number
- CN202510856884.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-10-03
AI Technical Summary
Traditional scales have closed-response limitations and cultural adaptability issues in psychological assessment, which affect the accuracy of assessment.
The target model is used to identify user intentions and slots in open conversations, adjust the conversation path, generate individual scores through slot value mapping, summarize the total scores, and generate a structured psychological assessment report.
It realizes accurate and personalized psychological assessment based on users' open-ended answers and dynamic follow-up questions, which improves the accuracy and personalization of the assessment.
Smart Images

Figure CN120748720A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to an open psychological assessment method, medium, and system. Background Art
[0002] Traditional questionnaires, as the primary tool for psychological assessment, offer advantages in standardization and structuring. These questionnaires consist of a series of questions, each with corresponding options for users to answer. However, the limitations of this closed-ended approach have become increasingly apparent with technological advancements and the increasing complexity of application scenarios.
[0003] First, traditional scales rely on the responses of the individual taking the scale, making them susceptible to errors or omissions. Second, most classic scales (such as the SCL-90 and 16PF) originate from the West and have not been fully adapted to Chinese cultural characteristics after translation. For example, certain emotional expressions have different meanings in the Chinese context, potentially affecting assessment accuracy.
[0004] Based on this, there is an urgent need for an accurate and personalized psychological assessment program. Summary of the Invention
[0005] In a first aspect, to solve at least one of the above-mentioned technical problems, an embodiment of the present application provides an open psychological assessment method, which is applied to an open conversation with a user, and the method includes: using a target model to identify user intentions and slots in the open conversation; adjusting the conversation path of the open conversation according to the user intentions and slots; mapping the values of each slot in the conversation path to individual scores for each slot, and summarizing the individual scores to generate a total score; and generating a structured psychological assessment report based on the individual scores and the total score.
[0006] In a second aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any of the above methods is implemented.
[0007] In a third aspect, an embodiment of the present application provides an electronic system, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the above methods when executing the computer program.
[0008] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0009] The present invention provides a solution, which uses a target model to identify user intentions and slots in an open-ended conversation with a user; adjusts the conversation path of the open-ended conversation according to the user intentions and slots; maps the values of each slot in the conversation path to individual scores for each slot, and aggregates the individual scores to generate an overall score; and generates a structured psychological assessment report based on the individual scores and the overall score, thereby accurately understanding the user's intentions based on the user's open-ended answers, conducting dynamic follow-up questions, and achieving accurate personalized psychological assessment. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0011] Figure 1 A flowchart of an open psychological assessment method provided in an embodiment of the present application;
[0012] Figure 2 A schematic diagram of intent and slot identification provided in an embodiment of the present application;
[0013] Figure 3 A schematic diagram of another process framework provided in an embodiment of the present application;
[0014] Figure 4 A schematic structural diagram of an embodiment of the electronic system provided in this application. DETAILED DESCRIPTION
[0015] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.
[0016] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.
[0017] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0018] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0019] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0020] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "comprise," "include," "have," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0021] For ease of understanding, the technical solution of this application will be described in detail below with reference to the accompanying drawings.
[0022] The present invention provides an open psychological assessment method, which is applied in the scenario of open dialogue with users. Figure 1 As shown, Figure 1 This is a flow chart of an open psychological assessment method provided in an embodiment of the present application, the method comprising:
[0023] S101: Using a target model to identify user intentions and slots in the open dialogue.
[0024] Unlike traditional closed-ended questionnaires, which require selective responses, open-ended conversations don't offer specific options. Instead, they offer a question or statement to guide the user through the conversation. For example, in a depression screening, a user might be asked, "Welcome to this interactive assessment. Have you felt sad in the past week?" The user responds based on, but not limited to, their emotional state. They might also mention sleep, their values, and their interests in life, such as, "I've been feeling very low for the past week. I've been tossing and turning at night, unable to sleep, and I feel like life is meaningless."
[0025] After the user enters the corresponding answer, the input text is segmented by BERT Tokenizer to obtain multiple formatted token data, including input_ids, attention_mask and token_type_ids, providing the required formatted data for the target model.
[0026] The target model uses a shared BERT encoder to simultaneously perform intent recognition and slot filling. Word metadata is fed into the target model's intent classification and slot labeling tasks, generating the user's intent category and slot labeling information, respectively, for end-to-end semantic understanding.
[0027] A pre-trained shared BERT encoder can be used to generate a global representation ([CLS] token) based on all tokens for intent classification, and a vector representation for each token for slot labeling tasks.
[0028] For example, in a psychological assessment of depression, a user mentions, "I've been feeling very low for the past two weeks, crying every day." The system records the intent as "Depression: Low Mood" and the slot as "Crying Every Day." In this conversation, the system collects the intent, slot, and value related to depression.
[0029] In the intent classification task, the [CLS] token generated by BERT is represented by a fully connected layer and a softmax layer to output the intent category. The loss function can be a cross entropy function to calculate the intent classification error.
[0030] In the slot labeling task, the vector representation of each token generated by BERT is processed. The slot label of each token can be output through BiLSTM or directly using a linear layer plus a conditional random field (CRF). The loss function is the CRF negative log-likelihood loss or cross-entropy loss.
[0031] The total loss is the weighted sum of the losses of the intent classification task and the slot labeling task. The hyperparameters α and β are used to adjust the weight coefficients of the two tasks and are usually set to 1:1, that is, Loss = α*Loss_intent + β*Loss_slot.
[0032] like Figure 2 As shown, Figure 2 A schematic diagram of intent and slot identification provided in an embodiment of the present application. For example, the format of the output intent and slot may be:
[0033] {
[0034] "intent":"depression",
[0035] "slots":{"emotional state":"depressed","behavioral response":"tearful","frequency":"daily","timeframe":"last two weeks"}}.
[0036] S102: Adjust the conversation path of the open conversation according to the user intention and the slot.
[0037] Open conversations usually go through multiple rounds. During the conversation, it is necessary to judge the user's intention and adjust the conversation path based on the user's intention and slot.
[0038] Specifically, each round of dialogue can be represented by a structured dialogue state, which includes the following:
[0039] The state vector S contains the following key information:
[0040] S = {dialogue history H, identified intent I, filled slots F, confidence C, dialogue turns T}
[0041] in:
[0042] Conversation history H: stores the history of users and the system;
[0043] Identified intent I: user intent identified by BERT intent;
[0044] Filled slot F: {"emotional state":"depressed","behavioral response":"tearful",...};
[0045] Confidence C: the confidence of the system in understanding the current state;
[0046] Dialogue turn T: The number of turns in the current dialogue.
[0047] In this way, a corresponding dialogue state can be obtained in each round of dialogue, and the slots can be adjusted according to the current state to determine the adjusted dialogue state, wherein the adjustment includes adding, modifying or deleting slot annotation information.
[0048] Possible implementations include
[0049] A={questioning action Aq, confirming action Ac, executing action Ae}
[0050] in:
[0051] Follow-up action Aq: Ask the user when a specific slot is missing or has low confidence;
[0052] Confirmation action Ac: used when the system needs to verify the information obtained;
[0053] Execute action Ae: When sufficient key information is available, perform subsequent tasks (such as providing evaluation results).
[0054] Continuing with the previous example, using the psychological assessment of depression as an example, if a user mentions, "I've been in a very bad mood lately, and I feel like crying occasionally. In addition, I kind of feel like sleeping and not waking up." The system recognizes two intents: "Depression: Poor Mood" and "Depression: Suicide or Self-Injury." The corresponding slots are filled with "Occasionally feel like crying" and "Somewhat." If the user then mentions, "In addition to feeling like crying, I also can't sleep all night," the slot corresponding to the "Depression: Poor Mood" intent is updated to read "Occasionally feel like crying, can't sleep all night."
[0055] Specifically, the current state can be used as the root node of the search tree. Since the root node contains multiple slots and their annotated information, any policy action can be a possible child node. Policy actions include questions, confirmations, or task execution (i.e., starting scoring). At this point, an expansion operation can be performed: all child nodes generated by the next legal step allowed by this child node are added to the search tree as new child nodes and initialized correctly, thereby generating a search tree containing the root node and child nodes.
[0056] Then, the possible paths in the search tree can be traversed, and the slots in the current state can be adjusted along the path with the maximum reward function value. The reward function can be designed based on indicators such as task completion (such as slot filling rate) and user satisfaction (such as conversation fluency). Through random sampling and iterative optimization, simulations are performed on a large number of possible conversation paths, the benefits of different conversation paths (such as information gain, user experience, and answer stability) are evaluated, and the optimal questioning path is selected based on the value of the reward function, achieving dynamic and adaptive interaction optimization.
[0057] S103: Map the value of each slot in the dialogue path to a single score of each slot, and aggregate the single scores to generate a total score.
[0058] Deep learning models (such as the Transformer architecture) can be used to analyze the values of each slot in the dialogue path in real time, identify and compare each value, and give a score.
[0059] Identification primarily includes mental health indicators and degree indicators. Mental health indicators include: emotional state, physical condition, interpersonal relationships, problematic behaviors, and cognitive strategies. Degree indicators refer to the specific level of mental health indicators. For example, if a user responds, "I felt extremely sad last week," the system will extract the mental health indicator as "sad" and the degree indicator as "extreme."
[0060] During scoring, the slot values can be standardized to generate standardized values, which can then be mapped to individual scores for the corresponding slots based on pre-defined standardized labels. For example, slot values can be replaced with synonyms based on an emotional expression dictionary, emojis can be converted to synonyms, or synonymous sentences can be normalized, achieving localization and standardization of emotional expression.
[0061] In the large-scale model scoring, the scoring criteria (for example, "always = 3") are expanded through supervised learning to degree words that users often reply (for example, "always / several times a day / very / extremely / especially / unbearable / extremely frequent, etc. = 3"). If the user's reply does not involve the prompt words, the system can ask follow-up questions, such as: "Can you tell me more about the degree of sadness?"
[0062] In addition, the system can also determine whether the slot annotation information has completely included the preset information (the preset information can be structured or unstructured). If not, the open dialogue will continue based on the missing information. The continuation can be in the form of follow-up questions until the slot annotation information is completely included in a certain round of dialogue. Figure 3 As shown, Figure 3 A schematic diagram of another process framework provided in an embodiment of the present application.
[0063] S104: Generate a structured psychological assessment report based on the individual item scores and the total score.
[0064] Finally, the system integrates the scores of the slot annotation information in each round of dialogue, compares the threshold scores, and presents the evaluation results to the user.
[0065] For example, based on the slot annotation information, psychological scale standards (such as PHQ-9 and GAD-7) can be used to calculate various scores. The answer to each question is mapped to a specific score, and then aggregated into a total score based on preset rules to mark the mental health status (such as mild, moderate or severe depression and anxiety).
[0066] Furthermore, templates can be used to generate preliminary psychological reports. The structured data output by the scoring engine (such as total score, status level, risk recommendations, etc.) is filled into the report template through the template engine (Jinja2) to generate a structured psychological assessment report.
[0067] By using a target model to identify user intentions and slots in an open-ended conversation with a user; adjusting the conversation path of the open-ended conversation according to the user intentions and slots; mapping the values of each slot in the conversation path to individual scores for each slot, and summarizing the individual scores to generate a total score; and generating a structured psychological assessment report based on the individual scores and the total score, the user intentions can be accurately understood based on the user's open-ended answers, dynamic follow-up questions can be conducted, and accurate personalized psychological assessment can be achieved.
[0068] In one embodiment, the setting of the reward function can be combined with the scenario of psychological assessment, that is, the reward function includes task completion reward, user satisfaction reward and risk identification reward. Among them, the task completion reward (Rtask) includes: giving a high reward when successfully completing the assessment of all core dimensions of the depression scale; giving a positive reward for each successful filling of a key slot; giving an additional high reward (positive reward) for each identification and timely questioning of suicide and self-harm related information. User satisfaction reward (Rsatisfaction) includes: the fewer the dialogue rounds, the higher the reward (negative reward, that is, too many rounds of punishment); avoid repeated questioning, repeated questioning gives negative rewards; successfully identifying user intentions and giving appropriate responses gives positive rewards. Risk identification reward (Rrisk) includes: timely identification and processing of high-risk (suicide and self-harm) information gives significantly high rewards; successfully guiding users to express suicidal and self-harm thoughts and conduct risk assessments gives high rewards. R = Wtask.Rtask + Wsatisfaction.Rsatisfaction + Wrisk.Rrisk, where Wtask, Wsatisfaction, and Wrisk are the weights of each reward. This approach can adjust the path of open dialogue toward a direction that is conducive to task completion, user satisfaction, and high-risk identification.
[0069] In one embodiment, when traversing and selecting child nodes in a search tree, the following methods are specifically included:
[0070] 1. Selection: Starting from the root node (the current dialog state), traverse down the search tree and select the child node with the highest UCT value. This value balances exploration (fewer visits) and exploitation (high win rate).
[0071]
[0072] Where Q(s,a) is the average value of the reward function of node a, N(s,a) is the number of visits to node ia, N(s) is the total number of visits to the parent node, and c is the exploration parameter.
[0073] 2. Expansion: If the selected node is not a leaf node and all its child nodes have not been fully expanded (i.e. all possible system actions have been tried), a new child node (new system action) is generated from the node and added to the search tree.
[0074] 3. Simulation: Starting from the newly expanded node, multiple rounds of dialogue simulation are performed using the user simulator and system model until a termination condition is reached (such as a maximum number of dialogue rounds, task completion, or explicit termination by the user). During the simulation, system actions are selected randomly or based on simple heuristic rules.
[0075] 4. Backpropagation: The reward value obtained during the simulation (calculated according to the reward function) is backpropagated from the leaf node to all parent nodes passed through, and the number of node visits and total rewards are updated.
[0076] Through the above four steps, the simulation is carried out and the action with the largest Q(s,a) is finally selected as the current system response for adjustment.
[0077] In the second aspect, Figure 4 As shown, Figure 4 This is a schematic diagram of the structure of an electronic system provided in one embodiment of the present application. Figure 4 As shown, the electronic system 4 of this embodiment includes: at least one processor 40 ( Figure 4 Only one is shown), a memory 41 and a computer program 42 stored in the memory 41 and executable on at least one processor 40, the processor 40 executes the computer program 42 to implement the above Figure 3 The steps in the method embodiment, or the implementation of the above Figure 4 Functions of each module / unit in the device embodiment.
[0078] The electronic system 4 can be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The electronic system 4 can include but is not limited to a processor 40 and a memory 41. It will be understood by those skilled in the art that Figure 4 This is only an example of the electronic system 4 and does not constitute a limitation on the electronic system 4. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.
[0079] The processor 40 may be a central processing unit (CPU), or other general-purpose processors, 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, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0080] In some embodiments, the memory 41 may be an internal storage unit of the electronic system 4, such as a hard disk or memory of the electronic system 4. In other embodiments, the memory 41 may also be an external storage device of the electronic system 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, etc. equipped on the electronic system 4. Furthermore, the memory 41 may include both an internal storage unit of the electronic system 4 and an external storage device. The memory 41 is used to store an operating system, application programs, a boot loader, data, and other programs, such as the program code of a computer program. The memory 41 may also be used to temporarily store data that has been output or is about to be output.
[0081] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0082] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the process in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program, when executed by the processor, can implement the steps of the above-mentioned various method embodiments. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include at least: any entity or device capable of carrying the computer program code to an electronic system, a recording medium, a computer memory, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), an electrical carrier signal, a telecommunication signal and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk.
[0083] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0084] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel 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.
[0085] In the embodiments provided in this application, it should be understood that the disclosed devices / equipment and methods can be implemented in other ways. For example, the device / equipment embodiments described above are merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0086] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0087] The above-mentioned electronic system and storage medium are created based on the above-mentioned retrieval problem optimization method, and will not be described in detail here. The above embodiments are only used to illustrate the technical solutions of this application, rather than to limit them. Although this application is described in detail with reference to the above-mentioned embodiments, a person of ordinary skill in the art should understand that it is still possible to modify the technical solutions described in the above-mentioned embodiments, or to replace some of the technical features therein by equivalents. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included in the scope of protection of this application.
Claims
1. An open psychological assessment method, characterized in that: Applied to an open dialogue with a user, the method includes: Using a goal model to identify user intent and slots in the open-ended conversation; Adjusting a conversation path of the open conversation according to the user intention and the slot; Mapping the value of each slot in the dialogue path into a single score for each slot, and summing up the single scores to generate a total score; A structured psychological assessment report is generated based on the individual item scores and the total score.
2. The method according to claim 1, wherein The adopting of the target model to identify the user intention and slot in the open conversation includes: Obtaining user input text from the open dialog; Segmenting the text to obtain a plurality of formatted word metadata; The word metadata are respectively input into the intention classification task and slot labeling task included in the target model to generate the category of user intention and slot labeling information respectively.
3. The method according to claim 1, wherein Adjusting the dialogue path of the open dialogue according to the user intention and the slot includes: Determining a current dialog state of the open dialog, wherein the current state includes a category of user intent, slot annotation information, and context information; Adjusting the slot according to the current conversation state to determine an adjusted conversation state, wherein the adjustment includes adding, modifying, or deleting slot annotation information; Multiple rounds of dialogue paths are simulated based on the current dialogue state, and the action with the largest reward function value is selected to generate a dialogue path.
4. The method according to claim 3, wherein: Simulating multiple dialogue paths based on the current dialogue state, selecting the action with the largest reward function value, and generating a dialogue path, including: Taking the current state as the root node of the search tree; Taking the optional policy action as a child node, generating a search tree including the root node and the child nodes; Possible paths are traversed from the search tree, and the slots included in the current state are adjusted along the path where the reward function has the maximum value.
5. The method according to claim 4, wherein: The reward function includes task completion reward, user satisfaction reward and risk identification reward.
6. The method of claim 4, wherein: Adjusting the slots in the current state along the path where the reward function has the maximum value includes: Select the child node with the highest UCT value as the next node in the path for adjustment, where: Q(s,a) is the average value of the reward function of node a, N(s,a) is the number of visits to node a, N(s) is the total number of visits to the parent node, and c is the exploration parameter.
7. The method of claim 1, wherein: The method further comprises: Determine whether the labeling information of the slot completely includes the preset information; if not, continue the open dialogue based on the information not included.
8. The method of claim 1, wherein: Mapping the value of each slot in the dialogue path to a single score for each slot includes: Standardizing the values of the slots to generate standardized values; The standardized value is mapped to a single score of the corresponding slot according to a predetermined standardized label.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
10. An electronic system comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Cited By
Large model intention understanding fine tuning method and device based on reinforcement learning
CN121787595A