Electrocardiogram diagnosis method and device based on mutation feature convolutional neural network

CN117414139BActive Publication Date: 2026-11-03SHANGHAI SID MEDICAL CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311026096.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-15
Publication Date
2026-11-03
Estimated Expiration
2043-08-15

AI Technical Summary

Technical Problem

In existing technologies, conventional convolutional neural networks are highly dependent on the quality of training data, which affects diagnostic accuracy.

Method used

An electrocardiogram diagnostic method based on mutation feature convolutional neural networks is adopted. By randomly changing the weights and offsets of the convolutional layers and combining them with a validation set optimization model, the dependence on data label quality is reduced.

Benefits of technology

Reduce overfitting, improve the robustness of the algorithm, and enhance the accuracy and stability of diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117414139B_ABST
    Figure CN117414139B_ABST
Patent Text Reader

Abstract

The application relates to an electrocardiogram diagnosis method based on a mutation feature convolutional neural network, which comprises the following steps: step one, preparing electrocardiosignal data; step two, data preprocessing; step three, establishing a model; step four, mapping the input and output of the model; step five, training the model; and step six, electrocardiogram diagnosis: new electrocardiosignal data x j After preprocessing, the model trained is put into the model, and according to the set judgment condition, it is determined whether it is an abnormal electrocardiogram or a normal electrocardiogram. The application has the beneficial effects that the overfitting can be reduced, the robustness of the algorithm is increased, and the dependence on the data label quality is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of medical device technology, and in particular relates to an electrocardiogram diagnostic method and device based on a convolutional neural network with mutation features. Background Technology

[0002] Cardiovascular disease is one of the leading causes of death worldwide. Electrocardiography (ECG) is non-invasive, low-cost, and non-implantable, making it the most common clinical diagnostic tool. However, manual ECG diagnosis is time-consuming and labor-intensive, and prone to basic errors under heavy workloads. ECG data from cardiology departments and health checkup centers show that a large proportion of ECGs are normal. Therefore, developing an AI-based diagnostic system for positive abnormal ECGs is significant for reducing the workload of ECG doctors and alleviating the shortage of medical resources. Deep learning, especially convolutional neural networks (CNNs), can discover distributed features from large datasets, replacing the traditional manual feature extraction methods based on data engineers, thus significantly improving the accuracy of ECG diagnosis. However, conventional CNNs are highly dependent on the quality of the training data; decreased data labeling quality can affect the accuracy of CNNs. Summary of the Invention

[0003] The technical problem to be solved by this invention is to address the issue that conventional convolutional neural networks in the prior art are highly dependent on the quality of training data, thereby providing an electrocardiogram diagnosis method and device based on a mutation feature convolutional neural network.

[0004] The technical solution adopted by this invention to solve its technical problem is:

[0005] An electrocardiogram (ECG) diagnostic method based on a mutation feature convolutional neural network includes the following steps:

[0006] Step 1, prepare ECG signal data: collect a certain number of 12-lead ECG signals from patients in a resting state to form an ECG database;

[0007] Step 2, data preprocessing: First, each ECG signal is preprocessed. Then, each ECG signal after filtering is reassembled according to the lead order to form a dataset.

[0008] Each data point is labeled with either [0] or [1]. If the ECG signal is abnormal, the ECG label vector is 1; if the ECG signal is normal, the ECG label vector is 0. After determining the label for each ECG signal, these labels are used to form a label set.

[0009] Step 3, Model Building: The input to the model is the preprocessed ECG signal, and the output of the neural network is a predicted ECG label vector [h]. i ];

[0010] Step 4: Map the model's input and output as follows

[0011] y i =net(x i )=f(W,b)(x i ), where x i It is the input of the model, y i It is x i The output after model calculation is W, which is the set of weights in the convolutional neural network, and b, which is the set of offsets in the convolutional neural network.

[0012] Step 5, train the model:

[0013] S1, using n data points to train the model established in step three.

[0014] net = f(W, b);

[0015] S2, train the convolutional neural network using the loss function to obtain...

[0016] net k =f(W k b k );

[0017] S3, perform mutation: randomly select the weights and offsets of a convolutional layer and change them to randomly generated values ​​to obtain new weights W. k* and offset b k* This forms the mutated network net. k* =f(W k* b k* );

[0018] S4, use the check set data to calculate the value of the judgment function E;

[0019] S5, compare E with the first set threshold thr1. If E > thr1, return to step S2; otherwise, stop training and record the weights and offset positions (Loc) used in step S3 for mutation. f ; to obtain the final model, net f =f(W f b f );

[0020] Step Six, ECG Diagnosis: New ECG Signal Data x j After preprocessing, it is fed into the trained model net. f =f(W f b f In ), h is calculated. jBy abruptly altering the weights and offsets at the same positions in step S3, the network net is obtained. f =f(W f b f ), calculate h j * ; Calculate |h j * -h j If the value of | is greater than the second set threshold thr2, then the condition is considered unresolvable; otherwise, the condition h is determined. j If the value is greater than the third set threshold thr3, it is considered an abnormal electrocardiogram; otherwise, it is considered a normal electrocardiogram.

[0021] Preferably, the electrocardiogram diagnosis method based on mutation feature convolutional neural network of the present invention is characterized in that, in step three, the neural network model is as follows: first convolutional layer, first pooling layer, second convolutional layer, second pooling layer, third convolutional layer, third pooling layer, fourth convolutional layer, fourth pooling layer, fifth convolutional layer, fifth pooling layer, sixth convolutional layer, sixth pooling layer, first fully connected layer, and second fully connected layer;

[0022] The first convolutional layer consists of 31 one-dimensional convolutional kernels with a stride of 1 and a size of 6; the second convolutional layer consists of 29 one-dimensional convolutional kernels with a stride of 1 and a size of 6; the third convolutional layer consists of 17 one-dimensional convolutional kernels with a stride of 1 and a size of 8; the fourth convolutional layer consists of 10 one-dimensional convolutional kernels with a stride of 1 and a size of 5; the fifth convolutional layer consists of 10 one-dimensional convolutional kernels with a stride of 1 and a size of 3; and the sixth convolutional layer consists of 10 one-dimensional convolutional kernels with a stride of 1 and a size of 3. All six pooling layers use max pooling with a kernel size and stride of 2.

[0023] The output of the sixth pooling layer is passed through the first fully connected layer with 128 neurons; the output of the first fully connected layer is then input into the second fully connected layer with 1 neuron.

[0024] Preferably, the electrocardiogram diagnosis method based on mutation feature convolutional neural network of the present invention is characterized in that the activation function output by the sixth pooling layer is the ReLU function.

[0025] Preferably, the electrocardiogram diagnosis method based on mutation feature convolutional neural network of the present invention is characterized in that the activation function of the output of the first fully connected layer is the Sigmoid function.

[0026] Preferably, the electrocardiogram (ECG) diagnostic method based on mutation feature convolutional neural network of the present invention is characterized in that, in step one, ECG signal data is prepared: at least 20,000 12-lead ECG signals of patients in a resting state are collected at a sampling frequency of 500 Hz, and the length of each ECG signal is 10 seconds, of which at least 10,000 are abnormal ECG data and at least 10,000 are normal ECG data, forming an ECG database; wherein at least 16,000 are training set data and at least 4,000 are validation set data.

[0027] Preferably, the electrocardiogram diagnosis method based on mutation feature convolutional neural network of the present invention is characterized in that, in step two, the preprocessing method is to use Butterworth bandpass filters with upper and lower cutoff frequencies of 1Hz and 50Hz respectively to remove noise, and then reassemble each electrocardiogram signal after filtering according to the lead order, and the electrocardiogram data is in the form of (5000, 12) to form a dataset.

[0028] Preferably, the electrocardiogram diagnosis method based on mutation feature convolutional neural network of the present invention is characterized in that, in step two, each electrocardiogram data is labeled by at least two professional cardiologists. If the opinions of two cardiologists are inconsistent, the label of the electrocardiogram signal is determined by a third cardiologist.

[0029] Preferably, the electrocardiogram diagnostic method based on mutation feature convolutional neural network of the present invention is characterized in that, in step S4, the formula for calculating the value of the judgment function E using the validation set data is as follows:

[0030]

[0031] Where α and β are pre-defined constant coefficients, n is the number of data in the validation set, and x l For preprocessed ECG data, y l =net k (x l ), y l For: with x l The input is the network obtained after training in step S2, and the output is the network obtained after computation. For: with x l The input is the network processed in step S3, and the output is obtained after computation.

[0032] Preferably, the electrocardiogram diagnostic method based on mutation feature convolutional neural network of the present invention is characterized in that,

[0033] In step S2, the cross-entropy function is used as the loss function; the training algorithm is: stochastic gradient descent, Adam algorithm, RMSProp algorithm, Adagrad algorithm, Adadelta algorithm, or Adamax algorithm.

[0034] In step S3, a percentage of a certain convolutional layer is randomly selected as the weight and offset of per.

[0035] An electrocardiogram (ECG) diagnostic device based on a mutation feature convolutional neural network has a module for running the aforementioned ECG diagnostic method based on a mutation feature convolutional neural network.

[0036] The beneficial effects of this invention are:

[0037] The solution of this invention can reduce overfitting, increase the robustness of the algorithm, and thus reduce the dependence on the quality of data labeling. Attached Figure Description

[0038] The technical solution of this application will be further described below with reference to the accompanying drawings and embodiments.

[0039] Figure 1 This is a schematic diagram of the steps of the electrocardiogram diagnosis method based on mutation feature convolutional neural network according to an embodiment of this application. Detailed Implementation

[0040] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other.

[0041] In the description of this application, 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 orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings, are only for the convenience of describing this application 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 limiting the scope of protection of this application. 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, features 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.

[0042] In the description of this application, 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 can understand the specific meaning of the above terms in this application based on the specific circumstances. The X, Y, and Z directions or X, Y, and Z axes mentioned in this embodiment are all based on the Cartesian coordinate system.

[0043] The technical solution of this application will now be described in detail with reference to the accompanying drawings and embodiments.

[0044] Example

[0045] This embodiment provides an electrocardiogram (ECG) diagnostic method based on a mutation feature convolutional neural network, including the following steps:

[0046] Step 1, prepare ECG signal data: collect a certain number of 12-lead ECG signals from patients in a resting state to form an ECG database;

[0047] Step 2, data preprocessing: First, each ECG signal is preprocessed. Then, each ECG signal after filtering is reassembled according to the lead order to form a dataset.

[0048] Each data point is labeled with either [0] or [1]. If the ECG signal is abnormal, the ECG label vector is 1; if the ECG signal is normal, the ECG label vector is 0. After determining the label for each ECG signal, these labels are used to form a label set.

[0049] Step 3, build the model, such as Figure 1 As shown: the model's input is the preprocessed electrocardiogram (ECG) signal, and the neural network output is a predicted ECG label vector [h]. i ];

[0050] Step 4: Map the model's input and output as y i =net(x i )=f(W,b)(x i ), where x i It is the input of the model, y i It is x i The output after model calculation is W, which is the set of weights in the convolutional neural network, and b, which is the set of offsets in the convolutional neural network.

[0051] Step 5, train the model:

[0052] S1, using n data points to train the model established in step three.

[0053] net = f(W, b);

[0054] S2, train the convolutional neural network using the loss function to obtain...

[0055] net k =f(W k b k );

[0056] S3, perform mutation: randomly select the weights and offsets of a convolutional layer and change them to randomly generated values ​​to obtain new weights W. k* and offset b k* This forms the mutated network net. k* =f(W k* b k* );

[0057] S4, use the check set data to calculate the value of the judgment function E;

[0058] S5, compare E with the first set threshold thr1. If E > thr1, return to step S2; otherwise, stop training and record the weights and offset positions (Loc) used in step S3 for mutation. f ; to obtain the final model, net f =f(W f b f );

[0059] Step Six, ECG Diagnosis: New ECG Signal Data x j After preprocessing, it is fed into the trained model net. f =f(W f b f In ), h is calculated. j By abruptly altering the weights and offsets at the same positions in step S3, the network net is obtained. f =f(W f b f ), calculate h j * ; Calculate |h j * -h j| If the value is greater than the second set threshold thr2, the condition is considered unresolvable; otherwise, the condition h is determined. j If the value is greater than the third set threshold thr3, it is considered an abnormal electrocardiogram; otherwise, it is considered a normal electrocardiogram.

[0060] The ECG diagnostic method based on mutation feature convolutional neural networks in this embodiment can reduce overfitting, increase the robustness of the algorithm, and thus reduce the dependence on the quality of data labels. One reason for overfitting is that the weight learning iteration process fits noise in the training data and features that are not representative of the training examples. In this embodiment, these features are calculated with weights and biases. By randomly discarding some features and optimizing again with a validation set, overfitting is reduced.

[0061] Preferably, in the electrocardiogram diagnosis method based on mutation feature convolutional neural network of this embodiment, the neural network model in step three is as follows: first convolutional layer, first pooling layer, second convolutional layer, second pooling layer, third convolutional layer, third pooling layer, fourth convolutional layer, fourth pooling layer, fifth convolutional layer, fifth pooling layer, sixth convolutional layer, sixth pooling layer, first fully connected layer, and second fully connected layer;

[0062] The first convolutional layer consists of 31 one-dimensional convolutional kernels with a stride of 1 and a size of 6; the second convolutional layer consists of 29 one-dimensional convolutional kernels with a stride of 1 and a size of 6; the third convolutional layer consists of 17 one-dimensional convolutional kernels with a stride of 1 and a size of 8; the fourth convolutional layer consists of 10 one-dimensional convolutional kernels with a stride of 1 and a size of 5; the fifth convolutional layer consists of 10 one-dimensional convolutional kernels with a stride of 1 and a size of 3; and the sixth convolutional layer consists of 10 one-dimensional convolutional kernels with a stride of 1 and a size of 3. All six pooling layers use max pooling with a kernel size and stride of 2.

[0063] The output of the sixth pooling layer is passed through the first fully connected layer with 128 neurons; the output of the first fully connected layer is then input into the second fully connected layer with 1 neuron.

[0064] Preferably, in the electrocardiogram diagnosis method based on mutation feature convolutional neural network of this embodiment, the activation function output by the sixth pooling layer is the ReLU function.

[0065] Preferably, in the electrocardiogram diagnosis method based on mutation feature convolutional neural network of this embodiment, the activation function of the output of the first fully connected layer is the Sigmoid function.

[0066] Preferably, in the ECG diagnostic method based on mutation feature convolutional neural networks of this embodiment, step one involves preparing ECG signal data: collecting no less than 20,000 12-lead ECG signals from patients in a resting state, with a sampling frequency of 500Hz and a length of 10 seconds for each signal. Of these, no less than 10,000 are abnormal ECG signals and no less than 10,000 are normal ECG signals, forming an ECG database. This database includes no less than 16,000 training data points and no less than 4,000 validation data points. Generally, no less than 20,000 data points provide a reliable amount of data for training, while a 4:1 ratio of training to validation data is considered appropriate.

[0067] Preferably, in the ECG diagnostic method based on mutation feature convolutional neural network of this embodiment, in step two, the preprocessing method is to remove noise using Butterworth bandpass filters with upper and lower cutoff frequencies of 1Hz and 50Hz respectively. Then, each ECG signal after filtering is reassembled according to the lead order, and the ECG data is in the form of (5000, 12) to form a dataset. The (5000, 12) form means: 10 seconds of 12-lead resting ECG data; 12 leads represent 12 signals, and the sampling frequency is 500Hz, so the length of the 10-second ECG signal is 5000.

[0068] Preferably, in the ECG diagnostic method based on mutation feature convolutional neural network of this embodiment, in step two, each ECG data is labeled by at least two professional cardiologists. If the opinions of the two cardiologists are inconsistent, the label of the ECG signal is determined by a third cardiologist.

[0069] Preferably, in the electrocardiogram diagnosis method based on mutation feature convolutional neural networks of this embodiment, in step S4, the formula for calculating the value of the judgment function E using the validation set data is as follows:

[0070]

[0071] Where α and β are pre-defined constant coefficients, n is the number of data in the validation set, and x l For preprocessed ECG data, y l =net k (x l ), y l For: with x l The input is the network obtained after training in step S2, and the output is the network obtained after computation. For: with x l The input is the network processed in step S3, and the output is obtained after computation.

[0072] Preferably, the electrocardiogram diagnostic method based on mutation feature convolutional neural networks in this embodiment,

[0073] In step S2, the cross-entropy function is used as the loss function; the training algorithm is: stochastic gradient descent, Adam algorithm, RMSProp algorithm, Adagrad algorithm, Adadelta algorithm, or Adamax algorithm.

[0074] In step S3, a percentage of a certain convolutional layer is randomly selected as the weight and offset of per (the recommended selection range for per is [40%-90%]).

[0075] This embodiment provides an electrocardiogram (ECG) diagnostic device based on a mutation feature convolutional neural network, which has a module for running the above-described ECG diagnostic method based on a mutation feature convolutional neural network.

[0076] Based on the above-described preferred embodiments according to this application, and through the foregoing description, those skilled in the art can make various changes and modifications without departing from the technical concept of this application. The technical scope of this application is not limited to the contents of the specification, but must be determined according to the scope of the claims.

Claims

1. An electrocardiogram diagnostic method based on a mutation feature convolutional neural network, characterized in that, Includes the following steps: Step 1, prepare ECG signal data: collect a certain number of 12-lead ECG signals from patients in a resting state to form an ECG database; Step 2, data preprocessing: First, each ECG signal is preprocessed. Then, each ECG signal after filtering is reassembled according to the lead order to form a dataset. Each data point is labeled with either [0] or [1]. If the ECG signal is abnormal, the ECG label vector is 1; if the ECG signal is normal, the ECG label vector is 0. After determining the label for each ECG signal, these labels are used to form a label set. Each ECG data point is labeled by at least two professional cardiologists. If the opinions of two cardiologists are inconsistent, the label of the ECG signal is determined by a third cardiologist. Step 3, Model Building: The input to the model is the preprocessed ECG signal, and the output of the neural network is a predicted ECG label vector [h]. i ]; Step 4: Map the model's input and output as follows y i =net(x i )=f(W,b)(x i ), where x i It is the input of the model, y i It is x i The output after model calculation is W, which is the set of weights in the convolutional neural network, and b, which is the set of offsets in the convolutional neural network. Step 5, train the model: S1, Use n data points to train the model established in step three; S2, train the convolutional neural network using the loss function to obtain... net k =f(W k ,b k ); S3, perform mutation: randomly select a predetermined percentage of weights and offsets from a certain convolutional layer and change them to randomly generated values ​​to obtain new weights W. k* and offset b k* This forms the mutated network net. k* =f(W k* b k* ); S4, use the validation set data to calculate the value of the judgment function E, where the formula for the value of the judgment function E is: Where α and β are pre-defined constant coefficients, n is the number of data in the validation set, and x l For preprocessed ECG data, y l =net k (x l ), y l For: with x l As input, the output y is obtained after the network is trained in step S2. l * =net k∗ (x l ), y l * For: with x l The input is the network processed in step S3, and the output is obtained after computation. S5, compare E with the first set threshold thr1. If E > thr1, return to step S2; otherwise, stop training and record the weights and offset positions (Locf) of the mutations performed in step S3 to obtain the final model, net. f =f(W f b f ); Step Six, ECG Diagnosis: New ECG Signal Data x j After preprocessing, it is fed into the trained model net. f =f(W f b f In ), h is calculated. j By abruptly altering the weights and offsets at the same positions in step S3, the network net is obtained. f* =f(W f* b f* ), calculate h j *; Calculate |h j *-h j If the value of | is greater than the second set threshold thr2, then the condition is considered unresolvable; otherwise, the condition h is determined. j If the value is greater than the third set threshold thr3, it is considered an abnormal electrocardiogram; otherwise, it is considered a normal electrocardiogram.

2. The electrocardiogram diagnostic method based on mutation feature convolutional neural network according to claim 1, characterized in that, In step three, the neural network model is as follows: first convolutional layer, first pooling layer, second convolutional layer, second pooling layer, third convolutional layer, third pooling layer, fourth convolutional layer, fourth pooling layer, fifth convolutional layer, fifth pooling layer, sixth convolutional layer, sixth pooling layer, first fully connected layer, second fully connected layer; The first convolutional layer consists of 31 one-dimensional convolutional kernels with a stride of 1 and a size of 6; the second convolutional layer consists of 29 one-dimensional convolutional kernels with a stride of 1 and a size of 6; the third convolutional layer consists of 17 one-dimensional convolutional kernels with a stride of 1 and a size of 8; the fourth convolutional layer consists of 10 one-dimensional convolutional kernels with a stride of 1 and a size of 5; the fifth convolutional layer consists of 10 one-dimensional convolutional kernels with a stride of 1 and a size of 3; and the sixth convolutional layer consists of 10 one-dimensional convolutional kernels with a stride of 1 and a size of 3. All six pooling layers use max pooling with a kernel size and stride of 2. The output of the sixth pooling layer is passed through the first fully connected layer with 128 neurons; the output of the first fully connected layer is then input into the second fully connected layer with 1 neuron.

3. The electrocardiogram diagnostic method based on mutation feature convolutional neural network according to claim 2, characterized in that, The activation function output by the sixth pooling layer is the ReLU function.

4. The electrocardiogram diagnostic method based on mutation feature convolutional neural network according to claim 2, characterized in that... The activation function of the output of the first fully connected layer is the Sigmoid function.

5. The electrocardiogram diagnostic method based on a mutation feature convolutional neural network according to any one of claims 1-4, characterized in that, In step one, prepare the ECG signal data: collect no less than 20,000 12-lead ECG signals from patients in a resting state, with a sampling frequency of 500Hz and a length of 10 seconds for each ECG signal. Among them, there should be no less than 10,000 abnormal ECG data and no less than 10,000 normal ECG data to form an ECG database; including no less than 16,000 training set data and no less than 4,000 validation set data.

6. The electrocardiogram diagnostic method based on a mutation feature convolutional neural network according to any one of claims 1-4, characterized in that, In step two, the preprocessing method is to use Butterworth bandpass filters with upper and lower cutoff frequencies of 1Hz and 50Hz respectively to remove noise. Then, each ECG signal after filtering is reassembled according to the lead order to obtain ECG data in the form of (5000, 12), which forms a dataset.

7. The electrocardiogram diagnostic method based on a mutation feature convolutional neural network according to any one of claims 1-4, characterized in that, In step S2, the cross-entropy function is used as the loss function; the training algorithm is: stochastic gradient descent, Adam algorithm, RMSProp algorithm, Adagrad algorithm, Adadelta algorithm, or Adamax algorithm. In step S3, 40%-90% of the weights and offsets of a certain convolutional layer are randomly selected.

8. An electrocardiogram diagnostic device based on a mutation feature convolutional neural network, characterized in that, It has a module for running the electrocardiogram diagnostic method based on a mutation feature convolutional neural network as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Left ventricular hypertrophy detection method and system based on deep learning early stop mechanism

    CN114519370A