Cardiovascular disease prognosis prediction method and system based on nomogram and attention model
By combining line diagrams and attention models, comprehensively analyzing patients' case information and other influencing factors, the problems that cannot comprehensively analyze patient risk factors in existing technologies have improved the accuracy and interpretability of prognosis and prediction of cardiovascular disease.
Patent Information
- Application Number
- CN202411514572.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-10-29
AI Technical Summary
When using nomograms to predict cardiovascular disease prognosis, the prior art cannot comprehensively analyze the patient's case information and other related influencing factors, resulting in the incomplete and accurate prediction results.
Combining the nomogram and attention model, through data access, preprocessing, attention model generation of risk values and nomogram construction, the patient's total score is calculated to predict cardiovascular disease risk.
It improves prediction accuracy and interpretability, enables a more comprehensive analysis of patient risk factors and levels, and helps medical staff make more accurate diagnosis and treatment decisions.
Smart Images

Figure CN119028592B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent first aid technology, and in particular to a cardiovascular disease prognosis prediction method and system based on a nomogram and an attention model. Background Art
[0002] Acute cardiovascular disease is one of the leading causes of death worldwide, and it seriously threatens human life and health. It is crucial to predict the prognosis of patients with this disease and assess the risk of adverse cardiovascular events in the future. The nomogram is a method to intuitively and effectively display the results of Cox regression. Its greatest feature is the prediction of the outcome of the event. At the same time, the length of the straight line can be used to represent the impact of different variables on the outcome, as well as the impact of different values of the variable on the outcome. During the emergency treatment process, the patient's immediate clinical data is scored accordingly, and arrhythmia, myocardial infarction, dyspnea, shock, respiratory rate, blood pressure, and blood oxygen are calculated as clinical scores. The score of each category is obtained based on the corresponding scale of the first row of scores. At the same time, the attention model will access the patient's in-hospital case data to identify the patient's information, and will comprehensively analyze the patient's other multi-category related information, such as age, gender, smoking history, drinking history, coronary heart disease history, stroke history, hyperlipidemia history, hypertension history, diabetes history, etc., to generate a model score, and finally add the clinical score to the model score to get the final score, and the patient's one-year survival risk is obtained in the nomogram.
[0003] Currently, the nomogram model is widely used in the prognosis assessment and prediction of various diseases, such as the prognosis prediction of malignant tumors such as liver cancer, breast cancer, gastric cancer, and bile duct cancer. The application of nomograms in emergency patients is also very valuable. By monitoring the patient's vital signs and changes in the condition, the nomogram can help medical staff quickly make diagnosis and treatment decisions, and improve the efficiency and success rate of emergency treatment.
[0004] The transparency provided by the nomogram solves the problem that the results of the artificial intelligence model are not easy to explain, and patients will have more confidence in the recommended treatment methods displayed by the nomogram. However, due to the excessive amount of information related to the patient's disease, the nomogram can only display a few fixed and more important influencing factors in the chart, and cannot comprehensively analyze the patient's case information and other related influencing factors. Summary of the invention
[0005] One of the purposes of the present invention is to provide a method for predicting cardiovascular disease prognosis based on a nomogram and an attention model to solve the problems raised in the above-mentioned background technology.
[0006] The purpose of the present invention can be achieved through the following technical solutions:
[0007] The cardiovascular disease prognosis prediction method based on the nomogram and attention model includes the following steps:
[0008] S1: data access, collection and preprocessing;
[0009] The data access, collection and preprocessing include obtaining basic patient-related information and medical history information from the hospital system and emergency system, then cleaning and filtering the acquired data, and then classifying the acquired data; specifically, data that conforms to binary classification is converted to binary classification, data that conforms to multi-classification is converted to multi-classification, and data that conforms to discrete classification is converted to normalized discrete.
[0010] S2: Generate risk values for patient prognosis prediction using the attention model;
[0011] Through S1 data access and preprocessing, the model training data set and test data set are constructed, and then the patient's risk value is obtained after model pre-training.
[0012] S3: Construct a risk prediction nomogram for patients with acute cardiovascular disease;
[0013] It includes obtaining historical data sets related to the survival of patients with acute cardiovascular disease based on the data of S1, and then using univariate and multivariate statistical analysis and constructing a nomogram model, converting the regression coefficients of the multivariate regression model into scores on the nomogram, and plotting the scores of each variable into a nomogram according to its contribution to the predicted risk. The total score of each patient is calculated through the nomogram, and the risk probability is predicted through the total score. The nomogram is applied to clinical practice, and the total score of the patient is calculated by inputting his or her various indicators, thereby predicting his or her risk of acute cardiovascular disease.
[0014] S4: Real-time prediction and system deployment;
[0015] The model is deployed to the back-end server, which receives patient-related information entered in S1 by providing an API and can return prediction results; it provides a visual interface, can make real-time predictions through mobile terminals, supports patient risk predictions in multiple locations such as patient sites, ambulances, and medical institutions, and regularly uses new data to update the model to improve the accuracy of model predictions. At the same time, it provides system monitoring functions to ensure real-time responses, collect user feedback, and continuously improve the system.
[0016] Furthermore, the acquisition and analysis of the patient's basic information in S1 includes obtaining the patient's gender, age, marital status, drinking history and smoking history, etc., and performing binary data conversion on the information on gender, marital status, drinking history and smoking history, and performing discrete data normalization on age.
[0017] The acquisition and analysis of the patient's medical history information in S1 includes acquiring medical history information such as hypertension, hyperlipidemia, diabetes, coronary heart disease and stroke, as well as surgical history, radiotherapy and chemotherapy history and other disease history information.
[0018] Furthermore, the construction of the model training data set and test data set includes obtaining historical data related to patients with acute cardiovascular disease in the hospital system or emergency system, performing preprocessing operations on the data in S1, and dividing the data into training set and test set in a quantity ratio of 7:3; based on the above data set, the model network structure is constructed, and the model is mainly divided into three parts, namely, an embedding network, an encoder network, and a prediction network.
[0019] The model pre-training includes: constructing an Adam optimizer using weight decay repair, using a negative log-likelihood loss function during training to improve the training effect, continuously pre-training the model, and setting the number of training iterations to 100 by default; by implementing an early stopping method, if the model verification loss has not improved after a certain number of iterations, then the training is stopped in advance; after the model training is completed, it is saved, and when using the prediction function, the model is loaded in advance, the input content of the model is set, and the predicted data is output by calculation to output the patient's risk value.
[0020] Furthermore, the embedding network is constructed according to the numerical value, position and tag type, and finally generates embeddings corresponding to the data. The encoder network is constructed based on the attention mechanism and outputs the encoder value corresponding to the data. The prediction network outputs the risk prediction of each round of training.
[0021] Furthermore, the historical data set related to the survival of patients with acute cardiovascular disease includes whether there are symptoms of arrhythmia, whether there are symptoms of myocardial infarction, whether there are symptoms of dyspnea, whether there are symptoms of shock, respiratory rate, blood pressure, blood oxygen, etc.
[0022] The single factor was used to preliminarily screen out variables related to prognosis through a single factor analysis chi-square test.
[0023] The multiple factors are used to use a multifactor Logistic regression model and a Cox regression model for time event data to analyze the independent impact of multiple factors on risk and obtain preliminary screening characteristic variables.
[0024] Another object of the present invention is to provide a cardiovascular disease prognosis prediction system based on a nomogram and an attention model, comprising:
[0025] The data acquisition module is used to connect to the hospital system and emergency system, and obtain basic information, medical history information, examination information, etc. related to patients through data access.
[0026] The data processing module is used to clean and filter the data obtained by the data acquisition module, supplement missing values for missing data, classify the acquired data, perform binary classification conversion on data that meets the binary classification requirements, perform multi-classification conversion on data that meets the multi-classification requirements, and perform normalized discrete conversion on data that meets the discrete classification requirements.
[0027] The prediction module is used to construct the model network structure and draw the nomogram according to the data obtained by the data processing module, so as to predict the risk of patients by combining the model and the nomogram.
[0028] The operation module includes a visual interface, which receives patient information through the API and can return it to the prediction structure; through real-time prediction on the mobile terminal, it supports providing patient risk prediction in multiple locations such as the patient site, ambulance, and medical institutions.
[0029] The update module is used to regularly update system data and has the function of monitoring the system to ensure real-time response, collect user feedback, and continuously improve the system.
[0030] Beneficial effects of the present invention:
[0031] The present invention provides a cardiovascular disease prognosis prediction method and system based on a nomogram and an attention model. The established model can be used to analyze the risk factors and risk levels related to the prognosis of emergency patients, which helps to improve prediction accuracy, interpretability and personalized treatment guidance, thereby promoting clinical decision-making efficiency and the development of future research. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0033] Figure 1 It is a flow chart of the prognosis prediction method of the present invention.
[0034] Figure 2 It is a flow chart of the use of the prognosis prediction method and system of the present invention.
[0035] Figure 3 It is a structural diagram of the nomogram model.
[0036] Figure 4 This is a network structure diagram based on the attention model. DETAILED DESCRIPTION
[0037] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0038] Embodiment 1:
[0039] See also Figures 1 to 4 In an embodiment of the present invention, a method for predicting cardiovascular disease prognosis based on a nomogram and an attention model comprises the following steps:
[0040] S1: data access, collection and preprocessing;
[0041] Data access, collection and preprocessing include obtaining basic patient-related information and medical history information from the hospital system and emergency system, then cleaning and filtering the acquired data, and then classifying the acquired data; specifically, data that conforms to binary classification is converted to binary classification, data that conforms to multi-classification is converted to multi-classification, and data that conforms to discrete classification is converted to normalized discrete.
[0042] S2: Figure 4 As shown, the attention model is used to generate prognostic predictions for patients;
[0043] Through S1 data access and preprocessing, the model training data set and test data set are constructed, and then the patient's risk value is obtained after model pre-training.
[0044] S3: Figure 3 As shown, a nomogram for predicting the prognosis of patients with acute cardiovascular disease was constructed;
[0045] It includes obtaining historical data sets related to the survival of patients with acute cardiovascular disease based on the data of S1, and then using univariate and multivariate statistical analysis and constructing a nomogram model, converting the regression coefficients of the multivariate regression model into scores on the nomogram, and plotting the scores of each variable into a nomogram according to its contribution to the predicted risk. The total score of each patient is then calculated through the nomogram, and the risk probability is predicted through the total score. The nomogram is applied to clinical practice, and the total score of the patient is calculated by inputting his or her various indicators, thereby predicting his or her risk of acute cardiovascular disease.
[0046] S4: Real-time prediction and system deployment;
[0047] The model is deployed to the back-end server, which receives patient-related information entered in S1 by providing an API and can return prediction results; it provides a visual interface, can make real-time predictions through mobile terminals, supports patient risk predictions in multiple locations such as patient sites, ambulances, and medical institutions, and regularly uses new data to update the model to improve the accuracy of model predictions. At the same time, it provides system monitoring functions to ensure real-time responses, collect user feedback, and continuously improve the system.
[0048] Among them, the acquisition and analysis of the patient's basic information in S1 includes obtaining the patient's gender, age, marital status, drinking history and smoking history, as well as binary data conversion of the information on gender, marital status, drinking history and smoking history, and normalization of discrete data of age.
[0049] The acquisition and analysis of the patient's medical history information in S1 includes obtaining medical history information such as hypertension, hyperlipidemia, diabetes, coronary heart disease and stroke, as well as surgical history, radiotherapy and chemotherapy history and other disease history information.
[0050] Among them, the construction of the model training data set and test data set includes obtaining historical data related to patients with acute cardiovascular disease in the hospital system or emergency system, performing preprocessing operations on the data in S1, and dividing the data into training set and test set in a ratio of 7:3; based on the above data set, the model network structure is constructed, and the model is mainly divided into three parts, namely, embedding network, encoder network, and prediction network.
[0051] Model pre-training includes: building an Adam optimizer using weight decay repair, using a negative log-likelihood loss function during training to improve training results, continuously pre-training the model, and setting the default number of training iterations to 100; implementing an early stopping method, if the model verification loss does not improve after a certain number of iterations, then stop training early; save the model after training is complete, load the model in advance when using the prediction function, set the model input content, calculate and output the predicted data, and output the patient's risk value.
[0052] Among them, the embedding network is constructed according to the value, position and tag type, and finally generates the embeddings corresponding to the data. The encoder network is built based on the attention mechanism and outputs the encoder value corresponding to the data. The prediction network outputs the risk prediction for each round of training.
[0053] Among them, the historical data sets related to the survival of patients with acute cardiovascular disease include whether there are symptoms of arrhythmia, whether there are symptoms of myocardial infarction, whether there are symptoms of dyspnea, whether there are symptoms of shock, respiratory rate, blood pressure, blood oxygen, etc.
[0054] The univariate analysis was used to preliminarily screen out variables associated with prognosis through the chi-square test.
[0055] Multifactors were used to analyze the independent effects of multiple factors on risk using multifactor logistic regression models and Cox regression models for time-to-event data, and to obtain preliminary screening characteristic variables.
[0056] Embodiment 2:
[0057] On the basis of Example 1, a cardiovascular disease prognosis prediction system based on a nomogram and an attention model includes:
[0058] The data acquisition module is used to connect to the hospital system and emergency system, and obtain basic information, medical history information, examination information, etc. related to patients through data access.
[0059] The data processing module is used to clean and filter the data obtained by the data acquisition module, supplement missing values for missing data, classify the acquired data, perform binary classification conversion on data that meets the binary classification requirements, perform multi-classification conversion on data that meets the multi-classification requirements, and perform normalized discrete conversion on data that meets the discrete classification requirements.
[0060] The prediction module is used to construct the model network structure and draw the nomogram according to the data obtained by the data processing module, so as to predict the risk of patients by combining the model and the nomogram.
[0061] The operation module includes a visual interface, which receives patient information through the API and can return it to the prediction structure; through real-time prediction on the mobile terminal, it supports providing patient risk prediction in multiple locations such as the patient site, ambulance, and medical institutions.
[0062] The update module is used to regularly update system data and has the function of monitoring the system to ensure real-time response, collect user feedback, and continuously improve the system.
[0063] Therefore, the cardiovascular disease prognosis prediction method and system based on the nomogram and attention model provided by the present invention constitutes a scoring analysis model for the prognosis-related factors of acute cardiovascular disease emergency patients through the combination of the attention model and the nomogram. The nomogram can clearly show the degree of influence of different characteristics on the prediction results, and help medical personnel understand the reasoning process and decision-making basis behind the model. The model combined with the attention mechanism can give personalized treatment suggestions and prognosis evaluations according to the individual characteristics and condition of the patient, which helps to improve the treatment effect. The model can assist medical personnel to quickly and accurately evaluate the prognosis of cardiovascular patients, and guide the formulation of more reasonable and effective treatment plans, thereby improving clinical decision-making efficiency. And by combining the attention model and the nomogram, the relationship between different characteristics and factors can be deeply analyzed, providing an important reference for further research and improvement of the prognosis scoring model for acute cardiovascular patients. In summary, the analysis model for scoring the prognosis-related factors of acute cardiovascular patients combined with the attention model and the nomogram helps to improve the prediction accuracy, interpretability and personalized treatment guidance, thereby promoting the efficiency of clinical decision-making and the development of future research.
[0064] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments, and the above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, and these changes and improvements all fall within the scope of the present invention to be protected.
Claims
1. A cardiovascular disease prognosis prediction method based on a nomogram and an attention model, characterized in that: The following steps are involved: S1: data access, collection and preprocessing; The data access, collection and preprocessing include obtaining basic information and medical history information related to the patient from the hospital system and the emergency system, then cleaning and filtering the acquired data, and then classifying the acquired data; specifically, data that meets the binary classification requirements are converted to binary classification, data that meets the multi-classification requirements are converted to multi-classification requirements, and data that meets the discrete classification requirements are converted to normalized discrete data; S2: Generate patient prognosis predictions using the attention model; Through S1 data access and preprocessing, the model training data set and test data set are constructed, and then the patient's risk value is obtained after model pre-training; S3: Construct a nomogram for predicting the prognosis of patients with acute cardiovascular disease; It includes obtaining historical data sets related to the survival of patients with acute cardiovascular disease based on the data of S1, and then using single-factor and multi-factor statistical analysis and constructing a nomogram model, converting the regression coefficients of the multi-factor regression model into scores on the nomogram, and drawing the scores of each variable into a nomogram according to its contribution to the predicted risk, and then calculating the total score of each patient through the nomogram, and predicting the risk probability through the total score, and applying the nomogram to clinical practice, by inputting the patient's various indicators to calculate the total score, so as to predict the risk of adverse prognosis of patients with acute cardiovascular disease; S4: Real-time prediction and system deployment; The model is deployed to the backend server, which receives the patient-related information entered in S1 by providing an API and can return the prediction results; it provides a visual interface, can make real-time predictions through the mobile terminal, supports the provision of adverse prognosis predictions for patients at multiple locations such as the patient site, ambulance, and medical institutions, and regularly uses new data to update the model to improve the accuracy of the model prediction. At the same time, it provides system monitoring functions to ensure real-time response, collect user feedback, and continuously improve the system; The construction of the model training data set and the test data set includes obtaining historical data related to patients with acute cardiovascular disease in the hospital system or the emergency system, performing the preprocessing operation in S1 on the data, and dividing the data into a training set and a test set in a quantity ratio of 7:3; constructing a model network structure based on the above data set, and the model is mainly divided into three parts, namely, an embedding network, an encoder network, and a prediction network; The model pre-training includes: constructing an Adam optimizer using weight decay repair, using a negative log-likelihood loss function during training to improve the training effect, continuously pre-training the model, and setting the number of training iterations to 100 by default; by implementing an early stopping method, if the model verification loss does not improve after iteration, then stop training in advance; after the model training is completed, save it, load the model in advance when using the prediction function, set the model input content, output the predicted data by calculation, and output the patient's risk value; The embedding network is constructed based on the value, position and tag type, and finally generates embeddings corresponding to the data. The encoder network is constructed based on the attention mechanism and outputs the encoder value corresponding to the data. The prediction network outputs the risk prediction for each round of training. The system in S4 includes: The data acquisition module is used to connect to the hospital system and the emergency system, and obtain the patient's basic information, medical history information and examination information through data access; The data processing module is used to clean and filter the data obtained by the data acquisition module, supplement missing values for missing data, classify the acquired data, perform binary classification conversion on data that meets the binary classification, perform multi-classification conversion on data that meets the multi-classification, and perform normalized discrete conversion on data that meets the discrete classification; The prediction module is used to construct a model network structure and draw a nomogram based on the data obtained by the data processing module, so as to predict the risk of patients by combining the model and the nomogram; Operational module, including a visual interface, receives patient information through API and returns it to the prediction structure; supports patient risk prediction at the patient site, ambulance and medical institution through real-time prediction on mobile terminals; The update module is used to regularly update system data and has the function of monitoring the system to ensure real-time response, collect user feedback, and continuously improve the system.
2. The cardiovascular disease prognosis prediction method based on nomogram and attention model according to claim 1, characterized in that: The acquisition and analysis of the basic information of the patient in S1 includes acquiring the patient's gender, age, marital status, drinking history and smoking history, performing binary data conversion on the information of gender, marital status, drinking history and smoking history, and performing discrete data normalization processing on age; The acquisition and analysis of the patient's medical history information in S1 includes acquiring medical history information of hypertension, hyperlipidemia, diabetes, coronary heart disease and stroke, as well as surgical history, radiotherapy and chemotherapy history and other disease history information.
3. The cardiovascular disease prognosis prediction method based on nomogram and attention model according to claim 1, characterized in that: The historical data set related to the survival of patients with acute cardiovascular disease includes whether there are symptoms of arrhythmia, whether there are symptoms of myocardial infarction, whether there are symptoms of dyspnea, whether there are symptoms of shock, respiratory rate, blood pressure and blood oxygen; The single factor is used to preliminarily screen out variables related to prognosis through the single factor analysis chi-square test; The multiple factors are used to use a multifactor Logistic regression model and a Cox regression model for time event data to analyze the independent impact of multiple factors on risk and obtain preliminary screening characteristic variables.
Citation Information
Patent Citations
System and method for predicting and summarizing medical events from electronic health records
CN110691548A
Cerebral arterial thrombosis long-term death risk ABC early warning model construction method
CN118782242A