Diabetic complication prediction method and system based on traditional Chinese medicine treatment
By constructing a complication prediction model, using the medical data of previous patients to predict patients and adjusting traditional Chinese medicine prescriptions, the problem of predicting and controlling complications in patients with diabetes is solved, and effective control and prevention of the probability of complications occurring in traditional Chinese medicine is achieved. .
Patent Information
- Application Number
- CN202411553643.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-02
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-11-02
AI Technical Summary
The prior art lacks a prediction system for the treatment of complications in patients with diabetes, which leads to the possibility of complications when the Chinese medicine prescription is added and subtracted between different patients, and lacks effective prediction and control methods.
By obtaining medical data of previous patients, building a historical database and preprocessing, generating a training database, and building a complication prediction model, including a node graph generation layer, a first hidden layer and an output layer, using this model to treat the data of the patient. Predictions are made to adjust traditional Chinese medicine prescriptions to reduce the probability of complications.
Effectively predict the probability of complications in patients with diabetes, reduce the risk of complications through adjustment of traditional Chinese medicine prescriptions, and reduce the adverse effects of traditional Chinese medicine on patients.
Smart Images

Figure CN119446494A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data mining, and more specifically, to a method and system for predicting diabetes complications based on traditional Chinese medicine treatment. Background Art
[0002] Diabetes is an increasingly serious global disease. Long-term poor blood sugar regulation can lead to a variety of complications, such as cardiovascular disease, kidney disease, neuropathy, etc. The emergence of complications not only increases the pain of patients, but also increases the medical burden. Therefore, early prediction and effective treatment of diabetic complications are particularly important. In recent years, with the rapid development of information technology, big data analysis and artificial intelligence technology have been increasingly used in the medical field.
[0003] When using traditional Chinese medicine to treat patients with diabetes, when it is actually applied to different patients, the prescription needs to be added or subtracted according to the patient's actual physical condition. However, the traditional Chinese medicine after addition or subtraction may contain some ingredients that induce different complications in patients. However, there is currently no relevant prediction system for traditional Chinese medicine-induced complications. Therefore, it is necessary to build a system to predict complications for diabetic patients in order to control and prevent the probability of complications, thereby minimizing the impact of traditional Chinese medicine on patients. Summary of the invention
[0004] The purpose of the present invention is to provide a method and system for predicting diabetes complications based on traditional Chinese medicine treatment in order to solve the above problems.
[0005] The present invention provides a method for predicting diabetes complications based on traditional Chinese medicine treatment, comprising the following steps:
[0006] Step 100: Obtain medical data of past patients, and generate a historical database based on the medical data of past patients;
[0007] Medical data of past patients include: basic patient information, diabetes information, Chinese medicine prescription information, and complication data;
[0008] Step 200, preprocessing the historical database to generate a training database;
[0009] Step 300: construct a complication prediction model, train the complication prediction model using a training data set, and generate a trained complication prediction model;
[0010] Among them, the complication prediction model includes a node graph generation layer, a first hidden layer, and an output layer;
[0011] The node graph generation layer generates nodes and edges based on the training data set. One node represents one patient, and there are edges between each node.
[0012] The first hidden layer is used to fuse the information of nodes and edges to obtain global features;
[0013] The output layer is used to perform linear transformation on the global features to obtain the probability of the corresponding complications;
[0014] Step 400: Obtain basic patient information, diabetes symptom information, and Chinese medicine prescription information of the patient to be treated, input them into a complication prediction model after preprocessing, and output complication prediction data of the patient to be treated.
[0015] As a further optimization solution of the present invention, the historical database is generated based on the medical data of previous patients, specifically:
[0016] Integrate and process the medical data of previous patients, including:
[0017] Numerical data standardization: Perform Z-score standardization or Min-Max normalization on numerical data;
[0018] Mean / median filling: Use mean or median to fill missing numerical data;
[0019] Mode filling: Use mode filling for categorical data.
[0020] Unified date format: the unified date format is "YYYY-MM-DD";
[0021] Categorical data standardization: ensure that all categorical data are consistent;
[0022] Standard deviation method: Use the Z-score method to identify and remove data points that are above or below a set threshold;
[0023] Coding of Chinese medicine ingredients: converting Chinese medicine ingredients into unified codes;
[0024] Recording of ingredient additions and subtractions: ensuring that additions and subtractions are coded and associated with individual ingredients;
[0025] A historical database of past patients is constructed based on the integrated medical data of past patients.
[0026] As a further optimization scheme of the present invention, the historical database is preprocessed to generate a training database, which specifically includes the following processing steps:
[0027] Feature engineering is performed on patient basic information, diabetes symptom information, Chinese medicine prescription information, and complication data to generate patient basic information feature codes, diabetes symptom information feature codes, Chinese medicine ingredient feature codes, and complication feature codes.
[0028] As a further optimization scheme of the present invention, the historical database is preprocessed to generate a training database, which also includes the following processing steps:
[0029] Label construction is performed on complication data, and label construction includes the following steps:
[0030] Read patient data: Get a dataset containing patient complication information;
[0031] Check complication information: Determine whether complications exist based on specific fields;
[0032] Generate labels: Create corresponding label codes for each patient;
[0033] A training data set is constructed based on the patient basic information feature coding, diabetes disease information feature coding, Chinese medicine ingredient feature coding, complication feature coding generated by feature engineering, and label coding generated by label processing.
[0034] As a further optimization solution of the present invention, the node set is represented as: X = {x 1 ,x 2 ,x 3 ,...,x N}, where x i The node feature vector represents the i-th node. The node feature vector is composed of the patient basic information feature code generated by feature engineering, the diabetes disease information feature code, the Chinese medicine ingredient feature code, the complication feature code and the label code generated by label processing.
[0035] As a further optimization solution of the present invention, the calculation formula of the first hidden layer is:
[0036]
[0037] Where X represents the input feature matrix, represents the sum of the adjacency matrix and the identity matrix, express The degree matrix, W 1 represents the weight parameter, and σ represents the activation function.
[0038] As a further optimization scheme of the present invention, the calculation formula of the output layer is:
[0039] B=σ(W 2 G+d)
[0040] Among them, B represents the vector representation of the probability of the corresponding complication, W 2 represents the second weight parameter, d represents the bias parameter, and σ represents the activation function.
[0041] As a further optimization scheme of the present invention, the training process of the complication prediction model is as follows:
[0042] Define the loss function. The calculation formula of the loss function is:
[0043]
[0044] Where N is the number of samples in the training set, that is, the number of nodes mentioned above, and B i represents the probability of the corresponding complication occurring in the ith node output by the complication prediction model, B i ∈B, represents the true label of the corresponding complication occurring at the i-th node;
[0045] Use gradient descent to minimize the loss function and update the model parameters W 1 .
[0046] A diabetes complication prediction system based on traditional Chinese medicine treatment, which is used to execute the diabetes complication prediction method based on traditional Chinese medicine treatment as described above, comprising:
[0047] Data acquisition module, used to obtain medical data of past patients;
[0048] Medical data of past patients include: basic patient information, diabetes information, Chinese medicine prescription information, and complication data;
[0049] The data processing module generates a historical database based on the medical data of previous patients and generates a training database after preprocessing the historical database;
[0050] A risk prediction module is used to build a complication prediction model, train the complication prediction model through a training data set, and generate a trained complication prediction model;
[0051] Among them, the complication prediction model includes a node graph generation layer, a first hidden layer, and an output layer;
[0052] The node graph generation layer generates nodes and edges based on the training data set. One node represents one patient, and there are edges between each node.
[0053] The node set is represented as: X = {x 1 ,x 2 ,x 3 ,...,x N}, x i Represents the node feature vector of the i-th node, that is, the feature encoding of the i-th patient in the training data set;
[0054] The first hidden layer is used to fuse the information of nodes and edges to obtain global features;
[0055] The calculation formula for the first hidden layer is:
[0056]
[0057] Where X represents the input feature matrix, represents the sum of the adjacency matrix and the identity matrix, express The degree matrix, W 1 represents the weight parameter, σ represents the activation function;
[0058] The output layer is used to perform linear transformation on the global features to obtain the probability of the corresponding complications. The calculation formula of the output layer is:
[0059] B=σ(W 2 G+d)
[0060] Among them, B represents the vector representation of the probability of the corresponding complication, W 2 represents the second weight parameter, d represents the bias parameter, and σ represents the activation function;
[0061] Obtain the basic patient information, diabetes symptom information, and traditional Chinese medicine prescription information of the patient to be treated, input them into the complication prediction model after preprocessing, and output the complication prediction data of the patient to be treated.
[0062] A storage medium storing non-transitory computer-readable instructions, when the non-transitory computer-readable instructions are executed by a computer, can execute the steps in the above-mentioned method for predicting diabetes complications based on traditional Chinese medicine treatment
[0063] The beneficial effect of the present invention is that the present invention trains a complication prediction model based on the medical data of diabetic patients who have received traditional Chinese medicine treatment in the past, and can effectively perform correlation learning through the adjustment parameters of each traditional Chinese medicine prescription and the data of patient complications, thereby effectively understanding the hidden inducing factors of some traditional Chinese medicine ingredients on certain complications, and can effectively control and prevent the probability of complications in patients, thereby minimizing the impact of traditional Chinese medicine on patients. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 It is a flow chart of a method for predicting diabetes complications based on traditional Chinese medicine treatment of the present invention;
[0065] Figure 2 It is a module schematic diagram of a diabetes complication prediction system based on traditional Chinese medicine treatment of the present invention.
[0066] In the figure: 1. Data acquisition module; 2. Data processing module; 3. Risk prediction module. DETAILED DESCRIPTION
[0067] The subject matter described herein will now be discussed with reference to example embodiments. It should be understood that the discussion of these embodiments is only to enable those skilled in the art to better understand and implement the subject matter described herein. In addition, relative to some of the features described, for example, they may also be combined in other examples.
[0068] like Figure 1 As shown, a method for predicting diabetes complications based on traditional Chinese medicine treatment comprises the following steps:
[0069] Step 100: Obtain medical data of past patients, and generate a historical database based on the medical data of past patients;
[0070] Medical data of past patients include:
[0071] Basic information of the patient:
[0072] Patient ID: unique identifier;
[0073] Gender: Male / Female;
[0074] Age: patient age (e.g. 45);
[0075] Weight: weight (e.g. 75kg);
[0076] Height: height (e.g. 170cm);
[0077] BMI: body mass index (calculated);
[0078] Diabetes Information:
[0079] Diabetes type: type 1 / type 2 / gestational diabetes;
[0080] Course of illness: duration of illness (e.g. 5 years);
[0081] Blood sugar levels:
[0082] Fasting blood sugar (e.g. 6.5mmol / L);
[0083] Postprandial blood sugar (e.g. 9.0mmol / L);
[0084] HbA1c level: Glycated hemoglobin (e.g. 7.2%);
[0085] History of complications: if any, record the type of complications (e.g., retinopathy, nephropathy);
[0086] Chinese medicine prescription information:
[0087] Prescription ID: unique identifier;
[0088] Names of Chinese medicine: such as licorice, astragalus, salvia miltiorrhiza;
[0089] Dosage: the dosage of each Chinese medicine (e.g. 10g of licorice);
[0090] Addition and subtraction instructions: specific addition and subtraction content (e.g., add: wolfberry; subtract: dandelion);
[0091] Time of taking: For example, three times a day, after meals, etc.
[0092] Complication data;
[0093] Type of complication: such as hyperglycemia, hypoglycemia, diabetic ketoacidosis, and others (please specify the specific situation);
[0094] Date of complication occurrence: the specific date when the complication occurred (e.g., 2024-06-15);
[0095] Severity: Mild / Moderate / Severe;
[0096] Hospitalization status: whether hospitalization is required (yes / no);
[0097] Data such as:
[0098]
[0099]
[0100] Generate a historical database based on the medical data of past patients, specifically:
[0101] Standardization:
[0102] Normalization of numerical data: For numerical data (such as blood sugar levels, body weight, etc.), Z-score normalization or Min-Max normalization can be used to keep it within a certain range.
[0103] For example:
[0104] Fasting blood sugar (original value: 6.8mmol / L), after standardization becomes:
[0105] Fill in missing values:
[0106] Mean / Median Filling: For missing numerical data (such as age, weight), use the mean or median to fill.
[0107] For example:
[0108] If there is a missing value in weight (such as 75kg), it can be filled with the mean weight of other patients (such as 78kg).
[0109] Mode filling: For categorical data (such as gender), use mode filling.
[0110] For example:
[0111] If gender is missing and the mode is "male", fill it with "male".
[0112] Unified data format:
[0113] Unified date format: The unified date format is "YYYY-MM-DD".
[0114] For example:
[0115] Convert "06 / 15 / 2024" to "2024-06-15".
[0116] Categorical data standardization: Ensure that all categorical data are consistent.
[0117] For example:
[0118] "Type 1" and "Type 1 diabetes" in "Diabetes type" will be unified as "Type 1".
[0119] Remove outliers:
[0120] Standard Deviation Method: The Z-score method is used to identify and remove data points that are above or below a certain threshold (such as values exceeding 3 standard deviations).
[0121] For example:
[0122] If there is a value of 20% in the HbA1c data (the normal range is approximately 4% to 14%), this value will be considered an outlier and removed.
[0123] Standardized representation of Chinese herbal medicine ingredients:
[0124] Coding of Chinese medicine ingredients: Convert Chinese medicine ingredients into unified codes for easy analysis.
[0125] For example:
[0126] Licorice was coded as “ZH001” and Astragalus was coded as “ZH002”, while their dosages remained in numerical form.
[0127] Recording of ingredient additions and subtractions: Ensure that additions and subtractions are coded and associated with individual ingredients.
[0128] For example:
[0129] For “add: wolfberry, subtract: dandelion”, it can be recorded as “add: ZH003, subtract: ZH004”.
[0130] The data sorting process is summarized as follows:
[0131] Assume that the original data contains the following:
[0132] Patient ID age gender Fasting blood sugar Prescription ID Name of Chinese medicine 001 45 male 6.8 RX001 Licorice 002 NA female 7.5 RX002 Licorice 003 60 male 20.0 RX003 Astragalus 004 55 NA 8.0 RX004 Salvia miltiorrhiza 005 72 female 7.1 RX005 Wolfberry
[0133] After data sorting, the results are as follows:
[0134]
[0135]
[0136] This will build a historical database of past patients.
[0137] Step 200, preprocessing the historical database to generate a training database;
[0138] The specific processing steps include:
[0139] 1) Feature Engineering:
[0140] Basic information characteristics of patients:
[0141] Age: Used directly as a continuous variable.
[0142] Gender: Converted into multiple binary features using One-Hot Encoding.
[0143] Example: Patients with gender coded as "male" are [1,0] and female are [0,1].
[0144] BMI: Direct use, calculate range categories (eg normal, overweight, obese).
[0145] Example:
[0146] Normal: 18.5≤BMI<24.9;
[0147] Overweight: 25 ≤ BMI < 29.9;
[0148] Obesity: BMI ≥ 30;
[0149] Diabetes type: Use one-hot encoding.
[0150] Example: Type 1 diabetes is coded as [1,0,0], Type 2 diabetes is [0,1,0], and gestational diabetes is [0,0,1].
[0151] Disease course: Used directly as a continuous variable.
[0152] Characteristics of Chinese medicine ingredients:
[0153] Chinese herbal medicine ingredients: Extract each Chinese herbal medicine ingredient and use one-hot encoding.
[0154] Example:
[0155] Licorice: [1,0,0,0]
[0156] Astragalus: [0,1,0,0]
[0157] Salvia miltiorrhiza: [0,0,1,0]
[0158] Wolfberry: [0,0,0,1]
[0159] Addition and subtraction: Unify the component coding and record the addition and subtraction situations separately.
[0160] Example:
[0161] Addition: [1,0,1,...], Subtraction: [0,1,0,...].
[0162] History of medical history:
[0163] Complication History: Use one-hot encoding to represent historical complications.
[0164] Example:
[0165] Retinopathy: [1,0,0,0,0]
[0166] Kidney disease: [0,1,0,0,0]
[0167] No medical history: [0,0,0,0,0]
[0168] Other diseases: such as high blood pressure or heart disease, are one-hot encoded.
[0169] Example:
[0170] Hypertension: [0,0,1,0,0]
[0171] Heart disease: [0,0,0,1,0];
[0172] 2) Label processing:
[0173] First, the complications that need to be considered need to be identified.
[0174] For example, the following comorbidity labels could be defined: retinopathy, nephropathy, heart disease, neuropathy;
[0175] For each complication, it is classified as "present" (1) or "not present" (0). The labels can be generated based on data from the patient's historical medical history.
[0176] Specific steps for label construction:
[0177] Read patient data: obtain a data set containing patient complication information, that is, the historical data set constructed in step 100.
[0178] Check complication information: Based on the specific fields, determine whether a complication exists.
[0179] Generate labels: Create corresponding labels for each patient.
[0180] Example data:
[0181] Assume the original data is as follows:
[0182] Patient ID Retinopathy Kidney disease heart disease Neuropathy 001 1 0 0 0 002 0 1 0 0 003 0 0 1 0 004 1 1 0 0 005 0 0 0 1
[0183] Based on the complication information, the binary classification labels are generated as follows:
[0184] Patient ID Retinopathy Tags Kidney disease label Heart disease label Neuropathy Tags 001 1 0 0 0 002 0 1 0 0 003 0 0 1 0 004 1 1 0 0 005 0 0 0 1
[0185] After integration, the final dataset can be shown as follows:
[0186]
[0187]
[0188] Combine the feature encoding data generated by feature engineering and the feature encoding data processed by labels to build a training data set;
[0189] Step 300: construct a complication prediction model, train the complication prediction model using a training data set, and generate a trained complication prediction model;
[0190] Among them, the complication prediction model includes a node graph generation layer, a first hidden layer, and an output layer;
[0191] The node graph generation layer generates nodes and edges based on the training data set. One node represents one patient, and there are edges between each node.
[0192] The node set is represented as: X = {x 1 ,x 2 ,x 3 ,...,x N}, x i Represents the node feature vector of the i-th node, that is, the feature encoding of the i-th patient in the training data set;
[0193] The first hidden layer is used to fuse the information of nodes and edges to obtain global features;
[0194] The calculation formula for the first hidden layer is:
[0195]
[0196] Where X represents the input feature matrix, represents the sum of the adjacency matrix and the identity matrix, express The degree matrix, W 1 represents the weight parameter, and σ represents the activation function (such as the ReLU function).
[0197] The output layer is used to perform linear transformation on the global features to obtain the probability of the corresponding complications. The calculation formula of the output layer is:
[0198] B=σ(W 2 G+d)
[0199] Among them, B represents the vector representation of the probability of the corresponding complication, W 2 represents the second weight parameter, d represents the bias parameter, and σ represents the activation function (such as the sigmoid function).
[0200] In one embodiment of the present invention, the training process of the complication prediction model is as follows:
[0201] Define the loss function. The calculation formula of the loss function is:
[0202]
[0203] Where N is the number of samples in the training set, that is, the number of nodes mentioned above, and B i represents the probability of the corresponding complication occurring in the ith node output by the complication prediction model, B i ∈B, represents the true label of the corresponding complication occurring at the i-th node;
[0204] Use gradient descent to minimize the loss function and update the model parameters W 1 ;
[0205] Finally, 20% of the training set is used as the test set to evaluate the model performance. Common evaluation indicators can be used, including accuracy, precision, recall, and F1 score.
[0206] Step 400: Obtain basic patient information, diabetes symptom information, and Chinese medicine prescription information of the patient to be treated, input them into a complication prediction model after preprocessing, and output complication prediction data of the patient to be treated.
[0207] In one embodiment of the present invention, based on the complication prediction data output in step 400, if the probability of causing a certain complication is too high, the Chinese medicine prescription can be adjusted by medical personnel based on the relevant medical knowledge of the medical personnel, and the adjusted Chinese medicine prescription is re-input into the complication prediction model. Multiple Chinese medicine prescription information can also be generated and all are input into the complication prediction model for processing. The Chinese medicine prescription with the lowest probability of complication is selected as the treatment plan. This can not only effectively and accurately predict the complications of diabetic patients, but also achieve the control and prevention of the probability of complication, thereby minimizing the impact of Chinese medicine on patients.
[0208] In one embodiment of the present invention, an optimization model is used to optimize the hyperparameters of the complication prediction model, specifically:
[0209] 1) Define the objective function:
[0210] f(θ) = Accuracy(θ);
[0211] Among them, f(θ): objective function, which represents the accuracy of the model on the validation set when the hyperparameter θ is given;
[0212] θ: hyperparameter vector, containing the hyperparameter values that need to be tuned;
[0213] 2) Select hyperparameter space:
[0214] Learning rate: η∈[0.0001,0.1];
[0215] Hidden layer dimension: d∈{16,32,64,128};
[0216] Regularization parameter λ∈[0,0.1];
[0217] The number of graph convolution layers L∈{1,2,3};
[0218] 3) Build an optimization model:
[0219] The calculation formula of the optimization model is:
[0220]
[0221] Among them, k(θ,θ′): kernel function, which represents the similarity between hyperparameter points θ and θ′;
[0222] l: length scale parameter, which controls the range of similarity in the hyperparameter space. A smaller l means that the similarity decays rapidly, and a larger l means that the similarity decays slowly.
[0223] ||θ-θ′||: Euclidean distance between hyperparameter vectors, reflecting the difference between two hyperparameter points;
[0224] 4) Select the next hyperparameter point based on the expected improvement criterion of the optimization model:
[0225] The calculation formula of the expected improvement criterion is:
[0226]
[0227] Where, EI(θ): expected improvement, which represents the expected improvement at the hyperparameter point θ;
[0228] f(θ + ): The current optimal objective function value, that is, the best performance obtained among the evaluated hyperparameters;
[0229] μ(θ): The predicted mean of the surrogate model at the hyperparameter point θ, which represents an estimate of the objective function;
[0230] σ(θ): The predicted standard deviation of the surrogate model at the hyperparameter point θ, which represents a measure of the uncertainty of the objective function;
[0231] Φ: Cumulative distribution function of standard normal distribution, which indicates the probability that the target function value is less than a certain value under a given mean and standard deviation;
[0232] The probability density function of the standard normal distribution represents the density of the target function value under a given mean and standard deviation;
[0233] 5) According to the hyperparameter point θ selected by the sampling strategy, evaluate the objective function f(θ) and update the optimization model;
[0234] 6) Repeat steps 4) and 5) until the stopping condition is met (such as reaching the maximum number of iterations or the objective function value converges). In one embodiment of the present invention, the default value of the maximum number of iterations is 50.
[0235] An optimization model is used to optimize the hyperparameters of the complication prediction model. Optimizing the learning rate and regularization parameters can speed up the convergence of the model, reduce the number of iterations required for training, and find a better hyperparameter combination under a smaller sample evaluation, thereby improving the stability of the model and reducing the performance fluctuations between different training runs. It can effectively control the complexity of the model, reduce overfitting, and improve the generalization ability of the model on unseen data, thereby improving the complication prediction model to obtain the hidden correlation between complications and related traditional Chinese medicines, user constitution and other data, thereby improving the prediction accuracy of the complication prediction model.
[0236] like Figure 2 As shown, a diabetes complication prediction system based on traditional Chinese medicine treatment is used to execute the diabetes complication prediction method based on traditional Chinese medicine treatment as described above, comprising:
[0237] Data acquisition module, used to obtain medical data of past patients;
[0238] Medical data of past patients include: basic patient information, diabetes information, Chinese medicine prescription information, and complication data;
[0239] The data processing module generates a historical database based on the medical data of previous patients and generates a training database after preprocessing the historical database;
[0240] A risk prediction module is used to build a complication prediction model, train the complication prediction model through a training data set, and generate a trained complication prediction model;
[0241] Among them, the complication prediction model includes a node graph generation layer, a first hidden layer, and an output layer;
[0242] The node graph generation layer generates nodes and edges based on the training data set. One node represents one patient, and there are edges between each node.
[0243] The node set is represented as: X = {x 1 ,x 2 ,x 3 ,...,x N}, x i Represents the node feature vector of the i-th node, that is, the feature encoding of the i-th patient in the training data set;
[0244] The first hidden layer is used to fuse the information of nodes and edges to obtain global features;
[0245] The calculation formula for the first hidden layer is:
[0246]
[0247] Where X represents the input feature matrix, represents the sum of the adjacency matrix and the identity matrix, express The degree matrix, W 1 represents the weight parameter, and σ represents the activation function.
[0248] The output layer is used to perform linear transformation on the global features to obtain the probability of the corresponding complications. The calculation formula of the output layer is:
[0249] B=σ(W 2 G+d)
[0250] Among them, B represents the vector representation of the probability of the corresponding complication, W 2 represents the second weight parameter, d represents the bias parameter, and σ represents the activation function;
[0251] Obtain the basic patient information, diabetes symptom information, and traditional Chinese medicine prescription information of the patient to be treated, input them into the complication prediction model after preprocessing, and output the complication prediction data of the patient to be treated.
[0252] A storage medium stores non-transitory computer-readable instructions. When the non-transitory computer-readable instructions are executed by a computer, the steps in the above-mentioned method for predicting diabetes complications based on traditional Chinese medicine treatment can be executed.
[0253] The present embodiment is described above, but the present embodiment is not limited to the above-mentioned specific implementation manner. The above-mentioned specific implementation manner is merely illustrative and not restrictive. Under the guidance of the present embodiment, ordinary technicians in this field can also make many forms, which are all within the protection of the present embodiment.
Claims
1. A method for predicting diabetes complications based on traditional Chinese medicine treatment, characterized in that: The following steps are involved: Step 100: Obtain medical data of past patients, and generate a historical database based on the medical data of past patients; Medical data of past patients include: basic patient information, diabetes information, Chinese medicine prescription information, and complication data; Step 200, preprocessing the historical database to generate a training database; Step 300: construct a complication prediction model, train the complication prediction model using a training data set, and generate a trained complication prediction model; Among them, the complication prediction model includes a node graph generation layer, a first hidden layer, and an output layer; The node graph generation layer generates nodes and edges based on the training data set. One node represents one patient, and there are edges between each node. The first hidden layer is used to fuse the information of nodes and edges to obtain global features; The output layer is used to perform linear transformation on the global features to obtain the probability of the corresponding complications; Step 400: Obtain basic patient information, diabetes symptom information, and Chinese medicine prescription information of the patient to be treated, input them into a complication prediction model after preprocessing, and output complication prediction data of the patient to be treated.
2. A method for predicting diabetes complications based on traditional Chinese medicine treatment according to claim 1, characterized in that: The generation of a historical database based on medical data of past patients is specifically as follows: Integrate and process the medical data of previous patients, including: Numerical data standardization: Perform Z-score standardization or Min-Max normalization on numerical data; Mean / median filling: Use mean or median to fill missing numerical data; Mode filling: Use mode filling for categorical data; Unified date format: the unified date format is "YYYY-MM-DD"; Categorical data standardization: ensure that all categorical data are consistent; Standard deviation method: Use the Z-score method to identify and remove data points that are above or below a set threshold; Coding of Chinese medicine ingredients: converting Chinese medicine ingredients into unified codes; Recording of ingredient additions and subtractions: ensuring that additions and subtractions are coded and associated with individual ingredients; A historical database of past patients is constructed based on the integrated medical data of past patients.
3. A method for predicting diabetes complications based on traditional Chinese medicine treatment according to claim 2, characterized in that: After preprocessing the historical database, a training database is generated, which specifically includes the following processing steps: Feature engineering is performed on patient basic information, diabetes symptom information, Chinese medicine prescription information, and complication data to generate patient basic information feature codes, diabetes symptom information feature codes, Chinese medicine ingredient feature codes, and complication feature codes.
4. A method for predicting diabetes complications based on traditional Chinese medicine treatment according to claim 3, characterized in that: After preprocessing the historical database, the training database is generated, which also includes the following processing steps: Label construction is performed on complication data, and label construction includes the following steps: Read patient data: Get a dataset containing patient complication information; Check complication information: Determine whether complications exist based on specific fields; Generate labels: Create corresponding label codes for each patient; A training data set is constructed based on the patient basic information feature coding, diabetes disease information feature coding, Chinese medicine ingredient feature coding, complication feature coding generated by feature engineering, and label coding generated by label processing.
5. A method for predicting diabetes complications based on traditional Chinese medicine treatment according to claim 4, characterized in that: The node set is represented as: X = {x1, x2, x3, ..., x N }, where x i The node feature vector represents the i-th node. The node feature vector is composed of the patient basic information feature code generated by feature engineering, the diabetes disease information feature code, the Chinese medicine ingredient feature code, the complication feature code and the label code generated by label processing.
6. A method for predicting diabetes complications based on traditional Chinese medicine treatment according to claim 5, characterized in that: The calculation formula for the first hidden layer is: Where X represents the input feature matrix, represents the sum of the adjacency matrix and the identity matrix, express The degree matrix, W1 represents the weight parameter, and σ represents the activation function.
7. A method for predicting diabetes complications based on traditional Chinese medicine treatment according to claim 6, characterized in that: The calculation formula of the output layer is: B = σ(W2G+d); Among them, B represents the vector representation of the probability of the corresponding complication, W2 represents the second weight parameter, d represents the bias parameter, and σ represents the activation function.
8. A method for predicting diabetes complications based on traditional Chinese medicine treatment according to claim 7, characterized in that: The training process of the complication prediction model is as follows: Define the loss function. The calculation formula of the loss function is: Where N is the number of samples in the training set, that is, the number of nodes mentioned above, and B i represents the probability of the corresponding complication occurring in the ith node output by the complication prediction model, B i ∈B, represents the true label of the corresponding complication occurring at the i-th node; Use the gradient descent method to minimize the loss function and update the model parameters W1.
9. A diabetes complication prediction system based on traditional Chinese medicine treatment, characterized in that: It is used to execute a method for predicting diabetes complications based on traditional Chinese medicine treatment as described in any one of claims 1 to 8, comprising: Data acquisition module, used to obtain medical data of past patients; Medical data of past patients include: basic patient information, diabetes information, Chinese medicine prescription information, and complication data; The data processing module generates a historical database based on the medical data of previous patients and generates a training database after preprocessing the historical database; A risk prediction module is used to build a complication prediction model, train the complication prediction model through a training data set, and generate a trained complication prediction model; Among them, the complication prediction model includes a node graph generation layer, a first hidden layer, and an output layer; The node graph generation layer generates nodes and edges based on the training data set. One node represents one patient, and there are edges between each node. The node set is represented as: X = {x1, x2, x3, ..., x N }, x i Represents the node feature vector of the i-th node, that is, the feature encoding of the i-th patient in the training data set; The first hidden layer is used to fuse the information of nodes and edges to obtain global features; The calculation formula for the first hidden layer is: Where X represents the input feature matrix, represents the sum of the adjacency matrix and the identity matrix, express The degree matrix, W1 represents the weight parameter, and σ represents the activation function; The output layer is used to perform linear transformation on the global features to obtain the probability of the corresponding complications. The calculation formula of the output layer is: B = σ(W2G+d); Among them, B represents the vector representation of the probability of the corresponding complication, W2 represents the second weight parameter, d represents the bias parameter, and σ represents the activation function; Obtain the basic patient information, diabetes symptom information, and traditional Chinese medicine prescription information of the patient to be treated, input them into the complication prediction model after preprocessing, and output the complication prediction data of the patient to be treated.
10. A storage medium storing non-transitory computer-readable instructions, which, when executed by a computer, can execute the steps in a method for predicting diabetes complications based on traditional Chinese medicine treatment as described in any one of claims 1-8.
Citation Information
Patent Citations
Machine-learning-based acute cerebral infarction traditional Chinese medicine prescription treatment effect prediction system
CN113990510A
Method and device for predicting disease occurrence
CN116368578A
Diabetes prediction method and system based on graph convolutional neural network
CN117038083A
Large-scale progressive reasoning diagnosis and treatment auxiliary method
CN117198504A
Hyper-parameter tuning device
CN117350374A