Classification method, device and medium of heartbeat signal based on deep learning

By combining convolutional neural network and Transformer model, learning the local and global characteristics of heartbeat, the defects of the existing technology centerbeat signal classification method in data processing are solved, the classification accuracy is improved and the model training effect is optimized.

CN113974649BActive Publication Date: 2025-02-14RUIJIN HOSPITAL AFFILIATED TO SHANGHAI JIAO TONG UNIV SCHOOL OF MEDICINE
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111468540.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-03
Publication Date
2025-02-14
Estimated Expiration
2041-12-03

AI Technical Summary

Technical Problem

The existing cardiac signal classification method lacks practicality in data processing, resulting in the same person's cardiac signal may appear in the training set and the verification set at the same time, resulting in a reduced classification accuracy.

Method used

Through a combination of convolutional neural network and Transformer model, we learn the local and global timing characteristics of each heartbeat, consider the relationship between heartbeat and RR interphase characteristics, and improve the classification accuracy.

Benefits of technology

It improves the accuracy of cardiac signal classification, avoids verification set leakage, optimizes the model training effect, and allows the model to learn the characteristics of each anomaly category more effectively.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113974649B_ABST
    Figure CN113974649B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of electrocardiogram detection technology, and in particular to a method, device and medium for classifying heartbeat signals and training a deep learning model for classifying heartbeat signals. The characteristics of the signal of each heartbeat in a plurality of continuous heartbeats are determined by a convolutional neural network; the relationship between the signals of the heartbeats in a plurality of continuous heartbeats is determined by an Encoder module of a first Transformer model according to the characteristics of the signal of each heartbeat; the characteristics of the RR interval characteristics of each heartbeat in a plurality of continuous heartbeats are determined by a fully connected neural network; the relationship between the RR interval characteristics of the heartbeats in a plurality of continuous heartbeats is determined by an Encoder module of a second Transformer model according to the characteristics of the RR interval characteristics of each heartbeat; and the category of each heartbeat is determined by a fully connected layer of a neural network according to the characteristics of the signal of each heartbeat, the relationship between the signals of the heartbeats, the characteristics of the RR interval characteristics of each heartbeat and the relationship between the RR interval characteristics of the heartbeats.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electrocardiogram detection technology, and in particular to a method, device and medium for classifying heartbeat signals and training a deep learning model for classifying heartbeat signals. Background Art

[0002] At present, the classification of long-duration Holter (dynamic electrocardiogram) signals is mainly based on the MIT_BIH_Arrhythmia dataset. The methods used range from CNN (Convolutional Neural Networks), BiLSTM (Bi-directional Long Short-Term Memory), seq2seq (sequence to sequence), and wavelet transform. Although there are many methods, and the results are very high, the accuracy (acc) index is >99%. However, they are basically the same in data processing. They all find a single heartbeat based on the R wave, and then classify a single heartbeat or multiple consecutive heartbeats. However, in the current method, both training and verification are distinguished based on the heartbeat signal, rather than based on the sample (person). As a result, the heartbeat of the same person may appear in both the training set and the verification set. When the above-mentioned MIT_BIH_Arrhythmia data is divided into training set and verification set according to people, the verification index of the above-mentioned method using CNN and seq2seq is greatly reduced. Therefore, due to the problem of data set processing, the current method lacks practicality. Summary of the invention

[0003] The purpose of the present invention is to provide a method, device and medium for classifying heartbeat signals and training a deep learning model for classifying heartbeat signals. The characteristics of the heartbeat itself and the influence of the characteristics of the previous and subsequent heartbeats on the heartbeat in time sequence can be taken into account, while local and global characteristics are taken into account. The accuracy of classification is improved.

[0004] An embodiment of the present invention discloses a method for classifying heartbeat signals based on deep learning, which is used in electronic devices. The method includes:

[0005] Determining the characteristics of the signal of each heart beat in a plurality of consecutive heart beats by a convolutional neural network;

[0006] Determining, by the Encoder module of the first Transformer model, the relationship between the signals of the heartbeats in the plurality of consecutive heartbeats according to the characteristics of the signal of each heartbeat;

[0007] Determining, by a fully connected neural network, a feature of an RR interval feature of each of the plurality of consecutive heartbeats;

[0008] Determining, by the Encoder module of the second Transformer model, a relationship between the RR interval features of the heartbeats in the plurality of consecutive heartbeats according to the features of the RR interval features of each heartbeat;

[0009] Through the fully connected layer of the neural network, the category of each heartbeat in the multiple consecutive heartbeats is determined according to the characteristics of the signal of each heartbeat, the relationship between the signals of the heartbeats, the characteristics of the RR interval characteristics of each heartbeat, and the relationship between the RR interval characteristics of the heartbeats.

[0010] Optionally, the convolutional neural network includes four groups, each group has two layers, and includes a one-dimensional convolution layer with a residual structure;

[0011] The fully connected neural network is a three-layer fully connected neural network;

[0012] The fully connected layer of the neural network is two layers of fully connected layers.

[0013] Optionally, the method further comprises:

[0014] De-noising the overall signal of the plurality of continuous heartbeats by wavelet transform;

[0015] Normalize the overall signal;

[0016] reducing the sampling rate of the overall signal;

[0017] The overall signal of the multiple continuous heartbeats is segmented to obtain a signal of each heartbeat.

[0018] Optionally, the method further comprises:

[0019] The RR interval features include RR scatter plot features, RR interval values, heart rate values, and time domain features and frequency domain features of the signal.

[0020] Optionally, the method further comprises:

[0021] Determine an RR scatter plot of a heartbeat, and then determine a confidence ellipse area, a confidence distance divergence, and a confidence angle divergence of the RR scatter plot as features of the RR scatter plot of the heartbeat;

[0022] The RR interval value includes a first predetermined number of RR interval values ​​before and after the heartbeat;

[0023] Determine the heart rate value of the heartbeat according to a second predetermined number of adjacent RR intervals around the heartbeat;

[0024] The frequency domain features include: the centroid frequency, average frequency, root mean square frequency and frequency standard deviation of the signal within a predetermined time before and after the heartbeat;

[0025] The time domain characteristics include: the maximum value, minimum value, peak value, average value, root amplitude, variance, standard deviation, root mean square, kurtosis, skewness, waveform factor, peak factor, pulse factor, margin factor, and clearance factor of the signal within a predetermined time before and after the heartbeat.

[0026] An embodiment of the present invention discloses a training method for a deep learning model for classification of heartbeat signals, which is used in electronic devices, and the method includes:

[0027] Dividing heartbeat signals of different examples into a training set and a validation set respectively, and making the heartbeat signals of the same category evenly distributed between the training set and the validation set;

[0028] Reducing the proportion of normal heartbeat signals in the training set and the validation set;

[0029] The deep learning model is trained using the training set and the validation set.

[0030] An embodiment of the present invention discloses a deep learning-based classification device for heartbeat signals, the device comprising a memory storing computer-executable instructions and a processor, and when the instructions are executed by the processor, the device implements any of the above-mentioned deep learning-based classification methods for heartbeat signals.

[0031] An embodiment of the present invention discloses a computer storage medium, on which instructions are stored. When the instructions are executed on a computer, the computer is enabled to execute any of the above-mentioned methods for classifying heartbeat signals based on deep learning.

[0032] An embodiment of the present invention discloses a training device for a deep learning model for classifying cardiac signal. The device includes a memory storing computer executable instructions and a processor. When the instructions are executed by the processor, the device implements any of the above-mentioned training of the deep learning model for classifying cardiac signal.

[0033] An embodiment of the present invention discloses a computer storage medium, on which instructions are stored. When the instructions are executed on a computer, the computer is enabled to perform any of the above-mentioned training of a deep learning model for classification of cardiac signal.

[0034] Compared with the prior art, the main differences and effects of the embodiments of the present invention are:

[0035] In the present invention, although the classification method of heartbeat signals based on deep learning classifies a single heartbeat, the input information is multiple continuous heartbeats. The information of multiple heartbeats is fused during classification to classify the single heartbeats separately. The local features of each heartbeat and the global timing features between heartbeats are learned. First, for each heartbeat, a CNN convolution neural network is used to capture the local morphological features of the heartbeat, and a fully connected neural network is used to learn the RR interval features of each heartbeat. Then, the local morphological features learned from multiple continuous heartbeats and the features of the RR interval are combined in time sequence, and the Transformer self-attention model in the NLP field is used to learn the global relationship between the heartbeat features. In this way, when predicting each heartbeat, the characteristics of the heartbeat itself and the influence of the characteristics of the heartbeats before and after in time sequence on the heartbeat can be considered, and local and global features are considered at the same time. Improve the accuracy of classification.

[0036] In the present invention, the training method of the deep learning model for the classification of heartbeat signals divides the heartbeat signals of different samples into training sets and verification sets respectively, instead of dividing the heartbeats in the samples, so that the heartbeat data of the same sample only exists in one of the training set and the verification set, and does not exist in both the training set and the verification set, thereby avoiding leakage of the verification set and optimizing the model training effect. In the division of samples, the heartbeat signals of the same category are evenly distributed between the training set and the verification set, avoiding the extremely uneven distribution of heartbeat signals of certain categories in the training set and the verification set caused by directly performing conventional random division. The proportion of normal heartbeat signals in the training set and the verification set is reduced, allowing the model to learn the characteristics of each abnormal category more effectively. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 The figure shows the analyzed ECG signal according to the embodiment of the present application.

[0038] Figure 2 A flowchart of a method for training a deep learning model for classifying cardiac signal according to an embodiment of the present application is shown.

[0039] Figure 3 A schematic diagram of a deep learning model for classification of cardiac signal according to an embodiment of the present application is shown.

[0040] Figure 4 A flowchart of a method for classifying heartbeat signals based on deep learning according to an embodiment of the present application is shown.

[0041] Figure 5 A diagram showing the segmentation effect of a group of 20 heart beats according to an embodiment of the present application is shown.

[0042] Figure 6A schematic diagram of a device for classifying heartbeat signals based on deep learning according to an embodiment of the present application is shown.

[0043] Figure 7 A schematic diagram of a training device for a deep learning model for classification of cardiac signal according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0044] The present application will be further described below in conjunction with specific embodiments and accompanying drawings. It will be appreciated that the specific embodiments described herein are only intended to explain the present application and are not intended to limit the present application. In addition, for ease of description, only some but not all structures or processes related to the present application are shown in the accompanying drawings. It should be noted that in this specification, similar reference numerals and letters represent similar items in the following accompanying drawings.

[0045] It should be understood that although the terms "first", "second", etc. may be used herein to describe various features, these features should not be limited by these terms. These terms are used only to distinguish and should not be understood as indicating or implying relative importance. For example, a first feature may be referred to as a second feature, and similarly a second feature may be referred to as a first feature without departing from the scope of the exemplary embodiments.

[0046] In the description of this application, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "set", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two elements. For ordinary technicians in this field, the specific meanings of the above terms in this embodiment can be understood according to specific circumstances.

[0047] Illustrative embodiments of the present application include, but are not limited to, ... methods, systems, apparatus, and media.

[0048] The various aspects of the illustrative embodiments will be described using terms commonly used by those skilled in the art to convey the essence of their work to other persons skilled in the art. However, it is apparent to those skilled in the art that some alternative embodiments may be implemented using the features described in part. For purposes of explanation, specific numbers and configurations are set forth to provide a more thorough understanding of the illustrative embodiments. However, it is apparent to those skilled in the art that alternative embodiments may be implemented without the specific details. In some other cases, some well-known features are omitted or simplified herein to avoid obscuring the illustrative embodiments of the present application.

[0049] In addition, various operations will be described as multiple separate operations in a manner that is most helpful for understanding the illustrative embodiments; however, the order of description should not be interpreted as implying that these operations must rely on the order of description, and many of the operations can be implemented in parallel, concurrently, or simultaneously. In addition, the order of the operations can also be rearranged. When the described operations are completed, the process can be terminated, but can also have additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.

[0050] References in the specification to "one embodiment," "an embodiment," "an illustrative embodiment," etc., indicate that the described embodiment may include a particular feature, structure, or property, but each embodiment may or may not necessarily include the particular feature, structure, or property. Moreover, these phrases are not necessarily referring to the same embodiment. In addition, when particular features are described in conjunction with a specific embodiment, the knowledge of those skilled in the art can affect the combination of these features with other embodiments, whether or not these embodiments are explicitly described.

[0051] Unless the context dictates otherwise, the terms "comprising," "having," and "including" are synonymous. The phrase "A and / or B" means "(A), (B), or (A and B)."

[0052] As used herein, the term "module" may refer to, be part of, or include: memory (shared, dedicated, or group) for running one or more software or firmware programs, application-specific integrated circuits (ASICs), electronic circuits and / or processors (shared, dedicated, or group), combinational logic circuits, and / or other suitable components that provide the described functionality.

[0053] In the accompanying drawings, some structural or method features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order is not necessary. Instead, in some embodiments, these features may be described in a manner and / or order different from that shown in the illustrative drawings. In addition, the structural or method features included in a specific figure do not mean that all embodiments need to include such features. In some embodiments, these features may not be included or may be combined with other features.

[0054] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.

[0055] The existing methods for classifying heartbeats in dynamic electrocardiograms have the following challenges in data and modeling:

[0056] In terms of data: 1) The data volume is large, and the 24-hour data volume leads to high pressure in transmission, processing and calculation. 2) The quality of the collected signal itself is not high, and it is also seriously disturbed by noise. 3) The category imbalance is serious. According to the distribution of Jinke data set, although the data volume is large, 95% of the categories are still sinus, and the remaining atrial fibrillation, premature beats, etc. occupy most of the abnormal distribution. The data volume of atrial flutter, etc. is very small. It is also difficult to find data in a targeted manner.

[0057] In terms of modeling: For categories such as abnormal heart rhythm, it is necessary to locate a single heartbeat, but it is not enough to use only the information of a single heartbeat for classification, because the classification of a single heartbeat also requires the information of surrounding heartbeats for judgment. Therefore, our task is to classify a single heartbeat, but the input information is multiple heartbeats. When modeling, we need to consider how to make the model integrate the information of multiple heartbeats and classify individual heartbeats separately.

[0058] In response to the above data problems, this application uses signal downsampling to reduce the amount of data, denoising to improve data quality, and only selects a small proportion of normal heartbeats to join the training to maintain the distribution of data. In response to the above modeling problems, this application defines the task of the model as the need to classify each heartbeat, and the model needs to learn the local features of each heartbeat and the global timing features between heartbeats. Therefore, we designed a local + global combination model. First, for each heartbeat, a convolution neural network is used to capture the local morphological features of the heartbeat, and a fully connected neural network is used to learn the RR interval (RR interval refers to the time limit between two R waves on the electrocardiogram) features of each heartbeat. Then, the local mentality features and RR interval features learned from multiple consecutive heartbeats are combined in time sequence, and the Transformer self-attention model in the field of NLP (Natural Language Processing) is used to learn the global relationship between heartbeat features. In this way, when predicting each heartbeat, the model can take into account the characteristics of the heartbeat itself and the influence of the heartbeat features before and after the timing on this heartbeat, while considering local and global features. The following is a detailed description in conjunction with the accompanying drawings.

[0059] First, the heartbeat data used in the embodiment of the present application is introduced: the data used to train the model can be the ECG signal data of multiple samples (people) for a continuous period of time. For example, the exemplary data totals 430 samples (people), each of which contains a 24-hour ECG signal data file of a person and a corresponding data annotation file, where:

[0060] Each signal file is in ECA format, 500 sampling rate, 12 leads. Figure 1 The figure shows the analyzed ECG signal according to the embodiment of the present application, and the segments of the V3, V4 and II leads of a certain data are respectively selected;

[0061] The annotation file of each example is in rpt format, which mainly records the position and category of each heartbeat. Table 1 shows some annotations of a sample after parsing, where pos is the heartbeat position and sinus is the corresponding category.

[0062] Table 1

[0063]

[0064]

[0065] The total number of heart beats in all samples is 42656879. The specific distribution of each category is shown in Table 2, among which sinus beats account for the majority, followed by atrial fibrillation and supraventricular premature beats.

[0066] Table 2

[0067]

[0068] To use ECG signal data for training a deep learning model for classifying heart beat signals, the data must first be divided into a training set and a validation set before being used for training.

[0069] Figure 2 FIG. 1 is a flow chart showing a method for training a deep learning model for classifying heartbeat signals according to an embodiment of the present application. Figure 2 As shown, the method 200 includes:

[0070] Step 202: Different examples of heartbeat signals are divided into training sets and validation sets, respectively, and heartbeat signals of the same category are evenly distributed between the training set and the validation set.

[0071] Since a sample has about 80,000 to 100,000 heartbeats, when training the model, if the training set and validation set are divided according to the heartbeats, it is easy to cause the heartbeats of the same sample to exist in both the training and validation sets, resulting in a certain degree of validation set leakage. Therefore, it is possible to directly divide according to the samples instead of dividing the heartbeats in the samples, so that the heartbeat data of the same sample only exists in one of the training set and the validation set, but not in both sets, thus avoiding validation set leakage and optimizing the model training effect.

[0072] In the division of samples, if conventional random division is performed directly, it will lead to extremely uneven distribution of heartbeat signals of certain categories in the training set and the validation set. This is because some categories of heartbeats only exist in a few samples. If they are randomly divided, it is easy to cause all the heartbeats of this category to be concentrated in one of the training or validation sets. For example, as shown in Table 3, only 25 samples in the aforementioned exemplary data contain atrial fibrillation, and the proportion of atrial fibrillation in each sample also varies greatly, ranging from the lowest 2.22% to the highest 100%. Therefore, when dividing the training set and the validation set, the heartbeat signals of each category are evenly distributed between the training set and the validation set. As a result, for example, out of a total of 430 samples, the training set contains 259 samples and the validation set contains 171 samples.

[0073] Table 3

[0074]

[0075]

[0076] Step 204, reducing the proportion of normal heartbeat signals in the training set and the validation set.

[0077] Since normal heartbeats account for a high proportion, for example, in the aforementioned exemplary data, normal heartbeats account for 92%. In order to make the model learn the features of each abnormal category more effectively, only a small number of normal category heartbeat signals can be retained during model training. For example, 20 heartbeats can be grouped into a group. Table 4 shows the distribution of each category of heartbeat signals in the training set and the validation set, where the distribution of normal category heartbeat signals is still significantly higher than that of other categories of heartbeat signals.

[0078] Table 4

[0079]

[0080]

[0081] Step 206: Use the training set and the validation set to train the deep learning model.

[0082] In terms of modeling, it is not enough to use only the information of a single heartbeat for classification, because the classification of a single heartbeat also requires the information of surrounding heartbeats to judge. Therefore, although a single heartbeat is classified, the input information can be multiple heartbeats. When modeling, it is necessary to consider how to make the model integrate the information of multiple heartbeats and classify each individual heartbeat separately.

[0083] Figure 3 FIG. 1 is a schematic diagram of a deep learning model for classifying heartbeat signals according to an embodiment of the present application. Figure 3 As shown, the deep learning model 300 includes:

[0084] A convolutional neural network 301 for determining a feature of a signal of each heartbeat in a plurality of consecutive heartbeats;

[0085] A first Transformer model 302, wherein the Encoder module of the first Transformer model 302 is used to determine the relationship between the heartbeat signals in the plurality of consecutive heartbeats according to the characteristics of the signal of each heartbeat;

[0086] A fully connected neural network 303, for determining a characteristic of an RR interval characteristic of each of the plurality of consecutive heartbeats;

[0087] An Encoder module of the second Transformer model 304, wherein the Encoder module of the second Transformer model 304 is used to determine the relationship between the RR interval characteristics of the heartbeats in the plurality of consecutive heartbeats according to the characteristics of the RR interval characteristics of each heartbeat;

[0088] The fully connected layer 305 of the neural network is used to determine the category of each heartbeat in the multiple consecutive heartbeats based on the characteristics of the signal of each heartbeat, the relationship between the signals of the heartbeat, the characteristics of the RR interval characteristics of each heartbeat, and the relationship between the RR interval characteristics of the heartbeat.

[0089] In the present invention, the model is a local + global combination model, which learns the local features of each heartbeat and the global timing features between heartbeats. First, for each heartbeat, a CNN convolution neural network is used to capture the local morphological features of the heartbeat, and a fully connected neural network is used to learn the RR interval features of each heartbeat. Then, the local morphological features and RR interval features learned from multiple consecutive heartbeats are combined in time sequence, and the Transformer self-attention model in the NLP field is used to learn the global relationship between the heartbeat features. In this way, when predicting each heartbeat, the model can take into account the characteristics of the heartbeat itself and the influence of the heartbeat features before and after the time sequence on the heartbeat, while considering local and global features. Improve the accuracy of classification.

[0090] Figure 4 A flow chart showing a method for classifying heartbeat signals based on deep learning according to an embodiment of the present application is shown. Figure 3 Description: The method 400 is used in an electronic device and includes:

[0091] Step 402, determining the characteristics of the signal of each heartbeat in multiple consecutive heartbeats through the convolutional neural network 301.

[0092] Step 404, determining the relationship between the heartbeat signals in the plurality of consecutive heartbeats according to the characteristics of the signal of each heartbeat through the Encoder module of the first Transformer model 302;

[0093] Step 406, determining the characteristics of the RR interval characteristics of each heartbeat in the plurality of consecutive heartbeats through the fully connected neural network 303;

[0094] Step 408, determining the relationship between the RR interval features of the heartbeats in the plurality of consecutive heartbeats according to the features of the RR interval features of each heartbeat through the Encoder module of the second Transformer model 304;

[0095] Step 410, through the fully connected layer 305 of the neural network, the category of each heartbeat in the multiple consecutive heartbeats is determined according to the characteristics of the signal of each heartbeat, the relationship between the signals of the heartbeat, the characteristics of the RR interval characteristics of each heartbeat, and the relationship between the RR interval characteristics of the heartbeat.

[0096] In the present invention, although a single heartbeat is classified, the input information is multiple continuous heartbeats. The information of multiple heartbeats is fused during classification, and the single heartbeat is classified separately. The local features of each heartbeat and the global timing features between heartbeats are learned. First, for each heartbeat, a CNN convolution neural network is used to capture the local morphological features of the heartbeat, and a fully connected neural network is used to learn the RR interval features of each heartbeat. Then, the local morphological features learned from multiple continuous heartbeats and the features of the RR interval are combined in time sequence, and the Transformer self-attention model in the NLP field is used to learn the global relationship between the heartbeat features. In this way, when predicting each heartbeat, the characteristics of the heartbeat itself and the influence of the characteristics of the heartbeats before and after in time sequence on the heartbeat can be considered, and local and global features are considered at the same time. Improve the accuracy of classification.

[0097] According to some embodiments of the present application, the method further includes:

[0098] The convolutional neural network 301 includes four groups, each with two layers, and includes a one-dimensional convolution layer with a residual structure;

[0099] The fully connected neural network 303 is a three-layer fully connected neural network;

[0100] The fully connected layer 305 of the neural network is a two-layer fully connected layer.

[0101] According to some embodiments of the present application, the method further includes:

[0102] The overall signal of the multiple continuous heartbeats is denoised by wavelet transform; for example, the lead signal is first denoised, and the denoising method can be to decompose, threshold filter, and reconstruct the signal by using wavelet transform to obtain a denoised signal.

[0103] Normalize the overall signal; for example, normalize all signal values ​​to between 0 and 1.

[0104] Reduce the sampling rate of the overall signal; for example, reduce the sampling rate of the signal from 500 to 125.

[0105] The whole signal is segmented to obtain the signal of each heartbeat. For example, each heartbeat is segmented according to the heartbeat position provided by the annotation file, for example, the first 45 signals and the last 60 signals of each heartbeat position can be segmented. Figure 5 A segmentation effect diagram of a group of 20 heartbeats according to an embodiment of the present application is shown, the lower signal is a segment of 20 original continuous heartbeat signals and the corresponding heartbeat positions, and the upper signal is a segmented single heartbeat and the corresponding category.

[0106] According to some embodiments of the present application, the method further includes:

[0107] RR interval features include RR scatter plot features, RR interval values, heart rate values, and time domain features and frequency domain features of the signal.

[0108] According to some embodiments of the present application, the method further includes:

[0109] Determine the RR scatter plot of the heartbeat, and then determine the confidence ellipse area, confidence distance divergence, and confidence angle divergence of the RR scatter plot as the RR scatter plot features of the heartbeat; for example, the RR scatter plot of the heartbeat is obtained by calculating the RR intervals 5 seconds before and 5 seconds after the heartbeat, and then calculate the confidence ellipse area, confidence distance divergence, and confidence angle divergence of the RR scatter plot.

[0110] The RR interval values ​​include a first predetermined number of RR interval values ​​before and after a heartbeat; for example, the first 4 and last 5 RR intervals of a new heartbeat are selected as the RR interval values.

[0111] The heart rate value of the heartbeat is determined based on a second predetermined number of adjacent RR intervals surrounding the heartbeat; for example, the current heart rate is calculated based on the surrounding 5 adjacent RR intervals.

[0112] Frequency domain features include: the centroid frequency, average frequency, root mean square frequency, and frequency standard deviation of the signal within a predetermined time before and after the heartbeat;

[0113] The time domain characteristics include: maximum value, minimum value, peak value, average value, root amplitude, variance, standard deviation, root mean square, kurtosis, skewness, waveform factor, peak factor, pulse factor, margin factor, and clearance factor of the signal within a predetermined time before and after the heartbeat.

[0114] Figure 6 A schematic diagram of a device for classifying heartbeat signals based on deep learning according to an embodiment of the present application is shown.

[0115] like Figure 6 As shown, the device 600 includes

[0116] A memory 602 for storing computer executable instructions, and

[0117] The processor 604 is configured to execute the instruction to implement any possible method of the first embodiment.

[0118] The first embodiment is a method embodiment corresponding to the present embodiment, and the present embodiment can be implemented in conjunction with the first embodiment. The relevant technical details mentioned in the first embodiment are still valid in the present embodiment, and are not repeated here to reduce repetition. Accordingly, the relevant technical details mentioned in the present embodiment can also be applied in the first embodiment.

[0119] Specifically, Figure 3 As shown, the device 600 may include one or more (only one is shown in the figure) memories 602 and a processor 604 (the processor 604 may include but is not limited to a central processing unit CPU, a graphics processor GPU, a digital signal processor DSP, a microprocessor MCU or a programmable logic device FPGA and other processing devices). The specific connection medium between the above-mentioned memory 602 and the processor 604 is not limited in the embodiment of the present application. Figure 3 In the embodiment, the memory 602 and the processor 604 are connected via a bus 606. Figure 6 The connection between other components is shown by bold lines, which is only for schematic illustration and is not intended to be limiting. The bus 606 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one thick line is used in the diagram, but it does not mean that there is only one bus or one type of bus. Those skilled in the art will understand that Figure 6 The structure shown is for illustration only and does not limit the structure of the above electronic device. Figure 6 More or fewer components as shown, or with Figure 6 Different configurations are shown.

[0120] The processor 604 executes various functional applications and data processing by running the software programs and modules stored in the memory 602, that is, implements the above-mentioned classification method of heartbeat signals based on deep learning.

[0121] The memory 602 may be used to store program instructions / modules corresponding to the classification method of heartbeat signals based on deep learning in some embodiments of the present application executed by the processor 604. The memory 602 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 602 may further include a memory remotely arranged relative to the processor 604, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0122] Figure 7 A schematic diagram of a training device for a deep learning model for classification of cardiac signal according to an embodiment of the present application is shown.

[0123] like Figure 7 As shown, the device 700 includes

[0124] A memory 702 for storing computer executable instructions, and

[0125] The processor 704 is configured to execute the instruction to implement any possible method of the first embodiment.

[0126] The first embodiment is a method embodiment corresponding to the present embodiment, and the present embodiment can be implemented in conjunction with the first embodiment. The relevant technical details mentioned in the first embodiment are still valid in the present embodiment, and are not repeated here to reduce repetition. Accordingly, the relevant technical details mentioned in the present embodiment can also be applied in the first embodiment.

[0127] Specifically, Figure 3 As shown, the device 700 may include one or more (only one is shown in the figure) memories 702 and processors 704 (the processor 704 may include but is not limited to a central processing unit CPU, a graphics processor GPU, a digital signal processor DSP, a microprocessor MCU or a programmable logic device FPGA and other processing devices). The specific connection medium between the above-mentioned memory 702 and the processor 704 is not limited in the embodiment of the present application. Figure 3 In the embodiment, the memory 702 and the processor 704 are connected via a bus 706. Figure 7The connection between other components is shown by bold lines, and is not intended to be limiting. The bus 706 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one thick line is used in the diagram, but it does not mean that there is only one bus or one type of bus. Those skilled in the art will understand that Figure 7 The structure shown is for illustration only and does not limit the structure of the above electronic device. Figure 7 More or fewer components as shown, or with Figure 7 Different configurations are shown.

[0128] The processor 704 executes various functional applications and data processing by running the software programs and modules stored in the memory 702, that is, implements the above-mentioned training method of the deep learning model for classification of cardiac signal.

[0129] The memory 702 may be used to store program instructions / modules corresponding to the training method of the deep learning model for classification of cardiac signals in some embodiments of the present application executed by the processor 704. The memory 702 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 702 may further include a memory remotely disposed relative to the processor 704, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0130] According to some embodiments of the present application, a computer storage medium is disclosed, on which instructions are stored. When the instructions are executed on a computer, the computer is enabled to execute any possible method of the first embodiment described above.

[0131] The first embodiment is a method embodiment corresponding to the present embodiment, and the present embodiment can be implemented in conjunction with the first embodiment. The relevant technical details mentioned in the first embodiment are still valid in the present embodiment, and are not repeated here to reduce repetition. Accordingly, the relevant technical details mentioned in the present embodiment can also be applied in the first embodiment.

[0132] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented in the form of instructions or programs carried or stored on one or more transient or non-transient machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors, etc. When the instructions or programs are run by the machine, the machine may perform the aforementioned various methods. For example, the instructions may be distributed via a network or other computer-readable medium. Therefore, the machine-readable medium may include, but is not limited to, any mechanism for storing or transmitting information in a machine (e.g., computer) readable form, such as a floppy disk, an optical disk, a compact disk read-only memory (CD-ROMs), a magneto-optical disk, a read-only memory (ROM), a random access memory (RAM), an erasable programmable read-only memory (EPROM), an electronically erasable programmable read-only memory (EEPROM), a magnetic card or an optical card, or a flash memory or a tangible machine-readable memory for transmitting network information via electrical, optical, acoustic, or other forms of signals (e.g., carrier waves, infrared signals, digital signals, etc.). Accordingly, machine-readable media includes any form of machine-readable media suitable for storing or transmitting electronic instructions or information readable by a machine (eg, a computer).

[0133] The embodiments of the present application are described in detail above in conjunction with the accompanying drawings, but the use of the technical solution of the present application is not limited to the various applications mentioned in the embodiments of the present patent. Various structures and variations can be easily implemented with reference to the technical solution of the present application to achieve the various beneficial effects mentioned herein. Various changes made within the knowledge of ordinary technicians in the field without departing from the purpose of the present application should all fall within the scope of the patent application.

Claims

1. A classification method for heartbeat signals based on deep learning, used in electronic equipment, characterized in that: The method comprises: Training a deep learning model for classification of heartbeat signals, wherein the deep learning model includes a convolutional neural network, a first Transformer model, a fully connected neural network, a second Transformer model, and a fully connected layer of the neural network; Segmenting the overall signals of multiple continuous heartbeats to obtain a signal of each heartbeat; Determining the characteristics of each heartbeat signal by the convolutional neural network; Determining, by the Encoder module of the first Transformer model, a relationship between the signals of the heartbeats in the plurality of consecutive heartbeats according to the characteristics of the signal of each heartbeat; By means of the fully connected neural network, the features of the RR interval characteristics of each heartbeat in the multiple consecutive heartbeats are determined, wherein the RR interval characteristics include RR scatter plot characteristics, RR interval values, heart rate values, and time domain characteristics and frequency domain characteristics of the signal; wherein the RR scatter plot characteristics include: the confidence ellipse area, confidence distance divergence, and confidence angle divergence of the RR scatter plot; the RR interval value includes a first predetermined number of RR interval values ​​before and after the heartbeat; the heart rate value is determined according to a second predetermined number of RR intervals adjacent to the heartbeat; the frequency domain characteristics include: the centroid frequency, average frequency, root mean square frequency, and frequency standard deviation of the signal within a predetermined time before and after the heartbeat; the time domain characteristics include: the maximum value, minimum value, peak value, average value, root amplitude, variance, standard deviation, root mean square, kurtosis, skewness, waveform factor, peak factor, pulse factor, margin factor, and clearance factor of the signal within a predetermined time before and after the heartbeat; Determining, by the Encoder module of the second Transformer model, a relationship between the RR interval features of the heartbeats in the plurality of consecutive heartbeats according to the features of the RR interval features of each heartbeat; Through the fully connected layer of the neural network, the category of each heartbeat in the multiple consecutive heartbeats is determined according to the characteristics of the signal of each heartbeat, the relationship between the signals of the heartbeats, the characteristics of the RR interval characteristics of each heartbeat, and the relationship between the RR interval characteristics of the heartbeats.

2. The method according to claim 1, characterized in that The convolutional neural network includes four groups, each group has two layers, and includes a one-dimensional convolution layer with a residual structure; The fully connected neural network is a three-layer fully connected neural network; The fully connected layer of the neural network is two layers of fully connected layers.

3. The method according to claim 1, characterized in that The method further comprises: De-noising the overall signal of the plurality of continuous heartbeats by wavelet transform; Normalize the overall signal; The sampling rate of the overall signal is reduced.

4. The method according to claim 1, characterized in that: The method further includes training the deep learning model by the following training method: Dividing heartbeat signals of different examples into a training set and a validation set respectively, and making the heartbeat signals of the same category evenly distributed between the training set and the validation set; Reducing the proportion of normal heartbeat signals in the training set and the validation set; The deep learning model is trained using the training set and the validation set.

5. A classification device for heartbeat signals based on deep learning, characterized in that: The device includes a memory storing computer executable instructions and a processor. When the instructions are executed by the processor, the device implements the deep learning-based classification method for heartbeat signals according to any one of claims 1 to 4.

6. A computer storage medium, characterized in that: Instructions are stored on the computer storage medium. When the instructions are executed on a computer, the computer executes the deep learning-based classification method for heartbeat signals according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Electrocardiosignal processing system, method, electronic equipment and readable storage medium

    CN110693488A