Method and apparatus for analyzing electrocardiogram signal by using deep learning model
A deep learning model using CNN in the frequency domain and an attention mechanism addresses the variability in ECG signals to enhance PVC detection, improving the reliability of arrhythmia diagnosis by focusing on shape and interval differences, thus addressing the limitations of existing methods.
Patent Information
- Application Number
- PCT/KR2024/007565
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-01-10
- Filing Date
- 2024-06-03
- Publication Date
- 2024-12-12
AI Technical Summary
Existing methods for detecting premature ventricular contraction (PVC) from electrocardiogram (ECG) signals lack reliability and generality due to variability in ECG signals under different settings and noise levels, making it challenging to accurately diagnose arrhythmias, especially in surgical contexts.
A deep learning model utilizing a convolutional neural network (CNN) in the frequency domain to remove noise from ECG signals, combined with an attention mechanism to focus on shape and interval differences, mimicking the expertise of trained clinicians for detecting abnormal sinus rhythm.
The solution enhances the detection performance of PVC by effectively removing noise and distinguishing between normal and abnormal sinus rhythms, improving the accuracy of arrhythmia diagnosis.
Smart Images

Figure KR2024007565_12122024_PF_FP_ABST
Abstract
Description
Method for analyzing electrocardiogram signals using a deep learning model and device for analyzing electrocardiogram signals
[0001] The present disclosure relates to a method for analyzing electrocardiogram (ECG) signals using a deep learning model and a device for analyzing ECG signals. More specifically, the present disclosure relates to a method and device for detecting abnormal sinus rhythms from ECG signals using a deep learning model.
[0002] Premature ventricular contractions (PVCs) are common, harmless cardiac arrhythmias that can sometimes be asymptomatic or, less commonly, cause palpitations and chest pain. PVCs are frequently observed in patients undergoing surgery, regardless of whether they are under general or regional anesthesia. In general, PVCs occurring during surgery may have relatively limited clinical significance. However, not all PVCs are considered harmless and, in certain circumstances, require careful monitoring.
[0003] Several PVC detection models have been proposed to enable early diagnosis of arrhythmias. However, their reliability and generalizability are limited due to the variability of electrocardiogram signals across various settings and noise levels. These weaknesses can be exacerbated with new data. Therefore, the present invention provides a method and device for detecting abnormal sinus rhythms that mimics the way trained clinicians detect PVCs by removing noise from electrocardiogram signals using a convolutional neural network (CNN) in the frequency domain and focusing on differences in heartbeat morphology and intervals based on an attention mechanism.
[0004] The present invention provides a method and device for detecting abnormal sinus rhythm from electrocardiogram signals. Furthermore, the present invention provides a computer-readable recording medium containing a program for executing the method on a computer. The technical challenges to be solved are not limited to the technical challenges described above, and other technical challenges may exist.
[0005] A method for detecting an abnormal sinus rhythm according to one aspect of the present disclosure may include the steps of: converting at least a portion of an electrocardiogram signal of a predetermined time period into a frequency domain signal; removing noise from the frequency domain signal using a convolution neural network (CNN) model; obtaining a denoised signal in a time domain corresponding to the signal from which the noise has been removed; and detecting a non-sinus rhythm from the denoised signal based on an attention mechanism.
[0006] According to another aspect of the present disclosure, a device for detecting an abnormal sinus rhythm comprises at least one memory; and at least one processor; wherein the at least one processor is configured to convert at least a portion of an electrocardiogram signal of a predetermined time period into a frequency domain signal, remove noise from the frequency domain signal using a convolution neural network (CNN) model, obtain a denoised signal in a time domain corresponding to the signal from which the noise has been removed, and detect a non-sinus rhythm based on an attention mechanism from the denoised signal.
[0007] A computer-readable recording medium according to another aspect of the present disclosure includes a recording medium having recorded thereon a program for executing the above-described method on a computer.
[0008] According to the problem solving means of the present invention described above, by detecting abnormal sinus rhythm using a deep learning model that removes noise from an electrocardiogram signal and focuses on the difference in shape between the abnormal sinus rhythm and the normal sinus rhythm, which are the detection targets, it is possible to simulate the judgment method of a trained specialist.
[0009] In addition, according to the problem solving means of the present invention, the detection performance of premature ventricular contraction can be improved.
[0010] The effects of the embodiments are not limited to the effects mentioned above, and other effects not mentioned will be clearly understood by those skilled in the art from the description of the present invention.
[0011] FIG. 1 is a diagram illustrating an example of a deep learning model for detecting abnormal sinus rhythm from an electrocardiogram signal according to one embodiment of the present invention.
[0012] FIG. 2 is a schematic diagram illustrating an example of a device for detecting abnormal rhythm according to one embodiment.
[0013] FIG. 3 is a flowchart illustrating an example of a method for detecting abnormal sinus rhythm according to one embodiment.
[0014] FIG. 4 is a diagram illustrating an example of removing noise from a frequency domain signal according to one embodiment.
[0015] FIG. 5 is a diagram illustrating an example of inputting a denoised signal in the time domain to an encoder and decoder to segment it into a normal rhythm signal and an abnormal rhythm signal according to one embodiment.
[0016] FIG. 6 is a diagram showing an example of an attention map that visualizes a section in which an attention mechanism, according to one embodiment, pays attention to an electrocardiogram signal.
[0017] A method for detecting an abnormal sinus rhythm according to one aspect may include the steps of: converting at least a portion of an electrocardiogram signal of a predetermined time period into a frequency domain signal; removing noise from the frequency domain signal using a convolution neural network (CNN) model; obtaining a denoised signal in a time domain corresponding to the signal from which the noise has been removed; and detecting a non-sinus rhythm from the denoised signal based on an attention mechanism.
[0018] A device for detecting an abnormal sinus rhythm according to another aspect comprises at least one memory; and at least one processor; wherein the at least one processor converts at least a part of an electrocardiogram signal of a predetermined time period into a frequency domain signal, removes noise from the frequency domain signal using a convolution neural network (CNN) model, obtains a denoised signal in a time domain corresponding to the signal from which the noise has been removed, and detects a non-sinus rhythm based on an attention mechanism from the denoised signal.
[0019] The terms used in the examples are selected from widely used, current terms, as much as possible. However, these terms may vary depending on the intentions of those skilled in the art, precedents, the emergence of new technologies, etc. Furthermore, in certain cases, the applicant may arbitrarily select terms, in which case their meanings will be described in detail in the relevant description. Therefore, the terms used in the specification should be defined based on their intended meaning and the overall content of the specification, rather than simply their names.
[0020] When a part of the specification is said to "include" a component, this does not exclude other components, but rather implies the inclusion of other components, unless otherwise specifically stated. Furthermore, terms such as "unit" and "module" used throughout the specification refer to a unit that processes at least one function or operation, which may be implemented in hardware, software, or a combination of hardware and software.
[0021] Additionally, terms including ordinal numbers, such as "first" or "second," used in the specification may be used to describe various components, but the components should not be limited by the terms. The terms may be used to distinguish one component from another.
[0022] The present disclosure will be described in detail with reference to the attached drawings. However, the embodiments may be implemented in various different forms and are not limited to the examples described herein.
[0023] FIG. 1 is a diagram illustrating an example of a deep learning model for detecting abnormal sinus rhythm from an electrocardiogram signal according to one embodiment of the present invention.
[0024] Referring to FIG. 1, the deep learning model for detecting premature ventricular contractions (PVCs) of the present invention may be a Denoise and Contrast Attention Module (DCAM) including a Denoise Module (DM) that removes noise in the frequency domain based on a CNN for an electrocardiogram signal of a predetermined time period, and a Contrast Attention Module (CAM) that improves the performance of detecting PVCs in an electrocardiogram signal by focusing on the contrast between the PVC and the form of normal sinus rhythm.
[0025] The denoise attention module of the present invention can imitate the principle of PVC detection by trained specialists. When diagnosing PVC, anesthesiologists filter out irrelevant signals and analyze the shape and interval with other surrounding sinus rhythm signals. The following mathematical expression 1 is the input characteristic of the Denoise and Contrast Attention Module (DCAM). is the output characteristic It shows the process of converting to .
[0026]
[0027] Here Silver input characteristics Output characteristics in represents the transformation mapping to . Here, represents the channel, represents the length of the signal.
[0028] Silver input characteristics This is the output of the denoising module with noise removed. and is a feature map extracted from each of the G group convolution neural networks (GCNN) described below. Map and The difference between the maps (subtraction) is done after activating the Gaussian Error Linear Unit (GELU). is combined with. Here is the recalibration characteristic The output characteristics are multiplied by is obtained.
[0029] The denoising module (20) is designed to remove noise from an electrocardiogram signal (10) of a predetermined time period containing noise after performing a fast Fourier transform (FFT). The denoising module (20) mimics the process by which an anesthesiologist ignores noise and artifacts before diagnosing an electrocardiogram signal by considering the time interval between heartbeats. is implemented based on per-channel FFT. It consists of the following three-step procedure. First, the ECG signal is transformed from the time domain to the frequency domain by performing an FFT. Since the signal in the frequency domain on which the FFT is performed has the property of conjugate symmetry, the right half of the signal in the frequency domain can be derived from the left half. Therefore, the denoising module (10) can use the rFFT (right FFT) algorithm to reduce the complexity of the operation.
[0030] Since frequency-domain signals consist of real and imaginary parts, concatenating the real and imaginary parts doubles the number of channels. The frequency-domain signal is input to a convolution layer with the real and imaginary parts concatenated. A convolution operation is performed on the input signal, and a normalization layer and GELU activation function are applied to the result of the convolution operation.
[0031] The convolutional layer acts as a filter, reducing noise levels while preserving the characteristics of the input signal. Additionally, the normalization layer ensures that the output has a stable distribution and scale. The GELU activation function introduces nonlinearity into the convolutional layer's operations, improving its performance.
[0032] The output with the normalization and GELU activation functions applied is divided into halves by the channel to separate the real and imaginary parts again. Afterwards, the noise-removed frequency domain signal is converted to the time domain using the inverse rFFT. Finally, the denoised signal in the time domain that retains the information of the original signal is obtained. at Map and It is designed to extract contrast features between maps and perform recalibration. The contrast attention module (30) does not normalize the input signal. Map and The map can be extracted. Also, the recalibration characteristic is is experimentally determined while maintaining the channel dimension of the input signal. The contrast attention module (30) uses GCNN to improve the discrimination between PVC and normal beats. Map and Learn the contrast between maps.
[0033] Here, GCNN is a type of CNN that divides the input channel into G groups and performs convolution independently for each group. The contrastive attention module (30) uses GCNN. Map and By learning the contrast between maps, the characteristics of PVCs that are different from normal sinus rhythm in a given ECG signal can be identified. As can be seen on the map, GCNN can reduce computational cost and increase model diversity by adjusting the parameter G.
[0034] The input signal (the denoised signal in the time domain) is divided into G groups along the channel dimension, and each group performs convolution independently. The output of the GCNN passes through a SoftMax layer. Map and The map is the output of each softmax layer. It is obtained by applying batch-wise matrix production with the contrastive attention module (30). Map and Differences between maps ( )cast By adding to this, the contrast between PVC and normal sinus rhythm can be emphasized.
[0035] Afterwards, the contrast attention module (30) Map and Differences between maps The channel information can be reduced by multiplying this added result by a recalibration feature P. Here, the recalibration feature P can be defined by the following mathematical expression 2.
[0036]
[0037] Hereinafter, a method and device for detecting abnormal sinus rhythm using the deep learning model of FIG. 1 will be specifically described with reference to FIGS. 2 to 6.
[0038] FIG. 2 is a schematic diagram illustrating an example of a device for detecting abnormal rhythm according to one embodiment.
[0039] Referring to FIG. 2, a device (100) for detecting abnormal sinus rhythm according to one embodiment includes a processor (110) and a memory (120). For convenience of explanation, only components related to the present embodiments are illustrated in FIG. 2, and it will be apparent to those skilled in the art that other general components may be included in addition to the components illustrated in FIG. 2.
[0040] The processor (110) can process computer program commands by performing basic arithmetic, logic, and input / output operations. Here, the commands can be provided from memory (120) or an external device (e.g., a server, etc.). In addition, the processor (110) can generally control the operations of other components included in the device (200).
[0041] The processor (110) may be implemented using at least one of application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, micro-controllers, microprocessors, and other electrical units for performing functions.
[0042] For example, the processor (110) can control at least one other component (e.g., hardware or software component) of an electronic device connected to the processor (110) by executing software (e.g., program) stored in the memory (120), and can control the device (100) as a whole by performing various data processing or operations.
[0043] According to one embodiment, the processor (110) may be implemented as, but is not limited to, a central processing unit (CPU), a graphics processing unit (GPU), an application processor (AP), a neural processing unit (NPU), an image signal processor (ISP), a sensor hub processor, or a communication processor (CP) provided in the device (100).
[0044] The memory (120) may include any non-transitory computer-readable recording medium. As an example, the memory (120) may include a non-permanent mass storage device such as a random access memory (RAM), a read only memory (ROM), a disk drive, a solid state drive (SSD), a flash memory, etc. As another example, the non-permanent mass storage device such as a ROM, an SSD, a flash memory, a disk drive, etc. may be a separate permanent storage device distinct from the memory. In addition, the memory (120) may store an operating system (OS) and at least one program code (e.g., code for the processor (110) to perform an operation to be described later with reference to FIGS. 3 to 6).
[0045] These software components may be loaded from a computer-readable recording medium separate from the memory (120). This separate computer-readable recording medium may be a recording medium that can be directly connected to the device (100), and may include, for example, a computer-readable recording medium such as a floppy drive, a disk, a tape, a DVD / CD-ROM drive, a memory card, etc.
[0046] Alternatively, the software components may be loaded into the memory (120) via a communication module rather than a computer-readable recording medium. For example, at least one program may be loaded into the memory (120) based on a computer program (e.g., a computer program for the processor (110) to perform the operations described below with reference to FIGS. 2 to 6) that is installed by files provided by developers or a file distribution system that distributes installation files of applications via a communication module.
[0047] FIG. 3 is a flowchart illustrating an example of a method for detecting abnormal sinus rhythm according to one embodiment.
[0048] Referring to FIG. 3, in step 310, the processor (110) can convert at least a portion of an electrocardiogram signal of a predetermined time period into a frequency domain signal.
[0049] For example, the processor (110) can convert an electrocardiogram signal into a frequency domain signal by performing a fast Fourier transform on at least a portion of the electrocardiogram signal for a predetermined time period.
[0050] According to one embodiment, an electrocardiogram signal of a predetermined time period may be subjected to a fast Fourier transform after undergoing a preprocessing process. For example, the processor (110) may resample the electrocardiogram signal at a rate of 250 Hz. Then, the sampled electrocardiogram signal may be divided into 5.12-second lengths to be divided into 1280 (250 5.12) An electrocardiogram signal of a predetermined time interval consisting of samples can be acquired. Here, the sampling frequency and the numerical values of the predetermined time interval are merely exemplary, and it is obvious that the present invention is not limited to these values. The length of the predetermined time interval, i.e., the length of the input signal segment, can be selected depending on the performance of the abnormal sinus rhythm detection device of the present invention.
[0051] Thereafter, the processor (110) can remove baseline wandering by applying a 5th-order Butterworth bandpass filter in the range of 0.5 Hz to 40 Hz. In addition, the processor (110) can perform normalization on the electrocardiogram signal from which the baseline wandering noise has been removed. Normalization is performed to address the problem that the amplitude of the electrocardiogram signal varies depending on the patient, electrode placement, and measuring device. At this time, the normalization may be Z-score normalization or min-max normalization. Preferably, the normalization may be Z-score normalization. Z-score normalization is more sensitive to outliers than min-max normalization, which may distort the shape when the signal contains artifacts.
[0052] According to one embodiment, the processor (110) can obtain the frequency domain signal by dividing an electrocardiogram signal of a predetermined time period into a first signal and a second signal, performing a fast Fourier transform on the first signal, and generating a symmetrical signal for the result of the performance. Here, the first signal means a signal corresponding to one half obtained by dividing the time domain signal in half, and the second signal means a signal corresponding to the other half. According to one embodiment, the processor (110) can reduce the complexity of the operation by using an rFFT (right FFT) algorithm by utilizing the symmetry of the fast Fourier transformed frequency domain signal.
[0053] In step 320, the processor (110) can remove noise from the frequency domain signal using a convolution neural network (CNN) model.
[0054] According to one embodiment, the processor (110) may connect the real and imaginary parts included in the frequency domain signal, input them to a convolution layer, perform a convolution on the input, apply normalization and a GELU function, and then obtain an output. In addition, the processor (110) may divide the output into a real and imaginary part to obtain a frequency domain signal from which noise has been removed.
[0055] Here, the convolutional layer acts as a filter that reduces noise levels while preserving the characteristics of the input signal. Unlike traditional noise removal methods, this noise removal process utilizes a learnable FFT filter.
[0056] In step 330, the processor (110) may obtain a denoised signal in the time domain corresponding to the signal from which noise has been removed. According to one embodiment, the processor (110) may reduce the complexity of the operation by using an inverse fast Fourier transform (rFFT) algorithm that utilizes the symmetry of the frequency domain signal. An example of the processor (110) removing noise from a frequency domain signal and obtaining a denoised signal in the time domain is described in detail below in FIG. 4.
[0057] FIG. 4 is a diagram illustrating an example of removing noise from a frequency domain signal according to one embodiment.
[0058] Referring to FIG. 4, the processor (110) performs a fast Fourier transform (FFT) on an electrocardiogram signal (410) of a predetermined time period containing noise to convert it from the time domain to the frequency domain. At this time, the processor (110) uses the rFFT (right FFT) algorithm to reduce the complexity of the operation by utilizing the conjugate symmetry property of the signal in the frequency domain. That is, the processor (110) divides the electrocardiogram signal of a predetermined time period in half, calculates a fast Fourier transform on the signal corresponding to the half, and then generates symmetry, thereby obtaining the entire frequency domain signal. The signal in the frequency domain is composed of a real part (420) and an imaginary part (430). The processor (110) connects the real part and the imaginary part and inputs them to a convolution layer. By connecting the real part and the imaginary part, the number of channels of the signal (440) input to the convolution layer is doubled. The convolution layer acts as a filter that reduces the noise level while preserving the characteristics of the input signal. A normalization layer and a GELU activation function are applied to the result of the convolution operation. The normalization layer ensures that the output has a stable distribution and scale. The GELU activation function imparts nonlinearity to the operation of the convolution layer and improves the performance of the convolution layer. The output (450) to which the normalization and GELU activation functions are applied is divided into halves, the real part (460) and the imaginary part (470) are separated again, and converted to the time domain by an inverse rFFT. Finally, a denoised signal (480) in the time domain that retains the information of the original signal is obtained.
[0059] Referring again to FIG. 3, at step 340, the processor (110) can detect a non-sinus rhythm from a denoised signal in the time domain based on an attention mechanism.
[0060] For example, the processor (110) may use a 1D U-Net architecture to segment abnormal sinus rhythm signals from an electrocardiogram signal. The U-Net is composed of an encoder and a decoder. The encoder encodes an input signal into abstracted features at various levels, and the decoder uses these features to generate an output of the same size as the original input signal. VGG19, ResNet34, or DenseNet121 may be used as the encoder. The Denoise and Contrast Attention Module (DCAM) of the present invention may be inserted into the encoder network to model contextual information at various levels of feature representation. In one embodiment, the Denoise and Contrast Attention Module may be inserted at the end of the encoder layer.
[0061] According to another embodiment, the processor (110) may obtain a first characteristic map regarding the abnormal sinus rhythm from the denoised signal in the time domain using an encoder. Here, the first characteristic map refers to the K map described above in FIG. 1. In addition, the processor (110) may obtain a second characteristic map regarding the normal sinus rhythm from the denoised signal in the time domain using an encoder. Here, the second characteristic map refers to the Q map described above in FIG. 1. Thereafter, the processor (110) may obtain a third characteristic map, which is a difference (subtraction) between the first characteristic map and the second characteristic map, using the encoder. Thereafter, the processor (110) may calculate a fourth characteristic map in which the difference is emphasized, using the encoder.
[0062] According to one embodiment, the processes of obtaining the first to third feature maps may be performed by dividing the input signal into G groups and performing the processes for each of the G groups. In all cases where VGG19, ResNet34, or DenseNet121 is used as the encoder, a preferable G that optimizes the performance of the model may be 8. According to another embodiment, the input signal may not be divided into multiple groups, and the processes of obtaining the first to third feature maps may be performed for all input channels.
[0063] Additionally, the processor (110) can input the fourth characteristic map obtained from the encoder into the decoder and obtain the segmentation result of the normal sinus rhythm signal and the abnormal sinus rhythm signal.
[0064] According to one embodiment, the processor (110) can obtain a fourth characteristic map by combining the third characteristic map and the denoised signal in the time domain and recalibrating the combined result. Here, the fourth characteristic map is Map and The difference (subtraction) between the maps activates the Gaussian Error Linear Unit (GELU). Combined with, and here is the recalibration characteristic It may be multiplied by .
[0065] In addition, the processor (110) can obtain the segmentation results of the normal sinus rhythm signal and the abnormal sinus rhythm signal from the fourth characteristic map obtained from the encoder using a decoder. Thereafter, the processor (110) can detect the abnormal sinus rhythm from the obtained abnormal sinus rhythm signal.
[0066] For example, the processor (110) can obtain a normal sinus rhythm signal and an abnormal sinus rhythm signal having the same size as the original signal input from two output channels of the decoder, respectively. Here, the normal sinus rhythm signal may refer to a QRS wave, and the abnormal sinus rhythm signal may refer to a signal generated by premature ventricular contraction (PVC). A sigmoid function may be applied to the output of the decoder so that the output has a value between 0 and 1. In addition, the output may be binarized by setting 0.5 as a threshold for both the normal sinus rhythm signal and the abnormal sinus rhythm signal.
[0067] According to one embodiment, the processor (110) can perform post-processing on the segmentation results. For example, the processor (110) can reduce false positives of PVCs by removing cases with an interval greater than 0.6 seconds from the segmentation results. When evaluating bit-by-bit PVC detection performance, the time threshold can be set to 0.12 seconds. The processor (110) can accurately detect the number of PVCs using the post-processed abnormal sinus rhythm signal.
[0068] Meanwhile, an augmented signal may be used as data for training a model included in a device for detecting abnormal sinus rhythm according to one embodiment of the present invention. For example, the following augmentation method may be used to prevent deterioration of the quality of the input signal.
[0069] First, Gaussian noise can be added to a clean ECG signal to achieve a signal-to-noise ratio of 10 dB, mimicking a noisy environment. Furthermore, the signal can be randomly resampled within a 5% range from the original sampling rate to mimic heart rate variations. Furthermore, realistic artifacts and noise can be added to the signal using NeuroKit2. Furthermore, the training dataset can be undersampled to maintain a balance between PVC and non-PVC classes. Undersampling involves weighting each sample based on the presence or absence of PVCs and using these weights to balance the samples in a batch job.
[0070] Additionally, a sliding window method can be used for model inference to avoid performance degradation when the proposed model must evaluate arbitrarily long ECG signals. This method segments the signal into 1280-sample segments for training and inference. The hyperparameters of the sliding window method are constant weights, and an overlap ratio of 0.25 can be used.
[0071] Finally, binary cross entropy can be used as the training loss function, the batch size can be 256, and Adam can be used as the optimizer. A step-learning rate scheduler can be used to ensure fast model training and repeatability. Training can also be set to terminate early when the F1 score of the test dataset reaches its maximum value. For example, training can be performed using a single GPU (24 GB) in an environment with Python 3.9, PyTorch 1.11, and PyTorch Lightning 1.5.0, and training can take 1 to 1.5 hours depending on the model configuration.
[0072] FIG. 5 is a diagram illustrating an example of a device for detecting PVC according to one embodiment segmenting a normal sinus rhythm signal and a PVC signal from an electrocardiogram signal.
[0073] Referring to FIG. 5, a device for detecting PVC segments a normal sinus rhythm signal and a PVC signal from an electrocardiogram signal using a 1D U-Net to which DCAM is applied. An attention module is added to the end of the encoder layer to improve segmentation performance. An electrocardiogram signal (500) of a predetermined time period is input to an encoder (510), and features extracted by the encoder are input to a decoder (520). The segmentation head of the decoder identifies a region and class of the input signal using the features extracted by the encoder, and outputs a segmentation result (530) divided into two classes of a normal sinus rhythm signal and a PVC signal. The processor (110) performs post-processing on the output segmentation result and finally detects a PVC.
[0074] FIG. 6 is a diagram showing an example of an attention map that visualizes a section in which an attention mechanism, according to one embodiment, pays attention to an electrocardiogram signal.
[0075] Referring to Fig. 6, the attention maps (610, 620, 630, 640, 710, 720, 730, 740) indicate where the K and Q of the contrastive attention module (CAM) pay attention. Fig. 6 visualizes the attention of the fourth layer of the encoder in a device for detecting abnormal sinus rhythm according to one embodiment. In the input signal (600, 700), triangles indicate the location of PVCs, and squares indicate the location of normal signals. The attention map is expressed darker when the gradient is large, and the K map focuses on candidate PVCs, and the Q map focuses on normal signals.
[0076] Figure 6 shows the denoising module before or after application of the contrast attention module (CAM). The effect of denoising is demonstrated by visualizing the attention maps with and without noise removal. The attention maps (630, 640, 730, 740) of the control attention module (CAM) without prior noise removal show that K and Q are paying attention to multiple regions. However, when the denoised attention module (DCAM) is used, attention is focused on the R peak within the attention maps (610, 620, 710, 720), resulting in a strong contrast between K and Q. This shows that removing noise using frequency-based convolution before the attention mechanism is triggered improves the detection performance of PVC.
[0077] Meanwhile, the above-described method can be written as a program that can be executed on a computer, and can be implemented on a general-purpose digital computer that runs the program using a computer-readable recording medium. In addition, the structure of the data used in the above-described method can be recorded on a computer-readable recording medium through various means. The computer-readable recording medium includes storage media such as magnetic storage media (e.g., ROM, RAM, USB, floppy disk, hard disk, etc.) and optical reading media (e.g., CD-ROM, DVD, etc.).
[0078] Those skilled in the art will appreciate that the present invention can be implemented in modified forms without departing from the essential characteristics of the above-described invention. Therefore, the disclosed methods should be considered illustrative rather than restrictive. The scope of the claims, not the foregoing description, is defined by the scope of the patent, and should be interpreted to encompass all differences within the scope equivalent thereto.
Claims
1. A step of converting at least a part of an electrocardiogram signal of a predetermined time period into a frequency domain signal; A step of removing noise from the above frequency domain signal using a CNN (convolution neural network) model; A step of obtaining a denoised signal in the time domain corresponding to the signal from which the noise has been removed; and A step of detecting a non-sinus rhythm based on an attention mechanism from the above denoised signal; A method for detecting abnormal sinus rhythm from electrocardiogram signals.
2. In paragraph 1, The above conversion step is, A step of dividing the electrocardiogram signal of the above predetermined time period into a first signal and a second signal; A step of performing a fast Fourier transform on the first signal; and A method comprising: generating the frequency domain signal by generating a symmetrical signal for the performance result; 3. In paragraph 1, The step of obtaining the above denoised signal is: A step of performing a convolution operation by connecting the real part and the imaginary part included in the frequency domain signal; A step of dividing the above operation result into a real part and an imaginary part to obtain a frequency domain signal with noise removed; and A method comprising the step of obtaining the denoised signal by performing an inverse fast Fourier transform on the frequency domain signal from which the noise has been removed.
4. In paragraph 1, The step of detecting the above abnormal rhythm is: A step of obtaining a first characteristic map regarding the abnormal rhythm from the denoised signal in the time domain using an encoder; A step of obtaining a second characteristic map regarding normal sinus rhythm from the denoised signal in the time domain using the encoder; A step of obtaining a third feature map, which is a difference (subtraction) between the first feature map and the second feature map, using the encoder; A step of calculating a fourth feature map in which the difference is emphasized from the third feature map using the encoder; A step of obtaining a segmentation result of a normal sinus rhythm signal and an abnormal sinus rhythm signal from the fourth characteristic map using a decoder; and A method comprising: a step of detecting an abnormal sinus rhythm from the above abnormal sinus rhythm signal; 5. In paragraph 4, The first characteristic map to the third characteristic map are, A method for dividing the input signal into G groups and obtaining signals for each of the G groups.
6. In paragraph 4, The step of calculating the fourth feature map is: A step of combining the third characteristic map and the denoised signal in the time domain; and A method comprising: a step of recalibrating the above combination result; 7. In paragraph 1, The above abnormal sinus rhythm is, A method caused by premature ventricular contraction.
8. At least one memory; and comprising at least one processor; At least one processor, Converting at least a portion of an electrocardiogram signal of a given time interval into a frequency domain signal, For the above frequency domain signal, noise is removed using a CNN (convolution neural network) model, Obtain a denoised signal in the time domain corresponding to the signal from which the noise has been removed, A device for detecting non-sinus rhythm from an electrocardiogram signal, based on an attention mechanism from the above denoised signal.
9. In paragraph 8, At least one processor, The electrocardiogram signal of the above predetermined time period is divided into a first signal and a second signal, Perform a fast Fourier transform on the above first signal, A device for obtaining the frequency domain signal by generating a symmetrical signal for the above performance result.
10. In paragraph 8, At least one processor, A convolution operation is performed by connecting the real and imaginary parts included in the above frequency domain signal, Divide the above operation result into a real part and an imaginary part to obtain a frequency domain signal with noise removed, A device for obtaining the denoised signal by performing an inverse fast Fourier transform on the frequency domain signal from which the noise has been removed.
11. In paragraph 8, At least one processor, Obtaining a first characteristic map for abnormal sinus rhythm from the denoised signal in the time domain using an encoder, obtaining a second characteristic map for normal sinus rhythm from the denoised signal in the time domain, obtaining a third characteristic map which is a difference (subtraction) between the first characteristic map and the second characteristic map, and calculating a fourth characteristic map in which the difference is emphasized from the third characteristic map. Using a decoder, the segmentation results of the normal sinus rhythm signal and the abnormal sinus rhythm signal are obtained from the fourth characteristic map, A device for detecting abnormal sinus rhythm from the above abnormal sinus rhythm signal.
12. In paragraph 11, The above first characteristic map to the above third characteristic map, A device that divides the input signals into G groups and obtains signals for each of the G groups.
13. In paragraph 11, At least one processor, A device that calculates a fourth characteristic map by combining the third characteristic map and the denoised signal in the time domain and recalibrating the combined result.
14. In paragraph 8, The above abnormal sinus rhythm is, A device caused by premature ventricular contraction.
15. A computer-readable recording medium recording a program for executing the method according to paragraph 1 on a computer.
Citation Information
Patent Citations
Method, apparatus, and system for wireless vital monitoring using high frequency signals
JP2021166704A
Method, computing device and computer program for analyzing a user's sleep state through sound information
KR102429256B1
Method for extracting heart rate variability feature values
WO2023048400A1
Cited By
Electrocardiogram recognition method and device, electronic equipment and storage medium
CN121943341A
Electrocardiogram recognition method and device, electronic equipment and storage medium
CN121943341B
