Diabetic complication risk detection system based on artificial intelligence
By introducing the GRU model and the complication risk detection system with positive execution layer, combined with the Red-bellied Eagle algorithm to optimize the search direction, the problems of insufficient feature integration and prediction capabilities in existing technologies are solved, and a more accurate diabetes complication risk assessment is achieved.
Patent Information
- Application Number
- CN202510976962.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-16
- Publication Date
- 2025-10-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing complication risk detection methods rely on static features and fail to effectively quantify the interactions and correlations between multidimensional features, resulting in insufficient feature integration and prediction capabilities, making it difficult to accurately assess the risks of complex cases.
Based on the GRU model, a positive definite execution layer and covariance matrix are introduced. The positive definite covariance matrix is generated by Cholesky decomposition, and the search direction is optimized by combining the Red-bellied Eagle algorithm to improve feature integration and prediction capabilities.
It improves the accuracy and efficiency of diabetes complication risk detection, can better capture time-dependent characteristics and deep correlations between data, and generate more reliable risk assessment results.
Smart Images

Figure CN120853936A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of clinical nursing, specifically to an artificial intelligence-based risk detection system for complications in diabetic patients. Background Technology
[0002] Existing methods for detecting complication risks primarily rely on static features, focusing only on the feature values of a single data point while neglecting the dynamic characteristics of physiological indicators changing over time. Furthermore, these methods fail to effectively quantify the interactions and correlations between multidimensional features, resulting in weak feature integration capabilities. In addition, traditional predictive models exhibit insufficient predictive power and inefficiency when handling complex cases, struggling to capture long-term dependent features and deep correlations between data. These limitations lead to inaccurate risk assessments in complex cases, thus affecting the effectiveness of patient risk detection and constituting significant shortcomings. Summary of the Invention
[0003] To address the above issues and overcome the shortcomings of existing technologies, this invention provides an AI-based risk detection system for diabetic patients' complications. Addressing the problems of existing complication risk detection methods relying on static feature modeling and having weak feature integration and predictive capabilities, this invention introduces a positive definite execution layer in the complication risk prediction module, based on a GRU model. This layer transforms the time series output into a lower triangular matrix and generates a positive definite covariance matrix through Cholesky decomposition, further quantifying the correlation and uncertainty of the input data. Furthermore, to address the insufficient predictive ability and low efficiency of existing complication risk detection methods, this invention designs a Red-bellied Eagle algorithm. By simulating the attack and migration behavior of the Red-bellied Eagle and dynamically adjusting the search direction by combining the actual and virtual parts of multiple individuals, this improves both global search capabilities and local exploration capabilities.
[0004] The technical solution adopted in this invention is as follows: The artificial intelligence-based risk detection system for diabetic patients provided by this invention includes a data acquisition module, a data preprocessing module, a complication risk feature extraction module, a complication risk prediction module, and an intelligent feedback module, specifically including the following:
[0005] The data acquisition module collects biochemical index data of diabetic patients and transmits the patients' biochemical index data to the data preprocessing module.
[0006] The data preprocessing module preprocesses the patient's biochemical indicator data;
[0007] The complication risk feature extraction module extracts features related to the risk of diabetic complications from the preprocessed biochemical indicator data to form a feature vector, including static features and dynamic features;
[0008] The complication risk prediction module constructs a complication risk prediction model based on GRU architecture, introduces a positive definite execution layer and covariance matrix, and predicts the risk of diabetic complications in patients to obtain prediction results.
[0009] The intelligent feedback module classifies the patient's complication risk into different levels, including low risk, medium risk and high risk, based on the prediction results, and generates a risk report.
[0010] Furthermore, the complication risk prediction module constructs a complication risk prediction model based on a GRU architecture, introducing a positive definite execution layer and a covariance matrix. The specific implementation steps are as follows:
[0011] Step S1: Data preparation, using feature vectors as input data;
[0012] Step S2: Model initialization. Construct a time series prediction network with GRU as the main architecture as the complication risk prediction model, expressed by the following formula: ;
[0013] in, Indicates a time step. This is the GRU output at the current time step. For input data, This is the output of the GRU from the previous time step. For GRU layer parameters;
[0014] Step S3: Introduce a positive definite execution layer and convert the output of the GRU. Convert to a lower triangular matrix The formula used is as follows: ;
[0015] in, It is a positive definite function. Let be the order of the lower triangular matrix;
[0016] Step S4: Generate a positive definite matrix. The positive definite covariance matrix is generated through Cholesky decomposition, using the following formula: ;
[0017] in, It is a positive definite covariance matrix. This is the transpose of the lower triangular matrix;
[0018] Step S5: Loss function design. The first loss term is the state estimation error, and the formula used is as follows: ;
[0019] in, This represents the state estimation error value. For the sample size, It is The time series length of each sample It is Each sample at time step The true state of It is Each sample at time step The estimated state;
[0020] The second loss term is designed as the covariance matching loss, and the formula used is as follows: L cov = 1 N ∑ i=1 N 1 T i ∑ t=1 T i ∑ j=1 m ∑ k=1 m | e t i e t i T j,k -[ ∑ t|t i ] j,k | ;
[0021] in, To match the covariance loss value, , for the first Each sample at time step The estimation error, To predict the dimension of the covariance matrix, All are elements of a positive definite covariance matrix;
[0022] The total loss function is shown below: ;
[0023] in, β∈[0,1] ;
[0024] Step S6: Optimize the objective, design a Red-bellied Eagle algorithm and apply it to minimize the total loss function, and update the parameters of the complication risk prediction model.
[0025] Furthermore, in step S6, the Red-bellied Eagle algorithm is used to minimize the total loss function, specifically including the following steps:
[0026] Step S61: Initialize the red-bellied hawk population parameters, define the search interval, random growth parameters, and initial complex number of individuals. The initial complex number of individuals serves as a candidate solution, specifically including the following:
[0027] The search range is [ A k , B k ] ;
[0028] The randomly generated parameters include magnitude and phase angle, with the magnitude ranging from [value missing]. ρ k ∈[0, B k - A k 2 ] The phase angle is θ k ∈[-2π,2π] ;
[0029] Initial complex number of individuals: ;
[0030] in, , This refers to the actual portion of the initial complex number of individuals. For the virtual part of the initial complex individuals;
[0031] Step S62: Attack Phase. The attack behavior generates new candidate solutions, which will be used as input for the migration behavior to refresh the actual part. The formula used is as follows: ;
[0032] in, Indicates the first The actual updated value in the next iteration. Indicates the first The actual updated value in the next iteration. Indicates the number of individual entities. Indicates the variable number in a complex number of individuals. It is a random number. Indicates a random threshold;
[0033] The formula used to refresh the virtual portion is as follows: ;
[0034] in, Indicates the first The updated value of the virtual part in the next iteration. Indicates the first The updated value of the virtual part in the next iteration. The intensity of the disturbance caused by the attack;
[0035] Step S63: Migration Phase. New candidate solutions are generated for the attack behavior. Combined with the fitness value, the red-bellied eagle population is guided towards the optimal candidate solution. The actual part is refreshed again. The formula used is as follows: ;
[0036] in, The result is a random number, ranging from [0,1]. Scaling parameters for migration behavior, This represents the current fitness value of the individual. The set reference fitness value;
[0037] The virtual portion is refreshed again using the following formula: ;
[0038] and This represents the actual and virtual components of the best individual in the current Red-bellied Eagle population.
[0039] Step S64: Fitness value calculation. Evaluate the fitness value of each optimal individual and calculate the modulus of the optimal individual. The formula used is as follows: ;
[0040] The fitness value is calculated using the modulus of the optimal individual. ;
[0041] Step S65: Sort by fitness value. Sort the best individuals according to their fitness values and use the individual with the highest fitness value as a reference to feed back to step S62.
[0042] Step S66: Convergence judgment. Set the maximum number of iterations and repeat steps S62 to S65 until the maximum number of iterations is reached. Output the individual with the highest fitness value as the final solution.
[0043] The beneficial effects achieved by the present invention using the above solution are as follows:
[0044] (1) To address the problem that existing complication risk detection methods rely on static feature modeling and have weak feature integration and prediction capabilities, in the complication risk prediction module, a positive definite execution layer is introduced based on the GRU model to transform the output of the time series into a lower triangular matrix. A positive definite covariance matrix is generated through Cholesky decomposition to further quantify the correlation and uncertainty of the input data.
[0045] (2) In view of the problems of insufficient predictive ability and low efficiency of existing complication risk detection methods, this invention designs a red-bellied eagle algorithm. By simulating the attack and migration behavior of red-bellied eagles, the search direction is dynamically adjusted by combining the actual and virtual parts of multiple individuals, thereby improving the global search capability and local development capability. Attached Figure Description
[0046] Figure 1 This is a schematic diagram of the AI-based risk detection system for diabetic patients' complications proposed in this invention.
[0047] Figure 2 This is a schematic diagram of the process for constructing a complication risk prediction model proposed in this invention;
[0048] Figure 3This is a flowchart illustrating the process of minimizing the total loss function using the Red-bellied Eagle algorithm proposed in this invention.
[0049] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof. Detailed Implementation
[0050] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0051] Example 1, see Figure 1 The artificial intelligence-based risk detection system for diabetic patients provided by this invention includes a data acquisition module, a data preprocessing module, a complication risk feature extraction module, a complication risk prediction module, and an intelligent feedback module, specifically including the following:
[0052] Patient Zhang San, 45 years old, has been diagnosed with type 2 diabetes for 7 years. Recently, he has experienced mild blurred vision and intermittent numbness in his lower limbs, and is suspected of having diabetes-related complications.
[0053] Data Acquisition Module: The system automatically collects Zhang San's latest biochemical indicator data through the hospital's electronic medical record system, including:
[0054] Blood glucose: 8.9 mmol / L;
[0055] Glycated hemoglobin (HbA1c): 9.2%;
[0056] Urinary albumin: 47 mg / L;
[0057] Serum creatinine: 125 μmol / L;
[0058] Low-density lipoprotein (LDL): 3.8 mmol / L;
[0059] Systolic blood pressure: 150 mmHg;
[0060] Weight: 76 kg;
[0061] BMI: 27.6;
[0062] Data preprocessing module:
[0063] Outlier removal: If an HbA1c value of 0 is found in historical data, the system will identify it as an anomaly and automatically remove it.
[0064] Missing value completion: Weight is missing, the system fills it in using Zhang San's average value over the past six months;
[0065] Data standardization: The data is normalized using the Z-score method;
[0066] The integrated data is formatted as a structured input dataset;
[0067] Complication risk feature extraction module: Extracts the following features from the data processed above:
[0068] Static characteristics:
[0069] HbA1c mean: 9.2%;
[0070] Serum creatinine: 125 μmol / L;
[0071] BMI: 27.6;
[0072] LDL: 3.8 mmol / L;
[0073] Dynamic characteristics:
[0074] Blood glucose fluctuation frequency: 4 times / day;
[0075] The diurnal variation rate of systolic blood pressure is on an upward trend, averaging +6 mmHg / day.
[0076] 48-hour change rate of urinary albumin: +10%;
[0077] The generated feature vector is: [9.2, 125, 27.6, 3.8, 4, 6, 0.10];
[0078] Complication risk prediction module: Using a deep time series model based on GRU structure, supplemented by a positive definite execution layer and feature covariance matrix enhancement mechanism, the module predicts the risk of complications for Zhang San. The model outputs a risk score of 0.84.
[0079] Intelligent Feedback Module: Based on the risk score, Zhang San is automatically assessed as "high-risk" and the following feedback report is generated:
[0080] Risk score: 0.84;
[0081] Risk level: High;
[0082] Risk Interpretation: High HbA1c levels, increasing proteinuria, and poor blood pressure control are the main risk factors;
[0083] It is recommended to perform retinal screening and lower limb nerve conduction tests;
[0084] Increase the frequency of blood sugar-lowering and blood pressure-controlling treatments;
[0085] Strengthen nutritional intervention and exercise management.
[0086] Example 2, see Figure 2 This embodiment, based on the above embodiment, constructs a complication risk prediction model with a GRU-based architecture, introducing a positive definite execution layer and a covariance matrix. The specific implementation steps are as follows:
[0087] Step S1: Data preparation, using feature vectors as input data [9.2, 125, 27.6, 3.8, 4, 6, 0.10];
[0088] Step S2: Model initialization. Construct a time series prediction network with GRU as the main architecture as the complication risk prediction model. The code used is as follows:
[0089] import torch
[0090] import torch.nn as nn
[0091] # Input dimension is 7
[0092] input_dim = 7
[0093] hidden_dim = 32 # GRU hidden layer dimension
[0094] num_layers = 1 # Single-layer GRU
[0095] batch_size = 1 # Input only 1 sample
[0096] # Define GRU
[0097] gru = nn.GRU(input_size=input_dim, hidden_size=hidden_dim, num_layers=num_layers, batch_first=True)
[0098] # Generate random initial hidden state h_0
[0099] h_0 = torch.zeros(num_layers, batch_size, hidden_dim) # Shape is (1,1,32)
[0100] # Input data shape (batch_size, time_steps, input_dim)
[0101] X_t = torch.tensor([[
[0102] [130, 3.9, 6.0, 2.0, 0.80, -0.02, 2.7],
[0103] [131, 4.0, 6.1, 2.1, 0.82, -0.01, 2.8],
[0104] [132, 4.1, 6.2, 2.2, 0.84, -0.02, 2.9],
[0105] [133, 4.2, 6.3, 2.3, 0.85, -0.01, 3.0],
[0106] [134, 4.3, 6.4, 2.4, 0.87, -0.01, 3.1],
[0107] [135, 4.4, 6.5, 2.5, 0.89, -0.01, 3.2],
[0108] [136, 4.5, 6.6, 2.6, 0.91, -0.02, 3.3],
[0109] [137, 4.6, 6.7, 2.7, 0.93, -0.01, 3.4],
[0110] [138, 4.7, 6.8, 2.8, 0.95, -0.01, 3.5],
[0111] [139, 4.8, 6.9, 2.9, 0.97, -0.01, 3.6]
[0112] `float()` # Shape is (1, 10, 7)
[0113] # Running GRU
[0114] output, h_n = gru(X_t.float(), h_0)
[0115] # Output
[0116] print(output.shape) # (1, 10, 32)
[0117] print(h_n.shape) # (1, 1, 32);
[0118] Step S3: Introduce a positive definite execution layer and convert the output of the GRU. Convert to a lower triangular matrix , =[0.5,−0.3,0.8,0.2,−0.1,0.6], the formula used is as follows: ;
[0119] Step S4: Generate a positive definite matrix. The positive definite covariance matrix is generated through Cholesky decomposition, using the following formula:
[0120] in, It is a positive definite covariance matrix. This is the transpose of the lower triangular matrix;
[0121] Step S5: Loss function design. The first loss term is the state estimation error, and the formula used is as follows: ;
[0122] in, This represents the state estimation error value. For the sample size, It is The time series length of each sample It is Each sample at time step The true state of It is Each sample at time step The estimated state;
[0123] The second loss term is designed as the covariance matching loss, and the formula used is as follows: L cov = 1 N ∑ i=1 N 1 T i ∑ t=1 T i ∑ j=1 m ∑ k=1 m | e t i e t i T j,k -[ ∑ t|t i ] j,k | ;
[0124] in, To match the covariance loss value, , for the first Each sample at time step The estimation error, To predict the dimension of the covariance matrix, All are elements of a positive definite covariance matrix;
[0125] The total loss function is shown below: ;
[0126] in, β∈[0,1] ;
[0127] In this embodiment, the code used in step S5 is as follows:
[0128] import torch
[0129] import torch.nn as nn
[0130] def compute_loss(x_true, x_pred, beta=0.5):
[0131] """
[0132] Calculate the total loss function L_total
[0133] :param x_true: The sequence of real states (batch_size, T, m)
[0134] :param x_pred: Estimated state sequence (batch_size, T, m)
[0135] :param beta: Weighting coefficient β ∈ [0,1]
[0136] :return: L_total
[0137] """
[0138] batch_size, T, m = x_true.shape
[0139] # Calculate the state estimation error L_l2
[0140] l2_loss = torch.mean(torch.sum((x_true - x_pred) ** 2, dim=-1) / T)
[0141] # Calculate the covariance matching loss L_cov
[0142] error = x_true - x_pred # Calculate the error e_t^(i)
[0143] cov_pred = torch.matmul(error.transpose(1, 2), error) / T # Calculate the covariance of the estimation error
[0144] cov_true = torch.var(error, dim=1, unbiased=True) # Estimate the true covariance matrix
[0145] l_cov = torch.mean(torch.abs(cov_pred - cov_true))
[0146] # Calculate the total loss L_total
[0147] L_total = beta * l2_loss + (1 - beta) * l_cov
[0148] return L_total
[0149] # Sample Data
[0150] batch_size, T, m = 10, 20, 5
[0151] x_true = torch.rand(batch_size, T, m)
[0152] x_pred = torch.rand(batch_size, T, m)
[0153] loss = compute_loss(x_true, x_pred, beta=0.5)
[0154] print("Total Loss:", loss.item());
[0155] Step S6: Optimize the objective, design a Red-bellied Eagle algorithm and apply it to minimize the total loss function, and update the parameters of the complication risk prediction model.
[0156] Example 3, see Figure 3 This embodiment is based on the above embodiment. Further, in step S6, the Red-bellied Eagle algorithm is used to minimize the total loss function, specifically including the following steps:
[0157] Step S61: Initialize the red-bellied hawk population parameters, define the search interval, random growth parameters, and initial complex number of individuals. The initial complex number of individuals serves as a candidate solution, specifically including the following:
[0158] The search range is [-5,-5] The population size is 20.
[0159] The randomly generated parameters include magnitude and phase angle, with the magnitude ranging from [value missing]. ρ k ∈[0, B k - A k 2 ] The phase angle is θ k ∈[-2π,2π] ;
[0160] Initial complex number of individuals: ; ;
[0161] Step S62: Attack Phase. The attack behavior generates new candidate solutions, which will be used as input for the migration behavior to refresh the actual part. The formula used is as follows: ;
[0162] Step S63: Migration Phase. New candidate solutions are generated for the attack behavior. Combined with the fitness value, the red-bellied eagle population is guided towards the optimal candidate solution. The actual part is refreshed again. The formula used is as follows: ;
[0163] Step S64: Fitness value calculation. Evaluate the fitness value of each optimal individual and calculate the modulus of the optimal individual. The formula used is as follows: ;
[0164] The fitness value is calculated using the modulus of the optimal individual: ;
[0165] Step S65: Sort by fitness value. Sort the best individuals according to their fitness values and use the individual with the highest fitness value as a reference to feed back to step S62.
[0166] Step S66: Convergence judgment. Set the maximum number of iterations and repeat steps S62 to S65 until the maximum number of iterations is reached. Output the individual with the highest fitness value as the final solution.
[0167] 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 apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus.
[0168] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.
[0169] The present invention and its embodiments are described above. This description is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. In short, if a person skilled in the art is inspired by this and, without departing from the purpose of the present invention, designs structures and embodiments similar to this technical solution without inventiveness, they shall fall within the scope of protection of the present invention.
Claims
1. An artificial intelligence-based risk detection system for complications in diabetic patients, characterized in that: It includes a data acquisition module, a data preprocessing module, a complication risk feature extraction module, a complication risk prediction module, and an intelligent feedback module, specifically including the following: The data acquisition module collects biochemical index data of diabetic patients and transmits the patients' biochemical index data to the data preprocessing module. The data preprocessing module preprocesses the patient's biochemical indicator data; The complication risk feature extraction module extracts features related to the risk of diabetic complications from the preprocessed biochemical indicator data to form a feature vector, including static features and dynamic features; The complication risk prediction module constructs a complication risk prediction model based on GRU architecture, introduces a positive definite execution layer and covariance matrix, and predicts the risk of diabetic complications in patients to obtain prediction results. The intelligent feedback module classifies the patient's complication risk into different levels, including low risk, medium risk and high risk, based on the prediction results, and generates a risk report.
2. The AI-based risk detection system for diabetic patients' complications according to claim 1, characterized in that: The complication risk prediction module constructs a complication risk prediction model based on a GRU architecture, introducing a positive definite execution layer and a covariance matrix. The specific implementation steps are as follows: Step S1: Data preparation, using feature vectors as input data; Step S2: Model initialization. Construct a time series prediction network with GRU as the main architecture as the epilepsy risk prediction model, expressed by the following formula: ; in, Indicates a time step. This is the GRU output at the current time step. For input data, This is the output of the GRU from the previous time step. For GRU layer parameters; Step S3: Introduce a positive definite execution layer and convert the output of the GRU. Convert to a lower triangular matrix ; Step S4: Generate a positive definite matrix. The positive definite covariance matrix is generated through Cholesky decomposition, using the following formula: ; in, It is a positive definite covariance matrix. This is the transpose of the lower triangular matrix; Step S5: Loss function design. The first loss term is the state estimation error, and the second loss term is the covariance matching loss. The total loss function is shown below: ; in, , For the total loss function, For state estimation error, For covariance matching loss; Step S6: Optimize the objective, design a Red-bellied Eagle algorithm and apply it to minimize the total loss function to update the parameters of the epilepsy risk prediction model.
3. The AI-based risk detection system for diabetic patients' complications according to claim 2, characterized in that: In step S6, the Red-bellied Eagle algorithm is used to minimize the total loss function, which specifically includes the following steps: Step S61: Initialize the red-bellied eagle population parameters, define the search interval, random growth parameters, and initial complex number of individuals, with the initial complex number of individuals serving as candidate solutions; Step S62: Attack phase. The attack behavior generates new candidate solutions, which will be used as input for the migration behavior to refresh the actual part and then refresh the virtual part. Step S63: Migration phase. New candidate solutions are generated for the attack behavior. Combined with the fitness value, the red-bellied eagle population is guided to move closer to the optimal candidate solution. The actual part is refreshed again, and then the virtual part is refreshed again. Step S64: Fitness value calculation, evaluate the fitness value of each optimal individual; Step S65: Sort by fitness value. Sort the best individuals according to their fitness values and use the individual with the highest fitness value as a reference to feed back to step S62. Step S66: Convergence judgment. Set the maximum number of iterations and repeat steps S62 to S65 until the maximum number of iterations is reached. Output the individual with the highest fitness value as the final solution.
