A diabetes complication prediction method and system based on traditional Chinese medicine treatment

By constructing a complication prediction model, a diabetes complication prediction system based on traditional Chinese medicine treatment was developed, which solved the problem of predicting complications after the use of traditional Chinese medicine prescriptions with modifications, and achieved early prediction and risk control of complications.

CN119446494BActive Publication Date: 2026-04-24CENT SOUTH UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CENT SOUTH UNIV
Filing Date
2024-11-02
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

Current technology lacks an effective system for predicting complications of diabetes treated with traditional Chinese medicine, which means that the addition or subtraction of traditional Chinese medicine prescriptions may induce different complications, making it impossible to effectively control the probability of complications.

Method used

A method and system for predicting diabetic complications based on traditional Chinese medicine treatment are constructed. A historical database is generated by acquiring past patients' medical data, and preprocessing and feature engineering are performed to construct a complication prediction model, including a node graph generation layer, a first hidden layer, and an output layer. The model is trained using the gradient descent method and outputs the probability of complications.

Benefits of technology

Effectively predict the probability of complications, reduce the risk of complications for patients by adjusting traditional Chinese medicine prescriptions, and minimize the impact of traditional Chinese medicine.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119446494B_ABST
    Figure CN119446494B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of data mining, and discloses a diabetes complication prediction method and system based on traditional Chinese medicine treatment, wherein the diabetes complication prediction method based on the traditional Chinese medicine treatment comprises the following steps: obtaining medical data of past patients; generating a training data set based on the medical data of the past patients; training a complication prediction model through the training data set; obtaining data of a patient to be treated, inputting the data into the complication prediction model after pretreatment, and outputting complication prediction data of the patient to be treated; the complication prediction model is trained based on the medical data of the diabetes patients treated with the traditional Chinese medicine in the past, the correlation between the adjustment parameters of various traditional Chinese medicine prescriptions and the data of the complications of the patients can be learned through correlation learning, hidden inducing factors of some traditional Chinese medicine components on some complications can be effectively learned, the complication occurrence probability of the patients can be effectively controlled and prevented, and the influence of the traditional Chinese medicine on the patients is reduced to the minimum.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data mining technology, and more specifically, to a method and system for predicting diabetic complications based on traditional Chinese medicine treatment. Background Technology

[0002] Diabetes is a growing global disease, and long-term poor blood sugar control can lead to various complications such as cardiovascular disease, kidney disease, and neuropathy. These complications not only increase patient suffering but also exacerbate the healthcare burden. Therefore, early prediction and effective treatment of diabetic complications are crucial. In recent years, with the rapid development of information technology, big data analytics and artificial intelligence technologies have been increasingly widely applied in the medical field.

[0003] When using traditional Chinese medicine to treat diabetes, the prescription needs to be modified according to the patient's actual physical condition. However, the modified traditional Chinese medicine may contain some components that may induce different complications in patients. At present, there is no relevant prediction system for complications induced by traditional Chinese medicine. Therefore, it is necessary to build a system to predict complications in 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 this invention is to provide a method and system for predicting diabetic complications based on traditional Chinese medicine treatment in order to solve the above-mentioned problems.

[0005] This invention provides a method for predicting diabetic 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] Past patient medical data includes: basic patient information, diabetes symptoms, traditional Chinese medicine prescriptions, and complication data;

[0008] Step 200: Generate the training database after preprocessing the historical database;

[0009] Step 300: Construct a complication prediction model. Train the complication prediction model using the training dataset to generate the trained complication prediction model.

[0010] 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 dataset. Each node represents a patient, and there are edges between each node.

[0012] The first hidden layer is used to fuse information from nodes and edges to obtain global features;

[0013] The output layer is used to perform a linear transformation on the global features to obtain the probability of the corresponding complication.

[0014] Step 400: Obtain the patient's basic information, diabetes symptoms, and traditional Chinese medicine prescription information. After preprocessing, input the information into the complication prediction model and output the complication prediction data of the patient to be treated.

[0015] As a further optimization of the present invention, the step of generating a historical database based on the medical data of previous patients specifically includes:

[0016] The medical data of patients from previous periods were integrated and processed, including:

[0017] Numerical data standardization: Perform Z-score standardization or Min-Max normalization on numerical data;

[0018] Mean / Median Imputation: Use the mean or median to imput 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 consistency across all categories of data;

[0022] Standard deviation method: Identifies and removes data points that are above or below a set threshold using the Z-score method;

[0023] Traditional Chinese Medicine Ingredient Coding: Converting traditional Chinese medicine ingredients into unified codes;

[0024] Ingredient addition / subtraction records: Ensure that added or subtracted ingredients are coded and associated with individual ingredients;

[0025] A historical database of past patients is constructed based on the integrated and processed medical data of past patients.

[0026] As a further optimization of the present invention, the training database is generated after preprocessing the historical database, specifically including the following processing steps:

[0027] Feature engineering is performed on patient basic information, diabetes symptoms information, traditional Chinese medicine prescription information, and complication data to generate feature codes for patient basic information, diabetes symptoms information, traditional Chinese medicine ingredients, and complications.

[0028] As a further optimization of the present invention, the generation of the training database after preprocessing the historical database also includes the following processing steps:

[0029] Labeling of complication data involves the following steps:

[0030] Read patient data: Obtain a dataset containing information about patient complications;

[0031] Check complication information: Determine if complications exist based on specific fields;

[0032] Generate labels: Create corresponding label codes for each patient;

[0033] A training dataset is constructed based on the patient basic information feature codes, diabetes symptom information feature codes, traditional Chinese medicine ingredient feature codes, complication feature codes generated by feature engineering, and label codes generated by label processing.

[0034] As a further optimization of the present invention, the node set is represented as: X = {x1, x2, x3, ..., x...} N}, where x i The node feature vector of the i-th node is composed of the patient basic information feature code, the diabetes symptom information feature code, the traditional Chinese medicine ingredient feature code, the complication feature code generated by feature engineering, and the tag code generated by tag processing.

[0035] As a further optimization of the present invention, the calculation formula for the first hidden layer is as follows:

[0036]

[0037] Where X represents the input feature matrix, This represents the sum of the adjacency matrix and the identity matrix. express The degree matrix is ​​given by W1, where W1 represents the weight parameters and σ represents the activation function.

[0038] As a further optimization of the present invention, the calculation formula for the output layer is as follows:

[0039] B = σ(W²G + d)

[0040] Where 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.

[0041] As a further optimization of the present invention, the training process of the complication prediction model is as follows:

[0042] Define the loss function, and the formula for calculating the loss function is:

[0043]

[0044] Where N is the number of samples in the training set, i.e., the number of nodes mentioned above, and B i B represents the probability of the corresponding complication occurring at the i-th node output by the complication prediction model. i ∈B, This represents the true label of the corresponding complication occurring at the i-th node;

[0045] Gradient descent is used to minimize the loss function, and the model parameters W1 are updated.

[0046] A system for predicting diabetic complications based on traditional Chinese medicine treatment, used to perform the aforementioned method for predicting diabetic complications based on traditional Chinese medicine treatment, includes:

[0047] The data acquisition module is used to acquire medical data of patients from previous periods.

[0048] Past patient medical data includes: basic patient information, diabetes symptoms, traditional Chinese medicine prescriptions, and complication data;

[0049] The data processing module generates a historical database based on the medical data of previous patients, and then generates a training database after preprocessing the historical database.

[0050] The risk prediction module is used to build a complication prediction model. It trains the complication prediction model using a training dataset to generate a trained complication prediction model.

[0051] 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 dataset. Each node represents a patient, and there are edges between each node.

[0053] The set of nodes is represented as: X = {x1, x2, x3, ..., x...} N}, x i This represents the node feature vector of the i-th node, which is the feature encoding of the i-th patient in the training dataset;

[0054] The first hidden layer is used to fuse information from nodes and edges to obtain global features;

[0055] The formula for calculating the first hidden layer is:

[0056]

[0057] Where X represents the input feature matrix, This represents the sum of the adjacency matrix and the identity matrix. express The degree matrix, W1 represents the weight parameters, and σ represents the activation function;

[0058] The output layer performs a linear transformation on the global features to obtain the probability of the corresponding complication. The calculation formula for the output layer is as follows:

[0059] B = σ(W²G + d)

[0060] Where 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;

[0061] The system obtains basic patient information, diabetes symptoms, and traditional Chinese medicine prescription information of patients to be treated. After preprocessing, these information are input into the complication prediction model, and the system outputs complication prediction data for patients to be treated.

[0062] A storage medium storing non-transitory computer-readable instructions, which, when executed by a computer, can perform the steps described above in a method for predicting diabetic complications based on traditional Chinese medicine treatment.

[0063] The beneficial effects of this invention are as follows: This invention trains a complication prediction model based on medical data of diabetic patients who have previously received traditional Chinese medicine treatment. It can effectively learn the correlation between the adjustment parameters of each traditional Chinese medicine prescription and the patient's complication data, thereby effectively identifying the hidden inducing factors of some traditional Chinese medicine components on certain complications. This can effectively control and prevent the probability of complications occurring in patients, thereby minimizing the impact of traditional Chinese medicine on patients. Attached Figure Description

[0064] Figure 1 This is a flowchart of a method for predicting diabetic complications based on traditional Chinese medicine treatment according to the present invention;

[0065] Figure 2 This is a schematic diagram of a module of a diabetes complication prediction system based on traditional Chinese medicine treatment according to the present invention.

[0066] In the diagram: 1. Data acquisition module; 2. Data processing module; 3. Risk prediction module. Detailed Implementation

[0067] The subject matter described herein will now be discussed with reference to, for example, embodiments. It should be understood that these embodiments are discussed merely to enable those skilled in the art to better understand and implement the subject matter described herein. Furthermore, some of the features described, for example, may be combined in other examples.

[0068] like Figure 1 As shown, a method for predicting diabetic complications based on traditional Chinese medicine treatment includes 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] Past patient medical data includes:

[0071] Patient basic information:

[0072] Patient ID: A unique identifier;

[0073] Gender: Male / Female;

[0074] Age: Patient's age (e.g., 45);

[0075] Weight: Body weight (e.g., 75kg);

[0076] Height: Height (e.g., 170cm);

[0077] BMI: Body Mass Index (calculated);

[0078] Information on diabetes symptoms:

[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 glucose (e.g., 6.5 mmol / L);

[0083] Postprandial blood glucose (e.g., 9.0 mmol / L);

[0084] HbA1c level: Glycated hemoglobin (e.g., 7.2%);

[0085] History of complications: If any, record the type of complication (e.g., retinopathy, nephropathy);

[0086] Traditional Chinese medicine prescription information:

[0087] Prescription ID: A unique identifier;

[0088] Chinese medicine names: such as licorice, astragalus, and salvia miltiorrhiza;

[0089] Dosage: Dosage for each type of Chinese herbal medicine (e.g., 10g of licorice);

[0090] Instructions for addition and subtraction: Specific additions and subtractions (e.g., add: goji berries; subtract: dandelion);

[0091] Dosage time: e.g., three times daily, after meals, etc.;

[0092] Complication data;

[0093] Complication types: such as: hyperglycemia, hypoglycemia, diabetic ketoacidosis, others (please specify details);

[0094] Date of complication occurrence: The specific date on which the complication occurred (e.g., 2024-06-15);

[0095] Severity: Mild / Moderate / Severe;

[0096] Hospitalization status: Is hospitalization required (yes / no)?

[0097] Data examples:

[0098]

[0099]

[0100] A historical database is generated based on the medical data of patients from previous periods, specifically:

[0101] Standardization process:

[0102] Numerical data standardization: For numerical data (such as blood sugar levels, weight, etc.), Z-score standardization or Min-Max normalization can be used to bring it within a certain range.

[0103] For example:

[0104] Fasting blood glucose (original value: 6.8 mmol / L), after standardization, becomes:

[0105] Complete missing values:

[0106] Mean / Median Imputation: For missing numerical data (such as age, weight), use the mean or median to imput the missing data.

[0107] For example:

[0108] If there is a missing value in the weight (e.g., 75kg), it can be filled in using the average weight of other patients (e.g., 78kg).

[0109] Mode filling: Use mode filling for categorical data (such as gender).

[0110] For example:

[0111] If there is a missing gender, and the mode is "male", then 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 consistency across all categories of data.

[0117] For example:

[0118] The terms "Type 1" and "Type 1 Diabetes" in "Diabetes Type" will be unified as "Type 1".

[0119] Remove outliers:

[0120] Standard deviation method: Identifies and removes data points that are above or below a specific threshold (such as values ​​exceeding 3 standard deviations) using the Z-score method.

[0121] For example:

[0122] If a value of 20% is found in the HbA1c data (the normal range is approximately 4% to 14%), that value will be considered an outlier and removed.

[0123] Standardized representation of Chinese medicine ingredients:

[0124] Traditional Chinese Medicine Ingredient Coding: Converting traditional Chinese medicine ingredients into unified codes for easier analysis.

[0125] For example:

[0126] Licorice is coded as “ZH001” and Astragalus is coded as “ZH002”, while their dosages remain in numerical form.

[0127] Component addition / subtraction records: Ensure that added or subtracted components are coded and associated with individual components.

[0128] For example:

[0129] For "Add: Goji berries, Subtract: Dandelion", it can be recorded as "Add: ZH003, Subtract: ZH004".

[0130] The data processing process is summarized as follows:

[0131] Assume the original data contains the following:

[0132] Patient ID age gender fasting blood glucose Prescription ID Chinese medicine name 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 Goji berries

[0133] After data processing, the results are as follows:

[0134]

[0135]

[0136] This allows for the construction of a historical database of past patients.

[0137] Step 200: Generate the training database after preprocessing the historical database;

[0138] Specifically, the following processing steps are included:

[0139] 1) Feature Engineering:

[0140] Patient basic information characteristics:

[0141] Age: Used directly as a continuous variable.

[0142] Gender: Converted into multiple binary features using one-hot encoding.

[0143] Example: Patients with gender coding of "male" are [1,0], and females are [0,1].

[0144] BMI: Use directly, calculate the range category (e.g., 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 unique heat coding.

[0150] Example: Type 1 diabetes is coded as [1,0,0], type 2 diabetes is coded as [0,1,0], and gestational diabetes is coded as [0,0,1].

[0151] Disease course: Used directly as a continuous variable.

[0152] Characteristics of Chinese herbal ingredients:

[0153] Traditional Chinese medicine ingredients: Extract each traditional Chinese medicine ingredient and use a unique thermal code.

[0154] Example:

[0155] Licorice: [1,0,0,0]

[0156] Astragalus: [0,1,0,0]

[0157] Salvia miltiorrhiza: [0,0,1,0]

[0158] Goji berries: [0,0,0,1]

[0159] Addition and subtraction: Use a unified component code to record the addition and subtraction results separately.

[0160] Example:

[0161] Bonus: [1,0,1,...], Subtraction: [0,1,0,...].

[0162] Historical medical history characteristics:

[0163] Complication history: Historical complications are represented using unique heat codes.

[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 hypertension or heart disease, are coded using unique thermal encoding.

[0169] Example:

[0170] High blood pressure: [0,0,1,0,0]

[0171] Heart disease: [0,0,0,1,0];

[0172] 2) Label processing:

[0173] First, it is necessary to identify the complications that need to be considered.

[0174] For example, the following complication labels can be defined: retinopathy, nephropathy, heart disease, neuropathy;

[0175] For each complication, it is categorized as "present" (1) or "not present" (0). Labels can be generated based on data from the patient's medical history.

[0176] Specific steps for tag construction:

[0177] Read patient data: Obtain the dataset containing information on patient complications, i.e., the historical dataset constructed in step 100.

[0178] Check complication information: Determine if complications exist based on specific fields.

[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 following binary labels are generated:

[0184] Patient ID Retinopathy label Kidney disease label Heart disease label Neuropathy label 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 viewed as follows:

[0186]

[0187]

[0188] A training dataset is constructed by combining the feature-encoded data generated by feature engineering and the feature-encoded data from label processing.

[0189] Step 300: Construct a complication prediction model. Train the complication prediction model using the training dataset to generate the trained complication prediction model.

[0190] 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 dataset. Each node represents a patient, and there are edges between each node.

[0192] The set of nodes is represented as: X = {x1, x2, x3, ..., x...} N}, x i This represents the node feature vector of the i-th node, which is the feature encoding of the i-th patient in the training dataset;

[0193] The first hidden layer is used to fuse information from nodes and edges to obtain global features;

[0194] The formula for calculating the first hidden layer is:

[0195]

[0196] Where X represents the input feature matrix, This represents the sum of the adjacency matrix and the identity matrix. express The degree matrix is ​​denoted by W1, where W1 represents the weight parameters and σ represents the activation function (such as the ReLU function).

[0197] The output layer performs a linear transformation on the global features to obtain the probability of the corresponding complication. The calculation formula for the output layer is as follows:

[0198] B = σ(W²G + d)

[0199] Where 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 (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, and the formula for calculating the loss function is:

[0202]

[0203] Where N is the number of samples in the training set, i.e., the number of nodes mentioned above, and B i B represents the probability of the corresponding complication occurring at the i-th node output by the complication prediction model. i ∈B, This 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 W1;

[0205] Finally, 20% of the training set is used as the test set to evaluate the model performance. Common evaluation metrics can be used, including accuracy, precision, recall, and F1 score.

[0206] Step 400: Obtain the patient's basic information, diabetes symptoms, and traditional Chinese medicine prescription information. After preprocessing, input the information into the complication prediction model and output the 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 traditional Chinese medicine prescription can be adjusted by medical personnel. The adjustment method is based on the relevant medical knowledge of the medical personnel, and the adjusted traditional Chinese medicine prescription is re-input into the complication prediction model. Alternatively, multiple traditional Chinese medicine prescriptions can be generated and input into the complication prediction model for processing. The traditional Chinese medicine prescription with the lowest probability of complication occurrence is selected as the treatment plan. This can not only effectively and accurately predict the complications of diabetic patients, but also control and prevent the probability of complication occurrence, thereby minimizing the impact of traditional Chinese medicine on patients.

[0208] In one embodiment of the present invention, the hyperparameters of the complication prediction model are optimized using an optimization model, specifically as follows:

[0209] 1) Define the objective function:

[0210] f(θ) = Accuracy(θ);

[0211] Where f(θ) is the objective function, representing the accuracy of the model on the validation set given the hyperparameters θ.

[0212] θ: Hyperparameter vector, containing the hyperparameter values ​​that need to be tuned;

[0213] 2) Selecting the hyperparameter space:

[0214] Learning rate: η∈[0.0001,0.1];

[0215] Hidden layer dimension: d∈{16,32,64,128};

[0216] The regularization parameter λ ∈ [0, 0.1];

[0217] The number of graph convolutional layers L∈{1,2,3};

[0218] 3) Construct an optimization model:

[0219] The calculation formula for the optimization model is:

[0220]

[0221] Where, k(θ,θ′): kernel function, representing the similarity between hyperparameter points θ and θ′;

[0222] l: Length scale parameter, which controls the range of similarity in the hyperparameter space. A smaller l indicates that the similarity decays rapidly, while a larger l indicates that the similarity decays slowly.

[0223] ||θ-θ′||: Euclidean distance between hyperparameter vectors, reflecting the difference between two hyperparameter points;

[0224] 4) Selecting the next hyperparameter point based on the expected improvement criterion of the optimization model:

[0225] The formula for calculating the expected improvement criterion is:

[0226]

[0227] Where EI(θ): expected improvement, representing the expected improvement at the hyperparameter point θ;

[0228] f(θ + ): The current optimal objective function value, i.e., the best performance obtained with the evaluated hyperparameters;

[0229] μ(θ): The mean prediction of the surrogate model at the hyperparameter point θ, representing an estimate of the objective function;

[0230] σ(θ): The standard deviation of the surrogate model's predictions at the hyperparameter point θ, representing a measure of the uncertainty of the objective function;

[0231] Φ: The cumulative distribution function of the standard normal distribution, representing the probability that the objective function value is less than a certain value given the mean and standard deviation;

[0232] The probability density function of the standard normal distribution represents the density of the objective function values ​​given the mean and standard deviation.

[0233] 5) Evaluate the objective function f(θ) based on the hyperparameter point θ selected by the sampling strategy, and update and optimize the model;

[0234] 6) Repeat steps 4) and 5) until the stopping condition is met (e.g., the maximum number of iterations is reached or the objective function value converges). In one embodiment of the invention, the default value for the maximum number of iterations is 50.

[0235] An optimization model is employed to optimize the hyperparameters of the complication prediction model. Optimizing the learning rate and regularization parameters can accelerate the model's convergence speed, reduce the number of iterations required for training, and find a better combination of hyperparameters under smaller sample evaluations, thereby improving the model's stability, reducing performance fluctuations between different training runs, effectively controlling model complexity, reducing overfitting, and improving the model's generalization ability on unseen data. This, in turn, enhances the complication prediction model's ability to identify hidden correlations between complications and related traditional Chinese medicines, user constitution, and other data, ultimately improving the prediction accuracy of the complication prediction model.

[0236] like Figure 2 As shown, a system for predicting diabetic complications based on traditional Chinese medicine treatment is used to perform the aforementioned method for predicting diabetic complications based on traditional Chinese medicine treatment, including:

[0237] The data acquisition module is used to acquire medical data of patients from previous periods.

[0238] Past patient medical data includes: basic patient information, diabetes symptoms, traditional Chinese medicine prescriptions, and complication data;

[0239] The data processing module generates a historical database based on the medical data of previous patients, and then generates a training database after preprocessing the historical database.

[0240] The risk prediction module is used to build a complication prediction model. It trains the complication prediction model using a training dataset to generate a trained complication prediction model.

[0241] 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 dataset. Each node represents a patient, and there are edges between each node.

[0243] The set of nodes is represented as: X = {x1, x2, x3, ..., x...} N}, x i This represents the node feature vector of the i-th node, which is the feature encoding of the i-th patient in the training dataset;

[0244] The first hidden layer is used to fuse information from nodes and edges to obtain global features;

[0245] The formula for calculating the first hidden layer is:

[0246]

[0247] Where X represents the input feature matrix, This represents the sum of the adjacency matrix and the identity matrix. express The degree matrix is ​​given by W1, where W1 represents the weight parameters and σ represents the activation function.

[0248] The output layer performs a linear transformation on the global features to obtain the probability of the corresponding complication. The calculation formula for the output layer is as follows:

[0249] B = σ(W²G + d)

[0250] Where 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;

[0251] The system obtains basic patient information, diabetes symptoms, and traditional Chinese medicine prescription information of patients to be treated. After preprocessing, these information are input into the complication prediction model, and the system outputs complication prediction data for patients to be treated.

[0252] A storage medium storing non-transitory computer-readable instructions that, when executed by a computer, can perform steps as described above in a method for predicting diabetic complications based on traditional Chinese medicine treatment.

[0253] The above description of this embodiment is not limited to the specific implementation described above. The specific implementation described above is merely illustrative and not restrictive. Those skilled in the art can make many other forms based on the guidance of this embodiment, all of which are within the protection scope of this embodiment.

Claims

1. A method for predicting diabetic complications based on traditional Chinese medicine treatment, characterized in that, Includes the following steps: Step 100: Obtain medical data of past patients and generate a historical database based on the medical data of past patients; Past patient medical data includes: basic patient information, diabetes symptoms, traditional Chinese medicine prescriptions, and complication data; Step 200: Generate the training database after preprocessing the historical database; Step 300: Construct a complication prediction model. Train the complication prediction model using the training dataset to generate the trained complication prediction model. 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 dataset. Each node represents a patient, and there are edges between each node. The first hidden layer is used to fuse information from nodes and edges to obtain global features; The output layer is used to perform a linear transformation on the global features to obtain the probability of the corresponding complication. Step 400: Obtain the patient's basic information, diabetes symptoms, and traditional Chinese medicine prescription information, perform preprocessing, input the data into the complication prediction model, and output the complication prediction data of the patient to be treated. The training database is generated after preprocessing the historical database, which includes the following processing steps: Feature engineering is performed on patient basic information, diabetes symptom information, traditional Chinese medicine prescription information, and complication data to generate patient basic information feature codes, diabetes symptom information feature codes, traditional Chinese medicine ingredient feature codes, and complication feature codes. The process of generating the training database after preprocessing the historical database also includes the following steps: Labeling of complication data involves the following steps: Read patient data: Obtain a dataset containing information about patient complications; Check complication information: Determine if complications exist based on specific fields; Generate labels: Create corresponding label codes for each patient; A training dataset is constructed based on the patient basic information feature codes, diabetes symptom information feature codes, traditional Chinese medicine ingredient feature codes, complication feature codes generated by feature engineering, and label codes generated by label processing. The node set is represented as: ,in, The node feature vector of the i-th node is composed of the patient basic information feature code, the diabetes symptom information feature code, the traditional Chinese medicine ingredient feature code, the complication feature code generated by feature engineering, and the tag code generated by tag processing. The formula for calculating the first hidden layer is: ; in, Represents the input feature matrix. This represents the sum of the adjacency matrix and the identity matrix. express The degree matrix, Represents the weight parameters. Indicates the activation function; The formula for calculating the output layer is: ; Where B represents the vector representation of the probability of the corresponding complication occurring. This represents the second weighting parameter, and d represents the bias parameter. Indicates the activation function; The hyperparameters of the complication prediction model are optimized using an optimization model, specifically as follows: 1) Define the objective function: ; in, : Objective function, representing the given hyperparameters θ At that time, the model's accuracy on the validation set; θ : Hyperparameter vector, containing the hyperparameter values ​​that need to be tuned; 2) Selecting the hyperparameter space: Learning rate: ; Hidden layer dimensions: ; Regularization parameters ; The number of graph convolutional layers L∈{1,2,3}; 3) Construct an optimization model: The calculation formula for the optimization model is: ; in, Kernel function, representing hyperparameter points and Similarity between them; l: Length scale parameter, which controls the range of similarity in the hyperparameter space. A smaller l indicates that the similarity decays rapidly, while a larger l indicates that the similarity decays slowly. The Euclidean distance between hyperparameter vectors reflects the difference between two hyperparameter points; 4) Selecting the next hyperparameter point based on the expected improvement criterion of the optimization model: The formula for calculating the expected improvement criterion is: ; in, : Expected improvement, representing the expected improvement at the hyperparameter point θ; The current optimal objective function value, i.e., the best performance obtained with the evaluated hyperparameters; The surrogate model's prediction mean at the hyperparameter point θ represents an estimate of the objective function; The standard deviation of the surrogate model's predictions at the hyperparameter point θ represents a measure of the uncertainty of the objective function. Φ The cumulative distribution function of the standard normal distribution represents the probability that the objective function value is less than a certain value given the mean and standard deviation. ϕ: The probability density function of the standard normal distribution, representing the density of the objective function value given the mean and standard deviation; 5) Hyperparameter points selected based on the sampling strategy θ Evaluate the objective function And update and optimize the model; 6) Repeat steps 4) and 5) until the stopping condition is met. The stopping condition is reaching the maximum number of iterations or the objective function value converges. The default value for the maximum number of iterations is 50.

2. The method for predicting diabetic complications based on traditional Chinese medicine treatment according to claim 1, characterized in that, The process of generating a historical database based on past patients' medical data specifically involves: The medical data of patients from previous periods were integrated and processed, including: Numerical data standardization: Perform Z-score standardization or Min-Max normalization on numerical data; Mean / Median Imputation: Use the mean or median to imput 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 consistency across all categories of data; Standard deviation method: Identifies and removes data points that are above or below a set threshold using the Z-score method; Traditional Chinese Medicine Ingredient Coding: Converting traditional Chinese medicine ingredients into unified codes; Ingredient addition / subtraction records: Ensure that added or subtracted ingredients are coded and associated with individual ingredients; A historical database of past patients is constructed based on the integrated and processed medical data of past patients.

3. The method for predicting diabetic complications based on traditional Chinese medicine treatment according to claim 2, characterized in that, The training process for the complication prediction model is as follows: Define the loss function, and the formula for calculating the loss function is: ; Where N is the number of samples in the training set, i.e., the number of nodes mentioned above. This represents the probability of the corresponding complication occurring at the i-th node output by the complication prediction model. , This represents the true label of the corresponding complication occurring at the i-th node; Gradient descent is used to minimize the loss function and update the model parameters. .

4. A predictive system for diabetic complications based on traditional Chinese medicine treatment, characterized in that, It is used to perform a method for predicting diabetic complications based on traditional Chinese medicine treatment as described in any one of claims 1-3, comprising: The data acquisition module is used to acquire medical data of patients from previous periods. Past patient medical data includes: basic patient information, diabetes symptoms, traditional Chinese medicine prescriptions, and complication data; The data processing module generates a historical database based on the medical data of previous patients, and then generates a training database after preprocessing the historical database. The risk prediction module is used to build a complication prediction model. It trains the complication prediction model using a training dataset to generate a trained complication prediction model. 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 dataset. Each node represents a patient, and there are edges between each node. The node set is represented as: , This represents the node feature vector of the i-th node, which is the feature encoding of the i-th patient in the training dataset; The first hidden layer is used to fuse information from nodes and edges to obtain global features; The formula for calculating the first hidden layer is: ; Represents the input feature matrix. Indicates the activation function; The output layer performs a linear transformation on the global features to obtain the probability of the corresponding complication. The calculation formula for the output layer is as follows: ; Where B represents the vector representation of the probability of the corresponding complication occurring. This represents the second weighting parameter, and d represents the bias parameter. Indicates the activation function; The system obtains basic patient information, diabetes symptoms, and traditional Chinese medicine prescription information of patients to be treated. After preprocessing, these information are input into the complication prediction model, and the system outputs complication prediction data for patients to be treated.

5. A storage medium storing non-transitory computer-readable instructions that, when executed by a computer, are capable of performing the steps in a method for predicting diabetic complications based on traditional Chinese medicine treatment as described in any one of claims 1-3.

Citation Information

Patent Citations

  • Diabetes prediction method and system based on graph convolutional neural network

    CN117038083A

  • Research method for prescription of compound spleen-tonifying colon sustained-release tablet

    CN118280513A

  • Diabetic complication prediction system and method based on data monitoring

    CN118522464A