A method for classifying diabetic retinopathy based on medical test indicators

CN117612703BActive Publication Date: 2026-08-21HANGZHOU DIANZI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311579700.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-24
Publication Date
2026-08-21
Estimated Expiration
2043-11-24

AI Technical Summary

Technical Problem

但是,由于检验指标具有数据波动大、种类繁多、影响因素多等特点,模型对检验指标的数据特征的学习能力不足,无法达到较高的准确率,这也是上述DR预测方法可行性不足的关键原因

Benefits of technology

[0045]本发明的预测数据来源是患者电子病历和化验报告数据。大多数DR检查和诊断更依赖眼底影像,本发明拓宽了检查方式和思路,可以从数据的角度提供给医生更全面的诊断证据,提供给患者更便捷的自我诊断依据。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117612703B_ABST
    Figure CN117612703B_ABST
Patent Text Reader

Abstract

The application discloses a diabetes retinopathy classification method based on medical examination indexes, and comprises the following steps: S1, patient data acquisition and preprocessing: obtaining the electronic medical records and test reports of patients related to diabetes retinopathy from the database of a medical institution, and extracting DR-related examination indexes from the electronic medical records and test reports; S2, traversing all patients and their examination indexes, using an examination index interval-based similarity calculation method to obtain the examination index similarity weight between all patients, constructing a triple <patient, patient, weight>, and further constructing an undirected weighted graph G; S3, constructing a multi-classification prediction model of a two-layer GCN, inputting the feature matrix H and the adjacency matrix A of the patient group graph G in S2, and training the classification prediction model; and S4, in actual application, inputting the electronic medical record information and examination index data of a patient to be classified into the trained GCN model in S3, so that the DR classification probability of the patient can be obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of medical data processing and auxiliary diagnostic technology, specifically to a classification method for diabetic retinopathy based on medical test indicators. Background Technology

[0002] As the course of diabetes increases, the prevalence of diabetic retinopathy (DR) and its blindness rate rise annually. DR patients are also at high risk for the early onset of other eye diseases, including cataracts, glaucoma, retinal vascular occlusion, and ischemic optic neuropathy. Currently, DR screening and diagnosis are primarily conducted through eye examinations, including visual acuity, intraocular pressure, anterior chamber angle, iris, lens, and fundus examinations. In recent years, the widespread availability of domestically produced ophthalmic examination equipment has significantly reduced examination costs, potentially enabling early prevention, diagnosis, and treatment in the near future. However, due to the large number of diabetic patients and their broad coverage across cities, regions, and age groups, the widespread availability of ophthalmic examination equipment in hospitals and medical institutions at all levels presents considerable challenges. Furthermore, patients with mobility impairments also face objective difficulties in accessing medical care.

[0003] With the increasing demand for diagnostics, online diagnosis is gradually becoming a new direction in medical information system research. Currently, most existing online DR (Digital Respiratory Diagnosis) diagnoses combine fundus medical imaging with image recognition applications based on convolutional neural networks, achieving near 100% accuracy. Doctors can use this application to significantly improve diagnostic accuracy and efficiency. However, diagnosis based solely on fundus medical imaging is often only applicable after stage I of DR, when patients already have relatively obvious symptoms and imaging abnormalities, and their quality of life has been significantly affected. Therefore, identification and prevention before obvious abnormalities are observed in fundus imaging are more important, possessing scientific, social, economic, and humanistic value for patients.

[0004] To achieve preventative diagnosis of diabetic retinopathy (DR), the medical community has recently begun researching the relationship between changes in medical laboratory indicators and DR prediction and diagnosis. Existing findings indicate a link between laboratory indicators in diabetic patients and DR development. Most methods for DR prediction based on laboratory indicators employ machine learning algorithms, such as decision trees, support vector machines, and random forests. These methods are simple to use, have low performance requirements, and can solve problems related to data classification, segmentation, and prediction. However, due to the characteristics of laboratory indicators—large data fluctuations, numerous types, and many influencing factors—the models' ability to learn the data characteristics of these indicators is insufficient, failing to achieve high accuracy. This is a key reason for the limited feasibility of the aforementioned DR prediction methods.

[0005] Therefore, there is an urgent need to provide a model for the field of diabetic retinopathy, which is characterized by complex symptoms, complex etiologies, and complex relationships between concepts. This model should be able to effectively learn the characteristics of the patient population from the test indicators of diabetic patients and accurately provide the classification results of diabetic retinopathy even in the absence of obvious symptoms and imaging abnormalities. This would lay the foundation for patients to achieve early prevention and timely treatment. Summary of the Invention

[0006] The purpose of this invention is to propose a classification method for diabetic retinopathy based on medical test indicators, addressing the shortcomings of existing technologies. This method is applied to a real medical database, thereby expanding the classification methods for diabetic retinopathy, improving the accuracy of classification results, and providing predictive suggestions based on patient test indicators in conjunction with the classification results.

[0007] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows:

[0008] A classification method for diabetic retinopathy based on medical test indicators includes the following steps:

[0009] Step 1: Patient Data Acquisition and Preprocessing

[0010] Electronic medical records and laboratory reports of patients with diabetic retinopathy (DR) were obtained from the databases of collaborating medical institutions. A set of test indicators related to DR was extracted from the electronic medical records and laboratory reports, summarized into a tabular dataset, and then preprocessed.

[0011] Preferably, in step 1, the patients are divided into three categories: those with diabetes but no DR, those with diabetes and non-proliferative DR, and those with diabetes and proliferative DR.

[0012] Preferably, in step 1, the patient dataset undergoes data cleaning and preprocessing, including the following steps:

[0013] When the null value in this column is of boolean data type, use a special symbol to fill it;

[0014] When the data type of the null value in this column is numeric, the average value of the data in this column will be used to fill the blank.

[0015] When the data in this column contains text information, but the data type is numeric or boolean, it is manually filled according to the meaning of the text information. If the meaning of the text information cannot be analyzed, special symbols or average values ​​are used for filling (depending on the data type).

[0016] When the percentage of missing data in a column is greater than or equal to 20%, the data in that column will be removed from the dataset.

[0017] When the data in this column is a range of data containing symbols such as > or <, the value after the > or < symbol is used as the value of this column.

[0018] When the data in this column contains personal privacy information such as patient name, ID number, mobile phone number, or medical record number, this column of data should be removed from the dataset.

[0019] Preferably, in step 1, in addition to the label column and the patient's unique identification number, all feature values ​​of the patient data need to be vectorized and standardized for input into the graph neural network for calculation, thereby improving the model training efficiency.

[0020] Preferably, the constructed dataset is divided into a training set, a validation set, and a test set in a 6:2:2 ratio.

[0021] Step 2: Construction of patient population based on similarity of test indicators

[0022] In this invention, a patient group refers to a group of patients with the same type of respiratory syndrome (DR). The group is divided based on whether the patients have similar diagnostic indicators. Specifically, the patient group is represented by constructing a patient group graph G = (U, V). Here, G is an undirected weighted graph containing u patient nodes and v weighted edges. Each patient node contains a vectorized representation of all diagnostic indicators in the dataset, and the weighted edges of a patient node represent the number of similar diagnostic indicators between it and another patient.

[0023] The similarity weights of test indicators among all patients are obtained using a similarity calculation method based on test indicator intervals, and triples <patient, patient, weight> are constructed. With patients as nodes, the vectorized patient test indicators are used as node attributes, and the patient test indicator similarity weights represented by the list of <patient, patient, weight> triples are used as weighted edges to construct an undirected weighted graph, namely the patient group graph G.

[0024] Step 3: Construct and train a graph convolutional neural network.

[0025] Graph Convolutional Network (GCN) is a multi-layer neural network architecture that learns low-dimensional representations of nodes from graph-structured data. GCN uses convolutional layers for feature propagation, with each layer processing first-order neighborhood data, and multiple convolutional layers are stacked to repeatedly process multi-order neighborhood data.

[0026] Using the dataset and graph G constructed in steps 1-2, the patient node feature matrix H∈R is obtained. N×M and adjacency matrix A∈R N ×NWhere N represents the number of training data points, M represents the feature dimension, H represents a patient in each row and a test metric for that patient in each column, and A describes the adjacency relationship between patient nodes, with both rows and columns representing patients. If A i,j A value of 0 indicates that patient i and patient j have no similarity relationship; a value other than 0 indicates that patient i and patient j have a similarity relationship, and the similarity weight is A. i,j .

[0027] A two-layer GCN multi-class prediction model is constructed, and the feature matrix H and adjacency matrix A are input into the GCN. The specific formula for the GCN propagation rule is as follows:

[0028]

[0029] Among them, H (l) It is the patient node feature matrix input at each layer; It is the adjacency matrix of the patient population graph G plus self-connections, I N It is the identity matrix. yes The degree matrix, W (l) σ is the parameter matrix for each layer, and σ is the activation function.

[0030] GCN outputs a feature vector H that aggregates the features of neighboring nodes. (L) Then H (L) Input the fully connected layer, and use softmax and cross-entropy loss functions to calculate the training set loss and perform backpropagation to update the parameters:

[0031]

[0032] Where N is the batch size, M is the number of categories in the output layer, and y ij It is the j-th real label, p ij This represents the probability of predicting the label. In each training cycle, the validation set is input into the GCN model to obtain the validation set loss, which is used to further evaluate the model's performance in real time. After training is complete, the test set data is input into the GCN to obtain the final training result of the model.

[0033] Step 4: Apply the model to predict patient DR classification.

[0034] In practical applications, the electronic medical record information and test index data of a patient to be classified are input. Step 2 calculates the similarity of the patient's test index to other patients, thus obtaining the feature matrix H′ and adjacency matrix A′. These are then input into the GCN model trained in step 3 to obtain the probability distribution of the classification results.

[0035] y out =GCN(H′,A′)

[0036] Then, softmax is used for normalization:

[0037]

[0038] in, This is the probability predicted by the GCN model for the patient to have each type of DR. p0 is the probability of not having DR, p1 is the probability of having non-proliferative DR, and p2 is the probability of having proliferative DR.

[0039] This invention also provides an application of a classification method for diabetic retinopathy based on medical test indicators, specifically in the form of a client-assisted diagnostic system, whose functional modules are as follows:

[0040] The input module is used to obtain basic patient information and examination indicator data to be classified. The input module should be used in conjunction with the storage module; it does not contain storage functionality itself.

[0041] The storage module stores patient data and graph structure data from the training data, including edges, weights, out-degree, and in-degree. Furthermore, the storage module supports adding new patient data and its graph structure data.

[0042] The data preprocessing module is used to clean and process patient data in the storage module, including checking for null and invalid values, extracting test index vectors, vector standardization, and handling privacy data.

[0043] The prediction module is used to input patient data to be classified into the model for DR classification prediction and obtain DR classification results. The prediction module can support dynamic updating of model parameters based on the data in the storage module to achieve continuous training and optimization.

[0044] This invention has the following characteristics and beneficial effects:

[0045] The predictive data for this invention comes from patients' electronic medical records and laboratory reports. Most DR examinations and diagnoses rely more on fundus imaging; this invention broadens the examination methods and approaches, providing doctors with more comprehensive diagnostic evidence from a data perspective and offering patients more convenient self-diagnosis information.

[0046] This invention is based on graph neural networks. Unlike previous pure data prediction methods, this invention can effectively combine the data characteristics of test indicators with the characteristics of the patient population, thus avoiding to some extent the problems of insufficient data dimensionality and loss of overall structural information that may occur with pure data prediction. It provides a new research and development case for the field of test indicator data-disease prediction.

[0047] Compared to detection methods based on fundus medical images, the application and deployment of this invention are lower in terms of deployment cost, equipment requirements, and operational difficulty. Therefore, it is more suitable for areas with insufficient basic medical resources and is conducive to promoting basic medical care in society.

[0048] The method in this invention analyzes the similarity of test indicators among patients to obtain the pairwise similarity of test indicators between different patients, thereby constructing a patient population graph. This network is transformed into graph data that the algorithm can process using a graph data processing library and then input into the model. The model consists of a two-layer graph convolutional neural network, whose inputs are the feature matrix and adjacency matrix of the patient population graph. After training, it outputs the predicted probability of DR classification for each patient. After training, the model is deployed to a server, and the model data is read from a medical database or input by the operator to obtain the predicted probability of DR classification for each patient. Combining this predicted probability with retinal fundus imaging reports can provide medical personnel with more references and suggestions. Attached Figure Description

[0049] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0050] Figure 1 This is a flowchart illustrating a classification method for diabetic retinopathy based on medical testing indicators, as described in this embodiment.

[0051] Figure 2 This is a partial data set for a patient data instance;

[0052] Figure 3 Diagram of patient node data preprocessing process;

[0053] Figure 4 This is a schematic diagram of a graph convolutional neural network;

[0054] Figure 5 This is a flowchart illustrating the classification process using this embodiment. Detailed Implementation

[0055] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.

[0056] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature. In the description of this invention, unless otherwise stated, "a plurality of" means two or more.

[0057] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art will understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0058] The purpose of this invention is to acquire and analyze patient group characteristics based on a large amount of laboratory indicator data from a medical database of diabetic and diabetic retinopathy patients, using graph structures and graph convolutional neural networks, thereby achieving the effect of predicting the stage of diabetic retinopathy. A method for classifying diabetic retinopathy based on medical laboratory indicators is provided, such as... Figure 1 As shown, the specific steps are as follows:

[0059] Step 1: Patient Data Acquisition and Preprocessing

[0060] Electronic medical records and examination reports of patients with diabetes and diabetic renal disease (DR) are obtained from the databases of collaborating medical institutions. DR-related laboratory indicators and patient data are extracted for subsequent patient population and model construction. Specifically, the following steps are included:

[0061] Step 110: Data extraction;

[0062] Patient information and laboratory test data were extracted from electronic medical records and examination reports. Based on disease type, patients were categorized into three types: diabetic without diabetic renal disease (DR), diabetic with non-proliferative DR, and diabetic with proliferative DR. A set of DR-related laboratory test indicators, E, was extracted. In this embodiment, 1419 patient data records meeting the dataset requirements were obtained, and 71 DR-related laboratory test indicators were extracted.

[0063] Step 120: Preprocess according to the outlier type;

[0064] The dataset contains Boolean and numeric data types. Different processing methods are used depending on the data type and the type of outlier, as follows:

[0065] Step 121: When the data type to be filled in for the empty value is Boolean, since Boolean values ​​have a greater impact on similarity, a valid value is not used to fill the blank; instead, a special symbol is used.

[0066] Step 122: When the data type to be filled in the blank is numeric, use the average value of the data in that column to fill it in.

[0067] Step 123: When the data in this column contains text information, and the data type to be filled in is numeric or Boolean, manually fill in the text information according to its meaning. If the meaning of the text information cannot be analyzed, fill in the text information using special symbols or average values ​​according to the data type to be filled in.

[0068] Step 124: When the percentage of missing data in this column is greater than or equal to 20%, which exceeds the default percentage threshold when constructing a typical dataset, remove the data from this column from the dataset.

[0069] Step 125: When the data in this column is a range of data containing symbols such as > or <, use the value after the > or < symbol as the value of this column.

[0070] Step 126: When the data in this column contains personal privacy information such as patient name, ID card number, mobile phone number, or medical record number, the data in this column should be removed from the dataset.

[0071] In this embodiment, after the preprocessing of the dataset obtained in step 110, the dataset contains 1023 records. The ratio of patients with diabetes but no DR, with diabetes and non-proliferative DR, and with diabetes and proliferative DR is approximately 6:3:1. Some data examples are shown below. Figure 2 As shown.

[0072] Furthermore, the constructed dataset is divided into training, validation, and test sets according to a 6:2:2 ratio.

[0073] Furthermore, the 71 test indicators extracted in step 110 are specifically: age, duration of diabetes (years), diabetes medication status, presence of hypertension, presence of hyperlipidemia, systolic / diastolic blood pressure, AST / ALT ratio, C-peptide, D3-hydroxybutyrate (D3H), D-dimer, α-L-fucosidase (AFU), γ-glutamyltransferase (GGT), albumin (Alb), albumin / globulin ratio (A / G), white blood cell count (WBC), alanine aminotransferase (ALT), thyroid-stimulating hormone (TSH), and monocytes. Count (MO#), cholinesterase (CHE), low-density lipoprotein cholesterol (LDL-C), calcium (CA), triglycerides (TG), high-density lipoprotein cholesterol (HDL-C), estimated glomerular filtration rate (eGFR), red blood cell count (RBC), activated partial thromboplastin time (APTT), creatinine (Cr), creatine kinase (CK), creatine kinase isoenzyme MB (CK-MB), thyroxine (T4), indirect bilirubin (IBil), urinary α1-microglobulin (α-MG), urinary protein-to-creatinine ratio, urinary immunoglobulin G quantification. Urea, urinary microalbumin (MA), thrombin time (TT), prothrombin time (PT), mean corpuscular volume (MCV), mean platelet volume (MPV), glucose (GLU), prealbumin (PALB), triiodothyronine (T3), retinol-binding protein (RBP), glycated hemoglobin (HbA1c), aspartate aminotransferase (AST), homocysteine ​​(HCY), fibrinogen (Fib), fibronectin (FN), platelet count (PLT), insulin, free thyroid hormones. Adenosine (FT4), free triiodothyronine (FT3), free fatty acids (FAA), apolipoprotein A1 (ApoA1), apolipoprotein B (ApoB), apolipoprotein E (ApoE), lipoprotein α (LPa), direct bilirubin (DBil), neutrophil count (NE#), total cholesterol (T-CH), total bilirubin (TBil), total bile acids (TBA), total protein (TP), albumin concentration (GALB), thyroglobulin antibody (TGA), anti-thyroid peroxidase antibody, glycated albumin (GA).

[0074] Step 2: Construction of patient population based on similarity of test indicators

[0075] In this invention, a patient group refers to a group of DR patients with similar characteristics. The characteristic of group division is whether patients have similar test indicators. Specifically, the patient group is represented by constructing a patient group graph G = (U, V). G is an undirected weighted graph constructed from the dataset provided in step 1, including u patient nodes and v weighted edges. Each patient node contains a vectorized representation of all test indicators in the dataset, and the weighted edges of a patient node represent that it has similar test indicators to another patient. The weight values ​​represent the number of similar test indicators between the two patients.

[0076] The patient population graph is based on patient data and additionally constructs a data feature of the test index similarity. The graph convolutional neural network can aggregate the data features of adjacent nodes in the patient population graph, thereby achieving more accurate DR classification prediction.

[0077] The construction of patient groups based on the similarity of test indicators mainly includes the following steps:

[0078] Step 210: Set the normal range for each test indicator;

[0079] Obtain the normal ranges for all test indicators in the test indicator set E from step 1 from a database or authoritative medical guidelines. For test indicator e k ∈E, its normal value range is Range k .

[0080] Step 220: Similarity calculation method based on test index interval;

[0081] The similarity weight range for the test index is set. In this embodiment, the model classification prediction performance is optimal when the weight range is between 10 and 20. The similarity calculation method based on the test index interval is as follows: Figure 3 As shown, the dataset processed in step 1 is traversed. For the test index e k ∈E, calculate the variance of the test index, and use the variance as reference data to set the data granularity. Threshold, used to calculate the interval of the test indicators. The value of should be positively correlated with the variance, and should ensure that the final calculated similarity weight of the test index is within a preset range. Test index interval k The calculation formula is as follows:

[0082] interval k =Range k / g k

[0083] Assume the i-th patient is u i The jth patient is u j Calculate u i and uj In the test index e k The difference in the test results Δe ij,k :

[0084] Δe ij,k =e i,k -e j,k

[0085] According to Δe ij,k Calculate the absolute value of u i and u j In the test index e k Similarity weight w ij,k :

[0086]

[0087] u i and u j The overall similarity weight is composed of the weights w of each test index. ij,k Summing yields:

[0088]

[0089] Step 230: Evaluate whether the obtained similarity weights of the test indicators are within the preset range;

[0090] In this embodiment, the model performs best when the similarity weight is between 10 and 20. Weights that are too high or too low will prevent the model from effectively extracting features from similar nodes, thus affecting the model's performance. If the weight exceeds a reasonable range, return to step 220 to modify the desired granularity, and repeat steps 220-230.

[0091] Ultimately, based on patient u i and patient u j and weight w ij The triple <patient, patient, weight> is obtained.

[0092] Step 240: Construct a patient population graph;

[0093] Based on all <patient, patient, weight> obtained in step 220, patients are used as graph nodes, and the relationships between patients represented by triples are used as weighted edges of the graph to construct a patient group graph G. At the same time, the triple list is converted into an adjacency matrix A of G.

[0094] Step 3: Construct and train a graph convolutional neural network.

[0095] This example constructs a two-layer GCN graph convolutional neural network, inputting a feature matrix and an adjacency matrix. Through repeated training, a DR classification and prediction model is obtained that aggregates patient test similarity indicators and patient-specific characteristics. A schematic diagram is shown below. Figure 4 As shown.

[0096] Specifically, the steps include the following:

[0097] Step 310: Input the feature matrix and adjacency matrix into the GCN;

[0098] Using the patient population graph G constructed in step 2, the patient node feature matrix H∈R can be obtained. 1023×71 and adjacency matrix A∈R 1023×1023 A two-layer GCN multi-class prediction model is constructed, and the feature matrix H and adjacency matrix A are input into the GCN.

[0099] The GCN propagation rule formula in this example adopts the Symmetric normalized Laplacian implementation, that is:

[0100]

[0101] Among them, H (l) It is the patient node feature matrix input at each layer; It is the adjacency matrix A of the patient population graph G plus self-connections, I N It is the identity matrix. yes The degree matrix, W (l) σ is the parameter matrix for each layer, and σ is the activation function for each layer. In this example, the Rectified Linear Units (ReLU) activation function is used.

[0102] Specifically, each layer of GCN uses an adjacency matrix A and a feature matrix H. (l) Multiplying these together yields a summary of the neighbor features for each patient node, which is then multiplied by the parameter matrix W. (l) Then, an activation function σ is added, and a nonlinear transformation is performed to obtain the feature matrix H of aggregated neighbor node features. (l+1) Since information needs to be preserved during propagation in convolutional layers, an identity matrix I needs to be added to the adjacency matrix A. N For the adjacency matrix Perform normalization operation This is to maintain the original distribution of the feature matrix H during information transmission, and to prevent large differences in feature distribution between nodes with high degree and nodes with low degree.

[0103] Step 320: Use the loss function to perform backpropagation and update the parameters;

[0104] The two-layer GCN outputs a feature vector H that aggregates the features of neighboring nodes. (L) Then H (L)Input a fully connected layer and use the softmax activation function and cross-entropy loss function for backpropagation to update the parameters:

[0105]

[0106] Where N is the batch size, M is the number of categories in the output layer, and y ij It is the j-th real label, p ij It is the probability of label classification prediction.

[0107] Step 330: Evaluate the model's performance using the validation and test sets;

[0108] After each training round, a validation set is input into the model to evaluate its training performance in real time. After training is complete, a test set is input into the model to obtain the classification prediction results, which are then compared with the true label values ​​to evaluate the final training performance of the model.

[0109] Step 4: Apply the model to predict patient DR classification.

[0110] In practical applications, the electronic medical record information and test index data of a patient to be classified are input. Step 2 calculates the similarity of the patient's test index to other patients, thus obtaining the feature matrix H′ and adjacency matrix A′. These are then input into the GCN model trained in step 3 to obtain the probability distribution of the classification results.

[0111] y out =GCN(H′,A′)

[0112] Then, softmax is used for normalization:

[0113]

[0114] in, This is the probability predicted by the GCN model for the patient to have each type of DR. p0 is the probability of not having DR, p1 is the probability of having non-proliferative DR, and p2 is the probability of having proliferative DR.

[0115] Based on steps 1, 2, 3, and 4, the pseudocode for the model algorithm in this example is as follows:

[0116]

[0117] The core environment used in the verification experiment of this embodiment is as follows:

[0118] Operating System: Ubuntu 20.04.1 x86_64

[0119] Python: 3.9.16

[0120] PyTorch: 1.13.0 CUDA

[0121] PyTorch Geometric 2.3.1

[0122] NumPy version 1.24.3

[0123] pandas:1.1.3

[0124] Scipy: 1.10.1

[0125] Scikit-learn: 1.2.2

[0126] In this embodiment, a two-layer GCN model is constructed using PyTorch Geometric (PyG). The input layer dimension of the GCN in PyG is 71, which is the node feature dimension of the patient population graph is 71, and the hidden layer dimension is 32.

[0127] In the GCNConv forward method, to prevent overfitting, nn.functional is used, and dropout randomly discards connections between network layers, with parameter p = 0.5. The optimizer used is Adam.

[0128] In this embodiment, the batch size is set to 32, and random sample extraction (shuffle=True) is enabled.

[0129] Hyperparameter settings: learning_rate: 8e-2, weight_decay: 5e-4, training epoch: 1000.

[0130] The comparative experiments used four metrics—accuracy, precision, recall, and F1 score—to analyze the model's performance. This embodiment applied the dataset to commonly used data classification models and methods, Support Vector Machine (SVM) and Random Forest (RF), and compared them with the method of this invention. The results are as follows:

[0131] Table 1: Comparison of Indicators for DR Prediction Models

[0132]

[0133] The method of this invention achieves good results in all four metrics, with precision and recall improved by 18% and 16% and 16% and 12% respectively compared to SVM and RF. This reflects that the present invention can achieve more efficient and accurate prediction and classification in DR prediction.

[0134] This embodiment also provides an application of a classification method for diabetic retinopathy based on medical test indicators.

[0135] After the GCN model has been trained, it is deployed to the client system and database. The specific architecture is as follows:

[0136] The input module is used to retrieve basic patient information and laboratory report data. The input module should be used in conjunction with a storage module; it does not contain storage functionality itself.

[0137] Furthermore, the input methods are divided into manual input and batch input. This example embeds the input module into a medical database, which can support dynamically retrieving patient data from the database.

[0138] The storage module stores patient data and graph structure data from the training data, including edges, weights, out-degree, and in-degree. Furthermore, the storage module supports adding new patient data and its graph structure data.

[0139] Furthermore, a graph database that facilitates the storage of graph data and corresponding feature data, such as Neo4j, can be used.

[0140] The data preprocessing module is used to clean and process patient data in the storage module, including checking for null and invalid values, extracting test index vectors, vector standards, and handling private data.

[0141] The prediction module is used to input patient data to be classified into the model for DR classification prediction and obtain DR classification results. The prediction module can support dynamic updating of model parameters based on the data in the storage module to achieve continuous training and optimization.

[0142] Furthermore, the prediction module supports client-side training to dynamically update model parameters. This is divided into offline training and online training. Offline training can retrain the model on the initial parameters; online training can dynamically train the model parameters based on changes in patient data. The classification method in this invention can be provided via commands or a graphical user interface (GUI). The overall workflow is as follows: Figure 5 As shown. The basic operation instructions that need to be implemented in each form are as follows:

[0143] (1) Data input. Patient test data can be imported in batches from Excel files or added manually. In addition, the threshold range of each test indicator can be modified.

[0144] (2) Training the prediction model. First, check if the amount of data in the model is greater than the minimum requirement of the model. Then you can choose to train offline or online. Offline training will reset the current model and train it from scratch based on the existing data; online training will iterate and update the parameters based on the new data.

[0145] (3) Predict DR staging. Based on the model parameters obtained from training, predict the DR staging of a certain patient node and display it.

[0146] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings, but the present invention is not limited to the described embodiments. For those skilled in the art, various changes, modifications, substitutions, and variations can be made to these embodiments, including components, without departing from the principles and spirit of the present invention, and these variations still fall within the protection scope of the present invention.

Claims

1. A classification method for diabetic retinopathy based on medical test indicators, characterized in that, Includes the following steps: S1. Patient Data Acquisition and Preprocessing The data collection method is as follows: obtain electronic medical records and laboratory reports of patients related to DR from the database of medical institutions, and extract DR-related test indicators from the electronic medical records and laboratory reports; among them, the obtained patients are divided into three categories, including: patients with diabetes but no DR, patients with diabetes and non-proliferative DR, and patients with diabetes and proliferative DR. S2. Construction of patient groups based on similarity of test indicators The algorithm iterates through all patients and their laboratory indicators, using a similarity calculation method based on the interval of the laboratory indicators to obtain the similarity weights of the laboratory indicators among all patients. The interval of the laboratory indicators is calculated based on variance and data granularity. Triples <patient, patient, weight> are constructed based on the calculated similarity weights. With patients as nodes, vectorized patient laboratory indicators as node attributes, and the similarity weights of the laboratory indicators among patients represented by the <patient, patient, weight> triple list as weighted edges, an undirected weighted graph, i.e., the patient population graph, is constructed. ; S3. Construct a graph convolutional neural network and train it. The graph constructed using S2 The patient node feature matrix can be obtained. and adjacency matrix ,in Indicates the number of training data. Representing feature dimension, The column represents a patient's test results. Describes the adjacency relationships between patient nodes, where both rows and columns represent patients. A value of 0 indicates that the patient With patients There is no similarity relationship. If the value is not 0, it indicates that the patient... With patients There is a similarity relationship, and the similarity weight is... ; A two-layer GCN multi-class prediction model is constructed. The feature matrix H and the adjacency matrix A are input into the GCN. The specific formula for the GCN propagation rule is as follows: in, It is the patient node feature matrix z input to each layer; It is the adjacency matrix of the patient population graph G plus self-connections. It is the identity matrix. yes The degree matrix, It is the parameter matrix of each layer. It is an activation function; A fully connected layer is then connected after the GCN. Layers, calculated based on the cross-entropy loss function. And propagate in reverse: in, It is the batch size. The number of categories in the output layer. It is the first A real label, It is the probability of label classification prediction; S4. Applying models to predict patient DR classification. In practical applications, the electronic medical record information and laboratory test data of a patient to be classified are input. The similarity of the patient's laboratory test indicators with those of other patients is calculated according to S2, thereby obtaining the feature matrix. and adjacency matrix The data is then input into the GCN model trained in S3 to obtain the probability distribution of the classification results: Then use Normalization is performed: in, It is the probability predicted by the GCN model that the patient has each type of DR. The probability of not having DR, The probability of developing non-proliferative DR, The probability of developing proliferative DR.

2. The method for classifying diabetic retinopathy based on medical test indicators according to claim 1, characterized in that, The test indicators include age, duration of diabetes (years), diabetes medication status, presence of hypertension, presence of hyperlipidemia, systolic / diastolic blood pressure, AST / ALT ratio, C-peptide, D3-hydroxybutyrate, D-dimer, α-L-fucosidase, γ-glutamyltransferase, albumin, albumin-to-globulin ratio, white blood cell count, alanine aminotransferase, thyroid-stimulating hormone, monocyte count, cholinesterase, low-density lipoprotein cholesterol, calcium, triglycerides, high-density lipoprotein cholesterol, estimated glomerular filtration rate, red blood cell count, activated partial thromboplastin time, creatinine, creatine kinase, creatine kinase isoenzyme MB, thyroxine, indirect bilirubin, urinary α1-microglobulin, urinary protein-to-creatinine ratio, urinary immunoglobulin G quantification, urea, urinary microalbumin, thrombin time, prothrombin time, and average... Mean corpuscular volume (MCV), mean platelet volume (MPV), glucose, prealbumin, triiodothyronine, retinol-binding protein, glycated hemoglobin, aspartate aminotransferase (AST), homocysteine, fibrinogen, fibronectin, platelet count, insulin, free thyroxine, free triiodothyronine, free fatty acids, apolipoprotein A1, apolipoprotein B, apolipoprotein E, lipoprotein α, direct bilirubin, neutrophil count, total cholesterol, total bilirubin, total bile acids, total protein, albumin concentration, thyroglobulin antibody, anti-thyroid peroxidase antibody, glycated albumin.

3. The method for classifying diabetic retinopathy based on medical test indicators according to claim 1, characterized in that, The preprocessing methods in step S1 are: outlier / null value removal, text data digitization, range value selection, standardization, and privacy data processing.

4. The method for classifying diabetic retinopathy based on medical test indicators according to claim 1, characterized in that, The similarity calculation method based on the test index interval in S2 is as follows: (1) Set various test indicators normal range ; (2) Set the similarity weight range of the test indicators, calculate the variance of each column of the test indicators obtained in step S1, use the variance as reference data, and combine the normal value range and the expected data granularity. Calculate the similarity interval for each test indicator. ,in The value of is positively correlated with the variance, and the final calculated similarity weight of the test index should be within a preset range. The calculation formula is: (3) Assume the first The patient is , No. The patient is If the two patients have the same test results If the absolute difference between the results is less than or equal to the interval, then they are considered similar, i.e., the weights are adjusted accordingly. Specifically: calculate and In the test indicators Difference in test results : calculate and In the test indicators Similarity weight : and The overall similarity weight is determined by the weights of each test index. Summing yields: Based on the above calculation results, the final triplet <patient, patient, weight> is obtained; (4) Traverse the list of <patient, patient, weight> triples in (3), with patients as nodes, the vectorized patient test index as node attributes, and the similarity weight of test indexes between patients as weighted edges, to construct an undirected weighted graph, i.e., the patient group graph G. (5) Evaluate whether the similarity weights of the obtained test indicators are within the preset range. If they exceed the preset range, then return to (2) to adjust the expected granularity. Make the modifications and repeat (3) to (5).

5. A classification system for diabetic retinopathy based on medical test indicators, characterized in that, The diabetic retinopathy classification method based on medical test indicators described in any one of claims 1-4 is deployed to a server to build an online system for parsing patient data. At the same time, the classification model is applied to a medical database, and the graph structure and model parameters are dynamically updated according to the database data. The system can use the trained model to predict the patient's current DR classification status.

6. A classification system for diabetic retinopathy based on medical test indicators according to claim 5, characterized in that, After training, the classification method will be deployed to the client system and database, and its specific architecture is as follows: The input module is used to obtain basic information and examination indicator data of the patients to be classified. The storage module is used to store patient data and graph structure data in the training data, including edges, weights, out-degree, and in-degree. In addition, the storage module supports adding new patient data and its graph structure data. The data preprocessing module is used to clean and process patient data in the storage module, including checking for null and invalid values, extracting test index vectors, vector standardization, and handling privacy data. The prediction module is used to input the patient data to be classified into the GCN model to perform DR classification prediction and obtain DR classification results.