A method, apparatus and related device for classifying electrocardiosignal
Patent Information
- Application Number
- CN202610531675.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-21
- Publication Date
- 2026-08-18
AI Technical Summary
[0004]但是,这种心电信号的分类方法的分类准确性较低
心电信号分类网络可以获取在人体的不同部位采集到的同一心脏电活动的多个导联的心电信号。心电信号分类网络可以提取用于表征多个导联的心电信号的不同时间尺度特征的第一特征, 这使得心电信号分类网络可以获得不同粒度的各个导联的心电信号的特征,实现充分提取各个导联的心电信号的特征。并且,心电信号分类网络还可以提取多个导联的心电信号的第二特征,第二特征可以反映各个导联的心电信号之间相关程度,这使得心电信号分类网络可以充分挖掘各个导联间的相关性。进而,心电信号分类网络可以根据不同时间尺度的第一特征以及可以反映各个导联的心电信号之间相关程度的第二特征确定多个导联的心电信号的分类标签,相对于将简单拼接后的各个导联的心电信号输入单一时间尺度卷积核的深度学习网络,得到各个导联的心电信号的特征,并根据各个导联的心电信号的特征确定分类标签的现有分类方法,心电信号分类网络可以获得更加准确的分类标签,实现提高对多个导联的心电信号的分类的准确性。
Smart Images

Figure CN122581785A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electrocardiogram (ECG) signal processing technology, and in particular to a method, apparatus, and related equipment for classifying ECG signals. Background Technology
[0002] A multi-lead electrocardiogram (ECG) is an ECG generated by a multi-lead ECG recorder that acquires the user's cardiac electrical activity signals. Multi-lead ECG recorders can simultaneously acquire these signals from different parts of the body.
[0003] Currently, existing methods for classifying ECG signals from multiple leads in a multi-lead ECG mainly involve simply splicing the ECG signals from each lead together and then inputting them into a deep learning network using a single-scale convolutional kernel to extract the features of each lead's ECG signal. Finally, the classification labels for the multiple leads' ECG signals are determined based on the features of each lead's ECG signal.
[0004] However, this method of classifying electrocardiogram signals has low accuracy. Summary of the Invention
[0005] This application provides a method for classifying electrocardiogram (ECG) signals to obtain more accurate classification labels, thereby improving the accuracy of ECG signal classification across multiple leads. Furthermore, embodiments of this application also provide corresponding ECG signal classification apparatus, computer-readable storage media, computer devices, and computer program products.
[0006] In a first aspect, this application provides a method for classifying electrocardiogram (ECG) signals. The method includes: acquiring ECG signals from multiple leads, wherein the ECG signals from multiple leads are ECG signals of the same cardiac electrical activity collected from different parts of the human body, and each ECG signal from the multiple leads is a single ECG signal; extracting a first feature from the ECG signals from the multiple leads, wherein the first feature is used to characterize features at different time scales; extracting a second feature from the ECG signals from the multiple leads, wherein the second feature is used to characterize the correlation between the ECG signals from each lead; and determining a classification label for the ECG signals from the multiple leads based on the first feature and the second feature, wherein the classification label is used to indicate whether an abnormality has occurred in the heart.
[0007] In one possible implementation, the ECG signal of each lead includes waveforms of multiple heartbeats, and each heartbeat waveform includes multiple sub-waveforms; the extraction of a first feature from the ECG signals of the multiple leads includes: extracting a first scale feature from the ECG signals of the multiple leads, the first scale feature being used to characterize the morphology of each sub-waveform of the ECG signals of the multiple leads; extracting a second scale feature from the ECG signals of the multiple leads, the second scale feature being used to characterize the morphology of the waveform of each heartbeat of the ECG signals of the multiple leads; extracting a third scale feature from the ECG signals of the multiple leads, the third scale feature being used to characterize the variation pattern of waveforms of multiple consecutive heartbeats in the ECG signals of each lead; and determining the first feature based on the first scale feature, the second scale feature, and the third scale feature.
[0008] In one possible implementation, extracting the second feature of the ECG signals from the plurality of leads includes: extracting a first correlation feature of the ECG signals from the plurality of leads, wherein the first correlation feature is used to characterize the degree of correlation between the ECG signal of each lead and the ECG signals of adjacent leads; extracting a second correlation feature of the ECG signals from the plurality of leads, wherein the second correlation feature is used to characterize the degree of correlation between the ECG signal of each lead and the ECG signals of other leads; and determining the second feature based on the first correlation feature and the second correlation feature.
[0009] In one possible implementation, determining the second feature based on the first relevant feature and the second relevant feature includes: determining the second feature based on a first weight parameter, the first relevant feature, a second weight parameter, and the second relevant feature, wherein the sum of the first weight parameter and the second weight parameter is one.
[0010] In one possible implementation, determining the classification label of the ECG signals of the plurality of leads based on the first feature and the second feature includes: splicing the first feature and the second feature to obtain a target feature; and inputting the target feature into a classification output network to obtain the classification label of the ECG signals of the plurality of leads.
[0011] In one possible implementation, the ECG signals of the multiple leads are ECG signals after baseline calibration using a baseline drift algorithm; or, the ECG signals of the multiple leads are ECG signals after noise signals have been filtered out using a filter.
[0012] Secondly, this application provides a classification device for electrocardiogram (ECG) signals, the device comprising: an acquisition module for acquiring ECG signals from multiple leads, wherein the ECG signals from multiple leads are ECG signals of the same cardiac electrical activity collected from different parts of the human body, and each of the multiple leads is an ECG signal; a first extraction module for extracting a first feature from the ECG signals from the multiple leads, the first feature being used to characterize features at different time scales; a second extraction module for extracting a second feature from the ECG signals from the multiple leads, the second feature being used to characterize the correlation between the ECG signals from each lead; and a determination module for determining a classification label for the ECG signals from the multiple leads based on the first feature and the second feature, the classification label being used to indicate whether an abnormality has occurred in the heart.
[0013] In one possible implementation, the first extraction module is specifically used to extract a first-scale feature of the ECG signals from the plurality of leads, the first-scale feature being used to characterize the morphology of each sub-waveform of the ECG signals from the plurality of leads; extract a second-scale feature of the ECG signals from the plurality of leads, the second-scale feature being used to characterize the waveform morphology of each heartbeat of the ECG signals from the plurality of leads; extract a third-scale feature of the ECG signals from the plurality of leads, the third-scale feature being used to characterize the waveform variation pattern of multiple consecutive heartbeats in the ECG signals from each lead of the plurality of leads; and determine a first feature based on the first-scale feature, the second-scale feature, and the third-scale feature.
[0014] In one possible implementation, the second extraction module is specifically used to extract a first correlation feature of the ECG signals of the plurality of leads, the first correlation feature being used to characterize the degree of correlation between the ECG signal of each lead and the ECG signals of adjacent leads; extract a second correlation feature of the ECG signals of the plurality of leads, the second correlation feature being used to characterize the degree of correlation between the ECG signal of each lead and the ECG signals of other leads; and determine a second feature based on the first correlation feature and the second correlation feature.
[0015] In one possible implementation, the second extraction module is specifically used to determine a second feature based on a first weight parameter, the first relevant feature, a second weight parameter, and the second relevant feature, wherein the sum of the first weight parameter and the second weight parameter is one.
[0016] In one possible implementation, the determining module is specifically used to splice the first feature and the second feature to obtain a target feature; and input the target feature into a classification output network to obtain classification labels for the multiple leads of electrocardiogram signals.
[0017] Thirdly, this application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements any of the electrocardiogram signal classification methods described above.
[0018] Fourthly, this application provides a computer device including a processor and a memory, the memory being used to store instructions, the processor executing the instructions stored in the memory to cause the computer device to perform any of the electrocardiogram signal classification methods described above.
[0019] Fifthly, this application provides a computer program product containing instructions that, when run on at least one computing device, cause the at least one computing device to perform any of the described electrocardiogram signal classification methods.
[0020] Based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods.
[0021] As can be seen from the above technical solutions, this application has the following beneficial effects: An ECG signal classification network can acquire ECG signals from multiple leads of the same cardiac electrical activity collected from different parts of the body. This network can extract first features representing the ECG signals from multiple leads at different time scales, allowing it to obtain features of each lead at different granularities and fully extract these features. Furthermore, the network can extract second features reflecting the correlation between the ECG signals from different leads, enabling it to fully explore the correlations between them. Therefore, the network can determine classification labels for the ECG signals from multiple leads based on the first features at different time scales and the second features reflecting the correlation between the signals. Compared to existing classification methods that simply concatenate the ECG signals from each lead into a single-time-scale convolutional kernel to obtain features and then determine classification labels based on these features, this network provides more accurate classification labels, thus improving the accuracy of classifying ECG signals from multiple leads. Attached Figure Description
[0022] Figure 1 A schematic diagram of the structure of an electrocardiogram signal classification network provided in an embodiment of this application; Figure 2 A flowchart illustrating a method for classifying electrocardiogram signals provided for the implementation of this application; Figure 3This is a schematic diagram of the structure of a first feature extraction network provided in an embodiment of this application; Figure 4 A schematic diagram of the waveform of a heartbeat is provided for an embodiment of this application; Figure 5 This is a schematic diagram of the structure of a second feature extraction network provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of an electrocardiogram signal classification device provided in an embodiment of this application. Detailed Implementation
[0023] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate; this is merely a method of distinction used in describing objects with the same attributes in the embodiments of this application.
[0024] To make the above-mentioned objectives, features and advantages of the embodiments of this application more apparent and understandable, the embodiments of this application will be further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0025] A multi-lead electrocardiogram (ECG) is an ECG generated by a multi-lead ECG recorder that acquires the user's cardiac electrical activity signals. Multi-lead ECG recorders can simultaneously acquire these signals from different parts of the body.
[0026] Currently, existing methods for classifying ECG signals from multiple leads in a multi-lead ECG mainly involve simply splicing the ECG signals from each lead together and then inputting them into a deep learning network using a single-scale convolutional kernel to extract the features of each lead's ECG signal. Finally, the classification labels for the multiple leads' ECG signals are determined based on the features of each lead's ECG signal.
[0027] However, this method of classifying electrocardiogram signals has low accuracy.
[0028] Based on this, embodiments of this application provide a method for classifying electrocardiogram (ECG) signals. By extracting a first feature from ECG signals of multiple leads to characterize different time scales and a second feature to characterize the correlation between ECG signals of each lead in the multiple leads, and obtaining more accurate classification labels based on the first and second features, the accuracy of classifying ECG signals of multiple leads is improved.
[0029] To facilitate understanding of the methods provided in the embodiments of this application, the following is combined with... Figure 1 The example of ECG signal classification network 10 is shown below. See also... Figure 1This figure is a schematic diagram of an exemplary network provided in an embodiment of this application. Figure 1 As shown, the ECG signal classification network 10 includes a first feature extraction network 110, a second feature extraction network 120, a feature fusion network 130, and a classification output network 140.
[0030] The first feature extraction network 110 can extract features from ECG signals of multiple leads at different time scales. The second feature extraction network 120 can extract features characterizing the correlation between ECG signals of different leads. The feature fusion network 130 can fuse the features extracted by the first feature extraction network 110 and the second feature extraction network 120. The classification output network 140 can obtain classification labels for ECG signals of multiple leads based on the features fused by the feature fusion network 130.
[0031] Specifically, ECG signals from multiple leads can be input into a first feature extraction network 110 and a second feature extraction network 120. The first feature extraction network 110 can extract first features to characterize the ECG signals from multiple leads at different time scales. This allows the ECG signal classification network 10 to obtain features of the ECG signals from each lead at different granularities, achieving full feature extraction of the ECG signals from each lead. Furthermore, after the ECG signals from multiple leads are input into the second feature extraction network 120, the second feature extraction network 120 can extract second features to characterize the correlation between the ECG signals from each lead. This allows the ECG signal classification network 10 to fully explore the correlation between the leads. Further, the first feature extraction network 110 can input the first features into a feature fusion network 130, and the second feature extraction network 120 can input the second features into the feature fusion network 130. The feature fusion network 130 then inputs the first feature and the second feature into the classification output network 140. The classification output network 140 can determine the classification labels of the ECG signals of multiple leads based on the first feature used to characterize the features of different time scales and the second feature that can reflect the correlation between the ECG signals of each lead. Compared with the existing classification method that simply splices the ECG signals of each lead into a deep learning network with a single time scale convolutional kernel to obtain the features of the ECG signals of each lead and determines the classification labels based on the features of the ECG signals of each lead, the ECG signal classification network 10 can obtain more accurate classification labels, thereby improving the accuracy of classification of ECG signals of multiple leads.
[0032] Those skilled in the art will understand that Figure 1 The schematic diagram of the ECG signal classification network 10 shown is merely one example in which the embodiments of this application can be implemented. The scope of application of the embodiments of this application is not limited by any aspect of this network.
[0033] To facilitate understanding of the embodiments of this application, the following description, in conjunction with the accompanying drawings, illustrates a method for classifying electrocardiogram (ECG) signals provided by the embodiments of this application.
[0034] See Figure 2 , Figure 2 This is a flowchart illustrating a method for classifying electrocardiogram (ECG) signals according to an embodiment of this application. This method can be applied to... Figure 1 The ECG signal classification network 10 shown can be applied to other applicable networks. For ease of understanding, the following example uses an application... Figure 1 The ECG signal classification network 10 shown is used as an example for illustration.
[0035] in, Figure 2 The classification method for electrocardiogram signals shown may specifically include the following steps.
[0036] S201: The ECG signal classification network 10 acquires ECG signals from multiple leads. The ECG signals from multiple leads are ECG signals of the same cardiac electrical activity collected from different parts of the human body. The ECG signal from each lead in the multiple leads is a single ECG signal.
[0037] Multiple-lead electrocardiogram (ECG) signals can be ECG signals of the same cardiac electrical activity collected from different parts of the body using a multi-lead ECG signal acquisition device. Each lead's ECG signal can be a single signal, and the multi-lead ECG signal acquisition device can be, for example, a 12-lead ECG signal acquisition device.
[0038] In one possible implementation, the duration of the ECG signal acquired by the multi-lead ECG signal acquisition device for each lead can be greater than a first threshold, thereby enabling the ECG signal classification network 10 to acquire sufficient ECG signal data for subsequent analysis. The first threshold can be, for example, 10 seconds or more.
[0039] In one possible implementation, the ECG signal classification network 10 may preprocess the ECG signal of each lead before acquiring the ECG signal of multiple leads.
[0040] Specifically, in the first example, the ECG signal preprocessing device can use a baseline drift algorithm to calibrate the baseline of the ECG signal in each lead, thereby ensuring that the baseline of the ECG signal in each lead of the ECG is at a consistent level. This improves the accuracy of ECG signal analysis for each lead, and consequently, improves the accuracy of classifying ECG signals from multiple leads. The baseline drift algorithm can be, for example, a high-pass filtering method, a least-squares polynomial fitting method, an adaptive filtering method, or a variational mode decomposition (VMD) method. It is understood that the embodiments of this application do not specifically limit the baseline drift algorithm used.
[0041] In the second example, the ECG signal preprocessing device can use a filter to remove noise signals from the ECG signals of each lead, thereby suppressing the interference of noise signals on the ECG signals of each lead, improving the quality of the ECG signals of each lead, improving the accuracy of the analysis of the ECG signals of each lead, and further improving the accuracy of the classification of ECG signals from multiple leads. The filter can be, for example, a finite impulse response (FIR) filter. It is understood that the embodiments of this application do not specifically limit the filters used.
[0042] In the third example, the ECG signal preprocessing device can use a sliding window approach to segment the acquired ECG signal of each lead and normalize each segment. This reduces the complexity of the ECG signal classification network 10 in analyzing multiple leads and lowers its computational overhead. Furthermore, dividing the ECG signal of each lead into several smaller segments allows the ECG signal classification network 10 to detect short-term abnormalities, improving the accuracy of ECG signal analysis and, consequently, the accuracy of ECG signal classification. Each ECG signal segment can include L sampling points, such as 512 sampling points. The overlap rate of adjacent windows can be a second threshold, such as 50%.
[0043] Furthermore, after the ECG signal preprocessing device preprocesses the ECG signal of each lead, it can input the preprocessed ECG signals of multiple leads into the first feature extraction network 110 and the second feature extraction network 120 in the ECG signal classification network 10.
[0044] S202: ECG signal classification network 10 extracts the first feature of ECG signals from multiple leads. The first feature is used to characterize the features at different time scales.
[0045] After receiving ECG signals from multiple leads, the first feature extraction network 110 in the ECG signal classification network 10 can extract the first features of the ECG signals from multiple leads. The first features can include features at three different time scales, namely, first-scale features, second-scale features, and third-scale features.
[0046] To facilitate understanding of the specific implementation of the first feature extraction network 110 provided in this application embodiment for extracting the first features of ECG signals from multiple leads, please refer to... Figure 3 , Figure 3 A schematic diagram of the structure of a first feature extraction network 110 is shown. The first feature extraction network 110 may include a first branch network 111, a second branch network 112, a third branch network 113, a splicing network 114, a dimensionality reduction network 115, and a normalization network 116.
[0047] Specifically, the ECG signal preprocessing device can input ECG signals from multiple leads to the first branch network 111, the second branch network 112, and the third branch network 113, respectively. Each lead's ECG signal can include waveforms of multiple heartbeats, and each heartbeat waveform can include multiple sub-waveforms. For example... Figure 4 As shown, Figure 4 A schematic diagram of the waveform of a heartbeat is shown. The sub-waveforms of a heartbeat may include, for example, the P wave, QRS complex, T wave, and U wave.
[0048] The first branch network 111 can employ a small-sized convolutional kernel to extract first-scale features from ECG signals across multiple leads. These first-scale features can characterize the morphology of each sub-waveform in the ECG signals across multiple leads. The kernel size of the small-sized convolutional kernel can be a first size, for example, 5. Sub-waveforms can include, for example, P waves, QRS complexes, T waves, and U waves. The first-scale features can include, for example, the width, amplitude, polarity, and shape of the sub-waveform. The polarity of the sub-waveform can be positive, negative, or bidirectional. A positive polarity indicates that the peak point of the sub-waveform is above the baseline; a negative polarity indicates that the peak point is below the baseline; and bidirectional polarity indicates that the sub-waveform has two peak points, one above the baseline and the other below. The shape of the sub-waveform can be rounded, sharp, or notched.
[0049] The second branch network 112 can employ a medium-sized convolutional kernel to extract second-scale features from ECG signals across multiple leads. These second-scale features can characterize the waveform morphology of each heartbeat in the ECG signals of multiple leads. The kernel size of the medium-sized convolutional kernel can be a second size, for example, 15. Second-scale features may include, for example, the width of each heartbeat waveform, the width proportion of each sub-waveform within each heartbeat, the PR interval, the PQ interval, waveform integrity, and morphological similarity to a standard heartbeat template. The PR interval is the difference between the abscissa of the peak point of the QRS complex and the abscissa of the peak point of the P wave. The PQ interval is the difference between the abscissa of the peak point of the QRS complex and the abscissa of the P wave. Waveform integrity refers to whether the heartbeat waveform exhibits any absence of P waves, QRS complex breaks, or band fusion.
[0050] The third branch network 113 can employ a large-size convolutional kernel to extract third-scale features from ECG signals across multiple leads. These third-scale features can characterize the waveform variations of consecutive heartbeats within each lead of the ECG signal. The kernel size of the large convolutional kernel can be a third-size feature, for example, 25. The third-scale features can include, for example, the variation features of the RR intervals of consecutive heartbeats. The RR interval refers to the difference between the x-coordinate of the peak point of the QRS complex of one heartbeat and the x-coordinate of the peak point of the QRS complex of the previous heartbeat.
[0051] In one possible implementation, the third branch network 113 can employ dilated convolution to expand the receptive field of the ECG signal for each lead. The dilated convolution can be a convolutional network where the spacing between the weight units of the convolution kernel is controlled by setting the dilation rate. For example, if the ECG signal for one lead is [4,3,6,3,7,4,3], and a convolution kernel with a kernel size of 3 and a dilation rate of 2 is [1,2,1], then the third-scale feature can be [4×1+6×2+7×1,3×1+3×2+3×1, 6×1+7×2+3×1], which is equivalent to the third-scale feature being [23,13,23].
[0052] Furthermore, the first feature extraction network 110 can determine the first feature based on the first scale feature, the second scale feature, and the third scale feature.
[0053] Specifically, the first branch network 111, the second branch network 112, and the third branch network 113 can respectively input the first-scale feature, the second-scale feature, and the third-scale feature into the splicing network 114. The splicing network 114 can align the dimensions of the first-scale feature, the second-scale feature, and the third-scale feature and splice them according to the channel dimension to obtain the target scale feature. For example, if the length of the ECG signal in each lead is 512, and there are 12 leads of ECG signals, the first branch network 111 uses a convolutional kernel with a kernel size of 5, the second branch network 112 uses a convolutional kernel with a kernel size of 15, and the third branch network 113 uses a convolutional kernel with a kernel size of 25. Then the dimension of the first-scale feature is 508×12, the dimension of the second-scale feature is 498×12, and the dimension of the third-scale feature is 488×12. The splicing network 114 can pad the first-scale feature, the second-scale feature, and the third-scale feature with zeros, so that the dimensions of the first-scale feature, the second-scale feature, and the third-scale feature are all 512×12. Then, the splicing network 114 can splice the first-scale features, the second-scale features, and the third-scale features according to the channel dimension to obtain the target-scale features. The dimension of the target-scale features can be, for example, 512×36.
[0054] After obtaining the target-scale features through the concatenation network 114, these features can be input into the dimensionality reduction network 115 for channel compression and information fusion. Specifically, the dimensionality reduction network 115 can use C 1×1 convolutions to compress the target-scale features through channels. For example, if the dimension of the target-scale features is 512×36, then after channel compression using C 1×1 convolution kernels, the dimension of the target convolutional features can be 512×C.
[0055] Then, the dimensionality reduction network 115 can input the dimensionality-reduced target scale features into the normalization network 116, which can normalize the target scale features to obtain the first feature.
[0056] S203: The ECG signal classification network 10 extracts the second feature of ECG signals from multiple leads. The second feature is used to characterize the correlation between ECG signals from each lead.
[0057] After receiving ECG signals from multiple leads, the second feature extraction network 120 in the ECG signal classification network 10 can extract second features from the ECG signals of multiple leads. These second features may include both first and second related features.
[0058] To facilitate understanding of the specific implementation of the second feature extraction network 120 provided in this application embodiment for extracting the second features of ECG signals from multiple leads, please refer to... Figure 5 , Figure 5A schematic diagram of a second feature extraction network 120 is shown. The second feature extraction network 120 may include a first path network 121, a second path network 122, and an adaptive fusion network 123.
[0059] In practice, the ECG signal preprocessing device can input ECG signals from multiple leads to the first path network 121 and the second path network 122 respectively.
[0060] After receiving ECG signals from multiple leads, the first path network 121 can use a depthwise separable convolutional network to extract first correlation features of the ECG signals from the multiple leads. These first correlation features can characterize the degree of correlation between the ECG signals of each lead and the ECG signals of adjacent leads.
[0061] Specifically, depthwise separable convolutional networks can be divided into deep convolutional networks and pointwise convolutional networks. The first path network 121 can first use the deep convolutional network to extract the temporal features of the ECG signals from each of multiple leads, without fusing the features from each lead. Further, the first path network 121 can input the temporal features output by the deep convolutional network into the pointwise convolutional network to extract the channel-dimensional features of the ECG signals from multiple leads, obtaining the second feature.
[0062] The second path network 122 can obtain second correlation features of ECG signals from multiple leads by calculating multi-head self-attention. These second correlation features can be used to characterize the degree of correlation between the ECG signals of each lead and the ECG signals of other leads.
[0063] Specifically, the second path network 122 can use ECG signals from multiple leads as sequence elements. Then, each lead's ECG signal is mapped to a query vector, a key vector, and a value vector, respectively. Based on the query vector and key vector, a correlation weight matrix is calculated between the ECG signals of each lead. This correlation weight matrix can quantify the degree of correlation between each lead's ECG signal and the ECG signals of the other leads. Subsequently, the feature space is divided into multiple subspaces using a multi-head mechanism. Self-attention weighted calculation is performed independently in each subspace to mine multi-scale correlation characteristics between leads from different dimensions. The attention features output from multiple subspaces are then concatenated and linearly fused to finally output a second correlation feature that comprehensively represents the interrelationships between multiple lead ECG signals.
[0064] Furthermore, the second feature extraction network 120 can determine the second feature based on the first relevant feature and the second relevant feature.
[0065] Specifically, the first path network 121 and the second path network 122 can respectively input the first relevant feature and the second relevant feature into the adaptive fusion network 123. The adaptive fusion network 123 can fuse the first relevant feature and the second relevant feature according to the following formula to obtain the second feature.
[0066] ; in, As the second feature, This refers to ECG signals from multiple leads. As the first relevant feature, This is the second relevant feature. The first learnable weight parameter, The second weight parameter is learnable. and The sum of is 1.
[0067] By utilizing the second feature extraction network 120 to extract second features that characterize the correlation between ECG signals in each lead, attention can be focused on key leads, noise signals and redundant information can be suppressed, and the accuracy of ECG signal classification in multiple leads can be improved.
[0068] Furthermore, the second feature extraction network 120, through a lightweight design employing a deep separable convolutional network and an attention mechanism, can significantly reduce the number of parameters and computational complexity while maintaining high classification accuracy. The second feature extraction network 120 can be deployed on resource-constrained platforms such as wearable devices and smartphones.
[0069] S204: The ECG signal classification network 10 determines classification labels for ECG signals in multiple leads based on the first feature and the second feature. The classification labels are used to indicate whether an abnormality has occurred in the heart.
[0070] The first feature extraction network 110 and the second feature extraction network 120 can respectively input the first feature and the second feature into the feature fusion network 130. The feature fusion network 130 can concatenate the first feature and the second feature according to the channel dimension to obtain the target feature. For example, if the dimension of the first feature is 512×8 and the dimension of the second feature is 512×12, then the dimension of the target feature can be 512×20. Here, the second dimension 20 represents the number of channels of the target feature.
[0071] Furthermore, the feature fusion network 130 can utilize a channel attention mechanism to learn the importance weights of each channel of the target feature. Then, the target feature is adaptively weighted using the importance weights of each channel. The channel attention mechanism can be a squeeze and excitation network (SENet) channel attention mechanism, an efficient channel attention (ECA) mechanism, or a global context (GC) attention mechanism; no specific limitation is placed on the channel attention mechanism.
[0072] Then, the feature fusion network 130 can perform global average pooling or global maximization on the weighted target features to obtain the target feature vector. For example, if the target features include three channels and the target features are [[3,4,6,7], [6,8,5,5], [8,5,7,8]], the target features after global average pooling are [5,6,7]. Alternatively, the target features after global maximization are [7,8,8].
[0073] Finally, the feature fusion network 130 inputs the target feature vector into the classification output network 140 to obtain the classification label of the target feature vector, that is, to obtain the classification label of the ECG signal of multiple leads. The classification output network 140 may include at least one fully connected layer and a softmax activation function. The classification label may include whether the heart is of a normal type and the probability of the heart belonging to a normal type, at least one abnormal heart type and the probability of the heart belonging to each abnormal type. For example, the abnormal heart type may be normal, atrial fibrillation, premature ventricular contractions, or bundle branch block.
[0074] Using the method provided in the above embodiments, the ECG signal classification network 10 can acquire ECG signals from multiple leads of the same cardiac electrical activity collected from different parts of the human body. The ECG signal classification network 10 can extract first features to characterize the ECG signals of multiple leads at different time scales. This allows the ECG signal classification network 10 to obtain features of ECG signals from each lead at different granularities, avoiding the loss of some features when using a feature extraction network with a single-scale convolutional kernel to extract features from multiple leads, thus achieving full extraction of features from each lead's ECG signals. Furthermore, the ECG signal classification network 10 can also extract second features from the ECG signals of multiple leads. These second features reflect the correlation between the ECG signals of each lead, allowing the ECG signal classification network 10 to fully explore the correlations between leads. Furthermore, the ECG signal classification network 10 can determine the classification labels of ECG signals from multiple leads based on the first features at different time scales and the second features that reflect the correlation between ECG signals from each lead. Compared to existing classification methods that simply concatenate the ECG signals from each lead into a deep learning network with a single time scale convolutional kernel to obtain the features of the ECG signals from each lead and determine the classification labels based on the features of the ECG signals from each lead, the ECG signal classification network 10 can obtain more accurate classification labels, thereby improving the accuracy of classifying ECG signals from multiple leads.
[0075] Furthermore, the ECG signal classification network 10 extracts first features to characterize features at different scales by using the first feature extraction network 110 and extracts second features to characterize the correlation between ECG signals in each lead by using the second feature extraction network 120. This allows for the extraction of complementary features that are different from each other, which can improve robustness to signal noise and human differences, thereby improving stability on different datasets.
[0076] In one possible implementation, when training the ECG signal classification network 10, the trainer can employ a cross-entropy loss function to introduce a focus loss to address the class imbalance problem. Furthermore, the trainer can use an adaptive moment estimation (ADAM) optimizer to train the ECG signal classification network 10. The initial learning rate of the ADAM optimizer can be set to 0.001, and the learning strategy of the ADAM optimizer is a step-wise learning rate decay strategy. For example, the ECG signal classification network 10 can be trained starting with the initial learning rate, and after completing 10 training iterations of all training samples, the learning rate can be decayed to 0.1 times the initial learning rate. In addition, the training strategy can employ a batch size of 64, a training epoch count of 100, and an early stopping mechanism to prevent overfitting. During training, the trainer can employ ECG signal data augmentation strategies; for example, the trainer can add random noise to the ECG signals of multiple leads or perform time warping operations on the ECG signals of multiple leads. The time warp operation stretches or compresses the time axis of multiple leads of ECG signals, but does not change the shape of the ECG signal waveform.
[0077] In one possible implementation, the loss function can be either a hinge loss function or a focal loss function.
[0078] In one possible implementation, the optimizer may be a Stochastic Gradient Descent (SGD) optimizer with momentum, or the optimizer may be Adam with decoupled weight decay.
[0079] It is worth noting that other reasonable combinations of steps that can be conceived by those skilled in the art based on the above description also fall within the scope of protection of this application. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to this application.
[0080] Based on the electrocardiogram (ECG) signal classification method provided in the above-described embodiments, this application also provides an ECG signal classification device. The ECG signal classification device will be described below with reference to the accompanying drawings. Since the principle of the device in this disclosure for solving the problem is similar to the ECG signal classification method described above in this application, the implementation of the device can refer to the implementation of the method, and repeated details will not be elaborated further.
[0081] See Figure 6 As shown, this figure is a schematic diagram of the structure of an electrocardiogram (ECG) signal classification device provided in an embodiment of this application. Figure 6As shown, the electrocardiogram signal classification device 600 includes: The acquisition module 601 is used to acquire electrocardiogram (ECG) signals from multiple leads. The ECG signals from multiple leads are ECG signals of the same cardiac electrical activity collected from different parts of the human body. Each ECG signal from the multiple leads is a single ECG signal. The first extraction module 602 is used to extract the first feature of the electrocardiogram signal from multiple leads. The first feature is used to characterize the features at different time scales. The second extraction module 603 is used to extract second features of ECG signals from multiple leads. The second features are used to characterize the correlation between ECG signals from each lead. The determination module 604 is used to determine the classification labels of multiple leads of electrocardiogram signals based on the first feature and the second feature. The classification labels are used to indicate whether an abnormality has occurred in the heart.
[0082] In one possible implementation, the first extraction module 602 is specifically used to extract first-scale features of the ECG signals of multiple leads, the first-scale features being used to characterize the morphology of each sub-waveform of the ECG signals of multiple leads; Second-scale features are extracted from ECG signals from multiple leads. These second-scale features are used to characterize the waveform morphology of each heartbeat in the ECG signals from multiple leads. The third-scale features of ECG signals from multiple leads are extracted. These third-scale features are used to characterize the waveform variation of multiple consecutive heartbeats in each lead of the ECG signal. The first feature is determined based on the first scale feature, the second scale feature, and the third scale feature.
[0083] In one possible implementation, the second extraction module 603 is specifically used to extract a first correlation feature of the electrocardiogram (ECG) signals of multiple leads. The first correlation feature is used to characterize the degree of correlation between the ECG signal of each lead and the ECG signals of adjacent leads. Second correlation features are extracted from ECG signals of multiple leads. These second correlation features are used to characterize the degree of correlation between ECG signals of each lead and ECG signals of other leads. The second feature is determined based on the first and second relevant features.
[0084] In one possible implementation, the second extraction module 603 is specifically used to determine the second feature based on the first weight parameter, the first relevant feature, the second weight parameter, and the second relevant feature, wherein the sum of the first weight parameter and the second weight parameter is one.
[0085] In one possible implementation, the determining module 604 is specifically used to splice the first feature and the second feature to obtain the target feature; the target feature is input into the classification output network to obtain the classification labels of the ECG signals of multiple leads.
[0086] It should be noted that the specific implementation of each module in this embodiment can be found in the relevant descriptions in the above method embodiments. The module division in this application embodiment is illustrative and only represents a logical functional division; in actual implementation, there may be other division methods. In this application embodiment, each functional module can be concentrated in one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. For example, in the above embodiment, the first acquisition module and the holding module can be the same module or different modules.
[0087] Furthermore, embodiments of this application also provide a computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the electrocardiogram signal classification method provided in any of the above embodiments.
[0088] This application provides a computer device including a processor and a memory. The memory stores instructions, and the processor executes the instructions stored in the memory to enable the computer device to implement the electrocardiogram signal classification method provided in any of the above embodiments.
[0089] This application provides a computer program product containing instructions that, when run on at least one computing device, causes the at least one computing device to implement the electrocardiogram signal classification method provided in any of the above embodiments.
[0090] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems or apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and relevant parts can be referred to the method section.
[0091] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0092] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0093] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0094] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for classifying electrocardiogram (ECG) signals, characterized in that, The method includes: Acquire ECG signals from multiple leads, wherein the ECG signals from multiple leads are ECG signals of the same cardiac electrical activity collected from different parts of the human body, and each ECG signal from the multiple leads is an ECG signal; Extract a first feature from the ECG signals of the multiple leads, the first feature being used to characterize features at different time scales; A second feature is extracted from the multiple leads of the electrocardiogram (ECG) signals, and the second feature is used to characterize the degree of correlation between the ECG signals of each lead. The classification labels of the ECG signals of the plurality of leads are determined based on the first feature and the second feature, and the classification labels are used to indicate whether the heart is abnormal.
2. The method according to claim 1, characterized in that, Each lead's ECG signal includes waveforms of multiple heartbeats, and each heartbeat waveform includes multiple sub-waveforms; The first feature extracted from the multiple leads of the electrocardiogram signal includes: First-scale features are extracted from the ECG signals of the multiple leads, and the first-scale features are used to characterize the morphology of each sub-waveform of the ECG signals of the multiple leads; The second-scale features of the ECG signals from the multiple leads are extracted. The second-scale features are used to characterize the waveform morphology of each heartbeat in the ECG signals from the multiple leads. The third-scale features of the ECG signals of the multiple leads are extracted. The third-scale features are used to characterize the waveform variation of multiple consecutive heartbeats in the ECG signals of each lead. The first feature is determined based on the first scale feature, the second scale feature, and the third scale feature.
3. The method according to claim 1, characterized in that, The extraction of the second feature of the ECG signals from the multiple leads includes: A first correlation feature is extracted from the ECG signals of the multiple leads, and the first correlation feature is used to characterize the degree of correlation between the ECG signal of each lead and the ECG signal of adjacent leads; A second correlation feature is extracted from the ECG signals of the multiple leads. The second correlation feature is used to characterize the degree of correlation between the ECG signal of each lead and the ECG signals of other leads. The second feature is determined based on the first relevant feature and the second relevant feature.
4. The method according to claim 3, characterized in that, Determining the second feature based on the first relevant feature and the second relevant feature includes: The second feature is determined based on the first weight parameter, the first relevant feature, the second weight parameter, and the second relevant feature, wherein the sum of the first weight parameter and the second weight parameter is one.
5. The method according to claim 1, characterized in that, The step of determining the classification labels of the multiple leads of electrocardiogram signals based on the first feature and the second feature includes: By concatenating the first feature and the second feature, the target feature is obtained; The target features are input into a classification output network to obtain classification labels for the ECG signals of the multiple leads.
6. The method according to claim 1, characterized in that, The ECG signals of the multiple leads are ECG signals after baseline calibration using a baseline drift algorithm; Alternatively, the ECG signals of the multiple leads are ECG signals after noise signals have been filtered out using a filter.
7. A device for classifying electrocardiogram (ECG) signals, characterized in that, The device includes: The acquisition module is used to acquire electrocardiogram (ECG) signals from multiple leads. The ECG signals from multiple leads are ECG signals of the same cardiac electrical activity collected from different parts of the human body. Each ECG signal from the multiple leads is an ECG signal. The first extraction module is used to extract a first feature of the electrocardiogram signals of the multiple leads, and the first feature is used to characterize features at different time scales. The second extraction module is used to extract a second feature of the electrocardiogram (ECG) signals of the multiple leads, and the second feature is used to characterize the degree of correlation between the ECG signals of each lead. A determination module is used to determine the classification labels of the multiple leads of electrocardiogram signals based on the first feature and the second feature, wherein the classification labels are used to indicate whether an abnormality has occurred in the heart.
8. A computer-readable storage medium, characterized in that, It stores a computer program, wherein the computer program, when executed by a processor, implements the method for classifying electrocardiogram signals as described in any one of claims 1 to 6.
9. A computer device, characterized in that, The computer device includes a processor and a memory, the memory being used to store instructions, the processor executing the instructions stored in the memory to cause the computer device to perform the electrocardiogram signal classification method as described in any one of claims 1 to 6.
10. A computer program product containing instructions, characterized in that, When it is run on at least one computing device, it causes the at least one computing device to perform the electrocardiogram signal classification method as described in any one of claims 1 to 6.