Disease auxiliary diagnosis method and related equipment
By classifying symptoms into explicit and implicit characteristics, and combining statistical weighting methods, the XGBoost algorithm, and feature matching to generate a comprehensive score, the problem of insufficient accuracy and reliability in auxiliary diagnosis of diseases in existing technologies is solved, and a more objective and scientific diagnostic result is achieved.
Patent Information
- Application Number
- CN202510795556.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-13
- Publication Date
- 2025-09-16
AI Technical Summary
Existing auxiliary diagnosis technologies for diseases have difficulty in accurately identifying subjective and objective symptoms. A single algorithm cannot fully explore the potential correlations between symptoms, leading to misdiagnosis or missed diagnosis, especially when facing complex diseases, where diagnostic accuracy and reliability are insufficient.
By classifying the symptoms into explicit and implicit features, combining statistical weighting methods, XGBoost algorithm and feature matching, three weight scores are calculated and weighted fusion is used to generate diagnostic results, and knowledge graphs and machine learning methods are used to comprehensively evaluate the symptoms.
It improves the accuracy and reliability of auxiliary diagnosis of diseases, can clearly distinguish objective symptoms from subjective symptoms, avoid interference from subjective factors, and provide accurate diagnostic support.
Smart Images

Figure CN120656694A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent diagnosis technology, and more specifically, to a disease-assisted diagnosis method and related equipment. Background Art
[0002] In the field of medical diagnosis, rapid and accurate diagnosis of diseases is crucial for patient treatment and recovery. With the development of medical information technology, the traditional method of disease diagnosis based on physician experience is no longer able to meet the growing medical needs. Therefore, the development of efficient and accurate auxiliary diagnosis methods has become necessary.
[0003] Currently, existing assisted diagnosis technologies for conditions primarily utilize two approaches. One involves simply matching user-entered symptoms against a pre-defined symptom knowledge base. For example, in some medical consultation apps, users can enter symptoms such as cough and fever, and the system will directly retrieve relevant symptom information from the knowledge base for feedback. This approach has serious flaws. Because it fails to differentiate between symptom characteristics, it struggles to accurately distinguish between subjective and objective symptoms. For example, a patient's self-report of "fatigue" is a subjective symptom requiring medical expertise, but the system may simply treat it as the same as an objective symptom. This results in a diagnosis susceptible to subjective influences and an inaccurate reflection of the true condition. The other approach involves relying solely on a single algorithm for symptom prediction. The limitations of a single algorithm prevent the diagnostic process from fully exploring potential connections between symptoms, making it difficult to comprehensively and accurately assess complex conditions. For example, in patients experiencing multiple atypical symptoms, a single algorithm may be unable to comprehensively analyze the connections between symptoms, leading to misdiagnosis or missed diagnoses, significantly reducing the accuracy and reliability of the diagnosis.
[0004] Based on this, the present application provides a disease-assisted diagnosis solution to circumvent the defects of the existing technology and improve the reliability and effectiveness of disease-assisted diagnosis. Summary of the Invention
[0005] The present application provides a disease-assisted diagnosis method and related equipment, and provides a method for dividing symptoms into explicit and implicit characteristics, calculating different weight scores through statistical weighting method, XGBoost algorithm and feature matching, and weighted fusion to generate diagnosis results, thereby avoiding interference from subjective factors, exploring potential correlations between symptoms and improving the comprehensiveness and accuracy of diagnosis.
[0006] A disease-assisted diagnosis method, comprising:
[0007] Classify the symptom set input by the user into explicit features and implicit features. The explicit features are objective symptom features that can be identified without professional medical knowledge, and the implicit features are subjective symptom features that require professional medical knowledge to determine.
[0008] Calculating a first weight score of the disease using a statistical weighting method based on the classified latent features and the preset knowledge graph;
[0009] Based on the classified dominant features and recessive features, feature engineering is performed and input into the XGBoost algorithm to generate a second weighted score for disease prediction;
[0010] Calculating a third weighted score of the disease by feature matching based on the symptom set input by the user and the disease feature score table pre-stored in the knowledge graph;
[0011] The first weighted score, the second weighted score and the third weighted score are weighted and fused according to a preset ratio to obtain a comprehensive score, and a diagnosis result set is generated according to the sorting of the comprehensive score.
[0012] Optionally, the first weight score of the disease is calculated by a statistical weighting method based on the classified latent features and a preset knowledge graph, including:
[0013] Calling the symptom feature association library established by the preset knowledge graph, matching the classified latent features with the symptom feature association library, and assigning corresponding weight values to the matching symptoms;
[0014] Calculating the remaining weight values of the unmatched symptoms, and evenly distributing the remaining weights to the unmatched symptoms;
[0015] The weight values of the matching symptoms and the unmatched symptoms are accumulated to generate a first weight score of the disease.
[0016] Optionally, the remaining weight value is calculated as follows:
[0017]
[0018] The calculation formula of the first weight score is:
[0019]
[0020] in, is the remaining weight value, is the total value of the preset weight, The weight value corresponding to the i-th matching symptom assignment is k, which is the total number of matching symptoms. is the first weight score, The jth unmatched symptom is assigned the corresponding weight value, and m is the total number of unmatched symptoms.
[0021] Optionally, the classified dominant features and recessive features are processed by feature engineering and input into an XGBoost algorithm to generate a second weighted score for disease prediction, including:
[0022] Discretizing and splitting the multi-valued symptom features in the dominant features and the recessive features to generate atomic-level symptom items;
[0023] One-hot encoding is used to convert the single-value symptom features in the dominant features and the recessive features, and each of the atomic-level symptom items obtained by splitting the multi-value symptom features into a binary dominant feature vector and a binary recessive feature vector;
[0024] Integrating the binary dominant feature vector and the binary recessive feature vector to form a training matrix;
[0025] The training matrix is input into the XGBoost algorithm to predict the disease probability, and the disease probability distribution is output as the second weight score.
[0026] Optionally, the process of using the XGBoost algorithm to predict disease probability based on the training matrix includes:
[0027] Processing the training matrix through a gradient boosting decision tree architecture to form a training matrix decision tree;
[0028] A weighted quantile splitting method is used to optimize the node splitting process of the training matrix decision tree, and a regularization objective function is combined to control overfitting;
[0029] The calculation results are converted by the Softmax function to generate the disease probability distribution.
[0030] Optionally, based on the symptom set input by the user and the pre-stored symptom feature score table in the knowledge graph, a third weighted score of the symptom is calculated by feature matching, including:
[0031] Traversing the pre-stored disease feature score table in the knowledge graph, retrieving feature items that match the symptom set input by the user, and extracting scores corresponding to the feature items, wherein the pre-stored disease feature score table in the knowledge graph stores a mapping relationship between symptoms, feature items, and scores;
[0032] The sum of the scores corresponding to the feature items is aggregated and matched according to the symptoms to generate a third weighted score.
[0033] Optionally, the calculation formula for the comprehensive score is:
[0034]
[0035] in, is the first weight score, is the second weight score, is the third weight score, 、 、 is the preset weighted proportional coefficient.
[0036] A disease auxiliary diagnosis device, comprising:
[0037] A feature classification module is used to classify the symptom set input by the user into explicit features and implicit features. The explicit features are objective symptom features that can be identified without professional medical knowledge, and the implicit features are subjective symptom features that require professional medical knowledge to determine;
[0038] A first weight module, configured to calculate a first weight score of the disease by a statistical weight method based on the classified latent features and a preset knowledge graph;
[0039] A second weight module is used to generate a second weight score for disease prediction based on the classified dominant features and recessive features through feature engineering processing and input into an XGBoost algorithm;
[0040] A third weight module is configured to calculate a third weight score of the disease by feature matching based on the symptom set input by the user and the disease feature score table pre-stored in the knowledge graph;
[0041] The comprehensive diagnosis module is used to weight and fuse the first weighted score, the second weighted score and the third weighted score according to a preset ratio to obtain a comprehensive score, and to generate a diagnosis result set based on the sorting of the comprehensive score.
[0042] A disease auxiliary diagnosis device, comprising a memory and a processor;
[0043] The memory is used to store programs;
[0044] The processor is used to execute the program to implement each step of the disease auxiliary diagnosis method as described in any one of the above items.
[0045] A readable storage medium stores a computer program thereon, wherein when the computer program is executed by a processor, each step of the disease auxiliary diagnosis method as described above is implemented.
[0046] It can be seen from the above technical solutions that the embodiment of the present application provides a method for auxiliary diagnosis of symptoms and related equipment, which first classifies the symptom set input by the user into explicit features and implicit features, and then calculates the first weight score of the symptom based on the classified implicit features and the preset knowledge graph through the statistical weight method. This method uses the correlation between the symptom and the implicit features in the knowledge graph, combined with statistical principles, to quantify the degree of influence of the implicit features on the judgment of the symptom. Then, based on the explicit features and implicit features after classification, the second weight score of the symptom prediction is generated through feature engineering and input into the XGBoost algorithm. Feature engineering can extract and optimize symptom features. The XGBoost algorithm, with its powerful nonlinear fitting ability, digs out the complex potential associations between symptoms. Based on the symptom set input by the user and the pre-stored symptom feature score table in the knowledge graph, the third weight score of the symptom is calculated by feature matching, so as to evaluate the symptom from the perspective of knowledge reserve. Finally, the first weight score, the second weight score and the third weight score are weighted and fused according to the preset ratio to obtain a comprehensive score, and a diagnosis result set is generated according to the ranking of the comprehensive score.
[0047] This solution can clearly distinguish objective symptoms from subjective symptoms by classifying and dividing explicit and implicit features. When dealing with subjective symptoms, it uses professional knowledge maps and statistical methods to avoid excessive interference of subjective factors on the diagnosis results, making the diagnosis more objective and scientific. Combining statistical weighting methods, feature engineering and XGBoost algorithms, as well as feature matching calculations and other methods, it fully explores the potential correlation between symptoms from different angles and levels, conducts comprehensive evaluations from multiple dimensions, and effectively improves the accuracy of diagnosis. The weight scores obtained by the three calculation methods are weighted and fused, integrating the advantages of different calculation methods, making up for the shortcomings of a single method, making the diagnosis results more comprehensive and reliable, greatly improving the reliability and effectiveness of auxiliary diagnosis of diseases, and providing strong support for accurate diagnosis and timely treatment of patients. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without any creative work.
[0049] Figure 1 This is a flow chart of a disease-assisted diagnosis method disclosed in an embodiment of the present application;
[0050] Figure 2 A schematic diagram of a disease-assisted diagnosis method disclosed in an embodiment of the present application;
[0051] Figure 3 A schematic diagram of a disease auxiliary diagnosis device disclosed in an embodiment of the present application;
[0052] Figure 4 This is a hardware structure block diagram of a disease auxiliary diagnosis device disclosed in an embodiment of the present application. DETAILED DESCRIPTION
[0053] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0054] The present application can be used in a variety of general or special computing device environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multi-processor devices, and distributed computing environments including any of the above devices or devices.
[0055] Next, we will introduce the application scheme. This application proposes the following technical scheme, please see below for details.
[0056] Figure 1 This is a flow chart of a disease-assisted diagnosis method disclosed in an embodiment of the present application.
[0057] Figure 2 This is a schematic diagram of a disease-assisted diagnosis method disclosed in an embodiment of the present application.
[0058] like Figure 1 and Figure 2 As shown, the method may include:
[0059] Step S1: classify the symptom set input by the user into explicit features and implicit features.
[0060] Specifically, the user-entered symptom set is classified into explicit and implicit features. Explicit features are objective symptom characteristics that can be identified without specialized medical knowledge, such as morbidity, mortality, duration of illness, and the presence of fever, which can be determined through observation or simple measurement. Implicit features are subjective symptom characteristics that require specialized medical knowledge to determine, such as motor neurological signs (depression, motor incoordination, etc.) and signs of reproductive dysfunction, which require professional analysis and summary. This classification achieves initial structured processing of symptom data, laying the foundation for subsequent differentiated analysis.
[0061] Step S2: Calculate a first weight score of the disease using a statistical weighting method based on the classified latent features and the preset knowledge graph.
[0062] Specifically, based on the classified latent features and the preset knowledge graph, the statistical weight method is used to calculate the first weight score of the disease. The specific process is: first, according to the preset experience data in the knowledge graph, the weight value is initialized for each latent symptom. For example, the sum of the weights of all latent symptoms can be set to 70% of the total weight. If the symptom entered by the user matches a certain latent symptom, it is assigned the corresponding preset weight value; if it does not match, the weight is temporarily assigned to 0. Then, the remaining weight value is calculated (the total weight value minus the sum of the weights of the matched symptoms), and the remaining weight is evenly distributed according to the number of unmatched symptoms. Finally, by accumulating the weights of the matched symptoms and the remaining weights after allocation, the first weight score based on statistics and knowledge graph experience is obtained.
[0063] The first weight score is based on the classified latent features and the preset knowledge graph, and is calculated using the statistical weight method. It is an analysis of the degree of correlation between subjective symptom features and symptoms that require professional medical knowledge to judge. It focuses on exploring the influence of latent features under the preset experience data in the knowledge graph, initializing the latent symptom weights and assigning weights according to the matching situation. It is centered on making disease diagnosis based on professional medical knowledge, and quantifies the potential correlation of subjective symptoms through statistical methods to enhance the dependence and logic of diagnosis on professional experience.
[0064] Step S3: Based on the classified dominant features and recessive features, feature engineering is performed and input into the XGBoost algorithm to generate a second weighted score for disease prediction.
[0065] Specifically, feature engineering is performed on the classified explicit and implicit features. This includes: First, data cleaning is performed on the symptom columns of multi-valued features (e.g., "motor neurological signs" in implicit features contain multiple specific manifestations), splitting composite features into independent single feature values for subsequent processing. Then, using one-hot encoding, the categorical data is converted into a binary vector representation. For example, non-numeric features such as "fever" and "type of physical signs" are converted into a numeric format that can be processed by machine learning algorithms. After encoding, the original symptom data is integrated with the encoded feature data to form a complete feature dataset. Finally, this dataset is input into the XGBoost algorithm model for training and prediction. The XGBoost algorithm uses mechanisms such as weighted quantile splitting to accelerate tree node splitting, handle sparse data, and introduce regularization terms to prevent overfitting. It learns the complex relationships between features and generates a second weighted score based on machine learning.
[0066] The second weighted score is based on the explicit and implicit features after classification, and is generated by inputting into the XGBoost algorithm after feature engineering processing. It is an analysis of the potential patterns of symptom data and the complex nonlinear associations between features. It focuses on using machine learning algorithms to automatically learn the impact of feature combinations on symptoms from data. Through feature engineering processing such as data cleaning and One-Hot encoding and the advantages of the XGBoost algorithm, it embodies data-driven intelligent analysis capabilities and supplements data perspectives to improve adaptability and accuracy to complex diseases.
[0067] Step S4: Based on the symptom set input by the user and the pre-stored disease feature score table in the knowledge graph, calculate the third weight score of the disease through feature matching.
[0068] Specifically, the third weighted score of the symptom is calculated through feature matching based on the user-entered symptom set and the pre-stored symptom feature score table in the knowledge graph. The knowledge graph pre-stores preset scores for different symptom characteristics (such as morbidity, mortality, course of disease, specific physical manifestations, etc.), which are accumulated from medical experience and statistical data.
[0069] The specific matching process is as follows: First, the system traverses the pre-stored symptom feature score table in the knowledge graph. This table stores the mapping relationship between symptoms, feature items, and scores (for example, symptom A corresponds to "morbidity rate <10%" with a score of 5, "fever - yes" with a score of 10, etc.). During the traversal process, the system searches for feature items that match the user's input symptom set one by one. For example, if the user enters "morbidity rate less than 10%" or "fever", the system will match the feature items in the score table such as "morbidity rate <10%" and "fever - yes" and extract their corresponding preset scores.
[0070] After matching feature items, the system aggregates the scores of the matched feature items by symptom, adding up the scores of all matching feature items for the same symptom to obtain the symptom's third weighted score. For example, if symptom A matches three feature items with scores of 5, 10, and 15, its third weighted score is 30; if symptom B matches two feature items with scores of 8 and 12, its third weighted score is 20. This process enables a direct mapping of user symptoms with the medical experience solidified in the knowledge graph, converting historical statistical data and expert experience in the medical field into quantifiable diagnostic scores, providing a direct basis for symptom sorting based on knowledge rules.
[0071] Based on the symptom set input by the user and the pre-stored symptom feature score table of the knowledge graph, calculating the third weight score of the symptom by feature matching may specifically include:
[0072] ① Traverse the pre-stored disease feature score table in the knowledge graph, retrieve the feature items that match the symptom set input by the user, and extract the scores corresponding to the feature items. The pre-stored disease feature score table in the knowledge graph stores the mapping relationship between symptoms, feature items, and scores;
[0073] ② Aggregate and match the sum of the scores corresponding to the feature items according to the symptoms to generate a third weighted score.
[0074] The third weighted score is based on the user-input symptom set and the pre-stored disease feature score table in the knowledge graph. It is calculated through feature matching and is a direct matching analysis of symptoms and the solidified medical experience features in the knowledge graph. It focuses on the disease feature scoring system that relies on historical accumulation, and compares the symptoms with the features in the score table one by one to accumulate scores, reflecting the direct application of knowledge in the medical field, ensuring that the diagnosis conforms to known medical laws, and enhancing reliability and interpretability.
[0075] Step S5: weighting and fusing the first weighted score, the second weighted score, and the third weighted score according to a preset ratio to obtain a comprehensive score, and generating a set of diagnosis results according to the sorting of the comprehensive score.
[0076] Specifically, the three basic data points used for the fusion calculation are identified: the first, second, and third weighted scores obtained in the previous steps. Next, these three weighted scores are fused according to a pre-set weighting ratio. Finally, the possible symptoms are ranked based on their combined scores, generating a set of diagnostic results. This is then used to present a ranking of the most likely symptoms for the user's input symptoms.
[0077] The calculation formula for the comprehensive score is:
[0078]
[0079] in, is the first weight score, is the second weight score, is the third weight score, 、 、 is the preset weighted proportional coefficient.
[0080] like Figure 2As shown, users enter symptom information through user terminals such as mobile phone APP or desktop Windows software. The system first automatically divides the input symptoms into two categories: explicit features (objective symptoms that can be identified without professional medical knowledge, such as "fever of 38.5℃") and implicit features (subjective symptoms that require professional medical knowledge to judge, such as "motor nerve incoordination"). After a user submits a symptom, the system simultaneously invokes three weighting methods to calculate the symptom association weights in parallel. The statistical weighting method, which accounts for 30%, matches implicit features based on the symptom feature association library in the pre-set knowledge graph, assigns preset weights, calculates and distributes the remaining weights of unmatched symptoms, and then accumulates these weights to generate a statistical weighted score. The machine learning weighting method, which accounts for 30%, first discretely splits the multi-valued symptoms in both explicit and implicit features into atomic symptom items. These are then converted into binary feature vectors using One-Hot encoding. This integrated training matrix is then input into the XGBoost algorithm. A gradient boosted decision tree is used to build the model, followed by weighted quantile segmentation to optimize node splitting, and a regularized objective function is used to prevent overfitting. The machine learning weighted score is then converted using the Softmax function to output the machine learning weighted score. The knowledge graph weighting method, which accounts for 40%, relies on the pre-stored symptom feature score table in the knowledge graph to traverse and retrieve matching user symptom feature items, extract scores, and aggregate them into a knowledge graph weighted score based on the symptom. Finally, the system weights the three weighted scores in a pre-set ratio of 30% for statistics, 30% for machine learning, and 40% for knowledge graph to calculate a comprehensive symptom score. The system then selects the top 10 diagnoses based on pre-set filter values as the diagnosis result set.
[0081] It can be seen from the above technical solutions that the embodiment of the present application provides a method for auxiliary diagnosis of symptoms and related equipment, which first classifies the symptom set input by the user into explicit features and implicit features, and then calculates the first weight score of the symptom based on the classified implicit features and the preset knowledge graph through the statistical weight method. This method uses the correlation between the symptom and the implicit features in the knowledge graph, combined with statistical principles, to quantify the degree of influence of the implicit features on the judgment of the symptom. Then, based on the explicit features and implicit features after classification, the second weight score of the symptom prediction is generated through feature engineering and input into the XGBoost algorithm. Feature engineering can extract and optimize symptom features. The XGBoost algorithm, with its powerful nonlinear fitting ability, digs out the complex potential associations between symptoms. Based on the symptom set input by the user and the pre-stored symptom feature score table in the knowledge graph, the third weight score of the symptom is calculated by feature matching, so as to evaluate the symptom from the perspective of knowledge reserve. Finally, the first weight score, the second weight score and the third weight score are weighted and fused according to the preset ratio to obtain a comprehensive score, and a diagnosis result set is generated according to the ranking of the comprehensive score.
[0082] This solution can clearly distinguish objective symptoms from subjective symptoms by classifying and dividing explicit and implicit features. When dealing with subjective symptoms, it uses professional knowledge maps and statistical methods to avoid excessive interference of subjective factors on the diagnosis results, making the diagnosis more objective and scientific. Combining statistical weighting methods, feature engineering and XGBoost algorithms, as well as feature matching calculations and other methods, it fully explores the potential correlation between symptoms from different angles and levels, conducts comprehensive evaluations from multiple dimensions, and effectively improves the accuracy of diagnosis. The weight scores obtained by the three calculation methods are weighted and fused, integrating the advantages of different calculation methods, making up for the shortcomings of a single method, making the diagnosis results more comprehensive and reliable, greatly improving the reliability and effectiveness of auxiliary diagnosis of diseases, and providing strong support for accurate diagnosis and timely treatment of patients.
[0083] In some embodiments of the present application, the process of calculating the first weight score of the disease by a statistical weighting method based on the classified latent features and the preset knowledge graph in step S2 is introduced, which may specifically include:
[0084] Step S21: calling the symptom feature association library established by the preset knowledge graph, matching the classified latent features with the symptom feature association library, and assigning corresponding weight values to the matching symptoms;
[0085] Step S22: Calculate the remaining weight values of the unmatched symptoms, and evenly distribute the remaining weights to the unmatched symptoms;
[0086] Step S23: Accumulate the weight values of the matching symptoms and the unmatched symptoms to generate a first weight score for the disease.
[0087] Specifically, the process of calculating the first weighted score for a symptom begins with a symptom feature association library constructed using a pre-set knowledge graph. This library pre-stores the association rules and weight settings for various symptoms and corresponding features. The previously classified latent features (symptoms requiring professional medical knowledge) are then matched one by one with the feature entries in the association library. If a symptom in the latent feature has a corresponding entry in the association library, the matching symptom is assigned a corresponding weight value according to the pre-set rules of the association library.
[0088] Next, the sum of the weights assigned to all matching symptoms in step S21 is subtracted from the preset total weight to obtain the remaining weight of the unmatched symptoms. This remaining weight is then evenly divided according to the number of unmatched symptoms, so that each unmatched symptom receives an evenly distributed weight.
[0089] The weight values assigned to the matching symptoms in step S21 and the weight values obtained by averaging the unmatched symptoms in step S22 are added together to generate a first weight score for the corresponding disease.
[0090] The remaining weight value calculation formula is:
[0091]
[0092] The calculation formula of the first weight score is:
[0093]
[0094] in, is the remaining weight value, is the total value of the preset weight, The weight value corresponding to the i-th matching symptom assignment is k, which is the total number of matching symptoms. is the first weight score, The jth unmatched symptom is assigned the corresponding weight value, and m is the total number of unmatched symptoms.
[0095] In some embodiments of the present application, the process of generating a second weighted score for disease prediction based on the classified dominant features and recessive features through feature engineering and inputting the feature into the XGBoost algorithm is introduced in step S3, which may specifically include:
[0096] Step S31: Discretize and split the multi-valued symptom features in the explicit features and the implicit features to generate atomic-level symptom items.
[0097] Specifically, we first process the multi-valued symptom features in explicit and implicit features. Multi-valued symptom features refer to features that contain multiple parallel manifestations under the same symptom dimension. For example, "motor neurological signs" in implicit features may cover multiple specific manifestations such as "mental depression / anorexia", "incoordination of movement / paddling of limbs", "convulsions / spasms", etc. The purpose of discretization is to decompose such composite features into independent atomic-level symptom items, each of which only describes a single symptom manifestation (such as "mental depression / anorexia" as an independent item). This process is achieved through text parsing or rule matching, such as splitting according to delimiters (such as " / ", ",") or semantic boundaries in the feature description to ensure that each split symptom item is unique and clear, providing standardized data units for subsequent feature encoding.
[0098] Step S32: One-Hot encoding is used to convert the single-value symptom features in the dominant features and the recessive features, as well as the atomic-level symptom items obtained by splitting the multi-value symptom features, into binary dominant feature vectors and binary recessive feature vectors.
[0099] Specifically, after the split is completed, all symptom items in the dominant and recessive features (including single-valued symptom features and atomic-level symptom items) are one-hot encoded. A single-valued symptom feature is a feature that only has a single manifestation, such as "yes" or "no" in "fever". One-hot encoding is implemented in the following way:
[0100] For each independent symptom item (either single-valued or atomic level), create a corresponding binary feature dimension;
[0101] If a symptom item is included in the sample, the dimension is marked as "1", otherwise it is marked as "0".
[0102] For example, the explicit feature "fever - yes" corresponds to one dimension and is coded as "1," while "fever - no" corresponds to another dimension and is coded as "1." The implicit feature "depression / anorexia" dimension, after being split, is coded as "1" if present in the sample and "0" otherwise. This step converts non-numeric symptom features into binary vectors that can be processed by machine learning algorithms. The explicit and implicit feature vectors correspond to the numerical representations of objectively observable symptoms and subjective professional symptoms, respectively.
[0103] Step S33: Integrate the binary dominant feature vector and the binary recessive feature vector to form a training matrix.
[0104] Specifically, the binary explicit feature vectors and binary implicit feature vectors that have been One-Hot encoded are horizontally spliced to form a complete training matrix. Each row of the training matrix represents a sample (i.e., the set of symptoms input by the user), and each column represents an independent symptom feature dimension (encoded single-value or atomic-level symptom item). For example, a row of data may contain binary values of multiple dimensions such as "Is fever - yes (1)", "Incidence rate <10% (1)", "Depression / anorexia (1)", etc., forming a high-dimensional feature vector. The integration process must ensure that the dimensional order of different feature types (explicit and implicit) is consistent, and that the samples and feature dimensions are correctly aligned to provide structured input data for subsequent algorithm training.
[0105] Step S34: input the training matrix into the XGBoost algorithm to predict the disease probability, and output the disease probability distribution as the second weight score.
[0106] Specifically, the training matrix is input into the XGBoost algorithm to predict disease probability. The XGBoost algorithm implements model training and prediction through the following mechanisms:
[0107] Gradient boosting tree framework: By iteratively training multiple decision trees, each tree is constructed based on the prediction residuals of the previous tree, gradually improving the model's ability to fit the association between symptom characteristics and diseases;
[0108] Regularization term: Regularization parameters such as tree depth and number of leaf nodes are added to the objective function to prevent overfitting of the model and improve generalization ability;
[0109] Sparse data processing: Automatically identify zero values (unmatched symptom items) in feature vectors, optimize the calculation process, and reduce invalid operations.
[0110] After algorithm training is complete, it outputs a probability distribution value for each symptom given the input symptom feature vector. This probability value reflects the likelihood of each symptom set corresponding to the different symptoms. For example, the output might display "Probability of Symptom A is 45%," "Probability of Symptom B is 30%," and so on. These probabilities serve as the second weighted score, used to comprehensively assess and rank the symptom likelihoods. By combining feature engineering with the XGBoost algorithm, nonlinear association mining of symptom features is achieved, overcoming the limitations of traditional rule-based matching in complex symptom combinations.
[0111] When using the XGBoost algorithm to predict disease probabilities based on a training matrix, the training matrix is first processed using a gradient boosting decision tree architecture. Multiple decision trees are iteratively constructed, each trained based on the prediction residuals of the previous tree. This gradually forms a training matrix decision tree that accurately fits the relationship between symptom features and symptoms in the training matrix. A weighted quantile splitting method is then used to optimize the node splitting process within the training matrix decision tree. This method accelerates the efficiency of node splitting by weighting the quantiles of eigenvalues. Furthermore, a regularized objective function is incorporated, incorporating regularization terms such as tree depth and number of leaf nodes, to control model complexity, prevent overfitting, and improve the model's generalization to new data. Finally, the calculated results are transformed using the Softmax function, mapping the raw scores output by the decision tree to normalized probability values. This generates a probability distribution for each symptom, resulting in a second weighted score for the symptom prediction. This score reflects the likelihood that the user's input symptom set corresponds to different symptoms.
[0112] Therefore, the process of predicting the disease probability based on the training matrix by the XGBoost algorithm includes:
[0113] ① Processing the training matrix through a gradient boosting decision tree architecture to form a training matrix decision tree;
[0114] ② Using the weighted quantile splitting method to optimize the node splitting process of the training matrix decision tree, and combining it with the regularization objective function to control overfitting;
[0115] ③ The calculation results are converted through the Softmax function to generate the disease probability distribution.
[0116] The following describes a disease auxiliary diagnosis device provided in an embodiment of the present application. The disease auxiliary diagnosis device described below and the disease auxiliary diagnosis method described above can refer to each other.
[0117] See also Figure 3 , Figure 3 This is a schematic diagram of a disease auxiliary diagnosis device disclosed in an embodiment of the present application.
[0118] like Figure 3 As shown, the disease auxiliary diagnosis device may include:
[0119] The feature classification module 110 is used to classify the symptom set input by the user into explicit features and implicit features. The explicit features are objective symptom features that can be identified without professional medical knowledge, and the implicit features are subjective symptom features that require professional medical knowledge to determine.
[0120] A first weighting module 120 is configured to calculate a first weight score of the disease based on the classified latent features and a preset knowledge graph using a statistical weighting method;
[0121] A second weighting module 130 is configured to generate a second weighted score for disease prediction based on the classified dominant features and recessive features through feature engineering processing and input into an XGBoost algorithm;
[0122] A third weighting module 140 is configured to calculate a third weight score of the disease by feature matching based on the symptom set input by the user and the disease feature score table pre-stored in the knowledge graph;
[0123] The comprehensive diagnosis module 150 is used to weight and fuse the first weighted score, the second weighted score and the third weighted score according to a preset ratio to obtain a comprehensive score, and to generate a diagnosis result set based on the sorting of the comprehensive score.
[0124] It can be seen from the above technical solutions that the embodiment of the present application provides a method for auxiliary diagnosis of symptoms and related equipment, which first classifies the symptom set input by the user into explicit features and implicit features, and then calculates the first weight score of the symptom based on the classified implicit features and the preset knowledge graph through the statistical weight method. This method uses the correlation between the symptom and the implicit features in the knowledge graph, combined with statistical principles, to quantify the degree of influence of the implicit features on the judgment of the symptom. Then, based on the explicit features and implicit features after classification, the second weight score of the symptom prediction is generated through feature engineering and input into the XGBoost algorithm. Feature engineering can extract and optimize symptom features. The XGBoost algorithm, with its powerful nonlinear fitting ability, digs out the complex potential associations between symptoms. Based on the symptom set input by the user and the pre-stored symptom feature score table in the knowledge graph, the third weight score of the symptom is calculated by feature matching, so as to evaluate the symptom from the perspective of knowledge reserve. Finally, the first weight score, the second weight score and the third weight score are weighted and fused according to the preset ratio to obtain a comprehensive score, and a diagnosis result set is generated according to the ranking of the comprehensive score.
[0125] This solution can clearly distinguish objective symptoms from subjective symptoms by classifying and dividing explicit and implicit features. When dealing with subjective symptoms, it uses professional knowledge maps and statistical methods to avoid excessive interference of subjective factors on the diagnosis results, making the diagnosis more objective and scientific. Combining statistical weighting methods, feature engineering and XGBoost algorithms, as well as feature matching calculations and other methods, it fully explores the potential correlation between symptoms from different angles and levels, conducts comprehensive evaluations from multiple dimensions, and effectively improves the accuracy of diagnosis. The weight scores obtained by the three calculation methods are weighted and fused, integrating the advantages of different calculation methods, making up for the shortcomings of a single method, making the diagnosis results more comprehensive and reliable, greatly improving the reliability and effectiveness of auxiliary diagnosis of diseases, and providing strong support for accurate diagnosis and timely treatment of patients.
[0126] Optionally, the first weight score of the disease is calculated by a statistical weighting method based on the classified latent features and a preset knowledge graph, including:
[0127] Calling the symptom feature association library established by the preset knowledge graph, matching the classified latent features with the symptom feature association library, and assigning corresponding weight values to the matching symptoms;
[0128] Calculating the remaining weight values of the unmatched symptoms, and evenly distributing the remaining weights to the unmatched symptoms;
[0129] The weight values of the matching symptoms and the unmatched symptoms are accumulated to generate a first weight score of the disease.
[0130] Optionally, the remaining weight value is calculated as follows:
[0131]
[0132] The calculation formula of the first weight score is:
[0133]
[0134] in, is the remaining weight value, is the total value of the preset weight, The weight value corresponding to the i-th matching symptom assignment is k, which is the total number of matching symptoms. is the first weight score, The jth unmatched symptom is assigned the corresponding weight value, and m is the total number of unmatched symptoms.
[0135] Optionally, the classified dominant features and recessive features are processed by feature engineering and input into an XGBoost algorithm to generate a second weighted score for disease prediction, including:
[0136] Discretizing and splitting the multi-valued symptom features in the dominant features and the recessive features to generate atomic-level symptom items;
[0137] One-hot encoding is used to convert the single-value symptom features in the dominant features and the recessive features, and each of the atomic-level symptom items obtained by splitting the multi-value symptom features into a binary dominant feature vector and a binary recessive feature vector;
[0138] Integrating the binary dominant feature vector and the binary recessive feature vector to form a training matrix;
[0139] The training matrix is input into the XGBoost algorithm to predict the disease probability, and the disease probability distribution is output as the second weight score.
[0140] Optionally, the process of using the XGBoost algorithm to predict disease probability based on the training matrix includes:
[0141] Processing the training matrix through a gradient boosting decision tree architecture to form a training matrix decision tree;
[0142] A weighted quantile splitting method is used to optimize the node splitting process of the training matrix decision tree, and a regularization objective function is combined to control overfitting;
[0143] The calculation results are converted by the Softmax function to generate the disease probability distribution.
[0144] Optionally, based on the symptom set input by the user and the pre-stored symptom feature score table in the knowledge graph, a third weighted score of the symptom is calculated by feature matching, including:
[0145] Traversing the pre-stored disease feature score table in the knowledge graph, retrieving feature items that match the symptom set input by the user, and extracting scores corresponding to the feature items, wherein the pre-stored disease feature score table in the knowledge graph stores a mapping relationship between symptoms, feature items, and scores;
[0146] The sum of the scores corresponding to the feature items is aggregated and matched according to the symptoms to generate a third weighted score.
[0147] Optionally, the calculation formula for the comprehensive score is:
[0148]
[0149] in, is the first weight score, is the second weight score, is the third weight score, 、 、 is the preset weighted proportional coefficient.
[0150] The disease auxiliary diagnosis device provided in the embodiment of the present application can be applied to disease auxiliary diagnosis equipment. Figure 4 The hardware structure diagram of the disease auxiliary diagnosis device is shown. Figure 4 ,The hardware structure of the disease auxiliary diagnosis device may include: at least one processor 1, at least one communication interface 2, at least one memory 3 and at least one communication bus 4;
[0151] In the embodiment of the present application, the number of the processor 1, the communication interface 2, the memory 3, and the communication bus 4 is at least one, and the processor 1, the communication interface 2, and the memory 3 communicate with each other through the communication bus 4;
[0152] The processor 1 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention;
[0153] The memory 3 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory;
[0154] The memory stores a program, and the processor can call the program stored in the memory, wherein the program is used to:
[0155] Classify the symptom set input by the user into explicit features and implicit features. The explicit features are objective symptom features that can be identified without professional medical knowledge, and the implicit features are subjective symptom features that require professional medical knowledge to determine.
[0156] Calculating a first weight score of the disease using a statistical weighting method based on the classified latent features and the preset knowledge graph;
[0157] Based on the classified dominant features and recessive features, feature engineering is performed and input into the XGBoost algorithm to generate a second weighted score for disease prediction;
[0158] Calculating a third weighted score of the disease by feature matching based on the symptom set input by the user and the disease feature score table pre-stored in the knowledge graph;
[0159] The first weighted score, the second weighted score and the third weighted score are weighted and fused according to a preset ratio to obtain a comprehensive score, and a diagnosis result set is generated according to the sorting of the comprehensive score.
[0160] Optionally, the refined functions and extended functions of the program may refer to the above description.
[0161] The present application also provides a readable storage medium, which may store a program suitable for execution by a processor, wherein the program is used to:
[0162] Classify the symptom set input by the user into explicit features and implicit features. The explicit features are objective symptom features that can be identified without professional medical knowledge, and the implicit features are subjective symptom features that require professional medical knowledge to determine.
[0163] Calculating a first weight score of the disease using a statistical weighting method based on the classified latent features and the preset knowledge graph;
[0164] Based on the classified dominant features and recessive features, feature engineering is performed and input into the XGBoost algorithm to generate a second weighted score for disease prediction;
[0165] Calculating a third weighted score of the disease by feature matching based on the symptom set input by the user and the disease feature score table pre-stored in the knowledge graph;
[0166] The first weighted score, the second weighted score and the third weighted score are weighted and fused according to a preset ratio to obtain a comprehensive score, and a diagnosis result set is generated according to the sorting of the comprehensive score.
[0167] Optionally, the refined functions and extended functions of the program may refer to the above description.
[0168] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only 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 terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0169] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0170] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A disease-aided diagnosis method, characterized in that: include: Classify the symptom set input by the user into explicit features and implicit features. The explicit features are objective symptom features that can be identified without professional medical knowledge, and the implicit features are subjective symptom features that require professional medical knowledge to determine. Calculating a first weight score of the disease using a statistical weighting method based on the classified latent features and the preset knowledge graph; Based on the classified dominant features and recessive features, feature engineering is performed and input into the XGBoost algorithm to generate a second weighted score for disease prediction; Calculating a third weighted score of the disease by feature matching based on the symptom set input by the user and the disease feature score table pre-stored in the knowledge graph; The first weighted score, the second weighted score and the third weighted score are weighted and fused according to a preset ratio to obtain a comprehensive score, and a diagnosis result set is generated according to the sorting of the comprehensive score.
2. The method according to claim 1, characterized in that The first weight score of the disease is calculated based on the classified latent features and the preset knowledge graph by a statistical weight method, including: Calling the symptom feature association library established by the preset knowledge graph, matching the classified latent features with the symptom feature association library, and assigning corresponding weight values to the matching symptoms; Calculating the remaining weight values of the unmatched symptoms, and evenly distributing the remaining weights to the unmatched symptoms; The weight values of the matching symptoms and the unmatched symptoms are accumulated to generate a first weight score of the disease.
3. The method according to claim 2, characterized in that The remaining weight value calculation formula is: The calculation formula of the first weight score is: in, is the remaining weight value, is the total value of the preset weight, The weight value corresponding to the i-th matching symptom assignment is k, which is the total number of matching symptoms. is the first weight score, The jth unmatched symptom is assigned the corresponding weight value, and m is the total number of unmatched symptoms.
4. The method according to claim 1, wherein The dominant features and recessive features after classification are processed by feature engineering and input into the XGBoost algorithm to generate a second weighted score for disease prediction, including: Discretizing and splitting the multi-valued symptom features in the dominant features and the recessive features to generate atomic-level symptom items; One-hot encoding is used to convert the single-value symptom features in the dominant features and the recessive features, and each of the atomic-level symptom items obtained by splitting the multi-value symptom features into a binary dominant feature vector and a binary recessive feature vector; Integrating the binary dominant feature vector and the binary recessive feature vector to form a training matrix; The training matrix is input into the XGBoost algorithm to predict the disease probability, and the disease probability distribution is output as the second weight score.
5. The method according to claim 4, characterized in that The process of the XGBoost algorithm predicting the probability of a disease based on the training matrix includes: Processing the training matrix through a gradient boosting decision tree architecture to form a training matrix decision tree; A weighted quantile splitting method is used to optimize the node splitting process of the training matrix decision tree, and a regularization objective function is combined to control overfitting; The calculation results are converted by the Softmax function to generate the disease probability distribution.
6. The method according to claim 1, characterized in that Based on the symptom set input by the user and the pre-stored symptom feature score table in the knowledge graph, a third weighted score of the symptom is calculated by feature matching, including: Traversing the pre-stored disease feature score table in the knowledge graph, retrieving feature items that match the symptom set input by the user, and extracting scores corresponding to the feature items, wherein the pre-stored disease feature score table in the knowledge graph stores a mapping relationship between symptoms, feature items, and scores; The sum of the scores corresponding to the feature items is aggregated and matched according to the symptoms to generate a third weighted score.
7. The method according to claim 1, characterized in that The calculation formula for the comprehensive score is: in, is the first weight score, is the second weight score, is the third weight score, 、 、 is the preset weighted proportional coefficient.
8. A disease auxiliary diagnosis device, characterized in that: include: A feature classification module is used to classify the symptom set input by the user into explicit features and implicit features. The explicit features are objective symptom features that can be identified without professional medical knowledge, and the implicit features are subjective symptom features that require professional medical knowledge to determine; A first weight module, configured to calculate a first weight score of the disease by a statistical weight method based on the classified latent features and a preset knowledge graph; A second weight module is used to generate a second weight score for disease prediction based on the classified dominant features and recessive features through feature engineering processing and input into an XGBoost algorithm; A third weight module is configured to calculate a third weight score of the disease by feature matching based on the symptom set input by the user and the disease feature score table pre-stored in the knowledge graph; The comprehensive diagnosis module is used to weight and fuse the first weighted score, the second weighted score and the third weighted score according to a preset ratio to obtain a comprehensive score, and to generate a diagnosis result set based on the sorting of the comprehensive score.
9. A disease-aided diagnosis device, characterized in that: including memory and processor; The memory is used to store programs; The processor is configured to execute the program to implement each step of the disease-assisted diagnosis method according to any one of claims 1 to 7.
10. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the disease-assisted diagnosis method according to any one of claims 1 to 7 is implemented.