A mental health-oriented conversational knowledge enhancement evaluation collaboration method and system
Patent Information
- Application Number
- CN202611208786.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-11
- Publication Date
- 2026-10-30
AI Technical Summary
[0004]本发明的目的是提供一种面向心理健康的对话式知识增强测评协同方法及系统,以克服现有技术中大模型心理分析专业性不足、对话交互缺乏支持性规范、以及传统量表测评与自然对话割裂的问题
1)通过知识检索与多查询融合增强外部大模型,为结构化心理测评提供稳定的心理学知识与风险边界约束,提升分析的专业性和核心问题识别的准确率;
Smart Images

Figure CN123017379A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of natural language processing and digital mental health technology, and in particular to a conversational knowledge-enhanced assessment collaborative method and system for mental health. Background Technology
[0002] As the application of large language models in intelligent question answering, medical consultation, and digital companionship continues to expand, large language model systems for mental health scenarios are gradually becoming an important direction for digital mental health services. Compared to traditional form-based assessment systems and fixed-template question-answering systems, large language models can understand natural language input and demonstrate application potential in psychological support, scale interpretation, and risk identification.
[0003] However, in the serious context of mental health, existing methods for applying large language models still have the following prominent problems: 1) Traditional large language models, when generating psychological responses, often lack stable constraints on psychological knowledge, scale norms, risk boundaries, and intervention strategies, which can easily lead to unprofessional analysis, generalized recommendations, or even loss of safety boundaries. 2) General dialogue models struggle to maintain the "psychological support" paradigm in multi-turn interactions, often exhibiting a lack of empathy, posing multiple complex questions at once, excessive output of reasoning logic, or falling into mechanical preaching, resulting in poor interaction effects and easily causing user resistance. 3) Existing digital solutions for structured psychological scales mainly rely on traditional questionnaires, which have fixed and numerous questions. The assessment process is highly disconnected from natural conversation, placing a heavy burden on users. Furthermore, the system cannot adaptively adjust the focus of questions based on exposed high-risk signals, making it difficult for assessment results to flow smoothly to subsequent psychological support stages. Summary of the Invention
[0004] The purpose of this invention is to provide a collaborative method and system for dialogic knowledge enhancement assessment oriented towards mental health, in order to overcome the problems of insufficient professionalism in large-scale psychological analysis, lack of supportive norms in dialogue interaction, and the disconnect between traditional scale assessment and natural dialogue in existing technologies.
[0005] To achieve the above objectives, this invention provides a collaborative method for conversational knowledge enhancement assessment oriented towards mental health, comprising the following steps: S1. Construct a mental health knowledge base, and segment mental health documents and structured materials into knowledge fragments for vectorized storage; the mental health knowledge base shall at least include psychological theories, scale norm interpretations, intervention strategies, and crisis management rules; S2. Construct a Chinese psychological support multi-turn dialogue corpus, perform role normalization, structure verification and precise deduplication on psychological dialogue samples from different sources, and map them into a unified format; S3. Divide the multi-turn dialogue corpus into a training set, a validation set, and a test set according to a preset ratio, and perform efficient supervised fine-tuning of the basic instruction large language model execution parameters based on the training set to obtain an emotion-supported dialogue large language model; after training, use the validation set and test set to expand into a response-level evaluation set to monitor the model's interactive behavior specifications. S4. After receiving the user's natural language input, invoke the emotion support dialogue big language model and the external item hit detection model, and combine the scale item bank to perform candidate item recall and item hit detection, and update the item evidence status. S5. Calculate the overall coverage and factor coverage based on the updated item evidence status, identify high-risk and low-confidence factors as priority follow-up questions, and call the emotion-supported dialogue big language model to generate single-point open-ended follow-up questions until the stopping condition is met. S6. After stopping follow-up questions, aggregate the collected evidence to generate factor scores, risk labels and assessment summaries; S7. Based on the factor scores and assessment summaries, perform multi-query retrieval from the mental health knowledge base, and input the retrieved knowledge context and assessment results into a general large language model to generate knowledge-enhanced structured psychological analysis results. S8. The assessment summary and risk markers are fed back to the emotional support dialogue big language model to generate a personalized psychological support response loop.
[0006] Preferably, in S2, the Chinese psychological support multi-turn dialogue corpus includes at least self-built replicated psychological support samples, PsyDT dataset samples, and CPsyCounD dataset samples; system role constraints are uniformly injected into all samples to enable the model to learn response patterns of empathic acceptance, single-point open-ended follow-up questions, and small-step executable suggestions, while explicitly avoiding outputting reasoning processes and list-style preaching.
[0007] Preferably, in S3, the parameter efficient supervised fine-tuning is LoRA fine-tuning, and the LoRA adapter is injected into the key projection matrices of the attention layer and the feedforward neural network layer; the key projection matrix includes at least q proj , k proj , v proj , o proj , gate proj , up proj and down proj ; The projection matrix in the attention layer includes at least a query projection matrix for mapping the input hidden state to a query vector. q proj ; a key projection matrix used to map the input hidden state to a key vector k proj ; a value projection matrix used to map the input hidden state to a value vector. v proj ; and the attention output projection matrix used to map the output vector obtained from attention calculation to the model's hidden state space. o proj .
[0008] The projection matrix in the feedforward neural network layer includes at least: a gated projection matrix for mapping the input hidden state to a gated branch representation. gate proj ; used to map the input hidden state to the upper projection matrix of the intermediate dimension of the feedforward neural network. up proj ; and the downprojection matrix used to map the gated activation intermediate representation back to the model's hidden state space. down proj .
[0009] For any original weight matrix injected into the LoRA adapter W The fine-tuned weight matrix W' Represented as: ; in, A and B It is a low-rank trainable matrix. r It is a low-rank dimension. α This is the scaling factor; the original weight matrix is frozen during training. W And update the low-rank trainable matrix. A and B .
[0010] Preferably, in S4, the candidate item recall adopts a multi-level hybrid recall strategy: Calculate the first t User input u t With the i Recall text for each item q i Vector similarity between them: ; in, This is a text vectorization function used to map input text into a real vector of a preset dimension using the same text embedding model; and The first t Round of user input and the first i The text vector corresponding to the recall text for each item; the symbol " " indicates the vector dot product operation. The L2 norm of a vector. Represents the cosine similarity between two text vectors; when Not lower than the vector recall threshold If the vector recall does not meet the threshold condition, it will fall back to rule-based recall based on semantic keywords and symptom thesaurus. The final candidate item set is represented as follows: ; in, The set of items obtained from rule-based recall; The item hit detection calls an external item hit detection model to output a structured result for each candidate item, including its status, matching type, confidence level, and evidence content, and updates the item evidence status accordingly.
[0011] Preferably, in S5, the calculation of the first item evidence state is based on the updated item evidence state. t Overall wheel coverage and factors f Factor coverage : ; ; in, For the set of items in the scale, As a factor f The corresponding set of questions, As the weight of the question item, This indicates whether an item has valid evidence that meets the confidence threshold; the priority of follow-up questions is calculated based on factor risk level, factor coverage, average evidence confidence, and the number of follow-up questions already asked. ; ; in, For factor risk level, As a factor f The average confidence level of evidence. The factor average confidence level. The number of times the factor has been asked has been completed. The maximum number of questions asked for a single factor. to These are non-negative weighting coefficients; the weighting coefficients are determined according to the principles of risk priority, information gap filling, and suppression of redundant inquiries; wherein, The weights corresponding to the risk level of the factors. The weights corresponding to the degree of factor coverage insufficiency. The weights corresponding to the degree of insufficient confidence of the evidence. The decay weights are the number of questions already asked; each weight coefficient is not less than 0 and satisfies the following conditions: ; The dynamic follow-up questioning process is constrained by the maximum number of questions in a single round, the maximum cumulative follow-up question points, and the maximum number of questions asked on a single factor. Priority factors include depression, anxiety, psychosis, and paranoia. The stopping condition for dynamic question completion is: ; in, The overall coverage threshold, To supplement the priority threshold, To accumulate points for additional questions, To accumulate the maximum number of supplementary questions, For the remaining dialogue budget, For the universal set of factors; symbol " The symbol "" represents a logical AND operation, where the result is true if all conditions connected to it are true; "" indicates a logical OR operation, the result of which is true when at least one condition is met; when the result of the operation of the stop condition is true, the dynamic questioning is terminated.
[0012] Preferably, in S6, the factor f Quantitative score Represented as: ; in, The item score is obtained based on the item evidence mapping. Indicates the terms i With factors f The attribution relationship; the risk marker is triggered by both factor-level quantitative score signals and explicit hazard expressions extracted from the original text of the item evidence, and the risk marker is represented as: ; in, A set of high-risk factors, As a risk threshold, This indicates whether explicit expressions of self-harm were detected in the original text. This is an indicator function.
[0013] Preferably, in S7, the multi-query retrieval includes: sample feature query based on the current test scoring table and question-level table content, knowledge query based on scale name and norm threshold, and supplementary query based on the high-scoring factors and risk descriptions of the current case; For knowledge fragments d The fusion search score is: ; in, For the first k A query text, K For the number of queries, For the corresponding query weight, and .
[0014] This invention also provides a conversational knowledge-enhanced assessment collaborative system for mental health, used to implement the above method, comprising: The corpus and knowledge base construction module is used to build a structured mental health knowledge base and a unified format Chinese psychological support multi-turn dialogue corpus; The dual-branch model building module includes a general large language model interface for generating professional reports, and an emotion-supporting dialogue large language model trained by LoRA. The conversational scale assessment module is used to receive natural language input and combine the scale item bank and symptom dictionary to perform candidate recall, coverage calculation, high-risk priority supplementary questioning and factor scoring; The joint analysis and linkage module is used to send the assessment results into a general large model to generate structured professional analysis through multi-query retrieval, and to feed them back into the emotion support dialogue model to generate supportive closing responses.
[0015] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the aforementioned collaborative method for conversational knowledge enhancement assessment oriented towards mental health.
[0016] The present invention also provides a computer program product that, when run on a computer, causes the computer to execute the aforementioned collaborative method for conversational knowledge enhancement assessment oriented towards mental health.
[0017] Therefore, the present invention employs the above-mentioned collaborative method and system for dialogic knowledge enhancement assessment oriented towards mental health, which has the following beneficial effects: 1) Enhance the external large model by integrating knowledge retrieval and multi-query, providing stable psychological knowledge and risk boundary constraints for structured psychological assessment, and improving the professionalism of the analysis and the accuracy of core issue identification; 2) By supervising and fine-tuning the basic model on a multi-source psychological support corpus and imposing role constraints, a dialogue foundation that conforms to psychological support norms is constructed, which improves the problem of the general large model being prone to preaching and multiple follow-up questions; 3) Transform fixed scales into dynamic, adaptive conversational assessment processes. Under limited conversational budgets, use a high-risk priority follow-up questioning strategy to maintain assessment effectiveness and reduce unnecessary questions. 4) Achieve a complete closed loop of "low-burden information collection - professional structured assessment - supportive natural feedback", so as to effectively connect natural dialogue with structured scale assessment.
[0018] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0019] Figure 1 This is a schematic diagram of the overall structure of the dialogic knowledge enhancement assessment collaborative method for mental health according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the construction process of the emotion-supporting dialogue large language model and the conversational scale assessment process according to an embodiment of the present invention; Figure 3 This is a dialog-based adaptive question completion and coverage-driven logic diagram of an embodiment of the present invention. Detailed Implementation
[0020] The technical solutions of the present invention will be further described below with reference to the accompanying drawings and embodiments. Unless otherwise defined, the technical or scientific terms used in this invention should be understood in their ordinary sense by those skilled in the art. The described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0021] Example 1 like Figure 1 As shown, this embodiment provides a collaborative method for conversational knowledge enhancement assessment oriented towards mental health, specifically including the following steps: S1. Construct a mental health knowledge base. This involves systematically collecting scale definition interpretation documents, norm reference materials, factor interpretation materials, evidence-based intervention recommendations, and crisis management rules. After segmenting these into knowledge fragments, vectorization is performed using a vectorization model (e.g., BGE-large-zh-v1.5). The mental health knowledge base should at least include psychological theories, scale norm interpretations, intervention strategies, and crisis management rules. Vectors are stored in vector databases such as ChromaDB and loaded as queryable external professional knowledge sources via a search engine (e.g., LlamaIndex) upon service startup.
[0022] S2. Construct a corpus of Chinese psychological support multi-turn dialogues, such as Figure 2As shown, role normalization, structure verification, and precise deduplication are performed on psychological dialogue samples from different sources, and the samples are mapped to a unified format. Specifically, in this embodiment, self-built and anonymized psychological support samples, the PsyDT dataset, and the CPsyCounD dataset are uniformly mapped to the ShareGPT style, which includes a system role and a conversation structure that alternates between human and gpt roles. Blank removal, role misordering cleaning, incomplete odd-turn deletion, and precise deduplication are performed on the data, and finally, 8430 valid multi-turn dialogues are obtained. At the same time, a unified system constraint is injected into all samples to guide the model to learn the response pattern of "empathic acceptance, single-point open-ended follow-up questions, and small-step actionable suggestions," while avoiding leakage of reasoning process and lengthy lecturing.
[0023] S3. Train and deploy the emotion-supporting dialogue large language model. Explicitly segment 8430 dialogues at the dialogue level using a 7:2:1 ratio (5900 dialogues in the training set, 1685 in the validation set, and 845 in the test set) to maintain consistency across multiple source distributions. Use the LLaMA-Factory framework to fine-tune the Qwen2.5-7B-Instruct base model with LoRA supervision to obtain the emotion-supporting dialogue large language model. Training parameters are set as follows: cutoff len =3072, learning rate =1e-5, num train_epochs =4.0, and inject the LoRA adapter. q proj , k proj , v proj , o proj , gate proj , up proj and down proj Key projection matrices.
[0024] The projection matrix in the attention layer includes at least: a query projection matrix used to map the input hidden state to a query vector. q proj The key projection matrix used to map the input hidden state to the key vector. k proj ; Value projection matrix used to map input hidden states to value vectors v proj ; and the attention output projection matrix used to map the output vector obtained from attention calculation to the model's hidden state space. o proj.
[0025] The projection matrix in a feedforward neural network layer includes at least: a gated projection matrix used to map the input hidden state to the gated branch representation. gate proj ; Used to map the input hidden state to the upper projection matrix of the intermediate dimension of the feedforward neural network. up proj ; and the downprojection matrix used to map the gated activation intermediate representation back to the model's hidden state space. down proj .
[0026] Based on the external validation set eval loss The best model is automatically saved. After training, the validation and test sets are expanded into a response-level evaluation set to monitor the model's interactive behavior. The model is then deployed as an inference service interface for use.
[0027] For any original weight matrix injected into the LoRA adapter W The fine-tuned weight matrix W' Represented as: ; in, and It is a low-rank trainable matrix. Represents the set of real numbers. Original weight matrix W The input feature dimension, Original weight matrix W The output feature dimension, the original weight matrix ; For use in transferring input features from 3D space mapping to r The first low-rank trainable matrix in a low-rank space. To map features in the low-rank space to The second low-rank trainable matrix in the dimensional output space; r It is a low-rank dimension, and r Less than and Positive integers; α This is the scaling factor. Matrix With matrix product Its dimensions are the same as the original weight matrix. W The same principle applies; it is used to construct a low-rank increment of the original weight matrix. The original weight matrix is frozen during training. W And update the low-rank trainable matrix. A and B .
[0028] For multi-turn dialogue samples, an autoregressive supervised fine-tuning objective is used, and the training loss is expressed as: ; in, x The input context consists of system constraints and historical dialogue. For the first t One target response term, Indicates the first t The sequence of target words preceding each target word, T For the target response length, Indicates by parameters Deterministic emotion supports dialogue-based large language models, within the input context. and target word sequence Under the condition of, for the first t target words The conditional generation probability of the assignment; Represents the first low-rank trainable matrix in each LoRA adapter. A Second low-rank trainable matrix B The parameter set. During training, the original weight parameters of the basic instruction large language model are frozen, and the parameters are updated by minimizing the training loss. Obtain the LoRA parameters after training. θ* In this embodiment, the low-rank dimension of LoRA r Set to 16, scaling factor. α Set the value to 32, and the LoRA discard rate to 0.05.
[0029] S4. Perform candidate item recall and hit detection for conversational assessments, such as... Figure 3 As shown, the conversational scale assessment module maintains a state machine to record rounds, questions asked, and evidence trajectories. Upon receiving natural language input from the user, it invokes the emotion-supported dialogue large language model and the external item hit detection model, and combines the scale's item bank to perform candidate item recall and item hit detection.
[0030] The candidate item recall adopts a multi-level hybrid recall strategy, prioritizing vector similarity matching between user expressions and recalled texts from the item bank (including scales such as SCL-90 and MSSMHS).
[0031] No. t User input With the i Recall text for each item The vector similarity between them is calculated as follows: ; in, This is a text vectorization function used to map input text into a real vector of a preset dimension using the same text embedding model; and The first t Round of user input and the first i The text vector corresponding to the recall text for each item; the symbol " " indicates the vector dot product operation. The L2 norm of a vector. This represents the cosine similarity between two text vectors. In this embodiment, the vector recall threshold... Take 0.60; when At that time, the first i Each item is included in the vector recall set; If vector recall does not meet the threshold condition, it will fall back to rule-based recall based on semantic keywords and symptom thesaurus. Finally, the vector recall results and rule-based recall results together constitute the final candidate item set. ; in, This is the set of items retrieved by the rule.
[0032] The item hit detection calls an external item hit detection model, outputting a structured result for each candidate item, including its state, matching type, confidence level, and evidence content, and updating the item evidence state accordingly. For candidate items... i Based on the confidence level output by the external model and evidence fragments Update the status of the evidence for the question item: ; in, The confidence threshold for the item hit is set to 0.70 in this embodiment; where, This indicates the number of characters or lemmas contained in the evidence fragment. This indicates that the evidence fragment is not empty.
[0033] S5. Coverage calculation and dynamic supplementary questioning with high risk priority: The system calculates the overall coverage and the coverage and confidence of each factor in real time based on the updated item evidence status.
[0034] No. t Overall wheel coverage and factors f Factor coverage They are respectively: ; ; in, For the set of items in the scale, As a factor f The corresponding set of questions, As the weight of the question item, This indicates whether a question item has valid evidence that meets the confidence threshold.
[0035] factor f The average confidence level of the evidence is: ; in, For the first t The external question hit detection model targets the first... i The output item hit confidence of each candidate item, and The larger the value, the more reliable the hit detection result for the corresponding question item; To prevent the default positive number with a denominator of zero.
[0036] If the stopping conditions have not yet been met, the system identifies factors with low coverage / low confidence from high-priority risk targets such as "depression, anxiety, psychoticism, and paranoia".
[0037] The priority of follow-up questions is calculated based on the factor risk level, coverage, evidence confidence level, and number of follow-up questions already asked: ; ; in, Given the current factor risk level, As a factor f The average confidence level of evidence. The factor average confidence level. The number of times the factor has been asked has been completed. The maximum number of questions asked for a single factor. to These are non-negative weighting coefficients. The weighting coefficients are determined according to the principles of risk priority, information gap filling, and suppression of redundant inquiries; among them, The weights corresponding to the risk level of the factors. The weights corresponding to the degree of factor coverage insufficiency. The weights corresponding to the degree of insufficient confidence of the evidence. The decay weights are the number of questions already asked; each weight coefficient is not less than 0 and satisfies the following conditions: To prioritize the identification of high-risk factors, The value is greater than and , and Determined based on the relative importance of factor coverage completeness and evidence reliability. The priority of a factor's follow-up questioning is determined based on the maximum allowed number of questions per factor, so that the closer the number of follow-up questions a factor has to be to the maximum number of questions per factor, the greater the reduction in the priority of its follow-up questioning. In this embodiment, =0.40、 =0.25、 =0.20、 =0.15.
[0038] The dynamic follow-up questioning process is constrained by the maximum number of questions per round, the maximum cumulative number of follow-up questions, and the maximum number of questions per factor. Priority factors include depression, anxiety, psychosis, and paranoia. Subsequently, the system invokes the emotion-supported dialogue language model deployed in S3 to transcribe the follow-up question target into highly empathetic and natural single-point open-ended follow-up questions. In this embodiment, the maximum number of questions per round is set to 2, and the maximum cumulative number of follow-up questions is set to... Take 4, maximum number of supplementary questions for a single factor. Set to 2, initial remaining dialogue budget Take 3 rounds; after each round of follow-up questions, reduce the remaining dialogue budget by 1, i.e. .
[0039] The stopping condition for dynamic question completion is expressed as: ; in, The overall coverage threshold is set to 0.60 in this embodiment; To compensate for the priority threshold, this embodiment uses 0.35; To accumulate points for additional questions, To determine the maximum cumulative number of supplementary questions, this embodiment uses 4; For the remaining dialogue budget, the initial remaining dialogue budget Take 3 rounds; For the universal set of factors. The symbol " The symbol "" represents a logical AND operation, where the result is true if all conditions connected to it are true; " indicates a logical OR operation, and the result is true when at least one of the conditions it connects is true; dynamic supplementation is terminated when the overall coverage reaches 0.60 and the maximum supplementation priority of all factors is less than 0.35, or the cumulative supplementation points reach 4, or the remaining dialogue budget is less than or equal to 0.
[0040] S6. Evidence Aggregation and Assessment Summary Generation: After the question-filling cessation condition is met, the system maps the acquired evidence fragments into item quantitative scores, and then aggregates them into quantitative scores for each factor and overall confidence level. Simultaneously, based on factor scores and dangerous word expressions extracted from the original dialogue (such as suicide or self-harm), independent risk markers and natural language assessment summaries are generated.
[0041] factorf The quantitative score is calculated as follows: ; in, The item scores are obtained based on the item evidence mapping. Indicates the terms i Does it belong to the factor? f .
[0042] Risk markers are generated by combining comprehensive factor quantification score signals with explicit hazard expressions in the original text. ; in, This is a set of high-risk factors, which in this embodiment includes factors such as depression, anxiety, psychosis, and paranoia. This is the factor risk threshold. This example uses the SCL-90 scale's conversational assessment process, with items using a 1-5 point quantitative mapping method. The factor risk threshold... The threshold is set to 2.00; when any factor in the high-risk factor set scores at or above 2.00, the factor quantification score signal triggers risk labeling. For implementations using other psychological scales, the factor risk threshold is determined according to the standard scoring method and norm determination rules of the corresponding scale.
[0043] Indicate whether there are explicit expressions of danger, such as suicide, self-harm, ending one's life, or other clear threats to one's safety, in the original evidence text; when at least one explicit expression of danger is detected, let Otherwise . This is an indicator function; it takes a value of 1 when the logical condition within the parentheses is true, and a value of 0 otherwise. Therefore, explicit hazard expressions can independently trigger risk labeling, regardless of whether the factor score reaches the risk threshold.
[0044] To clearly illustrate the parameter settings used in the conversational assessment process in this embodiment, the main thresholds and budget parameters for the candidate recall, item hit, coverage calculation, dynamic supplementation, and risk labeling stages are summarized in Table 1.
[0045] Table 1: Parameter settings for the dialogic assessment in this embodiment ; The above parameters are preset on the verification sample in this embodiment and remain unchanged during the conversational assessment process; other implementations can adjust the above parameters according to the scale type, number of items, dialogue rounds limit and verification results.
[0046] To further illustrate the specific implementation process of candidate item recall, item hit detection, dynamic question filling, and risk labeling, the intermediate processing results are shown in Table 2, taking the user's expression "Recently I always feel that something bad will happen, and I often can't sleep at night" as an example.
[0047] Table 2: Examples of Candidate Item Recall and Hit Detection ; As shown in Table 2, the vector similarity of items related to persistent worry and items related to difficulty falling asleep is not less than 0.60, and the hit confidence is not less than 0.70. At the same time, non-empty evidence fragments can be extracted, so the effective evidence label is 1. Although items related to low mood are recalled into the candidate item set through rules, the hit confidence is less than 0.70 and no clear evidence is extracted, so the effective evidence label is 0.
[0048] The system calculates coverage and supplementary question priority based on the status of the evidence for each question after each round of updates. Example results are shown in Table 3.
[0049] Table 3: Examples of Coverage and Dynamic Question Supplement Decisions ; The overall coverage rate in rounds 1 and 2 was below 0.60, and the maximum supplementary question priority was above 0.35. Therefore, the system continued to generate supplementary questions around the corresponding factors. In round 3, the overall coverage rate reached 0.63, the maximum supplementary question priority dropped to 0.31, and the cumulative number of supplementary question points reached 4, meeting the dynamic supplementary question stopping condition. The system then terminated the supplementary question generation and entered the item scoring and factor aggregation stage.
[0050] Example outputs of factor scores and risk labels are shown in Table 4.
[0051] Table 4: Examples of Factor Scores and Risk Labels ; In the examples shown in Table 4, the anxiety factor score of 2.36 is not lower than the risk threshold of 2.00, thus triggering a risk label; the scores of other factors are all lower than the risk threshold, and no explicit danger expressions were detected in the original evidence text, therefore no corresponding risk label was triggered. When explicit danger expressions such as suicide or self-harm are detected in any case, an overall risk label will be triggered independently, even if all factor scores are lower than the risk threshold.
[0052] S7, enhanced professional analysis generation for knowledge retrieval, triggers multi-query retrieval of the S1 knowledge base based on factor scores and assessment summaries generated in S6. Multi-query retrieval includes: sample feature queries based on the current assessment scoring table and question-level table content; knowledge queries based on scale names and norm thresholds; and supplementary queries based on high-scoring factors and risk descriptions of the current case. After fusion and deduplication, a knowledge context is formed.
[0053] Assume multiple queries generate a total of K A query text, for a knowledge fragment d Its fusion retrieval score is calculated as follows: ; in, For the first k A query text, To correspond to the query weight, and The system follows Before choosing Each knowledge fragment is used to form a knowledge context after deduplication of duplicate or highly similar knowledge fragments.
[0054] The context and assessment results are fed into a general large language model (such as DeepSeek-chat, constrained by JSON) to generate a professional report that includes quantitative views, dimensional analysis, risk assessment, and structured recommendations.
[0055] S8, the supportive dialogue loop is then fed back in. Simultaneously, the risk markers and assessment summaries generated in S6 are fed back into the emotion-supportive dialogue language model deployed in S3. The model then automatically generates a reassuring, explanatory dialogue conclusion that provides follow-up support actions, thus completing the closed loop from natural data collection and structured assessment to supportive feedback.
[0056] In this embodiment, in order to verify the specific effectiveness and linkage effect of the method, the following specific experimental evaluation system was constructed, and the effectiveness analysis is as follows.
[0057] 1) Effectiveness analysis of the knowledge enhancement assessment collaborative system of this invention.
[0058] Four standard assessment cases covering multiple risk levels were used for independent validation. A rule-based baseline system, a pure large-scale model system, and the knowledge-enhanced assessment collaborative system of this invention were set up. The experimental results are shown in Table 5.
[0059] Table 5: Performance Comparison in Risk Assessment and Factor Identification ; As shown in Table 1, in the four evaluation cases used in this embodiment, the risk level accuracy, suicide risk F1, and core factor hit rate of each system all reached 100%. The knowledge enhancement mechanism of this invention enabled the core factor F1 to reach 0.8661, which is higher than 0.8018 of the pure large model system. Expert evaluation results show that the system of this invention performs better in the dimensions of professionalism and feasibility, and can reduce unreliable suggestions caused by the lack of knowledge base.
[0060] 2) Effectiveness analysis of constructing an emotion-supported dialogue big language model.
[0061] To accurately evaluate the model's interactive behavior specifications during single-round responses, this embodiment expands the 1685 validation set and 845 test set into 23316 and 11730 response-level evaluation samples, respectively. The basic instruction model and the fine-tuned model of this invention are compared. The experimental results of the test set response levels are shown in Table 6.
[0062] Table 6: Comparison of Supported Behavior Specifications on the Response-Level Test Set ; Table 6 shows that the fine-tuned model of this invention improves support for dialogue styles. The multi-question rate decreased from 19.64% to 1.86%, the list-based didactic rate decreased to 0.29%, and the reasoning process leakage rate in the test set was 0; the question ending matching rate increased to 79.92%, reflecting the model's learning effect on the target pattern of "empathy followed by single-point follow-up questioning".
[0063] 3) Validity analysis of the conversational scale assessment module.
[0064] A comparative experiment was conducted by introducing a dialogue responder that hides the true scale results, under the same dialogue budget constraint. The baselines for comparison included: fixed-order questionnaire-to-dialogue, simple rule-based adaptive method, and the adaptive-driven method of this invention. The results are shown in Table 7.
[0065] Table 7: Comparison of Measurement Accuracy under Limited Dialogue Budgets ; Table 7 shows that, under strict budget constraints, the average number of questions asked in the conversational scale assessment module of this invention is 3.25, and the factor score MAE is 0.6428. Thanks to the high-risk priority supplementary question strategy, the high-risk recall rate reaches 90.62%, which is higher than the 39.58% of the fixed order method and the 47.92% of the rule adaptive method, verifying its effectiveness in low-burden scenarios.
[0066] Therefore, this invention employs the aforementioned collaborative method and system for conversational knowledge-enhanced assessment oriented towards mental health. Through knowledge retrieval enhancement, it provides stable professional knowledge and risk boundary constraints for structured psychological assessments, effectively improving analytical professionalism and reducing unreliable advice. By supervising and fine-tuning the basic model and imposing role constraints, it constructs a conversational model that conforms to psychological support norms, improving didactic and excessive follow-up questions. It transforms fixed scales into an adaptive conversational assessment process, maintaining assessment effectiveness and reducing unnecessary questioning within a limited conversational budget. It achieves a complete closed loop of natural conversational data collection, structured assessment, and supportive feedback, ensuring effective connection between each stage.
[0067] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.
Claims
1. A collaborative method for dialogic knowledge enhancement assessment oriented towards mental health, characterized in that, Includes the following steps: S1. Construct a mental health knowledge base, and segment mental health documents and structured materials into knowledge fragments for vectorized storage; the mental health knowledge base shall at least include psychological theories, scale norm interpretations, intervention strategies, and crisis management rules; S2. Construct a Chinese psychological support multi-turn dialogue corpus, perform role normalization, structure verification and precise deduplication on psychological dialogue samples from different sources, and map them into a unified format; S3. Divide the multi-turn dialogue corpus into a training set, a validation set, and a test set according to a preset ratio, and perform efficient supervised fine-tuning of the basic instruction large language model execution parameters based on the training set to obtain an emotion-supported dialogue large language model; after training, use the validation set and test set to expand into a response-level evaluation set to monitor the model's interactive behavior specifications. S4. After receiving the user's natural language input, invoke the emotion support dialogue big language model and the external item hit detection model, and combine the scale item bank to perform candidate item recall and item hit detection, and update the item evidence status. S5. Calculate the overall coverage and factor coverage based on the updated item evidence status, identify high-risk and low-confidence factors as priority follow-up questions, and call the emotion-supported dialogue big language model to generate single-point open-ended follow-up questions until the stopping condition is met. S6. After stopping follow-up questions, aggregate the collected evidence to generate factor scores, risk labels and assessment summaries; S7. Based on the factor scores and assessment summaries, perform multi-query retrieval from the mental health knowledge base, and input the retrieved knowledge context and assessment results into a general large language model to generate knowledge-enhanced structured psychological analysis results. S8. The assessment summary and risk markers are fed back to the emotional support dialogue big language model to generate a personalized psychological support response loop.
2. The collaborative method for dialogic knowledge enhancement assessment oriented towards mental health as described in claim 1, characterized in that, In S2, the Chinese psychological support multi-turn dialogue corpus includes at least self-built replicated psychological support samples, PsyDT dataset samples, and CPsyCounD dataset samples; system role constraints are uniformly injected into all samples to enable the model to learn response patterns of empathic acceptance, single-point open-ended follow-up questions, and small-step executable suggestions, while explicitly avoiding outputting reasoning processes and list-style preaching.
3. The collaborative method for dialogic knowledge enhancement assessment oriented towards mental health as described in claim 1, characterized in that, In S3, the parameter efficient supervised fine-tuning is LoRA fine-tuning, and the LoRA adapter is injected into the key projection matrices of the attention layer and the feedforward neural network layer; the key projection matrix includes at least q proj , k proj , v proj , o proj , gate proj , up proj and down proj ; The projection matrix in the attention layer includes at least a query projection matrix for mapping the input hidden state to a query vector. q proj ; a key projection matrix used to map the input hidden state to a key vector k proj ; a value projection matrix used to map the input hidden state to a value vector. v proj ; and the attention output projection matrix used to map the output vector obtained from attention calculation to the model's hidden state space. o proj ; The projection matrix in the feedforward neural network layer includes at least: a gated projection matrix for mapping the input hidden state to a gated branch representation. gate proj ; used to map the input hidden state to the upper projection matrix of the intermediate dimension of the feedforward neural network. up proj ; and the downprojection matrix used to map the gated activation intermediate representation back to the model's hidden state space. down proj ; For any original weight matrix injected into the LoRA adapter W The fine-tuned weight matrix W' Represented as: ; in, A and B It is a low-rank trainable matrix. r It is a low-rank dimension. α This is the scaling factor; the original weight matrix is frozen during training. W And update the low-rank trainable matrix. A and B .
4. The collaborative method for dialogic knowledge enhancement assessment oriented towards mental health as described in claim 1, characterized in that, In S4, the candidate item recall adopts a multi-level hybrid recall strategy: Calculate the first t User input u t With the i Recall text for each item q i Vector similarity between them: ; in, This is a text vectorization function used to map input text into a real vector of a preset dimension using the same text embedding model; and The first t Round of user input and the first i The text vector corresponding to the recall text for each item; symbol " " indicates the vector dot product operation. The L2 norm of a vector. Represents the cosine similarity between two text vectors; when Not lower than the vector recall threshold When the time comes, the corresponding item will be included in the vector recall set; If vector recall does not meet the threshold condition, it will fall back to rule-based recall based on semantic keywords and symptom thesaurus. The final candidate item set is represented as follows: ; in, The set of items obtained from rule-based recall; The item hit detection calls an external item hit detection model to output a structured result for each candidate item, including its status, matching type, confidence level, and evidence content, and updates the item evidence status accordingly.
5. The collaborative method for dialogic knowledge enhancement assessment oriented towards mental health as described in claim 1, characterized in that, In S5, the number of items is calculated based on the updated item evidence state. t Overall wheel coverage and factors f Factor coverage : ; ; in, For the set of items in the scale, As a factor f The corresponding set of questions, As the weight of the question item, This indicates whether an item has valid evidence that meets the confidence threshold; the priority of follow-up questions is calculated based on factor risk level, factor coverage, average evidence confidence, and the number of follow-up questions already asked. ; ; in, For factor risk level, As a factor f The average confidence level of evidence. The factor average confidence level. The number of times the factor has been asked has been completed. The maximum number of questions asked for a single factor. to These are non-negative weighting coefficients; the weighting coefficients are determined according to the principles of risk priority, information gap filling, and suppression of redundant inquiries; wherein, The weights corresponding to the risk level of the factors. The weights corresponding to the degree of factor coverage insufficiency. The weights corresponding to the degree of insufficient confidence of the evidence. The decay weights are the number of questions already asked; each weight coefficient is not less than 0 and satisfies the following conditions: ; The dynamic follow-up questioning process is constrained by the maximum number of questions in a single round, the maximum cumulative follow-up question points, and the maximum number of questions asked on a single factor. Priority factors include depression, anxiety, psychosis, and paranoia. The stopping condition for dynamic question completion is: ; in, The overall coverage threshold, To supplement the priority threshold, To accumulate points for additional questions, To accumulate the maximum number of supplementary questions, For the remaining dialogue budget, For the universal set of factors; symbol " " " represents the logical AND operation, where the result is true if all conditions connected to it are true; the symbol " "" indicates a logical OR operation, the result of which is true when at least one condition is met; when the result of the operation of the stop condition is true, the dynamic questioning is terminated.
6. The collaborative method for dialogic knowledge enhancement assessment oriented towards mental health as described in claim 1, characterized in that, In S6, the factor f Quantitative score Represented as: ; in, The item score is obtained based on the item evidence mapping. Indicates the terms i With factors f The attribution relationship; The risk marker is triggered by both factor-level quantitative score signals and explicit hazard expressions extracted from the original text of the item evidence. The risk marker is represented as follows: ; in, A set of high-risk factors, As a risk threshold, This indicates whether explicit expressions of self-harm were detected in the original text. This is an indicator function.
7. The collaborative method for dialogic knowledge enhancement assessment oriented towards mental health as described in claim 1, characterized in that, In S7, the multi-query retrieval includes: sample feature query based on the current test scoring table and question-level table content, knowledge query based on scale name and norm threshold, and supplementary query based on the current case's high-score factors and risk descriptions; For knowledge fragments d The fusion search score is: ; in, For the first k A query text, K For the number of queries, For the corresponding query weight, and .
8. A dialogic knowledge-enhanced assessment collaborative system for mental health, characterized in that: include: The corpus and knowledge base construction module is used to build a structured mental health knowledge base and a unified format Chinese psychological support multi-turn dialogue corpus; The dual-branch model building module includes a general large language model interface for generating professional reports, and an emotion-supporting dialogue large language model trained by LoRA. The conversational scale assessment module is used to receive natural language input and combine the scale item bank and symptom dictionary to perform candidate recall, coverage calculation, high-risk priority supplementary questioning and factor scoring; The joint analysis and linkage module is used to send the assessment results into a general large model to generate structured professional analysis through multi-query retrieval, and to feed them back into the emotion support dialogue model to generate supportive closing responses.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the collaborative method for conversational knowledge enhancement assessment for mental health as described in any one of claims 1-7.
10. A computer program product, characterized in that, When the computer program product is run on a computer, it causes the computer to perform the collaborative method for conversational knowledge enhancement assessment for mental health as described in any one of claims 1-7.
