Depression risk detection model training method, depression symptom early warning method and related equipment

By constructing a neural network model and using training samples to detect the risk of depression, the error problem caused by relying on subjective reports in the existing technology is solved, and more accurate depression detection and personalized treatment recommendations are achieved, reducing medical costs.

CN120376126AInactive Publication Date: 2025-07-25苏州市广济医院
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510332888.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-20
Publication Date
2025-07-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing depression detection methods rely on the patient's subjective report, have errors and are affected by cultural and social factors, resulting in inaccurate judgments.

Method used

By constructing a neural network model, using training samples to train the model, obtain the depression risk detection model, and use the optimized neural network model to detect patient data, output the depression risk level, generate a detection report, and provide doctors with targeted treatment suggestions.

Benefits of technology

It improves the accuracy of depression detection, saves doctors' time, reduces medical costs, reduces the severity of the disease, and improves the quality of life of patients.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120376126A_ABST
    Figure CN120376126A_ABST
Patent Text Reader

Abstract

The invention discloses a depression risk detection model training method, a depression symptom early warning method and related equipment, and belongs to the technical field of depression detection. The problem that errors exist in an existing detection method is solved, the neural network model is constructed, the model is trained through the training samples, and the model capable of automatically detecting the depression risk is obtained; using the optimized neural network model to detect the current patient data, and outputting a depression risk detection result; comparing the depression risk detection result with a depression risk index to obtain a depression risk level of the current patient, thereby generating a depression risk detection report; a set intervention scheme is obtained according to the depression risk level, so that targeted treatment suggestions are provided for patients, and doctors can take more effective measures during clinical intervention; according to the method, the time of doctors is saved, and the medical cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of depression detection, and specifically to a method for training a depression risk detection model, a method for warning of depressive symptoms, and related devices. Background Art

[0002] Depression is a common mental illness that can cause patients to experience symptoms such as low mood, loss of interest and pleasure, and insomnia; the symptoms of depression can be divided into three stages: the initial stage, the consolidation stage, and the recovery stage. In the initial stage, patients will feel obvious low mood, loss of interest, and reduced activities; in the consolidation stage, these symptoms will become more severe, and patients may start to avoid social activities and participate in daily hobbies; in the recovery stage, patients may start to realize their problems, but facing the pressure of the external environment, the symptoms may worsen again; if not treated in time, it will have a serious impact on the physical and mental health of patients.

[0003] In the prior art, many depression detection methods rely on the subjective reports of patients. However, patients may exaggerate or conceal their symptoms due to fear of being diagnosed. In addition, the subjective reports of patients may also be affected by cultural, social, and patient information factors, resulting in certain errors in the judgment of depression.

[0004] Therefore, it does not meet the existing needs, and for this reason, we propose a method for training a depression risk detection model, a method for warning of depressive symptoms, and related devices. Summary of the Invention

[0005] The purpose of the present invention is to provide a method for training a depression risk detection model, a method for warning of depressive symptoms, and related devices. By constructing a neural network model, using training samples to train the model, a model capable of automatically detecting the risk of depression is obtained; using the optimized neural network model to detect the current patient data and output the depression risk detection result; comparing the depression risk detection result with the depression risk index to obtain the depression risk level of the current patient, and thus generating a depression risk detection report; and obtaining the set intervention plan through the depression risk level, thereby providing targeted treatment suggestions for patients, so that doctors can take more effective measures during clinical intervention; this method not only saves doctors' time and reduces medical costs, but also solves the problems raised in the above background art.

[0006] To achieve the above object, the present invention provides the following technical solutions:

[0007] A method for training a depression risk detection model includes the following steps:

[0008] Step 1: Collect information and clinical manifestations of different patients, preprocess the collected patient information and clinical manifestations, and use the preprocessed patient information and clinical manifestations as training samples of the model to evaluate the mental health status of patients from different perspectives; the patient information and clinical manifestation data include: age, whether being the only child, education level, marital status, family history of mental illness, relationship between mother-in-law and daughter-in-law, whether it is the first pregnancy, living conditions, and the impulse to lose temper with children;

[0009] Step 2: Use the principal component analysis method to convert the data category variables in the training samples into numerical variables, analyze each question in the training samples, and extract effective feature variables;

[0010] Step 3: Based on the clustering algorithm, perform clustering analysis on the extracted feature variables to obtain the clustering analysis results of the feature variables, and screen out the feature variables that meet the model usage from the clustering analysis results to form a feature set;

[0011] Step 4: Divide the feature set into a training set and a validation set. The training set is used to train the model and establish the feature layer of the model, and the validation set is used to verify the training results of the model and the performance of risk detection;

[0012] Step 5: Build a neural network model, input the training set into the neural network model for training, and output the training results; then input the validation set into the trained neural network model for testing, and output the test results; use the test results to verify the performance of the model. If the verification passes, it indicates that the model training is completed; if the verification fails, it indicates that the model training fails, and adjust the content of the feature set, and retrain and verify the model until the model verification passes to obtain a depression risk detection model;

[0013] Step 6: According to the training results output by the depression risk detection model, set different levels of depression risk indicators for assisting doctors in clinical use.

[0014] Furthermore, collect information and clinical manifestations of different patients, and judge the diversity according to the information and clinical manifestations of different patients, including:

[0015] Extract the information similarity values of patient information between every two patients;

[0016] Compare the information similarity values of the patient information between every two patients with a preset information similarity threshold;

[0017] Extract the group of patients whose information similarity values exceed the preset information similarity threshold as the target patient group;

[0018] Extract the clinical manifestations corresponding to the target patient group and the corresponding data information, and obtain the clinical manifestation similarity value corresponding to each target patient group;

[0019] Use the information similarity value and the clinical manifestation similarity value corresponding to the target patient group to obtain the similarity coefficient corresponding to each target patient group;

[0020] Among them, the similarity coefficient corresponding to each target patient group is obtained through the following formula:

[0021]

[0022] Among them, S x represents the similarity coefficient corresponding to each target patient group; S a represents the information similarity value corresponding to each target patient group; S c represents the clinical manifestation similarity value corresponding to each target patient group; S y represents the preset information similarity threshold;

[0023] Use the similarity coefficient corresponding to each target patient group to determine the diversity degree of collecting information and clinical manifestations of different patients.

[0024] Furthermore, using the similarity coefficient corresponding to each target patient group to determine the diversity degree of collecting information and clinical manifestations of different patients includes:

[0025] Compare the similarity coefficient corresponding to each target patient group with the preset coefficient threshold;

[0026] Take the target patient group with a similarity coefficient lower than the preset coefficient threshold as the first target patient group;

[0027] Take the target patient group with a similarity coefficient not lower than the preset coefficient threshold as the second target patient group;

[0028] Use the similarity coefficient of the first target patient group and the similarity coefficient of the second target patient group to obtain the comprehensive similarity coefficient;

[0029] Among them, the comprehensive similarity coefficient is obtained through the following formula:

[0030]

[0031] Among them, S z represents the comprehensive similarity coefficient; m represents the number of target patient groups in the first target patient group; n represents the number of target patient groups in the second target patient group; S 01i represents the similarity coefficient of the i-th target patient group in the first target patient group; S 02iThe similarity coefficient of the \(i\)-th target patient group representing the second target patient group; \(S\) xy Represents a preset coefficient threshold; \(S\) 01p Represents the average value of the similarity coefficients of the \(m\) target patient groups of the first target patient group; \(S\) 02p Represents the average value of the similarity coefficients of the \(n\) target patient groups of the second target patient group;

[0032] Compare the comprehensive similarity coefficient with a preset comprehensive coefficient threshold;

[0033] When the comprehensive similarity coefficient does not exceed the preset comprehensive coefficient threshold, it is determined that the diversity of collecting different patients' information and clinical manifestations does not meet the sample diversity requirements, and a sample diversity deficiency prompt is given.

[0034] Further, in the second step, the principal component analysis method is used to convert the data category variables in the training samples into numerical variables, and effective feature variables are extracted, which specifically includes the following steps:

[0035] Import the training samples into the PCA toolkit, set labels for the depression status of each patient's information, extract the information features of each patient, and construct a two-dimensional data matrix \(X\); where each row corresponds to the information of one patient, and each column corresponds to a feature; convert each value of each category variable into a binary vector, and then splice the binary vectors to form a three-dimensional numerical vector; input the converted numerical vector and label into the PCA toolkit for dimensionality reduction processing to obtain the dimensionality-reduced data; and perform visual display and analysis on the dimensionality-reduced data, and then select four features with the largest variances from the dimensionality-reduced data as effective feature variables.

[0036] Further, in the third step, cluster analysis is performed on the extracted feature variables based on the clustering algorithm, which specifically includes the following steps:

[0037] Input the processed feature data into the hierarchical clustering algorithm, use the hierarchical clustering algorithm to perform cluster analysis on the extracted feature variables to obtain the cluster analysis result; according to the cluster analysis result, screen out the feature variables that meet the model training requirements; and sort the screened feature variables to form a feature set of depression.

[0038] Further, in the fifth step, to obtain the depression risk detection model, it specifically includes the following steps:

[0039] Construct a neural network model, including: an input layer, a hidden layer, and an output layer; where the input layer is used to receive input data, input the training set into the neural network model for training, and calculate the loss value and error value in the output layer, and adjust the parameters in the neural network model according to the loss value and error value to optimize the model;

[0040] Define the activation function and loss function in the output layer to measure the gap between the predicted value and the actual value of the model; and randomly initialize the weights and biases in the neural network model to optimize the generalization ability of the model for new data; train the neural network model with the training set to make the model converge to a local optimal solution, and during the training process, use the stochastic gradient descent optimization algorithm to adjust the parameters of the model; after the training is completed, use the validation set to evaluate the performance of the model; if the model performance is not good, further optimize the model by adjusting the network structure or adding hidden layers; if the model performance reaches the expected goal, obtain the depression risk detection model and deploy the model to the actual application environment.

[0041] Further, in step six, set different levels of depression risk indicators, which specifically include the following steps:

[0042] According to the results output by the model training, set the depression risk threshold; and according to the set depression risk threshold, formulate the corresponding depression risk classification criteria, including: dividing the risk scores into three levels: high, medium, and low.

[0043] A method for warning of depressive symptoms, including the following steps:

[0044] S1. Obtain the information and clinical manifestations of depression of the patient by means of clinical rounds or questionnaires to form the initial data of the patient;

[0045] S2. Organize the initial data of the patient to form patient data; and preprocess the patient data to make the patient data meet the requirements of model detection;

[0046] S3. Input the preprocessed patient data into the neural network model for depression risk detection and output the current depression risk detection result;

[0047] S4. Compare the current depression risk detection result with the preset depression risk indicators to obtain the depression risk level of the current patient and generate the depression risk detection report of the current patient;

[0048] S5. Based on the wireless transmission technology, synchronously feedback the depression risk detection report of the current patient to the human-computer interaction interface to assist the doctor in effectively intervening in the patient's condition.

[0049] Further, it also includes:

[0050] S6. After implementing effective intervention on the patient, regularly review the patient's condition; compare the review data with the patient's initial data to determine whether the current intervention method is correct; if it is correct, continue or suspend the intervention according to the patient's clinical manifestations; if it is incorrect, re-enter the review data into the neural network model for depression risk detection, and adjust the intervention method according to the new round of depression risk detection report.

[0051] A depression symptom warning device, comprising:

[0052] A data collection module for collecting the patient's information and clinical manifestations of depression as a basis for judging whether the patient has depression.

[0053] A data processing module for preprocessing the patient's data. The preprocessing includes: removing invalid, duplicate or damaged data, filling in missing values, and removing spaces and punctuation marks to ensure that all data formats are unified; and performing feature extraction on the preprocessed data to obtain a feature set suitable for model training.

[0054] A model construction module for constructing a neural network model, dividing the feature set into a training set and a validation set, training the neural network model through the training set, and outputting the training result; then inputting the validation set into the trained neural network model for testing to verify whether the detection ability of the neural network model is accurate.

[0055] A human-computer interaction terminal for visually displaying the depression risk detection report of the patient. Doctors and patients install exclusive software on the intelligent device and view it by logging in to the software.

[0056] Compared with the prior art, the beneficial effects of the present invention are:

[0057] In the present invention, by training and validating the neural network model using training samples, a model capable of automatically detecting the risk of depression is obtained; then using the optimized neural network model to detect the risk of depression for the current patient data, and comparing the depression risk detection result with the preset depression risk index to obtain the depression risk level of the current patient, thereby generating a depression risk detection report for the current patient; thus providing targeted treatment suggestions for the patient, so that doctors can take more effective measures during clinical intervention; this method not only saves doctors' time, reduces medical costs, thereby reducing the severity of the condition, but also improves the quality of life of the patient. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 It is a flowchart of the training method of the depression risk detection model of the present invention;

[0059] Figure 2Flowchart of the depression symptom early warning method of the present invention;

[0060] Figure 3 Composition diagram of the depression symptom early warning device of the present invention. Detailed implementation manners

[0061] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0062] To solve the technical problem that in the prior art, many depression detection methods rely on the subjective reports of patients. However, patients may exaggerate or conceal their symptoms due to fear of being diagnosed. In addition, the subjective reports of patients may also be affected by cultural, social and patient information factors, resulting in certain errors in the judgment of depression. Please refer to Figures 1-3 , the following technical solutions are provided in this embodiment:

[0063] A method for training a depression risk detection model, including the following steps:

[0064] Step 1: Collect information and clinical manifestations of different patients from various channels such as hospital medical records, medical treatment records, online questionnaires, and social media, and preprocess the collected patient information and clinical manifestations. Use the preprocessed patient information and clinical manifestations as training samples of the model to evaluate the mental health status of patients from different perspectives. Among them, the patient information and clinical manifestation data include: age, whether being the only child, education level, marital status, family history of mental illness, relationship between mother-in-law and daughter-in-law, whether being the first pregnancy, living conditions, and the impulse to lose temper with children. Specifically, by collecting rich and diverse patient information and clinical manifestation information, comprehensive data support can be provided for the training of the model, enabling it to evaluate the mental health status of patients from different perspectives. Secondly, preprocess the collected data to ensure the accuracy and integrity of the data, so that the model can more effectively learn features and patterns during the training process, thereby realizing multi-dimensional evaluation of the mental health status of patients and improving the accuracy of the detection results.

[0065] Specifically, collect information and clinical manifestations of different patients, and judge the diversity according to the information and clinical manifestations of different patients, including:

[0066] Extract the information similarity values of the patient information between every two patients;

[0067] Compare the information similarity value of the patient information between every two patients with a preset information similarity threshold;

[0068] Extract the group of patients whose information similarity value exceeds the preset information similarity threshold as the target patient group;

[0069] Extract the corresponding clinical manifestations and corresponding data information of the target patient group, and obtain the clinical manifestation similarity value corresponding to each target patient group;

[0070] Use the information similarity value and the clinical manifestation similarity value corresponding to the target patient group to obtain the similarity coefficient corresponding to each target patient group;

[0071] Among them, the similarity coefficient corresponding to each target patient group is obtained through the following formula:

[0072]

[0073] Among them, S x represents the similarity coefficient corresponding to each target patient group; S a represents the information similarity value corresponding to each target patient group; S c represents the clinical manifestation similarity value corresponding to each target patient group; S y represents the preset information similarity threshold;

[0074] Use the similarity coefficient corresponding to each target patient group to determine the diversity degree of collecting different patient information and clinical manifestations.

[0075] The technical effects of the above technical solution are as follows: By extracting the information similarity values between every two patients and comparing them with a preset threshold, this technical solution can identify patient groups with high information similarity as target patient groups. Further, by calculating the clinical manifestation similarity values of these target patient groups and combining the information similarity values to obtain a similarity coefficient, the evaluation of sample diversity becomes more detailed and accurate. By screening patient groups with information similarity exceeding the preset threshold as target patient groups, this technical solution can ensure that the selected samples are representative in terms of patient information and clinical manifestations. This helps the model learn more extensive and comprehensive features during the training process, thereby improving the generalization ability of the model. Using the similarity coefficient to determine the diversity degree of collecting information and clinical manifestations of different patients, this technical solution provides a new strategy for sample selection. By calculating the similarity coefficient, it can be identified which patient groups have high similarity in terms of information and clinical manifestations, thus avoiding overly repetitive or overly single sample selection, optimizing the composition of the sample set, and at the same time, effectively improving the accuracy and sensitivity of similarity determination. Accurate determination of sample diversity is crucial for the training of the depression risk detection model and the improvement of the early warning system. This technical solution helps researchers better understand the distribution characteristics of sample data by providing a scientific and objective diversity evaluation method, thereby guiding the training of the model and the optimization of the early warning system. A sample set with a high degree of diversity can contain more patient information and clinical manifestation characteristics, which helps the model show stronger robustness when dealing with complex and variable patient data. By performing sample diversity determination through this technical solution, it can be ensured that the model is exposed to sufficiently diverse data during the training process, thereby improving its stability and reliability in practical applications.

[0076] In summary, the above processing technical solution has high technical effects in sample diversity determination, not only improving the representativeness of the samples and the accuracy of diversity evaluation, but also providing strong support for the improvement of model training and early warning systems.

[0077] Specifically, using the similarity coefficient corresponding to each target patient group to determine the diversity degree of collecting information and clinical manifestations of different patients includes:

[0078] Comparing the similarity coefficient corresponding to each target patient group with a preset coefficient threshold;

[0079] Regarding the target patient group with a similarity coefficient lower than the preset coefficient threshold as the first target patient group;

[0080] Regarding the target patient group with a similarity coefficient not lower than the preset coefficient threshold as the second target patient group;

[0081] Obtain a comprehensive similarity coefficient using the similarity coefficient of the first target patient group and the similarity coefficient of the second target patient group;

[0082] Among them, the comprehensive similarity coefficient is obtained through the following formula:

[0083]

[0084] Among them, S z represents the comprehensive similarity coefficient; m represents the number of target patient groups in the first target patient group; n represents the number of target patient groups in the second target patient group; S 01i represents the similarity coefficient of the i-th target patient group in the first target patient group; S 02i represents the similarity coefficient of the i-th target patient group in the second target patient group; S xy represents a preset coefficient threshold; S 01p represents the average value of the similarity coefficients of the m target patient groups in the first target patient group; S 02p represents the average value of the similarity coefficients of the n target patient groups in the second target patient group;

[0085] Compare the comprehensive similarity coefficient with a preset comprehensive coefficient threshold;

[0086] When the comprehensive similarity coefficient does not exceed the preset comprehensive coefficient threshold, it is determined that the diversity of collecting different patient information and clinical manifestations does not meet the sample diversity requirements, and a sample diversity deficiency prompt is given.

[0087] The technical effects of the above technical solution are as follows: By setting a preset coefficient threshold and comparing the similarity coefficient of each target patient group with it, this technical solution can quantitatively evaluate the diversity degree of the samples. The target patient groups with similarity coefficients lower than the threshold are regarded as the first group, and those not lower than the threshold are regarded as the second group. This classification method helps to analyze the diversity characteristics of the samples more meticulously. Using the comprehensive similarity coefficient formula, combining the similarity coefficients and their average values of the first target patient group and the second target patient group, a comprehensive index can be calculated to reflect the diversity of the overall samples. This method comprehensively considers patient groups at different similarity levels, improving the accuracy and scientific nature of sample screening. By comparing the comprehensive similarity coefficient with the preset comprehensive coefficient threshold, this technical solution can determine whether the sample diversity meets the requirements. If not, a prompt for insufficient sample diversity is given, which helps researchers adjust the sample set in a timely manner to ensure that the samples have sufficient diversity and representativeness, thereby improving the performance of model training and the warning system. A diverse sample set helps the model learn more extensive and comprehensive features, improving the generalization ability and robustness of the model. This technical solution ensures that the data entering model training has a high degree of diversity and representativeness through strict sample diversity determination, thus supporting the robustness of model training. This technical solution proposes a new method for sample diversity determination, combining the calculation of similarity coefficients and comprehensive similarity coefficients, providing new ideas and methods for the research of depression risk detection model training and warning systems. The application of this method helps to promote innovation and development in related fields. At the same time, the above technical solution can effectively improve the accuracy of sample data diversity determination in the case of a large sample data volume.

[0088] In summary, the above technical solution has high technical effects in sample diversity determination, not only enhancing the quantitative evaluation ability of sample diversity, improving the accuracy of sample screening, but also optimizing the composition of the sample set, supporting the robustness of model training, and promoting the innovation of research methods.

[0089] Step 2: Use the principal component analysis method to convert the data category variables in the training samples into numerical variables, and analyze each question in the training samples to extract effective feature variables; specifically, it includes the following steps:

[0090] Import the training samples into the PCA toolkit, set labels for the depression status of each patient's information, extract the information features of each patient, and construct a two-dimensional data matrix X; where each row corresponds to the information of one patient, and each column corresponds to a feature; convert each value of each categorical variable into a binary vector, and then splice the binary vectors to form a three-dimensional numerical vector; input the converted numerical vector and labels into the PCA toolkit for dimensionality reduction processing to obtain the data after dimensionality reduction; and perform visual display and analysis on the data after dimensionality reduction, and then select four features with the largest variances from the data after dimensionality reduction as effective feature variables; specifically, through the above method, it is convenient for the neural network model to perform in-depth learning on the training samples, thereby improving the accuracy of model detection and enabling it to more accurately reflect the depressive symptoms of patients; at the same time, it helps doctors to more accurately identify and diagnose depressive disorders, and thus take more effective treatment measures.

[0091] Step 3: Perform clustering analysis on the extracted feature variables based on the clustering algorithm to obtain the clustering analysis results of the feature variables, and screen out the feature variables that meet the model usage from the clustering analysis results to form a feature set; specifically including the following steps:

[0092] Input the processed feature data into the hierarchical clustering algorithm, use the hierarchical clustering algorithm to perform clustering analysis on the extracted feature variables to obtain the clustering analysis results; according to the clustering analysis results, screen out the feature variables that meet the model training usage; and sort the screened feature variables to form the feature set of depression; in specific implementation, the feature set can be flexibly adjusted and optimized according to the specific requirements of the model and the characteristics of the data; where the evaluation indicators include: internal consistency, interconnectivity, and silhouette coefficient; when sorting the feature variables, various different methods are used to sort the features, such as: sorting according to the occurrence frequency, absolute value size, standardization degree, etc., and finally obtaining an ordered feature set of depression, and each item in the finally obtained feature set of depression corresponds to a feature selected from the original dataset, based on which the complexity of the model can be effectively reduced and its generalization ability can be improved.

[0093] Step 4: Divide the feature set into a training set and a validation set. The training set is used to train the model and establish the feature layer of the model, and the validation set is used to verify the training results of the model and the performance of risk detection; specifically, divide the feature set into a training set and a validation set according to a certain proportion, such as: 70% is the training set and 30% is the validation set.

[0094] Step 5: Build a neural network model, input the training set into the neural network model for training, and output the training results; then input the validation set into the trained neural network model for testing, and output the test results; use the test results to verify the performance of the model. If the verification passes, it indicates that the model training is completed; if the verification fails, it indicates that the model training fails, and adjust the content of the feature set, retrain and verify the model until the model verification passes to obtain a depression risk detection model. The specific steps are as follows:

[0095] Build a neural network model, including: an input layer, a hidden layer, and an output layer; among them, the input layer is used to receive input data, input the training set into the neural network model for training, and calculate the loss value and error value in the output layer, adjust the parameters in the neural network model according to the loss value and error value, and optimize the model; define an activation function and a loss function in the output layer to measure the gap between the model prediction value and the actual value; and randomly initialize the weights and biases in the neural network model to optimize the generalization ability of the model to new data; train the neural network model through the training set to make the model converge to a local optimal solution, and during the training process, use the stochastic gradient descent optimization algorithm to adjust the parameters of the model; after the training is completed, use the validation set to evaluate the performance of the model; if the model performance is not good, further optimize the model by adjusting the network structure or adding hidden layers; if the model performance reaches the expected goal, obtain a depression risk detection model and deploy the model to the actual application environment; specifically, train the model by using the training set and gradually adjust the hyperparameters of the model to minimize the loss value of the model to obtain the best model performance; when the model performance reaches the expectation, stop training and save the model; use the validation set to evaluate the model, obtain the prediction results of each sample in the validation set, and then calculate indicators such as the average accuracy rate and recall rate of the model in the training samples; if the performance of the model in the validation set is not good, readjust the hyperparameters of the model, such as: learning rate, batch size, number of neurons, etc., and perform multiple iterations until satisfactory model performance is achieved to ensure the accuracy of the model for depression detection.

[0096] Step 6: Set different levels of depression risk indicators according to the training results output by the depression risk detection model for assisting doctors in clinical use. The specific steps are as follows:

[0097] Set the depression risk threshold according to the results output by model training; and formulate corresponding depression risk classification criteria based on the set depression risk threshold, including: dividing the risk scores into three levels: high, medium, and low; specifically, calculate the probability of the information score of each patient according to the results output by the model. For example, use the sigmoid function as the activation function of the last layer, and then convert the probability obtained for each patient into a percentage score. Specifically: take an approximate value of the probability P within the range of 0 to 1, and then multiply it by 100% to obtain a score between 0 and 100; divide the risk into different levels according to this score. For example, divide the risk into three levels: high risk, medium risk, and low risk. The specific thresholds can be set to 80, 60, and 40; and formulate corresponding treatment suggestions and intervention measures for each level; for example: for patients with high risk, drug treatment or psychological treatment may be required immediately; for patients with medium risk, regular psychological counseling and behavioral intervention may be required; for patients with low risk, only some psychological counseling or health education may be required; adjust according to actual needs, and make decisions in combination with the specific situation of the patient individual.

[0098] A method for warning of depressive symptoms, including the following steps:

[0099] S1. Obtain the information of the patient and the clinical manifestations of depression by means of clinical rounds or questionnaires to form the initial data of the patient; obtain the personal information of the patient and the clinical manifestations of depression through methods such as clinical rounds or questionnaires, so as to form the initial data of the patient; the data can be information such as the patient's age, gender, course of disease, family history, occupation, marital status, life stress, etc., or the patient's symptom manifestations, such as: persistent low mood, loss of interest, insomnia and dreaminess, loss of appetite, etc.; through the collection and analysis of the above information, establish the initial data of the patient, providing a basis for subsequent model training and disease detection.

[0100] S2. Organize the initial data of the patient to form patient data; and preprocess the patient data to make the patient data meet the requirements of model detection; clean the original data to remove invalid data, duplicate records, incorrect entries, etc.; and screen out useful features from the patient data, such as: age, gender, course of disease, symptom severity, social support degree, etc., integrate the data collected from different channels to construct a unified patient data set; convert the data set into the format required by the model, such as: numerical data needs to be standardized to facilitate the neural network model to learn data features.

[0101] S3. Input the preprocessed patient data into the neural network model for depression risk detection and output the current depression risk detection result. By inputting the preprocessed patient data into the neural network model for forward propagation, the output values of all nodes are calculated. Then, calculate the loss value of the neural network model to evaluate the fitting degree of the model to the current patient data. According to the feedback information of the loss value, adjust the parameters in the neural network model to optimize the model. When the model reaches the optimal parameters, calculate the output values of all nodes and take the maximum value as the depression risk detection result of the current patient.

[0102] S4. Compare the current depression risk detection result with the preset depression risk indicators to obtain the depression risk level of the current patient and generate a depression risk detection report for the current patient. By comparing the current depression risk detection result with the preset depression risk indicators, for example, the three levels of high risk, medium risk, and low risk set above, the corresponding thresholds are 80, 60, and 40. According to the comparison result, determine the depression risk level of the current patient. Then, generate a corresponding depression risk detection report according to the depression risk level. The report includes the patient's personal information, depression risk level, and relevant analysis and explanations, so as to provide reference for the patient and medical professionals.

[0103] S5. Based on wireless transmission technology, synchronously feedback the depression risk detection report of the current patient to the human-machine interaction interface to assist doctors in effectively intervening in the patient's condition. Display the depression risks at different levels and the specific values of various indicators in the form of bar charts, pie charts, etc. to ensure that patients can more easily understand the content of the report. Then, put forward corresponding health suggestions according to the patient's depression risk level to help the patient reduce the risk of depression.

[0104] S6. After implementing effective intervention on the patient, regularly review the patient's condition. Compare the review data with the patient's initial data to judge whether the current intervention method is correct. If it is correct, continue or suspend the intervention according to the patient's clinical manifestations. If it is incorrect, re-enter the review data into the neural network model for depression risk detection and adjust the intervention method according to the new round of depression risk detection report. By regularly tracking the patient's depression risk situation and providing improvement suggestions, the effectiveness of the treatment is ensured.

[0105] The beneficial effects achieved by the above content: Through the above operations, it is convenient for doctors to take more effective measures during clinical intervention. This method not only saves doctors' time, reduces medical costs, but also reduces the severity of the disease and improves the patient's quality of life.

[0106] A depressive symptom warning device, including:

[0107] A data collection module, which is used to collect information of patients and clinical manifestations of depression as the basis for judging whether a patient has depression; by collecting data from multiple channels, such as online questionnaires, telephone interviews, face-to-face consultations, social media interactions, etc., the collected data includes basic information such as name, gender, age, occupation, marital status, education level, etc., as well as possible symptoms of depression and behavioral changes, such as mood swings, insomnia, loss of appetite, fatigue, worthlessness, etc.

[0108] A data processing module, which is used to preprocess patient data. The preprocessing includes: removing invalid, duplicate or damaged data, filling in missing values, and removing spaces and punctuation marks to ensure that all data formats are unified; and extracting features from the preprocessed data to obtain a feature set suitable for model training; by cleaning and processing the collected data, incomplete, duplicate or incorrect data is removed to ensure the quality and consistency of the data, so as to facilitate the neural network model to learn data features.

[0109] A model construction module, which is used to build a neural network model, divide the feature set into a training set and a validation set, train the neural network model with the training set, and output the training results; then input the validation set into the trained neural network model for testing to verify whether the detection ability of the neural network model is accurate; by using 70%-80% of the features as the training set and the remaining features as the validation set; secondly, define the neural network model, including the input layer, hidden layer and output layer, where the input layer is responsible for receiving input features, and the hidden layer and output layer are responsible for establishing the neural network structure and realizing the prediction of the model. When training the neural network model in the training set, gradually adjust the parameters of the model to improve the prediction accuracy of the model; and during the training process, use techniques such as cross-validation to evaluate the generalization ability of the model to avoid overfitting problems; input the data in the validation set into the trained neural network model for testing, evaluate the prediction ability and accuracy of the model; and adjust the feature set and neural network model according to the test results, and then perform a new round of training and testing, repeating the iteration until the expected accuracy and generalization ability are met, so as to obtain a model that can automatically detect the risk of depression.

[0110] A human-computer interaction terminal, which is used to visually display the depression risk detection report of patients for doctors and patients to view; through the human-computer interaction terminal, the results of the neural network model training and detection on the patient feature set can be visually displayed, including forms such as charts and tables, which is convenient for patients to better understand their own conditions.

[0111] Working principle: By constructing a neural network model, training and validating the model with training samples to obtain a model capable of automatically detecting the risk of depression; using the optimized neural network model to detect the risk of depression for current patient data and output the detection results of the risk of depression; comparing the detection results of the risk of depression with the preset risk indicators of depression to obtain the risk level of depression of the current patient, and thus generating a detection report on the risk of depression of the current patient; and obtaining the set intervention plan based on the current risk level of depression, thereby providing targeted treatment suggestions for the patient.

[0112] It should be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "having" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device.

[0113] Although the embodiments of the present invention have been shown and described, it will be understood by those of ordinary skill in the art that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of the present invention, and the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for training a depression risk detection model, characterized in that, It includes the following steps: Step 1: Collect information and clinical manifestations of different patients, preprocess the collected patient information and clinical manifestations, and use the preprocessed patient information and clinical manifestations as training samples of the model to evaluate the mental health status of patients from different perspectives; Step 2: Use the principal component analysis method to convert the data category variables in the training samples into numerical variables, analyze each question in the training samples, and extract effective feature variables; Step 3: Based on the clustering algorithm, perform clustering analysis on the extracted feature variables to obtain the clustering analysis results of the feature variables, and screen out the feature variables that meet the model usage from the clustering analysis results to form a feature set; Step 4: Divide the feature set into a training set and a validation set. The training set is used to train the model, and the validation set is used to verify the training results of the model and the performance of risk detection; Step 5: Build a neural network model, input the training set into the neural network model for training, and output the training results; Then input the validation set into the trained neural network model for testing, and output the test results; Use the test results to verify the performance of the model. If the verification passes, it indicates that the model training is completed; if the verification fails, it indicates that the model training fails, and adjust the content of the feature set, and retrain and verify the model until the model verification passes to obtain a depression risk detection model; Step 6: According to the training results output by the depression risk detection model, set different levels of depression risk indicators for assisting doctors in clinical use.

2. The method for training a depression risk detection model according to claim 1, wherein: Collect information and clinical manifestations of different patients, and judge the diversity determination according to the information and clinical manifestations of different patients, including: Extract the information similarity values of the patient information between every two patients; Compare the information similarity values of the patient information between every two patients with a preset information similarity threshold; Extract the patient groups whose information similarity values exceed the preset information similarity threshold as target patient groups; Extract the corresponding clinical manifestations and corresponding data information of the target patient groups, and obtain the clinical manifestation similarity values corresponding to each target patient group; Use the information similarity values and clinical manifestation similarity values corresponding to the target patient groups to obtain the similarity coefficients corresponding to each target patient group; Among them, the similarity coefficient corresponding to each target patient group is obtained through the following formula: Among them, S x represents the similarity coefficient corresponding to each target patient group; S a represents the information similarity value corresponding to each of the target patient groups; S c represents the clinical manifestation similarity value corresponding to each of the target patient groups; S y represents a preset information similarity threshold; Use the similarity coefficient corresponding to each target patient group to judge the diversity degree of collecting information and clinical manifestations of different patients.

3. The method for training a depression risk detection model according to claim 2, wherein: Use the similarity coefficient corresponding to each target patient group to judge the diversity degree of collecting information and clinical manifestations of different patients, including: Compare the similarity coefficient corresponding to each target patient group with a preset coefficient threshold; Take the target patient groups with similarity coefficients lower than the preset coefficient threshold as the first target patient groups; Take the target patient groups with similarity coefficients not lower than the preset coefficient threshold as the second target patient groups; Use the similarity coefficients of the first target patient groups and the similarity coefficients of the second target patient groups to obtain a comprehensive similarity coefficient; Among them, the comprehensive similarity coefficient is obtained through the following formula: Among them, S z represents the comprehensive similarity coefficient; m represents the number of target patient groups in the first target patient group; n represents the number of target patient groups in the second target patient group; S 01i represents the similarity coefficient of the i-th target patient group in the first target patient group; S 02i represents the similarity coefficient of the i-th target patient group in the second target patient group; S xy represents a preset coefficient threshold; S 01p represents the average value of the similarity coefficients of the m target patient groups in the first target patient group; S 02p represents the average value of the similarity coefficients of the n target patient groups in the second target patient group; Compare the comprehensive similarity coefficient with a preset comprehensive coefficient threshold; When the comprehensive similarity coefficient does not exceed the preset comprehensive coefficient threshold, it is determined that the diversity of collecting information and clinical manifestations of different patients does not meet the sample diversity requirements, and a sample diversity deficiency prompt is given.

4. The method for training a depression risk detection model according to claim 1, wherein: In step two, the principal component analysis method is used to convert the data category variables in the training samples into numerical variables and extract effective feature variables, which specifically includes the following steps: Import the training samples into the PCA toolkit, set labels for the depression status of each patient's information, extract the information features of each patient, and construct a two-dimensional data matrix X; where each row corresponds to the information of one patient and each column corresponds to a feature; convert each value of each category variable into a binary vector, and then splice the binary vectors to form a three-dimensional numerical vector; input the converted numerical vector and label into the PCA toolkit for dimensionality reduction processing to obtain the data after dimensionality reduction; and perform visual display and analysis on the data after dimensionality reduction, and then select four features with the largest variances from the data after dimensionality reduction as effective feature variables.

5. The method for training a depression risk detection model according to claim 1, wherein: In step three, cluster analysis is performed on the extracted feature variables based on the clustering algorithm, which specifically includes the following steps: Input the processed feature data into the hierarchical clustering algorithm, use the hierarchical clustering algorithm to perform cluster analysis on the extracted feature variables to obtain the cluster analysis result; according to the cluster analysis result, screen out the feature variables that meet the model training requirements; and sort the screened feature variables to form a feature set for depression.

6. The method for training a depression risk detection model according to claim 1, wherein: In step five, obtain the depression risk detection model, which specifically includes the following steps: Construct a neural network model, including: an input layer, a hidden layer, and an output layer; where the input layer is used to receive input data, input the training set into the neural network model for training, and calculate the loss value and error value in the output layer, and adjust the parameters in the neural network model according to the loss value and error value to optimize the model. Define an activation function and a loss function in the output layer to measure the gap between the model prediction value and the actual value; and randomly initialize the weights and biases in the neural network model to optimize the generalization ability of the model for new data; train the neural network model through the training set to make the model converge to a local optimal solution; and during the training process, use the stochastic gradient descent optimization algorithm to adjust the parameters of the model; after the training is completed, evaluate the performance of the model using the validation set; if the model performance is not good, further optimize the model by adjusting the network structure or adding a hidden layer; if the model performance reaches the expected goal, obtain the depression risk detection model and deploy the model to the actual application environment.

7. The method for training a depression risk detection model according to claim 1, wherein: In step six, set different levels of depression risk indicators, which specifically includes the following steps: According to the results output by the model training, set the depression risk threshold; and according to the set depression risk threshold, formulate corresponding depression risk grading criteria, including: dividing the risk scores into three levels: high, medium, and low.

8. A method for warning of depressive symptoms, implemented based on a depressive risk detection model trained by the depressive risk detection model training method according to claims 1-7, characterized in that, Include the following steps: S1. Obtain the information of patients and the clinical manifestations of depression through clinical rounds or questionnaires to form the initial data of patients; S2. Organize the initial data of patients to form patient data; and preprocess the patient data to make it meet the requirements of model detection; S3. Input the preprocessed patient data into the neural network model for depression risk detection and output the current depression risk detection result; S4. Compare the current depression risk detection result with the preset depression risk indicators to obtain the depression risk level of the current patient and generate a depression risk detection report for the current patient; S5. Based on wireless transmission technology, synchronously feedback the depression risk detection report of the current patient to the human-computer interaction interface to assist doctors in effectively intervening in the patient's condition.

9. The depressive symptom warning method according to claim 8, characterized in that: It further includes: S6. After implementing effective intervention on the patient, regularly review the patient's condition; And compare the review data with the initial data of the patient to judge whether the current intervention method is correct; if it is correct, continue or pause the intervention according to the patient's clinical manifestations; if it is incorrect, re-enter the review data into the neural network model for depression risk detection and adjust the intervention method according to the new round of depression risk detection report.

10. A depression symptom warning device for implementing the depression symptom warning method according to claims 8-9, characterized in that, It includes: A data collection module, which is used to collect the information of patients and the clinical manifestations of depression as the basis for judging whether a patient has depression; A data processing module, which is used to preprocess the patient data. The preprocessing includes: removing invalid, duplicate or damaged data, filling in missing values, and removing spaces and punctuation marks to ensure that all data formats are unified; and extracting features from the preprocessed data to obtain a feature set suitable for model training; A model construction module, which is used to construct a neural network model, divide the feature set into a training set and a validation set, train the neural network model through the training set and output the training result; then input the validation set into the trained neural network model for testing to verify whether the detection ability of the neural network model is accurate; A human-computer interaction terminal, which is used to visually display the depression risk detection report of patients. Doctors and patients install exclusive software on intelligent devices and view it by logging in to the software.