Depression analysis scoring method based on knowledge distillation and retrieval enhancement generation

Through knowledge distillation and retrieval-enhanced generation technology, combined with large-scale models and authoritative medical knowledge, the problems of data scarcity and high subjectivity in depression assessment are solved, and efficient and accurate depression assessment is achieved.

CN120656733APending Publication Date: 2025-09-16CAPITAL NORMAL UNIVERSITY

Patent Information

Application Number
CN202511157401.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-19
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

Existing depression assessment methods are highly subjective and have difficulty capturing subtle emotional dynamics. High-quality data resources are scarce, and traditional emotion recognition technology has difficulty in deeply understanding complex natural language, resulting in limited development of assessment technology.

Method used

Knowledge distillation technology is used to transfer the emotional reasoning capabilities of large-scale pre-trained models to small dedicated models. Combined with retrieval enhancement generation technology, the CCMD-3 diagnostic system is used to build a vector database, integrating authoritative medical knowledge to generate evaluation results.

Benefits of technology

Efficiently build assessment models in data-scarce environments, provide accurate and reliable depression assessment results, reduce computing resource requirements, and ensure that the assessment results have medical basis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120656733A_ABST
    Figure CN120656733A_ABST
Patent Text Reader

Abstract

The invention provides a depression analysis scoring method based on knowledge distillation and retrieval enhancement generation, belongs to the field of depression medical assessment, and utilizes a large language model to convert emotion self-description data of volunteers into dialogue data between doctors and the volunteers. And using a large-scale reasoning large language model to perform emotion reasoning and scoring on the part representing the volunteer in the dialogue data according to a medical scale rule. Performing supervised fine tuning on the reasoning large language model with relatively small parameter scale by using the dialogue data and the corresponding reasoning process and scoring result, and constructing a large language model specially used for depressive emotion analysis; the method comprises the following steps: constructing a CCMD-3 diagnosis system into a vector database, and performing similarity retrieval on dialogue data in a real scene and the vector database; and combining the most relevant diagnosis standard obtained by retrieval with dialogue data in a real scene, jointly inputting into the depressive emotion big language model, and finally outputting an analysis result and a score of a depressive symptom.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of medical assessment of depression, and in particular to a depression analysis and scoring method based on knowledge distillation and retrieval enhancement generation. Background Art

[0002] Accurate assessment of depression is crucial for timely diagnosis and intervention. However, existing assessment methods, such as clinical interviews and scales, are subject to limitations such as high subjectivity and difficulty in capturing subtle emotional dynamics. In addition, patient conversation data used to train automated assessment models face strict privacy protection restrictions and difficulties in collection and annotation, resulting in an extremely scarce supply of high-quality data resources, which seriously hinders the development of data-driven assessment technologies. Traditional emotion recognition technologies also have difficulty in deeply understanding and reasoning about complex natural language, and are unable to accurately analyze subtle emotional changes in patients. These problems make the development of a new depression assessment technology that is data-efficient, accurate, and medically based a challenge that needs to be addressed urgently. Summary of the Invention

[0003] The present invention aims to solve one of the technical problems in the related art at least to a certain extent.

[0004] This paper proposes a depression analysis and scoring method based on knowledge distillation and retrieval-enhanced generation. To address the shortage of high-quality conversational data, this paper employs knowledge distillation techniques, leveraging the powerful emotional reasoning capabilities of large-scale pre-trained models to transfer this knowledge to specialized models with smaller parameter sizes. This allows for efficient construction of assessment models in data-scarce environments. Furthermore, this method addresses the potential for model hallucinations and the lack of professional medical evidence.

[0005] Another object of the present invention is to propose a depression analysis and scoring system based on knowledge distillation and retrieval enhancement generation.

[0006] To achieve the above objectives, the present invention proposes a depression analysis and scoring method based on knowledge distillation and retrieval enhancement generation, comprising: In response to the input of the volunteer's self-reported emotional data, the large language model is guided by prompt word engineering to generate simulated conversation data between the doctor and the volunteer, wherein the simulated conversation data includes the doctor's questions and the volunteer's answers; Based on the speech content of the representative volunteers in the simulated conversation data, a large language model is used to perform emotional reasoning, and a scoring result and reasoning process are generated according to preset medical scale rules; Using the simulated conversation data, the scoring results, and the reasoning process as supervisory signals, the preset reasoning large language model is fine-tuned in a supervised manner to construct a large language model of depression; When user conversation data from real-world scenarios is received, the user conversation data is input into a text embedding model to generate user conversation vectors; the text content of the CCMD-3 diagnostic system is divided into blocks and embedded into vectors to construct a vector database; Retrieving at least three CCMD-3 text segments most relevant to the user conversation data based on cosine similarity between the user conversation vector and CCMD-3 text vectors in the vector database; fusing the user conversation data with the retrieved CCMD-3 text segments to generate enhanced input text; The enhanced input text is input into the large language model of depression emotion, and the analysis results and scores of the user's depression symptoms are output.

[0007] The depression analysis and scoring method based on knowledge distillation and retrieval enhancement generation in the embodiment of the present invention may also have the following additional technical features: In one embodiment of the present invention, the emotion inference is performed using a large language model based on the speech content of the representative volunteer in the simulated conversation data, and the scoring result and the inference process are generated according to the preset medical scale rules, including: Using a large-scale inference language model as a scoring model, and receiving the simulated conversation data; Providing a prompt containing scoring rules and standards based on an authoritative medical scale to the scoring model, wherein the prompt conveys the role and task of the scoring model, provides the name of the medical scale and detailed scoring standards and rules, and clearly specifies the conversation segment to be analyzed; The scoring model performs in-depth reasoning on the speech content of the representative volunteer based on the simulated conversation data and the prompt words, analyzes the emotions, feelings, behavioral manifestations and physiological symptoms expressed by the volunteer in the conversation, and matches, associates and judges them with the standard symptoms defined by the medical scale items; The scoring model outputs the reasoning process and the scoring result.

[0008] In one embodiment of the present invention, dividing the text content of the CCMD-3 diagnostic system into blocks and embedding them into vectors to construct a vector database includes: The core text of the Chinese Classification and Diagnostic Criteria for Mental Disorders (CCMD-3) was structured and segmented, including diagnostic criteria for various depressive disorders, detailed symptom descriptions, relevant differential diagnosis points, and severity classification criteria. Inputting the processed text segments into a text embedding model, which converts each text segment into a numerical vector of fixed dimension; All generated numerical vectors are used to construct a high-dimensional vector database, where each numerical vector corresponds to a specific text segment in CCMD-3.

[0009] In one embodiment of the present invention, based on the cosine similarity between the user conversation vector and the CCMD-3 text vectors in the vector database, at least three CCMD-3 text segments most relevant to the user conversation data are retrieved, including: Use the same text embedding model as used to build the CCMD-3 vector database to convert the pre-processed user conversation data into a query vector; Calculating the cosine similarity between the query vector and all CCMD-3 text segment vectors stored in the vector database; The three CCMD-3 text segments with the highest similarity scores are selected based on the cosine similarity ranking results.

[0010] In one embodiment of the present invention, the enhanced input text is input into the depression language model, and the analysis results and scores of the user's depression symptoms are output, including: Provide the constructed enhanced input text as input to the large language model of depression trained through knowledge distillation fine-tuning, wherein the enhanced input text includes the user conversation content and the retrieved CCMD-3 fragments; The depression language model comprehensively analyzes the user conversation content and the retrieved CCMD-3 fragments, associates the user's specific language expressions with standard medical concepts and diagnostic criteria, and outputs detailed analysis results of the user's depression symptoms and corresponding scale scores.

[0011] To achieve the above objectives, the present invention further proposes a depression analysis and scoring system based on knowledge distillation and retrieval enhancement generation, comprising: Emotional self-report data processing module, used to receive volunteers' emotional self-report data and perform pre-processing; The dialogue data generation module is used to guide the large language model to generate simulated dialogue data between doctors and volunteers based on the prompt word engineering; An emotional reasoning and scoring module, configured to perform emotional reasoning based on the speech content of the volunteers in the simulated conversation data in combination with preset medical scale rules, and output a scoring result and reasoning process; A model fine-tuning module is configured to use the simulated conversation data, the scoring results, and the reasoning process as supervisory signals to perform supervised fine-tuning on a preset large inference language model to construct a large language model of depression; Medical knowledge retrieval module, used to segment and embed the text content of the CCMD-3 diagnostic system into vectors to build a vector database; An enhanced input generation module is configured to embed user conversation data in real-world scenarios into vectors, retrieve at least three CCMD-3 text segments most relevant to the user conversation data based on cosine similarity, and fuse the user conversation data with the CCMD-3 text segments to generate enhanced input text; The depression symptom analysis and scoring output module is used to input the enhanced input text into the depression emotion large language model and output the analysis results and scoring of the user's depression symptoms.

[0012] The depression analysis and scoring method and system based on knowledge distillation and retrieval enhancement generation of the embodiment of the present invention organically combines the efficient knowledge transfer capability of knowledge distillation, the emotional reasoning advantage of large models and the reliable knowledge enhancement mechanism of retrieval enhancement generation, thereby providing a new depression analysis method with relatively low data requirements, accurate and reliable evaluation results, and clear medical basis. It creatively combines retrieval enhancement generation technology and integrates the authoritative medical diagnosis system CCMD-3 as external knowledge to ensure that the evaluation results are well-founded and in compliance with medical standards, and can accurately locate and analyze depressive symptoms.

[0013] Additional aspects and advantages of the present invention will be set forth in part in the description which follows and, in part, will be obvious from the description which follows, or may be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which: Figure 1 is a flowchart of a depression analysis and scoring method based on knowledge distillation and retrieval enhancement generation according to an embodiment of the present invention; Figure 2 2 is a structural diagram of a depression analysis and scoring system based on knowledge distillation and retrieval enhancement generation according to an embodiment of the present invention. DETAILED DESCRIPTION

[0015] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments of the present invention can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0016] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0017] The following describes a depression analysis and scoring method and system based on knowledge distillation and retrieval enhancement generation according to an embodiment of the present invention with reference to the accompanying drawings.

[0018] Figure 1 is a flowchart of a depression analysis and scoring method based on knowledge distillation and retrieval enhancement generation according to an embodiment of the present invention. Figure 1 Shown, including: S1, in response to the input of the volunteer's self-described emotional data, guides the large language model to generate simulated conversation data between the doctor and the volunteer through prompt word engineering, and the simulated conversation data includes the doctor's questions and the volunteer's answers.

[0019] In some embodiments of the present invention, the knowledge distillation stage: the conversion of volunteer's emotional self-report data into doctor-volunteer conversation data includes: Specifically, this step aims to transform the raw, often unstructured or semi-structured, emotional self-reports of volunteers into a dialogue format more closely resembling a clinical interview setting, with a clear structure and well-defined information exchange patterns between doctors and volunteers. We utilize a general large language model as the teacher model. The volunteer's emotional self-report content is provided to the teacher model via prompts as core input. The design of prompts is crucial to this transformation process. It explicitly instructs the teacher model to play a specific role, sets the context and purpose of the conversation, and specifies requirements for the format and content of the generated conversations. The doctor's questions should be guiding and exploratory, aiming to elicit more details about the volunteer's emotional symptoms from their responses, including the nature, frequency, duration, severity, triggers, and impact on daily functioning. The volunteer's responses should be a logical organization and expression of the original self-report content within the context of a simulated conversation. In this way, the raw, potentially fragmented, or subjective self-report information is transformed into more organized conversation data that is more amenable to structured analysis and reasoning in subsequent steps. This step outputs a large number of simulated conversation text pairs between doctors and volunteers.

[0020] In some embodiments of the present invention, the content of the prompt words for the conversion of the volunteer's self-reported emotions into the conversation between the doctor and the volunteer is shown in Table 1: Table 1

[0021] S2, based on the speech content of the representative volunteers in the simulated dialogue data, uses the large language model to perform emotional reasoning, and generates scoring results and reasoning process according to the preset medical scale rules.

[0022] In some embodiments of the present invention, the knowledge distillation stage: performing sentiment inference and scoring on the portion of the conversation data representing the volunteer, includes: Specifically, after successfully generating the conversation data between doctors and volunteers, this step utilizes a large-scale inference language model as the scoring model. This model's task is to analyze the speech content of the volunteers in the conversation data and, based on pre-set scoring rules and criteria based on authoritative medical scales, conduct in-depth reasoning on the volunteers' emotional states, ultimately assigning scores for the corresponding items in the scale. This step also relies heavily on sophisticated prompt engineering. The prompts must clearly convey their role and mission to the scoring model, providing the name of the medical scale and its detailed scoring criteria and rules, specifying the conversation segments to be analyzed, and requiring the model to output the inference process and the final scoring results. After receiving the conversation data and the prompts containing the scale rules, the scoring model leverages its powerful text understanding, semantic analysis, and logical reasoning capabilities to conduct a detailed analysis of the volunteers' emotions, feelings, behaviors, and physiological symptoms expressed in the conversations. The model then matches, correlates, and determines these natural language descriptions with the standard symptoms defined by the medical scale items, and assigns a corresponding score based on the scale's scoring criteria. The key innovation of this step is that we require the model to output not only the final scale score but also the reasoning or basis for the score. This reasoning process details how the model extracts key information from the conversation content, compares it with the scale items, and ultimately arrives at the score. These samples embody the expertise and capabilities of large-scale models in understanding complex emotional expressions, reasoning based on medical standards, and quantitative assessment, providing valuable supervisory signals for subsequent fine-tuning of smaller models.

[0023] In one embodiment of the present invention, the conversation data scoring prompt words are shown in Table 2: Table 2

[0024] S3, using the simulated conversation data, the scoring results, and the reasoning process as supervisory signals, to perform supervised fine-tuning on the preset reasoning large language model to construct a large language model of depression.

[0025] In one embodiment of the present invention, the knowledge distillation stage uses conversation data, reasoning processes, and scoring to perform supervised fine-tuning on a large language model with a small parameter scale, including: Specifically, the generated high-quality annotated samples are used to perform supervised fine-tuning on a large language model (the student model) with relatively small parameters and low computational and storage requirements. The goal of fine-tuning is to enable the student model to learn and emulate the ability of the large-scale teacher model to output sentiment reasoning and rating scales when given conversational data. Supervised fine-tuning can be viewed as a sequence-to-sequence learning task.

[0026] The input is the conversation data between doctors and volunteers The desired output is a sequence of inference processes and scale scores generated by the teacher model. ,in It can be the result of serializing the reasoning process text and the scoring value. The student model is recorded as ,in is the set of parameters of the model. The fine-tuning process aims to optimize the parameters by minimizing the difference between the output sequence predicted by the student model and the target sequence generated by the teacher model. Since the output is a text sequence and a numerical value, it can be combined into a unified sequence generation task, and the loss function is the cross-entropy loss. In sequence generation, the cross-entropy loss measures the difference between the student model's predicted probability distribution when predicting the word at each position in the sequence and the one-hot encoding distribution of the actual word in the true target sequence.

[0027] For a given input dialog and the corresponding target output sequence ,in is the first indivual , the cross entropy loss of the student model is calculated as follows:

[0028] in: is the target sequence length. is the first A real . Indicates the position in the target sequence All before . It is the input conversation data. It is a student model At a given input and the preceding truth Under the condition of for This probability is usually the probability distribution of the model output layer on the vocabulary corresponding to probability.

[0029] The total loss on the entire fine-tuning dataset is the average of all sample losses:

[0030] in is the number of samples in the fine-tuning dataset. and They are The fine-tuning process uses Optimization algorithm to iteratively update model parameters By minimizing the cross entropy loss, the student model is trained to maximize the prediction of the correct target The probability of , so that its output reasoning process and scoring are as consistent as possible with the high-quality labeled samples generated by the teacher model. Through this supervised fine-tuning, the small-scale parameter-scale reasoning large language model effectively absorbs the knowledge and reasoning capabilities of the large-scale model in depression analysis and scale scoring.

[0031] S4: When user conversation data in a real-world scenario is received, the user conversation data is input into a text embedding model to generate a user conversation vector; and the text content of the CCMD-3 diagnostic system is divided into blocks and embedded into vectors to construct a vector database.

[0032] In one embodiment of the present invention, during the search enhancement generation phase, the CCMD-3 diagnostic system is constructed as a vector database. This step forms the foundation for building an external medical knowledge base. First, the core text content in the Chinese Classification and Diagnostic Criteria for Mental Disorders (CCMD-3) is structured and segmented. This text content includes, but is not limited to, diagnostic criteria for various depressive disorders, detailed symptom descriptions, relevant differential diagnosis points, and severity classification criteria. The processed text segments are then input into a text embedding model. This embedding model is responsible for converting each text segment into a fixed-dimensional numerical vector, known as a text embedding. All these generated vectors together form a high-dimensional vector database, where each vector corresponds to a specific text segment in CCMD-3.

[0033] S5. Retrieve at least three CCMD-3 text segments that are most relevant to the user conversation data based on the cosine similarity between the user conversation vector and the CCMD-3 text vectors in the vector database; and fuse the user conversation data with the retrieved CCMD-3 text segments to generate enhanced input text.

[0034] In one embodiment of the present invention, the retrieval enhancement generation stage: similarity retrieval of real-world scenario conversation data and vector database: When the system receives conversation data from a user who needs to be evaluated for depression in a real-world scenario, it first performs necessary preprocessing on the conversation data. Then, the current user conversation data is converted into a query vector using the same text embedding model as that used to construct the CCMD-3 vector database. This query vector represents the semantic information of the user conversation content. Next, the similarity between the user conversation query vector and all CCMD-3 text fragment vectors stored in the vector database is calculated. The present invention uses cosine similarity as a metric to measure the semantic similarity between two vectors. Given two non-zero vectors and , they are The cosine similarity in dimensional space is defined as their dot product divided by the product of their Euclidean norms:

[0035] in, and They are vectors and No. A quantity, is the dimension of the vector. The range of cosine similarity is A value closer to 1 indicates a more consistent direction for the two vectors, meaning the text they represent is highly semantically similar. A value of 0 indicates that the two vectors are orthogonal and semantically unrelated. A value closer to -1 indicates a more opposite direction and a greater semantic difference. By calculating cosine similarity, we can quantify the degree of relevance between the user conversation content and the diagnostic criteria and symptom descriptions in CCMD-3. After calculating the cosine similarity score between the user conversation query vector and all CCMD-3 segment vectors in the vector database, these CCMD-3 segments are sorted from high to low according to their similarity score.

[0036] Retrieve the three most relevant segments and combine them with the conversation data: Based on the cosine similarity ranking results calculated in the previous step, the system selects the three CCMD-3 text segments with the highest similarity scores to the current user's conversation data. These three segments are considered to be the most relevant diagnostic criteria or symptom descriptions from a medical perspective to the user's current emotions and symptoms. After obtaining these three most relevant CCMD-3 segments, they need to be effectively integrated with the original user conversation data to form enhanced input text. This enhanced input includes the user's own description and relevant authoritative medical background knowledge.

[0037] S6: Input the enhanced input text into the depression language model, and output the analysis results and score of the user's depression symptoms.

[0038] Specifically, during the retrieval enhancement generation phase, the enhanced results are fed into a large language model for depression, which then outputs the results. The constructed enhanced input text is fed as input to a large language model for depression, trained through knowledge distillation fine-tuning. This model, having already learned the ability to reason about emotions and perform scale scoring from conversations during the knowledge distillation phase, now receives augmented input containing additional medical knowledge. The model comprehensively analyzes the user's conversation content and retrieved CCMD-3 fragments. The retrieved CCMD-3 fragments serve as important context, guiding the model to associate the user's specific language expressions with standard medical concepts and diagnostic criteria, thereby revising or validating the model's initial judgment based on the conversation content. Finally, the model outputs a detailed analysis of the user's depressive symptoms and the corresponding scale score. In this way, the retrieved authoritative medical knowledge directly influences the model generation process, ensuring the accuracy and professionalism of the final evaluation results and providing clear medical evidence, significantly improving the reliability of the evaluation.

[0039] Through the above-mentioned retrieval-enhanced generation process, the present invention effectively combines the flexibility and generative capabilities of large language models with the rigor of authoritative medical knowledge, providing a new method that can not only deeply understand individual emotional expressions but also provide medically based depression assessment results.

[0040] For example, the search enhancement generation prompt words are shown in Table 3: Table 3

[0041] In summary, the present invention's depression analysis and scoring method based on knowledge distillation and retrieval-enhanced generation includes the following: First, a large language model is used to convert the emotional self-reports of volunteers (including patients) into conversation data between doctors and volunteers. Next, a large-scale inference large language model is used to perform emotional inference and scoring on the portion of the conversation data representing the volunteers according to medical scale rules. Finally, the conversation data, its corresponding inference process, and scoring results are used to perform supervised fine-tuning on the inference large language model with a smaller parameter size to construct a large language model specifically for depression analysis (depression large language model). Finally, the retrieval-enhanced generation method constructs the CCMD-3 diagnostic system as a vector database, and performs similarity retrieval on real-world conversation data against this vector database. The most relevant diagnostic criteria obtained through retrieval are combined with the real-world conversation data and input into the depression large language model, ultimately outputting analysis results and scores for depressive symptoms.

[0042] The present invention has the following technical effects: 1) Efficiently address data scarcity: Utilize knowledge distillation to transfer knowledge from large-scale models to small models, significantly reducing reliance on high-quality labeled data and improving model training efficiency.

[0043] 2) Accurate and reliable evaluation results: Combining retrieval-enhanced generation technology and integrating authoritative medical knowledge bases effectively reduces model hallucinations and ensures that the evaluation results are medically based and highly accurate.

[0044] 3) Optimize system deployment efficiency: Use small models obtained through knowledge distillation to reduce computing resource requirements, making the system easier to deploy and run, and improving practicality.

[0045] According to the depression analysis and scoring method based on knowledge distillation and retrieval enhancement generation according to the embodiment of the present invention, in order to solve the problem of insufficient high-quality dialogue data, the present invention adopts knowledge distillation technology, and utilizes the powerful emotional reasoning ability of large-scale pre-trained models to transfer this knowledge to a dedicated model with a smaller parameter scale, thereby efficiently constructing an evaluation model in a data-scarce environment. At the same time, in order to solve the problems of hallucinations and lack of professional medical basis that may be generated by the model, the present invention creatively combines retrieval enhancement generation technology, and integrates the authoritative medical diagnosis system CCMD-3 as external knowledge to ensure that the evaluation results are well-founded, in line with medical standards, and can accurately locate and analyze depressive symptoms. By organically combining the efficient knowledge transfer capabilities of knowledge distillation, the emotional reasoning advantages of large models, and the reliable knowledge enhancement mechanism of retrieval enhancement generation, the present invention provides a new type of depression assessment technology with relatively low data requirements, accurate and reliable evaluation results, and clear medical basis.

[0046] In order to implement the above embodiment, Figure 2 As shown, this embodiment also provides a depression analysis and scoring system 10 based on knowledge distillation and retrieval enhancement generation, including: The emotional self-description data processing module 100 is used to receive the emotional self-description data of volunteers and perform pre-processing; A dialogue data generation module 200 is used to generate simulated dialogue data between doctors and volunteers based on the prompt word engineering guidance of the large language model; The emotion reasoning and scoring module 300 is used to perform emotion reasoning based on the speech content of the volunteers in the simulated dialogue data in combination with the preset medical scale rules, and output the scoring results and reasoning process; A model fine-tuning module 400 is configured to use the simulated conversation data, the scoring results, and the reasoning process as supervisory signals to perform supervised fine-tuning on a preset large inference language model to construct a large language model of depression; Medical knowledge retrieval module 500, used to divide the text content of CCMD-3 diagnostic system into blocks and embed them into vectors to build a vector database; Enhanced input generation module 600 is configured to embed user conversation data in a real-world scenario into a vector, retrieve at least three CCMD-3 text segments most relevant to the user conversation data based on cosine similarity, and fuse the user conversation data with the CCMD-3 text segments to generate enhanced input text; The depression symptom analysis and scoring output module 700 is used to input the enhanced input text into the depression emotion large language model and output the analysis results and scoring of the user's depression symptoms.

[0047] Furthermore, the sentiment reasoning and scoring module 300 is also used to: Using a large-scale inference language model as a scoring model, and receiving the simulated conversation data; Providing a prompt containing scoring rules and standards based on an authoritative medical scale to the scoring model, wherein the prompt conveys the role and task of the scoring model, provides the name of the medical scale and detailed scoring standards and rules, and clearly specifies the conversation segment to be analyzed; The scoring model performs in-depth reasoning on the speech content of the representative volunteer based on the simulated conversation data and the prompt words, analyzes the emotions, feelings, behavioral manifestations and physiological symptoms expressed by the volunteer in the conversation, and matches, associates and judges them with the standard symptoms defined by the medical scale items; The scoring model outputs the reasoning process and the scoring result.

[0048] Furthermore, the medical knowledge retrieval module 500 is further configured to: The core text of the Chinese Classification and Diagnostic Criteria for Mental Disorders (CCMD-3) was structured and segmented, including diagnostic criteria for various depressive disorders, detailed symptom descriptions, relevant differential diagnosis points, and severity classification criteria. Inputting the processed text segments into a text embedding model, which converts each text segment into a numerical vector of fixed dimension; All generated numerical vectors are used to construct a high-dimensional vector database, where each numerical vector corresponds to a specific text segment in CCMD-3.

[0049] Furthermore, the enhanced input generation module 600 is further configured to: Use the same text embedding model as used to build the CCMD-3 vector database to convert the pre-processed user conversation data into a query vector; Calculating the cosine similarity between the query vector and all CCMD-3 text segment vectors stored in the vector database; The three CCMD-3 text segments with the highest similarity scores are selected based on the cosine similarity ranking results.

[0050] Furthermore, the depression symptom analysis and scoring output module 700 is also used to: Provide the constructed enhanced input text as input to the large language model of depression trained through knowledge distillation fine-tuning, wherein the enhanced input text includes the user conversation content and the retrieved CCMD-3 fragments; The depression language model comprehensively analyzes the user conversation content and the retrieved CCMD-3 fragments, associates the user's specific language expressions with standard medical concepts and diagnostic criteria, and outputs detailed analysis results of the user's depression symptoms and corresponding scale scores.

[0051] According to the depression analysis and scoring system based on knowledge distillation and retrieval enhancement generation according to the embodiment of the present invention, in order to address the problem of insufficient high-quality dialogue data, the present invention adopts knowledge distillation technology, and utilizes the powerful emotional reasoning ability of large-scale pre-trained models to transfer this knowledge to a dedicated model with a smaller parameter scale, thereby efficiently constructing an evaluation model in a data-scarce environment. At the same time, in order to solve the problems of hallucinations and lack of professional medical basis that may be generated by the model, the present invention creatively combines retrieval enhancement generation technology, and integrates the authoritative medical diagnosis system CCMD-3 as external knowledge to ensure that the evaluation results are well-founded, in line with medical standards, and can accurately locate and analyze depressive symptoms. By organically combining the efficient knowledge transfer capabilities of knowledge distillation, the emotional reasoning advantages of large models, and the reliable knowledge enhancement mechanism of retrieval enhancement generation, the present invention provides a new type of depression assessment technology with relatively low data requirements, accurate and reliable evaluation results, and clear medical basis.

[0052] In the description of this specification, the reference terms "one embodiment," "some embodiments," "example," "specific example," or "some examples" mean that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification and features of different embodiments or examples without contradiction.

[0053] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of the technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "plurality" means at least two, such as two, three, etc., unless otherwise specifically defined.

Claims

1. A depression analysis and scoring method based on knowledge distillation and retrieval enhancement generation, characterized by: The following steps are involved: In response to the input of the volunteer's self-reported emotional data, the large language model is guided by prompt word engineering to generate simulated conversation data between the doctor and the volunteer, wherein the simulated conversation data includes the doctor's questions and the volunteer's answers; Based on the speech content of the representative volunteers in the simulated conversation data, a large language model is used to perform emotional reasoning, and a scoring result and reasoning process are generated according to preset medical scale rules; Using the simulated conversation data, the scoring results, and the reasoning process as supervisory signals, the preset reasoning large language model is fine-tuned in a supervised manner to construct a large language model of depression; When receiving user conversation data in a real-world scenario, the user conversation data is input into a text embedding model to generate a user conversation vector; The text content of the CCMD-3 diagnostic system is divided into blocks and embedded into vectors to construct a vector database; Retrieving at least three CCMD-3 text segments most relevant to the user conversation data based on cosine similarity between the user conversation vector and CCMD-3 text vectors in the vector database; fusing the user conversation data with the retrieved CCMD-3 text segments to generate enhanced input text; The enhanced input text is input into the large language model of depression emotion, and the analysis results and scores of the user's depression symptoms are output.

2. The method according to claim 1, wherein The method of using a large language model to perform emotional reasoning based on the speech content of the representative volunteer in the simulated conversation data and generating a scoring result and reasoning process according to preset medical scale rules includes: Using a large-scale inference language model as a scoring model, and receiving the simulated conversation data; Providing a prompt word containing scoring rules and standards based on an authoritative medical scale to the scoring model, wherein the prompt word is used to convey the role and task of the scoring model, provide the name of the medical scale and detailed scoring standards and rules, and clearly specify the conversation segment to be analyzed; The scoring model performs in-depth reasoning on the speech content of the representative volunteer based on the simulated conversation data and the prompt words, analyzes the emotions, feelings, behavioral manifestations and physiological symptoms expressed by the volunteer in the conversation, and matches, associates and judges them with the standard symptoms defined by the medical scale items; The scoring model outputs the reasoning process and the scoring result.

3. The method according to claim 1, wherein The text content of the CCMD-3 diagnostic system is divided into blocks and embedded into vectors to construct a vector database, including: The core text of the Chinese Classification and Diagnostic Criteria for Mental Disorders (CCMD-3) was structured and segmented, including diagnostic criteria for various depressive disorders, detailed symptom descriptions, relevant differential diagnosis points, and severity classification criteria. Inputting the processed text segments into a text embedding model, which converts each text segment into a numerical vector of fixed dimension; All generated numerical vectors are used to construct a high-dimensional vector database, where each numerical vector corresponds to a specific text segment in CCMD-3.

4. The method according to claim 1, wherein Retrieving at least three CCMD-3 text segments most relevant to the user conversation data based on the cosine similarity between the user conversation vector and the CCMD-3 text vectors in the vector database, including: Use the same text embedding model as used to build the CCMD-3 vector database to convert the pre-processed user conversation data into a query vector; Calculating the cosine similarity between the query vector and all CCMD-3 text segment vectors stored in the vector database; The three CCMD-3 text segments with the highest similarity scores are selected based on the cosine similarity ranking results.

5. The method according to claim 1, wherein Inputting the enhanced input text into the depression language model, and outputting analysis results and scores of the user's depression symptoms, including: Provide the constructed enhanced input text as input to the large language model of depression trained through knowledge distillation fine-tuning, wherein the enhanced input text includes the user conversation content and the retrieved CCMD-3 fragments; The depression language model comprehensively analyzes the user conversation content and the retrieved CCMD-3 fragments, associates the user's specific language expressions with standard medical concepts and diagnostic criteria, and outputs detailed analysis results of the user's depression symptoms and corresponding scale scores.

6. A depression analysis and scoring system based on knowledge distillation and retrieval enhancement generation, characterized by: include: Emotional self-report data processing module, used to receive volunteers' emotional self-report data and perform pre-processing; The dialogue data generation module is used to guide the large language model to generate simulated dialogue data between doctors and volunteers based on the prompt word engineering; An emotional reasoning and scoring module, configured to perform emotional reasoning based on the speech content of the volunteers in the simulated conversation data in combination with preset medical scale rules, and output a scoring result and reasoning process; A model fine-tuning module is configured to use the simulated conversation data, the scoring results, and the reasoning process as supervisory signals to perform supervised fine-tuning on a preset large inference language model to construct a large language model of depression; Medical knowledge retrieval module, used to segment and embed the text content of the CCMD-3 diagnostic system into vectors to build a vector database; An enhanced input generation module is configured to embed user conversation data in real-world scenarios into vectors, retrieve at least three CCMD-3 text segments most relevant to the user conversation data based on cosine similarity, and fuse the user conversation data with the CCMD-3 text segments to generate enhanced input text; The depression symptom analysis and scoring output module is used to input the enhanced input text into the depression emotion large language model and output the analysis results and scoring of the user's depression symptoms.

7. The system according to claim 6, wherein: The sentiment reasoning and scoring module is also used to: Using a large-scale inference language model as a scoring model, and receiving the simulated conversation data; Providing a prompt word containing scoring rules and standards based on an authoritative medical scale to the scoring model, wherein the prompt word is used to convey the role and task of the scoring model, provide the name of the medical scale and detailed scoring standards and rules, and clearly specify the conversation segment to be analyzed; The scoring model performs in-depth reasoning on the speech content of the representative volunteer based on the simulated conversation data and the prompt words, analyzes the emotions, feelings, behavioral manifestations and physiological symptoms expressed by the volunteer in the conversation, and matches, associates and judges them with the standard symptoms defined by the medical scale items; The scoring model outputs the reasoning process and the scoring result.

8. The system according to claim 6, wherein: The medical knowledge retrieval module is further used to: The core text of the Chinese Classification and Diagnostic Criteria for Mental Disorders (CCMD-3) was structured and segmented, including diagnostic criteria for various depressive disorders, detailed symptom descriptions, relevant differential diagnosis points, and severity classification criteria. Inputting the processed text segments into a text embedding model, which converts each text segment into a numerical vector of fixed dimension; All generated numerical vectors are used to construct a high-dimensional vector database, where each numerical vector corresponds to a specific text segment in CCMD-3.

9. The system according to claim 6, wherein: Enhanced input generation module, also used for: Use the same text embedding model as used to build the CCMD-3 vector database to convert the pre-processed user conversation data into a query vector; Calculating the cosine similarity between the query vector and all CCMD-3 text segment vectors stored in the vector database; The three CCMD-3 text segments with the highest similarity scores are selected based on the cosine similarity ranking results.

10. The system according to claim 6, wherein: The depression symptom analysis and scoring output module is also used for: Provide the constructed enhanced input text as input to the large language model of depression trained through knowledge distillation fine-tuning, wherein the enhanced input text includes the user conversation content and the retrieved CCMD-3 fragments; The depression language model comprehensively analyzes the user conversation content and the retrieved CCMD-3 fragments, associates the user's specific language expressions with standard medical concepts and diagnostic criteria, and outputs detailed analysis results of the user's depression symptoms and corresponding scale scores.

Citation Information

Patent Citations

  • Depression detection method based on knowledge distillation and emotion integration model

    CN113111152A

  • Wearable depressive disorder recognition and attack detection method and device

    CN118000731A

  • Depressive disorder detection report generation system based on retrieval enhancement generation technology and large model fine tuning

    CN119092035A

  • Entity standardization method and model based on large language model retrieval enhancement

    CN120471054A

Cited By

  • Dynamic psychological coping ability evaluation method and system based on multi-agent collaboration

    CN121122596A