Semantic feature and graph structure feature fused depression auxiliary analysis method

By integrating clinical symptom scales and social media data, and utilizing large language models and graph neural networks to extract semantic and graph structure features, a diagnostic model is constructed, which solves the problems of inefficiency and subjectivity in traditional depression identification methods, and achieves more accurate depression analysis and intervention.

CN120837076APending Publication Date: 2025-10-28ANHUI NORMAL UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510928249.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-07
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

Traditional methods of identifying and intervening in depression rely on the experience of clinicians, which is inefficient and highly subjective. They also struggle to effectively integrate multi-source data, especially social media data, resulting in a lack of comprehensiveness and timeliness in identification and intervention.

Method used

This paper proposes an auxiliary analysis method for depression that integrates semantic features and graph structure features. By combining clinical symptom scale data and social media data, and utilizing large language models and graph neural networks, it extracts deep semantic features and symptom associations to construct a diagnostic model for evaluation.

Benefits of technology

It enables a more comprehensive and accurate analysis of depression, provides scientific and objective diagnostic evidence, reduces subjective judgment bias, dynamically monitors disease progression, and provides a basis for adjusting treatment plans.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120837076A_ABST
    Figure CN120837076A_ABST
Patent Text Reader

Abstract

The invention discloses a semantic feature and graph structure feature fused depression auxiliary analysis method. The method comprises the following steps: collecting a depression symptom scale and psychological counseling dialogue data, carrying out fusion preprocessing, constructing and training a large language model, and extracting semantic features. And constructing a graph neural network, and training and extracting graph structure features. And fusing the semantic features and the graph structure features, constructing and training a diagnosis model, and evaluating the depression probability and the illness degree. According to the method, the symptom scale data of the depression patient and the psychological consultation scene dialogue data are integrated, so that the limitation of single data source in the traditional research is broken through, the effective fusion of clinical data and social media data is realized, and the analysis result is more comprehensive.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of auxiliary analysis technology for depression, and in particular to an auxiliary analysis method for depression that integrates semantic features and graph structure features. Background Technology

[0002] With societal development and increasing public awareness of mental health, the need for identification and intervention in depression is growing. However, traditional methods of depression identification and intervention rely heavily on the experience and subjective judgment of clinicians, which have many limitations.

[0003] On the one hand, identifying depression typically requires a significant investment of time and effort in analyzing depressive symptom scales, medical history, and communication with the individual. This process is not only inefficient but also easily influenced by personal experience and emotions, leading to inconsistencies and subjectivity in the identification results. On the other hand, the symptoms of depression are complex and diverse, with intricate interactions and dynamic changes among them. For example, sleep disturbances may exacerbate low mood, while low mood may further affect the individual's sleep quality. Traditional methods struggle to effectively model these complex symptom relationships, thus limiting a deeper understanding and accurate identification of depression.

[0004] Furthermore, with the widespread use of the internet and social media, more and more people are sharing their life status and emotional experiences on social media. This social media data contains a wealth of information about individual mental health, but it is currently not being fully utilized. Traditional diagnostic methods have failed to fully leverage these multi-source data resources, resulting in a lack of comprehensiveness and timeliness in the identification and intervention of depression.

[0005] In the current technological context, advanced artificial intelligence technologies such as large language models (e.g., DeepSeekV, BERT) and graph neural networks (GNNs) offer new ideas and methods for solving the aforementioned problems. Large language models can extract deep semantic features from large amounts of text data, capturing complex semantic information and implicit features within the text. Graph neural networks, on the other hand, can model the dependencies between symptoms through graph structures, utilizing node feature propagation and aggregation operations to learn the interrelationships between symptoms. The application of these technologies makes it possible to analyze depression more comprehensively and accurately.

[0006] For example, invention document CN118490232B discloses a brainwave-based diagnostic method for depression based on multi-frequency domain decomposition. This application constructs an attention matrix through a trend-wise approach. Compared to traditional attention mechanisms, the proposed trend-aware attention mechanism helps in more accurate classification and has stronger stability. However, this approach also suffers from the problem of over-reliance on EEG data for depression diagnosis, while depression identification requires the integration of multi-source data and still relies on the experience of clinicians to interpret the diagnostic results.

[0007] Currently, how to effectively integrate multi-source data such as clinical symptom scales and social media data, and use technologies such as large language models and graph neural networks for in-depth analysis, in order to achieve more comprehensive and accurate identification and intervention for depression, is an urgent problem to be solved.

[0008] Therefore, there is a need for a depression analysis method that integrates multi-source data and diagnostic models to overcome the limitations of traditional methods, make full use of multi-source data resources and advanced artificial intelligence technology, and provide a more efficient, accurate and interpretable solution for the analysis and intervention of depression. Summary of the Invention

[0009] To address the aforementioned problems, the present invention aims to provide an auxiliary analysis method for depression that integrates semantic features and graph structure features. By integrating multi-source information such as clinical symptom scale data and social media data, and combining advanced natural language processing technology and graph neural network algorithms, a comprehensive and accurate analysis of patients with depression can be achieved.

[0010] This invention provides an auxiliary analysis method for depression that integrates semantic features and graph structure features.

[0011] First aspect: A method for auxiliary analysis of depression that integrates semantic features and graph structure features, including:

[0012] S1. Collect symptom scale data and dialogue data from psychological counseling scenarios of individuals with depression, fuse them to obtain multi-source fusion data and perform preprocessing;

[0013] S2. Construct and train a large language model. Input multi-source fusion data into the trained large language model and extract semantic features.

[0014] S3. Construct graph structure data based on the symptoms of the depressed subjects, build a graph neural network and train it, input the graph structure data into the trained graph neural network, and extract graph structure features;

[0015] S4. Fuse semantic features and graph structure features to obtain a fused feature vector, construct a diagnostic model and train it, input the fused feature vector into the trained diagnostic model, and obtain the assessment results of the probability of depression and the severity of the condition.

[0016] Optionally, the symptom scale data includes basic information about the subject, detailed symptom presentation, scale scores, and clinical diagnostic conclusions.

[0017] The collection of dialogue data in psychological counseling scenarios includes using psychological counseling dialogue prompting engineering to rewrite social media data into dialogue data for psychological counseling scenarios.

[0018] Optionally, the preprocessing in S1 includes:

[0019] The multi-source fusion data is cleaned to remove duplicate, erroneous, or incomplete data records. Text data is labeled and transformed into structured data. Numerical data is standardized to maintain data consistency and comparability.

[0020] Optionally, the training of the large language model includes:

[0021] Data sets are constructed using multi-source fusion data to train large language models using supervised learning, semi-supervised learning, or reinforcement learning algorithms.

[0022] Fine-tuning the large language model involves adjusting hyperparameters such as the hidden layer dimension and the number of attention heads to better suit the processing of depression-related data.

[0023] During the training process, relevant medical literature data is introduced to enrich the model's knowledge base and enhance its ability to understand complex symptom relationships.

[0024] Optionally, the large language model adopts the BioBERT model, and the loss function is the cross-entropy loss, expressed by the formula:

[0025]

[0026] Among them, y i For real labels, Predict probabilities for the model.

[0027] Optionally, in the graph structure data, each symptom is regarded as a node, the nodes are connected according to the association between symptoms as edges, and the association strength between symptoms is used as the weight of the edges.

[0028] Optionally, the training of the graph neural network includes:

[0029] To prevent overfitting, early stopping is used. Training is stopped when the loss function on the validation set no longer decreases, and the optimal model parameters are saved.

[0030] Regularly evaluate the model, monitor its performance metrics on the training and validation sets, and promptly identify and adjust any anomalies during the model training process.

[0031] Optionally, the training loss function of the graph neural network adopts a loss function combining cross-entropy loss and mean squared error loss, expressed as follows:

[0032] L = L cls +λL reg

[0033] Among them, L cls For cross-entropy loss, L reg λ represents the mean squared error loss, and λ is the balance parameter.

[0034] Optionally, the graph neural network calculates the attention weights between nodes through a multi-head attention mechanism, expressed by the following formula:

[0035]

[0036] h i Let W be the feature vector of node i, a be the weight matrix, a be the attention vector, and N be the number of nodes. i Let i be the set of neighboring nodes of node i.

[0037] Optionally, regularization techniques are used during the training of the diagnostic model to prevent overfitting and enhance the model's generalization ability.

[0038] Second aspect: An electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, performs the steps of the method provided in the first aspect.

[0039] Third aspect: A non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method provided in the first aspect.

[0040] The beneficial effects of this invention are:

[0041] 1. This invention, by collecting symptom scale data and dialogue data from psychological counseling scenarios of individuals with depression, can reflect the psychological state of these individuals from different perspectives. It integrates clinical data with social media data, breaking through the limitations of traditional methods that rely on a single data source, thus enabling more comprehensive analysis. Simultaneously, the multi-source fusion data undergoes cleaning, labeling, and standardization to remove duplicate, erroneous, or incomplete data, providing high-quality data for subsequent model training, improving data utilization efficiency, and enhancing feature extraction and model analysis capabilities.

[0042] 2. This invention extracts semantic features through a large language model and introduces medical literature data to enrich knowledge reserves. It can extract deep semantic features from multi-source fusion data, capture complex semantic information and implicit features in the text, and improve the ability to understand the semantics of symptom texts. At the same time, based on graph neural networks, it can mine the associations between various symptoms, mine the causal, accompanying and other associations between symptoms and the time dimension change patterns, learn the interrelationships between symptoms, and solve the problem that traditional methods are difficult to model complex symptom relationships.

[0043] 3. This invention integrates semantic features extracted from a large language model and graph structure features extracted from a graph neural network to form a fused feature vector. This vector is input into the diagnostic model, and regularization techniques are used to prevent overfitting, enabling the model to more comprehensively capture the characteristics of depression and achieve high diagnostic accuracy. Through multiple evaluations of model performance, the progression of the condition can be dynamically monitored, providing a basis for adjusting treatment plans. Simultaneously, the model outputs assessments of the probability and severity of depression, providing a scientific and objective basis for clinical diagnosis and assisting doctors in more accurately judging the condition. Attached Figure Description

[0044] Figure 1 This is a flowchart illustrating the auxiliary analysis method for depression of the present invention;

[0045] Figure 2 This is a schematic diagram of the structure of the depression auxiliary analysis device of the present invention;

[0046] Figure 3 This is a schematic diagram of the structure of the electronic device of the present invention. Detailed Implementation

[0047] Embodiments of the present invention are described in detail below. Examples of these embodiments are illustrated in the accompanying drawings, wherein the same or similar symbols denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0048] Currently, research combining social media and multi-source data for depression analysis is still limited. Effectively integrating data from clinical scales, social media, and other sources, and employing large language models and graph neural network techniques for in-depth analysis to more comprehensively and accurately identify and intervene in depression, is an urgent problem to be solved.

[0049] To address the aforementioned problems, this invention provides an auxiliary analysis method for depression that integrates semantic features and graph structure features. Figure 1 This is a flowchart illustrating an auxiliary analysis method for depression provided in an embodiment of the present invention. The method includes:

[0050] S1. Collect symptom scale data and dialogue data from psychological counseling scenarios of individuals with depression, integrate the data from multiple sources, and perform preprocessing.

[0051] Clinical symptom scale data D1 was collected from patients. Symptom scale data D1 included the Hamilton Depression Rating Scale (HAMD), basic information of the subjects, detailed symptom manifestations, scale scores, and clinical diagnosis conclusions. Detailed symptom manifestations included, but were not limited to, typical symptoms such as depressed mood, loss of interest, sleep disorders, and fatigue.

[0052] By using dialogue prompting engineering in psychological counseling, large language models (such as DeepSeekV3) are guided to rewrite social media data into dialogue data D2 for psychological counseling scenarios.

[0053] Social media data records the verbal content of individuals with depression during their interactions with therapists, their emotional responses on WeChat or Weibo, and information from the therapists' professional assessments. This data can reflect the psychological state and changes of individuals with depression from different perspectives.

[0054] The regeneration prompts for dialogue data in psychological counseling scenarios follow specific rules, including: controlling the format of the dialogue opening; requiring different subjects (patients, family members) to share content according to their roles; defining the dialogue background style, such as formal or relaxed styles; and limiting the length and number of dialogues to avoid dialogues that are too long or too short, which may affect information acquisition.

[0055] The symptom scale data D1 and the psychological counseling scenario dialogue data D2 are fused to obtain multi-source fused data D. Then, the multi-source fused data undergoes preprocessing, including:

[0056] Data cleaning involves removing duplicate, erroneous, or incomplete records. Natural language processing techniques are used to annotate textual data, transforming it into a computer-understandable structured data format. Numerical data is standardized to fit within specific numerical ranges, ensuring data consistency and comparability.

[0057] The standardization process for numerical data is expressed by the following formula:

[0058]

[0059] Where μ is the mean, σ is the standard deviation, and S i For the original data, S i′ This is the standardized data.

[0060] S2. Construct and train a large language model. Input multi-source fused data into the trained large language model and extract semantic features.

[0061] You can choose a large language model with the Transformer architecture, such as DeepSeekV, BERT, or other general-purpose large models, or a large model optimized for the medical field, such as BioBERT.

[0062] During the training phase of the large language model, multi-source fused data is used, and supervised learning, semi-supervised learning, or reinforcement learning algorithms are employed for training, among which:

[0063] In supervised learning, known diagnostic results are used as labels, allowing the model to learn the mapping relationship between symptom data and diagnostic results.

[0064] Semi-supervised learning utilizes a small amount of labeled data and a large amount of unlabeled data to improve the model's ability to learn data features;

[0065] Reinforcement learning algorithms guide models to make better decisions when processing symptom data by setting reasonable reward mechanisms.

[0066] Then, by using the backpropagation algorithm, the model parameters are continuously adjusted to optimize the model's ability to process the features of clinical symptom scale data, enabling it to accurately capture the semantic information and implicit features in the symptom text.

[0067] Furthermore, taking into account the characteristics of depression data, the selected large model was fine-tuned during training, adjusting hyperparameters such as the hidden layer dimension and the number of attention heads to better suit the processing of depression-related data. (For example, the hidden layer dimension was adjusted from 768 to 512, and the number of attention heads was adjusted from 12 to 8).

[0068] In addition to the data mentioned above, relevant medical literature data was also introduced during the training process to enrich the model's knowledge base and enhance its ability to understand complex symptom relationships.

[0069] When employing different learning algorithms, appropriate training parameters such as learning rate and batch size should be selected based on the data scale and characteristics to ensure the stability and convergence of model training. After training is complete, the preprocessed multi-source fusion data is input into the trained large model. For example, for a large language model, the BioBERT model is used, and the preprocessed multi-source fusion data D is input to extract high-dimensional and deep semantic features.

[0070] When training the model using supervised learning, the loss function is the cross-entropy loss:

[0071]

[0072] Among them, y i For real labels, Predict probabilities for the model.

[0073] S3. Construct graph structure data based on the symptoms of the depressed subjects, build a graph neural network and train it, input the graph structure data into the trained graph neural network, and extract graph structure features.

[0074] A graph neural network is constructed based on the characteristics of the symptom graph structure of depression. Graph structure data is constructed based on the intrinsic connections between depression symptoms, medical knowledge, and clinical research findings. In the graph structure data, each symptom is considered a node, and nodes are connected according to causal relationships, accompanying relationships, etc., with the strength of the association between symptoms serving as the weight of the edges; while for some relatively independent symptoms, the weight of the edges is correspondingly lower or no edges are set.

[0075] Furthermore, considering factors such as the order of symptom onset and duration, for symptoms with a temporal sequence, time-dimensional edge or node attributes are added to the graph structure data. This allows the graph structure to better reflect the changing patterns and mutual influences of symptoms over time, transforming the symptom data into a graph data structure more suitable for graph neural network processing.

[0076] When training a graph neural network, the pre-constructed graph structure data is used as input. Through node feature propagation and aggregation operations, the relationships and features between nodes are learned. Convolution operations are used to update the node features on the graph structure and aggregate the information of neighboring nodes.

[0077] Graph neural networks employ a graph attention mechanism, which adaptively focuses on important neighboring nodes by calculating attention weights between nodes, thereby learning the relationships between symptoms more accurately.

[0078] Graph neural networks calculate the attention weights between nodes through a multi-head attention mechanism, expressed by the following formula:

[0079]

[0080] h i Let W be the feature vector of node i, a be the weight matrix, a be the attention vector, and N be the number of nodes. i Let i be the set of neighboring nodes of node i.

[0081] The parameters in a graph neural network are optimized by minimizing a loss function. This loss function consists of cross-entropy loss and mean squared error loss, and is expressed by the following formula:

[0082] L = L cls +λL reg

[0083] Among them, L cls For cross-entropy loss, L reg λ represents the mean squared error loss, and λ is the balance parameter.

[0084] By using a loss function to measure the difference between the model's predictions and the actual diagnostic results, and by continuously adjusting the network parameters, the model's ability to uncover potential connections and interactions between symptoms can be improved.

[0085] Meanwhile, during the training of the graph neural network, early stopping is employed to prevent overfitting. Training is stopped when the loss function on the validation set no longer decreases, and the optimal model parameters are saved. The model is also evaluated periodically, monitoring its performance metrics on both the training and validation sets to promptly identify and adjust any anomalies encountered during training.

[0086] S4. Fuse semantic features and graph structure features to obtain a fused feature vector, construct a diagnostic model and train it, input the fused feature vector into the trained diagnostic model, and obtain the assessment results of the probability of depression and the severity of the condition.

[0087] By employing methods such as feature concatenation and weighted summation, semantic features and graph structure features are fused to obtain a fused feature vector from the two different types of features.

[0088] A diagnostic model is constructed based on the fused feature vectors. The diagnostic model can be a machine learning classification algorithm. Optimizations are performed on different classification algorithms to adapt to the fused feature vectors.

[0089] For example, in random forests, adjusting parameters such as the number of trees and maximum depth can balance the accuracy and training efficiency of the diagnostic model. Reasonable network structure design, adjusting the number of hidden layers and neurons in a multilayer perceptron, optimizing convolutional kernel size, and using combinations of convolutional and pooling layers can improve the model's accuracy in diagnosing depression.

[0090] During the training of the diagnostic model, regularization techniques, such as L1 and L2 regularization and Dropout, are used to prevent overfitting and enhance the model's generalization ability.

[0091] The diagnostic model is trained using a large amount of clinical data with known diagnostic results, and the optimal parameters and decision boundaries of the model are determined through methods such as cross-validation.

[0092] In practical applications, the fused feature vector of an object is input into a diagnostic model, and the model outputs an assessment of the probability of having depression and the severity of the condition.

[0093] The severity of the condition can be categorized into mild, moderate, and severe levels. Simultaneously, reasonable thresholds are set for the diagnostic model based on clinical experience. An interpretation mechanism is introduced to make the diagnostic results more interpretable and clinically applicable.

[0094] Through comparative experiments on the same test dataset, the effectiveness of the proposed method was verified in terms of diagnostic accuracy, recall, F1 score, and other metrics compared to other methods, thus validating the effectiveness of the proposed method.

[0095] Application examples:

[0096] Data Collection and Preprocessing: Data was collected from 200 clinically diagnosed patients with depression from three tertiary hospitals, including:

[0097] Symptom scale data: HAMD scale, patient basic information (age, gender, etc.), detailed symptom presentation (depressed mood, sleep disorders, fatigue, etc.) and clinical diagnosis conclusion, etc.

[0098] Psychological counseling scenario dialogue data: Using the prompting engineering of the DeepSeekV3 large language model, text data posted by patients on social media (such as Weibo, WeChat, etc.) and psychological counseling dialogue content were rewritten into standardized psychological counseling scenario dialogues. The prompting rules include: limiting the dialogue opening format (e.g., patient: I recently…), assigning speaking content according to roles (patient / family), defining the dialogue style as a formal medical scenario, and limiting the dialogue length to 5-8 rounds.

[0099] Then, data cleaning and standardization were performed: duplicate records and samples with more than 30% missing values ​​were removed, ultimately yielding 180 valid data points. Textual data was labeled (e.g., insomnia and early awakening were labeled as sleep disorders) and transformed into structured data; numerical data (e.g., HAMD scores, age) were Z-score standardized using the following formula:

[0100]

[0101] Where μ is the mean, σ is the standard deviation, and x is the original data.

[0102] The dataset was divided into a training set (144 cases) and a test set (36 cases) in an 8:2 ratio.

[0103] A large language model was built using BioBERT: The BioBERT model optimized for the medical field was adopted, with the hidden layer dimension initially set to 768 and the number of attention heads to 12. It was subsequently fine-tuned to 512 hidden layers and 8 attention heads based on the characteristics of depression data.

[0104] Dataset construction: The training set consists of case texts, symptom descriptions, clinical diagnostic conclusions, and preprocessed multi-source fusion data. Medical literature data such as the "Guidelines for the Prevention and Treatment of Depression in China" are introduced to enhance knowledge reserves.

[0105] Training algorithm: Supervised learning is used, with clinical diagnostic results (whether there is depression, severity of the condition) as labels, and cross-entropy loss as the loss function.

[0106]

[0107] Among them, y i For real labels, Predict probabilities for the model.

[0108] Parameter settings: 100 training epochs, learning rate 1.5 × 10⁻⁶ -5 The batch size was 16, and parameters were optimized using the backpropagation algorithm. Training results: The classification accuracy on the training set reached 88%, and it can effectively extract semantic features such as low mood accompanied by loss of appetite.

[0109] Graph neural network construction using GAT: Node definition: 20 typical depressive symptoms (such as insomnia, anxiety, self-blame, etc.) are used as graph nodes. Edge weight calculation: Pearson correlation coefficients between symptoms are calculated based on clinical data. For example, the correlation coefficient between insomnia and anxiety is 0.65, which is set as the edge weight. A time dimension is added to record the timestamp of the first occurrence of each symptom (e.g., the first occurrence of insomnia is t=5 days).

[0110] Model training: A Graph Attention Network (GAT) is used, with two attention heads, each with a hidden layer dimension of 32. The weights between nodes are calculated through a multi-head attention mechanism.

[0111]

[0112] h i Let W be the feature vector of node i, a be the weight matrix, a be the attention vector, and N be the number of nodes. i Let i be the set of neighboring nodes of node i.

[0113] Loss function: A combination of cross-entropy loss and mean squared error loss is used, as shown in the formula:

[0114] L = L cls +λL reg

[0115] Among them, L cls For cross-entropy loss, L reg The mean squared error loss is represented by λ = 0.5, which is the balancing parameter.

[0116] Optimization strategy: Use early stopping to prevent overfitting. Stop training when the validation set loss no longer decreases for 5 consecutive rounds, with 50 training rounds.

[0117] Training results: The F1 score on the test set reached 0.86, which can capture the symptom association pathways of insomnia, anxiety and low mood.

[0118] Constructing a diagnostic model: The semantic features (768 dimensions) extracted by BioBERT and the graph structure features (64 dimensions) extracted by GAT are fused together to form an 832-dimensional fused feature vector.

[0119] Diagnostic model construction: A random forest algorithm was used, with parameters adjusted to 100 trees and a maximum depth of 8, combined with L2 regularization to prevent overfitting. Output results: The model outputs the probability of a patient having depression and the severity of the condition (mild / moderate / severe). For example, after fusing feature vectors into the input, the model outputs a depression probability of 82% and a moderate severity, indicating a strong correlation (weight 0.65) between insomnia and anxiety as the main influencing factors.

[0120] Performance comparison: On the same test set, the diagnostic accuracy (91%), recall (89%), and F1 score (0.90) of this method are all higher than those of single HAMD scale analysis (78% accuracy) and traditional machine learning methods (such as SVM, F1 score 0.75).

[0121] The method of this invention provides doctors with quantitative assessments of the probability and severity of depression, reducing subjective judgment bias. For example, in a certain case, the model indicated that the patient's social media text implied suicidal tendencies (semantic features), which, combined with the strong correlation between self-blame and sleep disorders in the symptom graph (graph structure features), assisted in timely analysis and intervention.

[0122] This invention also provides an auxiliary analysis device for depression that integrates semantic features and graph structure features, such as... Figure 2 As shown, the device includes:

[0123] The data collection module collects symptom scale data, dialogue data from psychological counseling scenarios, and graph structure data from individuals with depression.

[0124] The large language model module extracts semantic features based on the large language model.

[0125] The graph neural network module extracts graph structure features based on graph neural networks.

[0126] The feature fusion module is used to fuse semantic features and graph structure features into a fused feature vector.

[0127] The diagnostic model module is used to obtain assessment results on the probability of individuals with depression and the severity of their condition.

[0128] Based on the aforementioned device structure, the data collection module extensively collects symptom scale data and psychological counseling dialogue records from patients with depression, transforming complex clinical information into intuitive and easy-to-understand graphical representations. This data covers multi-dimensional information about patients, providing a solid foundation for subsequent precise analysis. Simultaneously, this raw data is cleaned, denoised, and formatted to ensure data quality, providing high-quality input for subsequent model training.

[0129] The large language model module is equipped with a pre-trained large language model that can use natural language processing technology to extract semantic features from symptom scale data and dialogue data in psychological counseling scenarios, capturing the subtle connection between patients' language expression and psychological state.

[0130] The graph neural network module is equipped with a pre-trained graph neural network that mines deep features in graph structure data, reveals the intrinsic connections between symptoms, and extracts graph structure features.

[0131] The feature fusion module combines semantic features and graph structure features to form a comprehensive and accurate fused feature vector, providing strong support for the construction of diagnostic models.

[0132] The diagnostic model module is equipped with a pre-trained diagnostic model that, based on fused feature vectors, can automatically output the probability and severity of a patient's depression, providing a scientific and objective basis for clinical decision-making.

[0133] The entire device is compact in structure and comprehensive in function, realizing the organic combination of multi-source data and advanced models, opening up new avenues for the auxiliary analysis and diagnosis of depression.

[0134] The present invention also provides an electronic device, Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention, such as... Figure 3 As shown, the electronic device may include a processor, a communications interface, memory, and a communication bus, wherein the processor, communications interface, and memory communicate with each other via the communication bus. The processor can invoke logical instructions from the memory, for example, to execute the following method:

[0135] S1. Collect symptom scale data and dialogue data from psychological counseling scenarios of individuals with depression, fuse them to obtain multi-source fusion data and perform preprocessing;

[0136] S2. Construct and train a large language model. Input multi-source fusion data into the trained large language model and extract semantic features.

[0137] S3. Construct graph structure data based on the symptoms of the depressed subjects, build a graph neural network and train it, input the graph structure data into the trained graph neural network, and extract graph structure features;

[0138] S4. Fuse semantic features and graph structure features to obtain a fused feature vector, construct a diagnostic model and train it, input the fused feature vector into the trained diagnostic model, and obtain the assessment results of the probability of depression and the severity of the condition.

[0139] Furthermore, the logical instructions in the aforementioned memory can be implemented as software functional units and sold or used as independent products, and can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0140] This invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, is implemented to perform the methods provided in the above embodiments, including, for example:

[0141] S1. Collect symptom scale data and dialogue data from psychological counseling scenarios of individuals with depression, fuse them to obtain multi-source fusion data and perform preprocessing;

[0142] S2. Construct and train a large language model. Input multi-source fusion data into the trained large language model and extract semantic features.

[0143] S3. Construct graph structure data based on the symptoms of the depressed subjects, build a graph neural network and train it, input the graph structure data into the trained graph neural network, and extract graph structure features;

[0144] S4. Fuse semantic features and graph structure features to obtain a fused feature vector, construct a diagnostic model and train it, input the fused feature vector into the trained diagnostic model, and obtain the assessment results of the probability of depression and the severity of the condition.

[0145] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0146] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0147] 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 the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for auxiliary analysis of depression that integrates semantic features and graph structure features, characterized in that, include: S1. Collect symptom scale data and dialogue data from psychological counseling scenarios of individuals with depression, fuse them to obtain multi-source fusion data and perform preprocessing; S2. Construct and train a large language model. Input multi-source fusion data into the trained large language model and extract semantic features. S3. Construct graph structure data based on the symptoms of the depressed subjects, construct a graph neural network and train it, input the graph structure data into the trained graph neural network, and extract graph structure features; S4. Fuse semantic features and graph structure features to obtain a fused feature vector, construct a diagnostic model and train it, input the fused feature vector into the trained diagnostic model, and obtain the assessment results of the probability of depression and the severity of the condition.

2. The auxiliary analysis method for depression according to claim 1, characterized in that, The symptom scale data includes basic information about the subjects, detailed symptom presentation, scale scores, and clinical diagnostic conclusions. The collection of dialogue data in psychological counseling scenarios includes using psychological counseling dialogue prompting engineering to rewrite social media data into dialogue data for psychological counseling scenarios.

3. The auxiliary analysis method for depression according to claim 2, characterized in that, The preprocessing in S1 includes: The multi-source fusion data is cleaned to remove duplicate, erroneous, or incomplete data records. Text data is labeled and transformed into structured data. Numerical data is standardized to maintain data consistency and comparability.

4. The auxiliary analysis method for depression according to claim 1, characterized in that, The training of the large language model includes: Data sets are constructed using multi-source fusion data to train large language models using supervised learning, semi-supervised learning, or reinforcement learning algorithms. Fine-tuning the large language model involves adjusting hyperparameters such as the hidden layer dimension and the number of attention heads to better suit the processing of depression-related data. During the training process, relevant medical literature data is introduced to enrich the model's knowledge base and enhance its ability to understand complex symptom relationships.

5. The auxiliary analysis method for depression according to claim 4, characterized in that, The large language model uses the BioBERT model, and the loss function is the cross-entropy loss, expressed by the following formula: Among them, y i For real labels, Predict probabilities for the model.

6. The auxiliary analysis method for depression according to claim 1, characterized in that, In the graph structure data, each symptom is regarded as a node, and the nodes are connected according to the association between symptoms as edges, and the strength of the association between symptoms is used as the weight of the edges.

7. The auxiliary analysis method for depression according to claim 6, characterized in that, The graph neural network training includes: Early stopping is used to prevent overfitting. Training is stopped when the loss function on the validation set no longer decreases, and the optimal model parameters are saved. Regularly evaluate the model, monitor its performance metrics on the training and validation sets, and promptly identify and adjust any anomalies during the model training process.

8. The auxiliary analysis method for depression according to claim 7, characterized in that, The training loss function of the graph neural network adopts a combination of cross-entropy loss and mean squared error loss, and the formula is expressed as: L=L cls +λL reg Among them, L cls For cross-entropy loss, L reg λ represents the mean squared error loss, and λ is the balance parameter.

9. The auxiliary analysis method for depression according to claim 7, characterized in that, The graph neural network calculates the attention weights between nodes through a multi-head attention mechanism, expressed by the following formula: h i Let W be the feature vector of node i, a be the weight matrix, a be the attention vector, and N be the number of nodes. i Let i be the set of neighboring nodes of node i.

10. The auxiliary analysis method for depression according to claim 1, characterized in that, The diagnostic model in S4 employs regularization techniques during training to prevent overfitting and enhance its generalization ability.

Citation Information

Patent Citations

  • A method for diagnosing depression based on EEG based on multi-frequency domain decomposition

    CN118490232B