Abnormal biomarker prediction method and system based on electrocardiogram information
By constructing a deep learning model based on the convolutional transformer structure, preprocessing and biomarker prediction of ECG data, the problem of lack of early recognition function of abnormal biomarkers in the prior art is solved, and efficient identification and prediction of vascular abnormal biomarkers in the center of ECG is achieved.
Patent Information
- Application Number
- CN202411601760.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-03-11
AI Technical Summary
In the prior art, the ECG intelligent analysis system does not yet include early recognition function for abnormal biomarkers, and it is difficult to provide effective support in the early detection of cardiovascular diseases.
By constructing a deep learning model based on the convolutional transformer structure, combined with task adaptive strategies, preprocessing and biomarker prediction of ECG data can be achieved to identify and utilize occult information in the ECG.
It significantly improves the recognition ability of vascular abnormal biomarkers in the central electrocardiogram, and improves predicted performance indicators, such as AUROC, PPV and NPV, solving the problem of model overfitting.
Smart Images

Figure CN119601229A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of biotechnology, and in particular to a method and system for predicting abnormal biomarkers based on electrocardiogram information. Background Art
[0002] Cardiovascular disease (CVD) is the leading cause of death in the world. Biomarkers refer to certain characteristic biochemical indicators in physiological, pathological or therapeutic processes that can be objectively measured and evaluated. For the diagnosis of certain heart diseases, it is often necessary to obtain corresponding biomarkers from the blood and analyze the indicator results through laboratory tests. Early detection of cardiovascular disease is crucial for disease monitoring and management of the diagnosis and treatment process. Electrocardiogram is a non-invasive detection method that can identify cardiovascular diseases such as arrhythmia and myocardial ischemia by recording the electrical activity of the heart. However, the diagnosis of diseases such as myocardial infarction and heart failure currently still requires the use of biomarkers in the blood for auxiliary diagnosis. Studies have shown that the hidden information contained in the electrocardiogram is related to the biomarkers and can provide additional information about the diagnosis of the disease. Therefore, the present invention uses the portable detection method of electrocardiogram to identify abnormal biomarkers in the early stage of heart disease, so as to achieve the purpose of early identification and prevention.
[0003] Currently in the industry, the intelligent analysis system for electrocardiograms focuses on the intelligent diagnosis of arrhythmias and does not yet include the early identification function for abnormal biomarkers. Summary of the invention
[0004] In view of the defects in the prior art, the purpose of the present invention is to provide a method and system for predicting abnormal biomarkers based on electrocardiogram information.
[0005] According to the present invention, a method for predicting abnormal biomarkers based on electrocardiogram information includes:
[0006] Step S1: The server receives the ECG data to be analyzed sent by the client;
[0007] Step S2: preprocessing the ECG data to be analyzed to obtain the preprocessed ECG data to be analyzed;
[0008] Step S3: The server uses the trained task-adaptive convolutional transformer network to predict biomarkers on the preprocessed ECG data to be analyzed and obtain recognition results;
[0009] Step S4: The server transmits the recognition result to the terminal device.
[0010] Preferably, in step S2:
[0011] Preprocessing method:
[0012] Data division: divide the data received by the client to meet the preset sampling number requirements;
[0013] Quality assessment: A sliding window is used to assess the quality of the ECG waveform, identify flat waveforms, baseline drift waveforms, and outlier waveforms, and remove segments that do not meet preset quality standards.
[0014] Preferably, in step S3:
[0015] Construct a deep learning model based on the convolutional transformer structure, including a one-dimensional convolutional feature extraction module, a transformer module, and a biomarker prediction module;
[0016] The one-dimensional convolution operation generates a feature map by sliding a one-dimensional convolution kernel to different positions of the ECG signal. The convolution kernel slides on the input signal, and each time the weighted sum of a local area is calculated to extract the local feature pattern. This achieves local feature extraction and captures the short-term dependency pattern of the time series.
[0017] The transformer module captures global dependencies at each position in the sequence through the self-attention mechanism, and uses the multi-head self-attention mechanism and position encoding to extract deeper features; it realizes the global feature modeling of the ECG and the long-term model that captures the time series;
[0018] The biomarker prediction module consists of a fully connected layer, which maps features into the output space; it realizes the mapping from high-dimensional features to target values, and outputs the preset abnormal classification results or predicted values of each biomarker.
[0019] Preferably, the type of heart disease is determined based on the ECG data, and the type of arrhythmia in the entire segment is labeled to obtain a diagnostic label, thereby constructing an ECG diagnostic database;
[0020] Collect ECG data, including normal and abnormal ECGs; identify and classify heart disease types through a combination of algorithms and manual methods, extract features and generate corresponding diagnostic labels, and submit them for manual review; store ECG signals, features, and diagnostic results in a database to form a structured ECG data set for subsequent research and diagnostic model training;
[0021] Preprocessing the constructed ECG database, including data standardization and filtering operations, to obtain a preprocessed ECG database;
[0022] Unify the amplitude of the collected electrocardiogram data; unify the sampling frequency of the collected electrocardiogram data;
[0023] A median filter as well as high-pass and low-pass filters are used to remove interference including baseline drift, power frequency noise, and high-frequency noise.
[0024] Preferably, the arrhythmia detection model is trained using an ECG database containing ECG signals and disease labels to obtain a trained deep learning diagnosis pre-training model based on a convolutional transformer structure;
[0025] The data set is divided into training set, validation set and test set. The training set is used to train the model, the validation set is used to adjust the hyperparameters, and the test set is used to evaluate the model performance. The cross entropy loss function is selected and combined with the stochastic gradient descent method to optimize the loss function to obtain the optimal model weights, and the random dropout method is used for regularization.
[0026] The formula for the cross entropy loss function is as follows:
[0027]
[0028] Where N is the number of samples, w yi is the weight vector corresponding to the true category yi of sample i in the model, is the feature representation of sample i, C is the number of categories, and w j is the weight vector corresponding to the predicted category j;
[0029] The weights of the pre-trained model are transferred to the abnormal biomarker prediction model, and iterative training is performed in combination with the task adaptation strategy to obtain the trained deep learning biomarker prediction model based on the convolutional transformer r structure;
[0030] The weights are the weights of the deep learning diagnosis pre-training model based on the convolution transformer structure after training; different network layers in the model contain different structures and weights, and the weights of the model are saved as files according to the corresponding layer names;
[0031] The iterative training adopts the category contrast loss. The projector embeds the representation features of the pre-trained model into the latent space projection. For this category contrast loss, the keys in the same category are regarded as positive matches of the query.
[0032] The formula is as follows:
[0033]
[0034] Where K is the number of candidate keys, S i is the set of positive keys of sample i, represents the query vector, represents the key vector, τ is a hyperparameter for temperature scaling, and 1 represents the indicator function;
[0035] After replacing the output layer with the predicted category of the biomarker, the obtained pre-trained weight file is read according to the network structure layer; the cross entropy loss and category contrast loss are combined, and the SGD stochastic gradient descent strategy is used for iterative optimization to obtain the model after task adaptive training.
[0036] According to the present invention, an abnormal biomarker prediction system based on electrocardiogram information is provided, comprising:
[0037] Module M1: The server receives the ECG data to be analyzed sent by the client;
[0038] Module M2: preprocessing the ECG data to be analyzed to obtain the preprocessed ECG data to be analyzed;
[0039] Module M3: The server uses the trained task-adaptive convolutional transformer network to predict biomarkers on the pre-processed ECG data to be analyzed and obtain recognition results;
[0040] Module M4: The server transmits the recognition result to the terminal device.
[0041] Preferably, in the module M2:
[0042] Preprocessing method:
[0043] Data division: divide the data received by the client to meet the preset sampling number requirements;
[0044] Quality assessment: A sliding window is used to assess the quality of the ECG waveform, identify flat waveforms, baseline drift waveforms, and outlier waveforms, and remove segments that do not meet preset quality standards.
[0045] Preferably, in the module M3:
[0046] Construct a deep learning model based on the convolutional transformer structure, including a one-dimensional convolutional feature extraction module, a transformer module, and a biomarker prediction module;
[0047] The one-dimensional convolution operation generates a feature map by sliding a one-dimensional convolution kernel to different positions of the ECG signal. The convolution kernel slides on the input signal, and each time the weighted sum of a local area is calculated to extract the local feature pattern. This achieves local feature extraction and captures the short-term dependency pattern of the time series.
[0048] The transformer module captures global dependencies at each position in the sequence through the self-attention mechanism, and uses the multi-head self-attention mechanism and position encoding to extract deeper features; it realizes the global feature modeling of the ECG and the long-term model that captures the time series;
[0049] The biomarker prediction module consists of a fully connected layer, which maps features into the output space; it realizes the mapping from high-dimensional features to target values, and outputs the preset abnormal classification results or predicted values of each biomarker.
[0050] Preferably, the type of heart disease is determined based on the ECG data, and the type of arrhythmia in the entire segment is labeled to obtain a diagnostic label, thereby constructing an ECG diagnostic database;
[0051] Collect ECG data, including normal and abnormal ECGs; identify and classify heart disease types through a combination of algorithms and manual methods, extract features and generate corresponding diagnostic labels, and submit them for manual review; store ECG signals, features, and diagnostic results in a database to form a structured ECG data set for subsequent research and diagnostic model training;
[0052] Preprocessing the constructed ECG database, including data standardization and filtering operations, to obtain a preprocessed ECG database;
[0053] Unify the amplitude of the collected electrocardiogram data; unify the sampling frequency of the collected electrocardiogram data;
[0054] A median filter as well as high-pass and low-pass filters are used to remove interference including baseline drift, power frequency noise, and high-frequency noise.
[0055] Preferably, the arrhythmia detection model is trained using an ECG database containing ECG signals and disease labels to obtain a trained deep learning diagnosis pre-training model based on a convolutional transformer structure;
[0056] The data set is divided into training set, validation set and test set. The training set is used to train the model, the validation set is used to adjust the hyperparameters, and the test set is used to evaluate the model performance. The cross entropy loss function is selected and combined with the stochastic gradient descent method to optimize the loss function to obtain the optimal model weights, and the random dropout method is used for regularization.
[0057] The formula for the cross entropy loss function is as follows:
[0058]
[0059] Where N is the number of samples, w yi is the weight vector corresponding to the true category yi of sample i in the model, is the feature representation of sample i, C is the number of categories, and w j is the weight vector corresponding to the predicted category j;
[0060] The weights of the pre-trained model are transferred to the abnormal biomarker prediction model, and iterative training is performed in combination with the task adaptation strategy to obtain the trained deep learning biomarker prediction model based on the convolutional transformer r structure.
[0061] The weights are the weights of the deep learning diagnosis pre-training model based on the convolution transformer structure after training; different network layers in the model contain different structures and weights, and the weights of the model are saved as files according to the corresponding layer names;
[0062] The iterative training adopts the category contrast loss. The projector embeds the representation features of the pre-trained model into the latent space projection. For this category contrast loss, the keys in the same category are regarded as positive matches of the query.
[0063] The formula is as follows:
[0064]
[0065] Where K is the number of candidate keys, S i is the set of positive keys of sample i, represents the query vector, represents the key vector, τ is a hyperparameter for temperature scaling, and 1 represents the indicator function;
[0066] After replacing the output layer with the predicted category of the biomarker, the obtained pre-trained weight file is read according to the network structure layer; the cross entropy loss and category contrast loss are combined, and the SGD stochastic gradient descent strategy is used for iterative optimization to obtain the model after task adaptive training.
[0067] Compared with the prior art, the present invention has the following beneficial effects:
[0068] 1. The present invention solves the problem of poor recognition effect of the model obtained by training only on the biomarker prediction database by adopting a deep learning method based on transfer learning. This task is quite challenging for humans, but it can be effectively solved by the model of the present invention, which significantly improves the recognition ability of cardiovascular abnormality biomarkers in electrocardiograms, such as troponin, creatine kinase isoenzymes, amino-terminal brain natriuretic peptide precursor and C-reactive protein.
[0069] 2. The present invention solves the problem of model overfitting when using a smaller training set by adopting a convolution-transformer model with a task adaptation strategy, and significantly improves the performance of the predicted area under the receiver operating characteristic curve (AUROC), positive predictive value (PPV), and negative predictive value (NPV). BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0071] Figure 1 For electrocardiogram-based biomarker prediction model and training method;
[0072] Figure 2 It is a deep learning model based on convolution-transformer structure. DETAILED DESCRIPTION
[0073] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.
[0074] Embodiment 1:
[0075] This paper proposes an electrocardiogram analysis method based on transfer learning for detecting abnormal biomarkers related to acute coronary syndrome. Through pre-trained large-scale electrocardiogram datasets combined with task-adaptive convolution-transformer networks, efficient identification of biomarkers is achieved, improving the risk stratification and prediction capabilities of cardiovascular diseases in different patient groups.
[0076] According to the present invention, a method for predicting abnormal biomarkers based on electrocardiogram information includes:
[0077] Step S1: The server receives the ECG data to be analyzed sent by the client;
[0078] Step S2: preprocessing the ECG data to be analyzed to obtain the preprocessed ECG data to be analyzed;
[0079] Specifically, in step S2:
[0080] Preprocessing method:
[0081] Data division: divide the data received by the client to meet the preset sampling number requirements;
[0082] Quality assessment: A sliding window is used to assess the quality of the ECG waveform, identify flat waveforms, baseline drift waveforms, and outlier waveforms, and remove segments that do not meet preset quality standards.
[0083] Step S3: The server uses the trained task-adaptive convolutional transformer network to predict biomarkers on the preprocessed ECG data to be analyzed and obtain recognition results;
[0084] Specifically, in step S3:
[0085] Construct a deep learning model based on the convolutional transformer structure, including a one-dimensional convolutional feature extraction module, a transformer module, and a biomarker prediction module;
[0086] The one-dimensional convolution operation generates a feature map by sliding a one-dimensional convolution kernel to different positions of the ECG signal. The convolution kernel slides on the input signal, and each time the weighted sum of a local area is calculated to extract the local feature pattern. This achieves local feature extraction and captures the short-term dependency pattern of the time series.
[0087] The transformer module captures global dependencies at each position in the sequence through the self-attention mechanism, and uses the multi-head self-attention mechanism and position encoding to extract deeper features; it realizes the global feature modeling of the ECG and the long-term model that captures the time series;
[0088] The biomarker prediction module consists of a fully connected layer, which maps features into the output space; it realizes the mapping from high-dimensional features to target values, and outputs the preset abnormal classification results or predicted values of each biomarker.
[0089] Specifically, the type of heart disease is determined based on the ECG data, and the types of arrhythmias in the entire segment are labeled to obtain diagnostic labels, and an ECG diagnostic database is constructed;
[0090] Collect ECG data, including normal and abnormal ECGs; identify and classify heart disease types through a combination of algorithms and manual methods, extract features and generate corresponding diagnostic labels, and submit them for manual review; store ECG signals, features, and diagnostic results in a database to form a structured ECG data set for subsequent research and diagnostic model training;
[0091] Preprocessing the constructed ECG database, including data standardization and filtering operations, to obtain a preprocessed ECG database;
[0092] Unify the amplitude of the collected electrocardiogram data; unify the sampling frequency of the collected electrocardiogram data;
[0093] A median filter as well as high-pass and low-pass filters are used to remove interference including baseline drift, power frequency noise, and high-frequency noise.
[0094] Specifically, an ECG database containing ECG signals and disease labels is used to train an arrhythmia detection model, and a deep learning diagnosis pre-training model based on a convolutional transformer structure is obtained after training;
[0095] The data set is divided into training set, validation set and test set. The training set is used to train the model, the validation set is used to adjust the hyperparameters, and the test set is used to evaluate the model performance. The cross entropy loss function is selected and combined with the stochastic gradient descent method to optimize the loss function to obtain the optimal model weights, and the random dropout method is used for regularization.
[0096] The formula for the cross entropy loss function is as follows:
[0097]
[0098] Where N is the number of samples, w yi is the weight vector corresponding to the true category yi of sample i in the model, is the feature representation of sample i, C is the number of categories, and w j is the weight vector corresponding to the predicted category j;
[0099] The weights of the pre-trained model are transferred to the abnormal biomarker prediction model, and iterative training is performed in combination with the task adaptation strategy to obtain the trained deep learning biomarker prediction model based on the convolutional transformer r structure;
[0100] The weights are the weights of the deep learning diagnosis pre-training model based on the convolution transformer structure after training; different network layers in the model contain different structures and weights, and the weights of the model are saved as files according to the corresponding layer names;
[0101] The iterative training adopts the category contrast loss. The projector embeds the representation features of the pre-trained model into the latent space projection. For this category contrast loss, the keys in the same category are regarded as positive matches of the query.
[0102] The formula is as follows:
[0103]
[0104] Where K is the number of candidate keys, S i is the set of positive keys of sample i, represents the query vector, represents the key vector, τ is a hyperparameter for temperature scaling, and 1 represents the indicator function;
[0105] After replacing the output layer with the predicted category of the biomarker, the obtained pre-trained weight file is read according to the network structure layer; the cross entropy loss and category contrast loss are combined, and the SGD stochastic gradient descent strategy is used for iterative optimization to obtain the model after task adaptive training.
[0106] Step S4: The server transmits the recognition result to the terminal device.
[0107] Embodiment 2:
[0108] Embodiment 2 is a preferred example of Embodiment 1, and is used to illustrate the present invention in more detail.
[0109] The present invention also provides an abnormal biomarker prediction system based on electrocardiogram information. The abnormal biomarker prediction system based on electrocardiogram information can be implemented by executing the process steps of the abnormal biomarker prediction method based on electrocardiogram information, that is, those skilled in the art can understand the abnormal biomarker prediction method based on electrocardiogram information as a preferred implementation of the abnormal biomarker prediction system based on electrocardiogram information.
[0110] According to the present invention, an abnormal biomarker prediction system based on electrocardiogram information is provided, comprising:
[0111] Module M1: The server receives the ECG data to be analyzed sent by the client;
[0112] Module M2: preprocessing the ECG data to be analyzed to obtain the preprocessed ECG data to be analyzed;
[0113] Specifically, in the module M2:
[0114] Preprocessing method:
[0115] Data division: divide the data received by the client to meet the preset sampling number requirements;
[0116] Quality assessment: A sliding window is used to assess the quality of the ECG waveform, identify flat waveforms, baseline drift waveforms, and outlier waveforms, and remove segments that do not meet preset quality standards.
[0117] Module M3: The server uses the trained task-adaptive convolutional transformer network to predict biomarkers on the pre-processed ECG data to be analyzed and obtain recognition results;
[0118] Specifically, in the module M3:
[0119] Construct a deep learning model based on the convolutional transformer structure, including a one-dimensional convolutional feature extraction module, a transformer module, and a biomarker prediction module;
[0120] The one-dimensional convolution operation generates a feature map by sliding a one-dimensional convolution kernel to different positions of the ECG signal. The convolution kernel slides on the input signal, and each time the weighted sum of a local area is calculated to extract the local feature pattern. This achieves local feature extraction and captures the short-term dependency pattern of the time series.
[0121] The transformer module captures global dependencies at each position in the sequence through the self-attention mechanism, and uses the multi-head self-attention mechanism and position encoding to extract deeper features; it realizes the global feature modeling of the ECG and the long-term model that captures the time series;
[0122] The biomarker prediction module consists of a fully connected layer, which maps features into the output space; it realizes the mapping from high-dimensional features to target values, and outputs the preset abnormal classification results or predicted values of each biomarker.
[0123] Specifically, the type of heart disease is determined based on the ECG data, and the types of arrhythmias in the entire segment are labeled to obtain diagnostic labels, and an ECG diagnostic database is constructed;
[0124] Collect ECG data, including normal and abnormal ECGs; identify and classify heart disease types through a combination of algorithms and manual methods, extract features and generate corresponding diagnostic labels, and submit them for manual review; store ECG signals, features, and diagnostic results in a database to form a structured ECG data set for subsequent research and diagnostic model training;
[0125] Preprocessing the constructed ECG database, including data standardization and filtering operations, to obtain a preprocessed ECG database;
[0126] Unify the amplitude of the collected electrocardiogram data; unify the sampling frequency of the collected electrocardiogram data;
[0127] A median filter as well as high-pass and low-pass filters are used to remove interference including baseline drift, power frequency noise, and high-frequency noise.
[0128] Specifically, an ECG database containing ECG signals and disease labels is used to train an arrhythmia detection model, and a deep learning diagnosis pre-training model based on a convolutional transformer structure is obtained after training;
[0129] The data set is divided into training set, validation set and test set. The training set is used to train the model, the validation set is used to adjust the hyperparameters, and the test set is used to evaluate the model performance. The cross entropy loss function is selected and combined with the stochastic gradient descent method to optimize the loss function to obtain the optimal model weights, and the random dropout method is used for regularization.
[0130] The formula for the cross entropy loss function is as follows:
[0131]
[0132] Where N is the number of samples, w yi is the weight vector corresponding to the true category yi of sample i in the model, is the feature representation of sample i, C is the number of categories, and wj is the weight vector corresponding to the predicted category j;
[0133] The weights of the pre-trained model are transferred to the abnormal biomarker prediction model, and iterative training is performed in combination with the task adaptation strategy to obtain the trained deep learning biomarker prediction model based on the convolutional transformer r structure;
[0134] The weights are the weights of the deep learning diagnosis pre-training model based on the convolution transformer structure after training; different network layers in the model contain different structures and weights, and the weights of the model are saved as files according to the corresponding layer names;
[0135] The iterative training adopts the category contrast loss. The projector embeds the representation features of the pre-trained model into the latent space projection. For this category contrast loss, the keys in the same category are regarded as positive matches of the query.
[0136] The formula is as follows:
[0137]
[0138] Where K is the number of candidate keys, S i is the set of positive keys of sample i, represents the query vector, represents the key vector, τ is a hyperparameter for temperature scaling, and 1 represents the indicator function;
[0139] After replacing the output layer with the predicted category of the biomarker, the obtained pre-trained weight file is read according to the network structure layer; the cross entropy loss and category contrast loss are combined, and the SGD stochastic gradient descent strategy is used for iterative optimization to obtain the model after task adaptive training.
[0140] Module M4: The server transmits the recognition result to the terminal device.
[0141] Embodiment 3:
[0142] Embodiment 3 is a preferred example of Embodiment 1, and is used to illustrate the present invention in more detail.
[0143] Step 1: The server receives the ECG data to be analyzed sent by the client;
[0144] Step 2: preprocess the ECG data to be analyzed to obtain the preprocessed ECG data to be analyzed;
[0145] Step 3: The server uses the trained task-adaptive convolution-transformer network to predict biomarkers on the preprocessed ECG data to be analyzed and obtain recognition results; Figure 1 )
[0146] Step 4: The server transmits the prediction results to the terminal device.
[0147] The step 2 comprises:
[0148] Preprocessing method:
[0149] Data division: Data received by the client is divided to meet certain sampling number requirements, such as 10s or 20s as a section of ECG data to be processed.
[0150] Quality assessment: A sliding window is used to assess the quality of the ECG waveform, identify flat waveforms, baseline drift waveforms, and outlier waveforms, and remove these poor quality segments.
[0151] The step 3 comprises the following steps:
[0152] Step 3.1: Construct a deep learning model based on the convolution-transformer structure, including a one-dimensional convolution feature extraction module, a transformer module, and a biomarker prediction module; ( Figure 2 )
[0153] The one-dimensional convolution operation generates a series of feature maps by sliding a one-dimensional convolution kernel to different positions of the ECG signal. The convolution kernel slides on the input signal and calculates the weighted sum of a local area each time, thereby extracting local feature patterns. Used technology: including convolution operations, activation functions, pooling operations, etc. Implementation effect: local feature extraction and capture of short-term dependency patterns of time series are achieved.
[0154] The transformer module captures global dependencies at each position of the sequence through the self-attention mechanism, further extracting deeper features. Technology used: multi-head self-attention mechanism and position encoding. Result: The global feature modeling of ECG is achieved, as well as the long-term model that captures the time series.
[0155] The biomarker prediction module consists of a fully connected layer, which maps features to the output space. Technology used: fully connected layer, activation function. Implementation effect: It realizes the mapping from high-dimensional features to target values and outputs the abnormal classification results or predicted values of each biomarker.
[0156] Step 3.2: Determine the type of heart disease based on the ECG data, label the arrhythmia type in the entire segment to obtain a diagnostic label, and build an ECG diagnostic database;
[0157] To build an ECG diagnosis database, we first need to collect a large amount of good ECG data, including normal and abnormal ECGs. We use a combination of algorithms and manual methods to identify and classify the types of heart diseases, extract features and generate corresponding diagnostic labels, and then submit them to medical experts for review. ECG signals, features, and diagnostic results are then stored in the database to form a structured ECG dataset for subsequent research and diagnostic model training.
[0158] Step 3.3: Preprocess the constructed ECG database, including data standardization and filtering operations, to obtain a preprocessed ECG database;
[0159] Data standardization: standardize the amplitude of the collected ECG data to millivolts (mV); standardize the sampling frequency of the collected ECG data to 500Hz
[0160] Filtering: Use median filter as well as high-pass filter and low-pass filter to eliminate common interferences such as baseline drift, power frequency noise and high-frequency noise.
[0161] Step 3.4: Use the ECG database containing ECG signals and disease labels to train the arrhythmia detection model to obtain a trained deep learning diagnosis pre-training model based on the convolution-transformer structure.
[0162] The dataset is divided into training set, validation set and test set, usually in a ratio of 8:1:1. The training set is used to train the model, the validation set is used to adjust the hyperparameters, and the test set is used to finally evaluate the model performance. The cross-entropy loss function is selected and the stochastic gradient descent (SGD) is used to optimize the loss function to obtain the optimal model weights. In order to avoid overfitting of the model during training, the random dropout method (Dropout) is used for regularization.
[0163] The formula for the cross entropy loss function is as follows:
[0164]
[0165] Where N is the number of samples, w yi is the weight vector corresponding to the true category yi of sample i in the model, is the feature representation of sample i, and C is the number of categories.
[0166] Step 3.5: Transfer the weights of the pre-trained model to the abnormal biomarker prediction model, and perform iterative training in combination with the task adaptation strategy to obtain the trained deep learning biomarker prediction model based on the convolution-transformer r structure;
[0167] The weights come from the weights of the deep learning diagnosis pre-trained model based on the convolution-transformer structure trained in step 3.4. Different network layers in the model contain different structures and weights. The weights of the model are saved as files according to the corresponding layer names.
[0168] Iterative training is a fine-tuning process after pre-training. The categorical contrastive loss is used. This projector embeds the representation features of the pre-trained model into the latent space projection. For this categorical contrastive loss, we regard keys in the same category as positive matches for the query.
[0169] The formula is as follows:
[0170]
[0171] in, K is the number of candidate keys, S i is the set of positive keys of sample i, represents the query vector, represents the key vector, τ is a hyperparameter for temperature scaling, and 1 represents the indicator function.
[0172] After replacing the output layer with the predicted category of the biomarker, the pre-trained weight file obtained in step 3.4 is read according to the network structure layer. The cross entropy loss and the category contrast loss are combined, and the SGD stochastic gradient descent strategy is used for iterative optimization to obtain the task adaptively trained model.
[0173] Those skilled in the art know that, in addition to realizing the system and its various devices, modules, and units provided by the present invention in a purely computer-readable program code, it is entirely possible to realize the same functions in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered as a hardware component, and the devices, modules, and units included therein for realizing various functions can also be regarded as structures within the hardware component; the devices, modules, and units for realizing various functions can also be regarded as both software modules for realizing the method and structures within the hardware component.
[0174] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.
Claims
1. A method for predicting abnormal biomarkers based on electrocardiogram information, characterized in that: include: Step S1: The server receives the ECG data to be analyzed sent by the client; Step S2: preprocessing the ECG data to be analyzed to obtain the preprocessed ECG data to be analyzed; Step S3: The server uses the trained task-adaptive convolutional transformer network to predict biomarkers on the preprocessed ECG data to be analyzed and obtain recognition results; Step S4: The server transmits the recognition result to the terminal device.
2. The abnormal biomarker prediction method based on electrocardiogram information according to claim 1, characterized in that: In step S2: Preprocessing method: Data division: divide the data received by the client to meet the preset sampling number requirements; Quality assessment: A sliding window is used to assess the quality of the ECG waveform, identify flat waveforms, baseline drift waveforms, and outlier waveforms, and remove segments that do not meet preset quality standards.
3. The abnormal biomarker prediction method based on electrocardiogram information according to claim 1, characterized in that: In step S3: Construct a deep learning model based on the convolutional transformer structure, including a one-dimensional convolutional feature extraction module, a transformer module, and a biomarker prediction module; The one-dimensional convolution operation generates a feature map by sliding a one-dimensional convolution kernel to different positions of the ECG signal. The convolution kernel slides on the input signal, and each time the weighted sum of a local area is calculated to extract the local feature pattern. This achieves local feature extraction and captures the short-term dependency pattern of the time series. The transformer module captures global dependencies at each position in the sequence through the self-attention mechanism, and uses the multi-head self-attention mechanism and position encoding to extract deeper features; it realizes the global feature modeling of the ECG and the long-term model that captures the time series; The biomarker prediction module consists of a fully connected layer by mapping the features into the output space; Realize the mapping from high-dimensional features to target values, and output the preset abnormal classification results or predicted values of each biomarker.
4. The abnormal biomarker prediction method based on electrocardiogram information according to claim 3, characterized in that: Determine the type of heart disease based on ECG data, annotate the arrhythmia type in the entire segment to obtain a diagnostic label, and build an ECG diagnostic database; Collect ECG data, including normal and abnormal ECGs; identify and classify heart disease types through a combination of algorithms and manual methods, extract features and generate corresponding diagnostic labels, and submit them for manual review; store ECG signals, features, and diagnostic results in a database to form a structured ECG data set for subsequent research and diagnostic model training; Preprocessing the constructed ECG database, including data standardization and filtering operations, to obtain a preprocessed ECG database; Unify the amplitude of the collected electrocardiogram data; unify the sampling frequency of the collected electrocardiogram data; A median filter as well as high-pass and low-pass filters are used to remove interference including baseline drift, power frequency noise, and high-frequency noise.
5. The abnormal biomarker prediction method based on electrocardiogram information according to claim 4, characterized in that: The arrhythmia detection model is trained using an ECG database containing ECG signals and disease labels to obtain a deep learning diagnosis pre-training model based on a convolutional transformer structure. The data set is divided into training set, validation set and test set. The training set is used to train the model, the validation set is used to adjust the hyperparameters, and the test set is used to evaluate the model performance. The cross entropy loss function is selected and combined with the stochastic gradient descent method to optimize the loss function to obtain the optimal model weights, and the random dropout method is used for regularization. The formula for the cross entropy loss function is as follows: Where N is the number of samples, w yi is the weight vector corresponding to the true category yi of sample i in the model, is the feature representation of sample i, C is the number of categories, and w j is the weight vector corresponding to the predicted category j; The weights of the pre-trained model are transferred to the abnormal biomarker prediction model, and iterative training is performed in combination with the task adaptation strategy to obtain the trained deep learning biomarker prediction model based on the convolutional transformer r structure; The weights are the weights of the deep learning diagnosis pre-training model based on the convolution transformer structure after training; different network layers in the model contain different structures and weights, and the weights of the model are saved as files according to the corresponding layer names; The iterative training adopts the category contrast loss. The projector embeds the representation features of the pre-trained model into the latent space projection. For this category contrast loss, the keys in the same category are regarded as positive matches of the query. The formula is as follows: Where K is the number of candidate keys, S i is the set of positive keys of sample i, represents the query vector, represents the key vector, τ is a hyperparameter for temperature scaling, and 1 represents the indicator function; After replacing the output layer with the predicted category of the biomarker, the obtained pre-trained weight file is read according to the network structure layer; the cross entropy loss and category contrast loss are combined, and the SGD stochastic gradient descent strategy is used for iterative optimization to obtain the model after task adaptive training.
6. An abnormal biomarker prediction system based on electrocardiogram information, characterized in that: include: Module M1: The server receives the ECG data to be analyzed sent by the client; Module M2: preprocessing the ECG data to be analyzed to obtain the preprocessed ECG data to be analyzed; Module M3: The server uses the trained task-adaptive convolutional transformer network to predict biomarkers on the pre-processed ECG data to be analyzed and obtain recognition results; Module M4: The server transmits the recognition result to the terminal device.
7. The abnormal biomarker prediction system based on electrocardiogram information according to claim 6, characterized in that: In the module M2: Preprocessing method: Data division: divide the data received by the client to meet the preset sampling number requirements; Quality assessment: A sliding window is used to assess the quality of the ECG waveform, identify flat waveforms, baseline drift waveforms, and outlier waveforms, and remove segments that do not meet preset quality standards.
8. The abnormal biomarker prediction system based on electrocardiogram information according to claim 6, characterized in that: In the module M3: Construct a deep learning model based on the convolutional transformer structure, including a one-dimensional convolutional feature extraction module, a transformer module, and a biomarker prediction module; The one-dimensional convolution operation generates a feature map by sliding a one-dimensional convolution kernel to different positions of the ECG signal. The convolution kernel slides on the input signal, and each time the weighted sum of a local area is calculated to extract the local feature pattern. This achieves local feature extraction and captures the short-term dependency pattern of the time series. The transformer module captures global dependencies at each position in the sequence through the self-attention mechanism, and uses the multi-head self-attention mechanism and position encoding to extract deeper features; it realizes the global feature modeling of the ECG and the long-term model that captures the time series; The biomarker prediction module consists of a fully connected layer by mapping the features into the output space; Realize the mapping from high-dimensional features to target values, and output the preset abnormal classification results or predicted values of each biomarker.
9. The abnormal biomarker prediction system based on electrocardiogram information according to claim 8, characterized in that: Determine the type of heart disease based on ECG data, annotate the arrhythmia type in the entire segment to obtain a diagnostic label, and build an ECG diagnostic database; Collect ECG data, including normal and abnormal ECGs; identify and classify heart disease types through a combination of algorithms and manual methods, extract features and generate corresponding diagnostic labels, and submit them for manual review; store ECG signals, features, and diagnostic results in a database to form a structured ECG data set for subsequent research and diagnostic model training; Preprocessing the constructed ECG database, including data standardization and filtering operations, to obtain a preprocessed ECG database; Unify the amplitude of the collected electrocardiogram data; unify the sampling frequency of the collected electrocardiogram data; A median filter as well as high-pass and low-pass filters are used to remove interference including baseline drift, power frequency noise, and high-frequency noise.
10. The abnormal biomarker prediction system based on electrocardiogram information according to claim 9, characterized in that: The arrhythmia detection model is trained using an ECG database containing ECG signals and disease labels to obtain a deep learning diagnosis pre-training model based on a convolutional transformer structure. The data set is divided into training set, validation set and test set. The training set is used to train the model, the validation set is used to adjust the hyperparameters, and the test set is used to evaluate the model performance. The cross entropy loss function is selected and combined with the stochastic gradient descent method to optimize the loss function to obtain the optimal model weights, and the random dropout method is used for regularization. The formula for the cross entropy loss function is as follows: Where N is the number of samples, w yi is the weight vector corresponding to the true category yi of sample i in the model, is the feature representation of sample i, C is the number of categories, and w j is the weight vector corresponding to the predicted category j; The weights of the pre-trained model are transferred to the abnormal biomarker prediction model, and iterative training is performed in combination with the task adaptation strategy to obtain the trained deep learning biomarker prediction model based on the convolutional transformer r structure. The weights are the weights of the deep learning diagnosis pre-training model based on the convolution transformer structure after training; different network layers in the model contain different structures and weights, and the weights of the model are saved as files according to the corresponding layer names; The iterative training adopts the category contrast loss. The projector embeds the representation features of the pre-trained model into the latent space projection. For this category contrast loss, the keys in the same category are regarded as positive matches of the query. The formula is as follows: Where K is the number of candidate keys, S i is the set of positive keys of sample i, represents the query vector, represents the key vector, τ is a hyperparameter for temperature scaling, and 1 represents the indicator function; After replacing the output layer with the predicted category of the biomarker, the obtained pre-trained weight file is read according to the network structure layer; the cross entropy loss and category contrast loss are combined, and the SGD stochastic gradient descent strategy is used for iterative optimization to obtain the model after task adaptive training.