Electrocardiogram signal quality automatic identification and classification method

By performing discrete wavelet decomposition and time domain feature extraction on the ECG signal, combined with the Bayesian optimization method, automatic identification and classification of ECG signal quality are achieved, solving the problem of decreased accuracy caused by reliance on QRS complex waves and RR intervals in existing technologies, and providing detailed noise type classification and fault diagnosis.

CN120611223AActive Publication Date: 2025-09-09HUNAN GUITU INFORMATION TECH CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510762728.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-09
Publication Date
2025-09-09
Estimated Expiration
2045-06-09

AI Technical Summary

Technical Problem

Existing electrocardiogram signal quality assessment methods rely on event features such as QRS complexes and RR intervals, resulting in decreased accuracy under the influence of irregular morphology or physiological factors. They also lack further classification of local noise types and cannot effectively assist in troubleshooting.

Method used

By performing discrete wavelet decomposition on the electrocardiogram signal, low-frequency sub-band, reconstruction sub-band and high-frequency sub-band are obtained, and time domain features are extracted. Combining wavelet analysis and fault diagnosis technology, the classification of global noise and local noise is realized, and the Bayesian optimization method is used to optimize the parameter group.

Benefits of technology

Without relying on QRS complex waves and RR intervals, it achieves automatic recognition and classification of ECG signal quality, improves the accuracy of identifying various types of noise and the effectiveness of fault diagnosis, saves computing resources, and provides more detailed noise type classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120611223A_ABST
    Figure CN120611223A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of electrocardiosignal classification, and discloses an electrocardiosignal quality automatic identification and classification method, which comprises the following steps: carrying out discrete wavelet decomposition on an electrocardiosignal to obtain a low-frequency sub-band, a reconstructed sub-band and a high-frequency sub-band, and carrying out time domain feature extraction on the low-frequency sub-band, the reconstructed sub-band and the high-frequency sub-band; according to the method, wavelet analysis, time domain feature extraction and a fault diagnosis technology are organically combined, and automatic identification and classification of electrocardiogram signal quality are achieved on the premise of not depending on event features such as QRS complex waves and RR intervals.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of electrocardiogram signal classification, and in particular relates to a method for automatically identifying and classifying electrocardiogram signal quality. Background Art

[0002] Automatic ECG signal quality identification and classification is an algorithmic technology used to analyze and process ECG data, aiming to improve the accuracy and efficiency of ECG signal analysis. This method helps doctors and engineers quickly and accurately identify ECG device faults by preprocessing, extracting features, assessing quality, and classifying ECG signals.

[0003] Existing automatic ECG signal quality assessment methods have two major problems. First, they rely on event characteristics such as the QRS complex and RR interval. These methods lose accuracy when the QRS complex has irregular morphology or is affected by physiological factors. Second, although they include local noise location, they lack further classification of local noise types, and therefore cannot provide sufficient reference information for subsequent troubleshooting work. Summary of the Invention

[0004] In view of the above situation, in order to overcome the defects of the existing technology, the present invention provides a method for automatic identification and classification of electrocardiogram signal quality. In response to the problems in the existing technology, it is proposed to perform discrete wavelet decomposition on the electrocardiogram signal to obtain low-frequency subbands, reconstruction subbands and high-frequency subbands, and perform time domain feature extraction on the low-frequency subbands, reconstruction subbands and high-frequency subbands. Global noise classification and local noise classification are performed based on the results of time domain feature extraction. The present invention organically combines wavelet analysis, time domain feature extraction and fault diagnosis technology, and realizes automatic identification and classification of electrocardiogram signal quality without relying on event characteristics such as QRS complex waves and RR intervals.

[0005] The technical solution adopted by the present invention is as follows: The present invention provides a method for automatically identifying and classifying electrocardiogram signal quality, the method comprising the following steps:

[0006] Step S1: collecting electrocardiogram signals, performing discrete wavelet decomposition on the electrocardiogram signals, and obtaining electrocardiogram subbands;

[0007] Step S2: Summarize the electrocardiogram subbands to obtain low-frequency subbands, reconstruction subbands, and high-frequency subbands;

[0008] Step S3: setting an adjustable parameter group;

[0009] Step S4: extracting time domain features from the low-frequency sub-band, the reconstructed sub-band, and the high-frequency sub-band;

[0010] Step S5: performing global noise classification and local noise classification according to the results of time domain feature extraction;

[0011] Step S6: Construct an ECG data set and adjust the adjustable parameter group.

[0012] Furthermore, the adjustable parameter group includes no valid signal threshold, baseline drift amplitude threshold, adjacent amplitude difference threshold, white noise kurtosis center point, white noise kurtosis radius, high frequency noise amplitude threshold, envelope peak width threshold, envelope peak height threshold and autocovariance threshold.

[0013] Furthermore, the step S4 specifically includes the following steps:

[0014] Step S41: extracting the maximum absolute amplitude of the low frequency from the low frequency sub-band and extracting the maximum absolute amplitude of the reconstructed electrocardiogram from the reconstructed sub-band;

[0015] Step S42: performing equidistant division on the low-frequency sub-band to obtain low-frequency segments, which are aggregated into a low-frequency segment set; performing equidistant division on the reconstructed sub-band to obtain reconstructed ECG segments, which are aggregated into a reconstructed ECG segment set; performing equidistant division on the high-frequency sub-band to obtain high-frequency segments, which are aggregated into a high-frequency segment set;

[0016] Step S43: extracting the local average amplitude, autocovariance, and kurtosis corresponding to each high-frequency segment in the high-frequency segment set, extracting the local maximum absolute amplitude corresponding to each reconstructed ECG segment in the reconstructed ECG segment set, extracting the local maximum absolute amplitude corresponding to each low-frequency segment in the low-frequency segment set, and calculating the adjacent amplitude difference corresponding to each low-frequency segment in the low-frequency segment set;

[0017] Step S44: Calculate the number of zero-crossing points of each high-frequency segment in the high-frequency segment set;

[0018] Step S45: Generate a high-frequency sub-band zero-crossing envelope according to the number of zero-crossing points in each high-frequency segment, extract the width and height of each peak in the high-frequency sub-band zero-crossing envelope, and mark the envelope peak width and envelope peak height corresponding to each high-frequency segment.

[0019] Furthermore, the step S5 specifically includes the following steps:

[0020] S51: performing global noise classification based on the results of time domain feature extraction;

[0021] S52: performing local noise classification based on the results of time domain feature extraction;

[0022] S53: Summarize the results of the local noise classification into a local noise time series.

[0023] Furthermore, the step S51 specifically includes the following steps:

[0024] S511: The maximum absolute amplitude of the reconstructed ECG is less than the no-signal threshold, and the global noise type is marked as no-signal.

[0025] S512: The maximum absolute low-frequency amplitude is greater than the baseline drift amplitude threshold, but the maximum value of the adjacent amplitude difference is less than the adjacent amplitude difference threshold. The global noise type is marked as baseline drift.

[0026] S513: The maximum absolute low-frequency amplitude is greater than the baseline drift amplitude threshold and the maximum value of adjacent amplitude differences is greater than the adjacent amplitude difference threshold. The global noise type is marked as mutation.

[0027] Furthermore, the step S52 specifically includes the following steps:

[0028] S521: marking the local noise type of the reconstructed electrocardiogram segment whose local maximum absolute amplitude is less than the no valid signal threshold as no valid signal;

[0029] S522: marking the local noise type of the low-frequency segment whose adjacent amplitude difference is greater than the adjacent amplitude difference threshold as mutation;

[0030] S523: extracting high-frequency segments from the high-frequency segment set whose local average amplitude is greater than the high-frequency noise amplitude threshold, whose envelope peak width is greater than the envelope peak width threshold, and whose envelope peak height is greater than the envelope peak height threshold, and summarizing them into a high-frequency noise segment set;

[0031] S524: determining a white noise kurtosis interval according to the white noise kurtosis radius and the white noise kurtosis center point, and marking the local noise type of high-frequency noise segments whose kurtosis is within the white noise kurtosis interval as white noise;

[0032] S525: Mark the local noise type of the high-frequency segment whose kurtosis is outside the white noise kurtosis range and whose autocovariance is higher than the autocovariance threshold as power line interference;

[0033] S526: The local noise type of the high-frequency segment whose kurtosis is outside the white noise kurtosis range and whose autocovariance is lower than the autocovariance threshold is marked as electromyographic artifact.

[0034] Furthermore, step S53 specifically includes the following steps:

[0035] Step S531: constructing a local noise one-hot encoding corresponding to each sampling point in the electrocardiogram signal;

[0036] Step S532: Summarize the local noise one-hot encoding into a local noise time series.

[0037] Furthermore, step S6 specifically includes the following steps:

[0038] Step S61: Collecting an ECG database and constructing an ECG data set;

[0039] Step S62: extracting the electrocardiogram signal instance in the electrocardiogram data set and the actual local noise time series corresponding to the electrocardiogram signal instance, and extracting the theoretical local noise time series of the electrocardiogram signal instance according to the adjustable parameter group;

[0040] Step S63: Optimizing the adjustable parameter group using the Bayesian optimization method with the goal of minimizing the average Hamming total difference.

[0041] Furthermore, step S61 specifically includes the following steps:

[0042] Step S611: extracting ECG signal instances and ECG signal annotations from the ECG database;

[0043] Step S612: extracting the actual local noise time series from the electrocardiogram signal annotation;

[0044] Step S613: performing discrete wavelet decomposition on the ECG signal instance and summarizing to obtain an instance low-frequency subband, an instance reconstruction subband, and an instance high-frequency subband;

[0045] Step S614: stacking the actual local noise time series, the ECG signal instance, the instance low-frequency subband, the instance reconstructed subband, and the instance high-frequency subband to obtain a multivariate signal time series instance; visualizing the ECG signal instance, the instance low-frequency subband, the instance reconstructed subband, and the instance high-frequency subband to obtain an ECG signal instance graph, an instance low-frequency subband graph, an instance reconstructed subband graph, and an instance high-frequency subband graph; annotating the fault type of the ECG signal instance, including: no significant noise, patient muscle movement, amplifier fault, filter fault, internal circuit break, internal circuit short, wire damage, wire connection error, poor electrode contact, and no signal; and performing one-hot encoding on the fault type of the ECG signal instance;

[0046] Step S615: The fault type of the ECG signal instance, the ECG signal instance, the actual local noise time series, the multivariate signal time series instance, the ECG signal instance graph, the instance low-frequency subband graph, the instance reconstructed subband graph, and the instance high-frequency subband graph of the ECG signal instance are summarized into an ECG dataset.

[0047] The beneficial effects achieved by the present invention using the above scheme are as follows:

[0048] (1) The present invention provides a method for automatic identification and classification of electrocardiogram signal quality. In response to the problems in the prior art, it is proposed to perform discrete wavelet decomposition on the electrocardiogram signal to obtain low-frequency subbands, reconstruction subbands and high-frequency subbands, and to extract time domain features from the low-frequency subbands, reconstruction subbands and high-frequency subbands. Global noise classification and local noise classification are performed based on the results of the time domain feature extraction. The present invention organically combines wavelet analysis, time domain feature extraction and fault diagnosis technology to achieve automatic identification and classification of electrocardiogram signal quality without relying on event features such as QRS complex waves and RR intervals.

[0049] (2) The method of global noise classification and local noise classification based on the results of time domain feature extraction proposed in the present invention is based on the analysis of the key time domain features of various types of noise. The absence of effective signals is generally manifested as a flat line or only fluctuations caused by noise, so the maximum absolute amplitude is selected as the basis for judgment. The characteristic of mutation is that the amplitude between segments changes dramatically, so the adjacent amplitude difference is selected as the basis for judgment. If the low-frequency sub-band shows a significant enough change but there is no mutation, it indicates that baseline drift has occurred. Since high-frequency noise usually has a rapidly changing waveform, this causes many zero crossing points. The use of the zero-crossing envelope can quickly extract this feature. It is found that the distribution of white noise is often close to the Gaussian distribution, and the expected kurtosis of the Gaussian distribution is 3. Therefore, the kurtosis is selected as the basis for judging the Gaussian distribution. The difference between power line interference and electromyographic artifacts is that power interference has a stronger periodicity than electromyographic artifacts. The method proposed in the present invention for global noise classification and local noise classification based on the results of time domain feature extraction generally captures the key time domain features of various types of noise. Compared with the existing technology, it saves more computing power resources and can further classify local noise types, solving the problem that the existing technology relies on event features such as QRS complex waves and RR intervals, and is difficult to cope with interference from external factors.

[0050] (3) The average Hamming total difference formula proposed in this invention innovatively applies the Hamming distance to comprehensively evaluate the difference between two local noise time series, providing a clear basis for the process of optimizing the adjustable parameter group using the Bayesian optimization method, making the results of global noise classification and local noise classification closer to the actual situation. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 A flow chart of a method for automatically identifying and classifying electrocardiogram signal quality provided by the present invention;

[0052] Figure 2 Schematic diagram of the neural network for ECG fault diagnosis;

[0053] Figure 3 Schematic diagram of the image feature extraction branch;

[0054] Figure 4 Schematic diagram of signal feature extraction branch;

[0055] Figure 5 Schematic diagram of the comprehensive analysis branch.

[0056] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention. DETAILED DESCRIPTION

[0057] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0058] Example 1, see Figure 1 The present invention provides a method for automatically identifying and classifying electrocardiogram signal quality, the method comprising the following steps:

[0059] Step S1: collecting an electrocardiogram signal and performing discrete wavelet decomposition on the electrocardiogram signal to obtain an electrocardiogram subband. In this embodiment, the discrete wavelet decomposition is implemented using the Mallett algorithm, and the sampling frequency of the electrocardiogram signal is 360 Hz.

[0060] Step S2: Summarizing the ECG subbands to obtain a low-frequency subband, a reconstruction subband, and a high-frequency subband. In this embodiment, the frequency range of the reconstruction subband is 2.8 Hz to 22.5 Hz, the frequency range of the low-frequency subband is less than 1 Hz, and the frequency range of the high-frequency subband is greater than 40 Hz.

[0061] Step S3: setting an adjustable parameter group;

[0062] Step S4: performing time domain feature extraction on the low-frequency sub-band, the reconstructed sub-band and the high-frequency sub-band;

[0063] Step S5: performing global noise classification and local noise classification according to the results of time domain feature extraction;

[0064] Step S6: Construct an ECG data set and adjust the adjustable parameter group.

[0065] Example 2. This example is based on the above example, and the adjustable parameter group includes a no valid signal threshold, a baseline drift amplitude threshold, an adjacent amplitude difference threshold, a white noise kurtosis center point, a white noise kurtosis radius, a high-frequency noise amplitude threshold, an envelope peak width threshold, an envelope peak height threshold, and an autocovariance threshold.

[0066] Embodiment 3: This embodiment is based on the above embodiment, and step S4 specifically includes the following steps:

[0067] Step S41: extracting the maximum absolute amplitude of the low frequency from the low frequency sub-band and extracting the maximum absolute amplitude of the reconstructed electrocardiogram from the reconstructed sub-band;

[0068] Step S42: Divide the low-frequency subband into equal intervals to obtain low-frequency segments, which are aggregated into a low-frequency segment set; divide the reconstructed subband into equal intervals to obtain reconstructed ECG segments, which are aggregated into a reconstructed ECG segment set; divide the high-frequency subband into equal intervals to obtain high-frequency segments, which are aggregated into a high-frequency segment set. In this embodiment, the length of a low-frequency segment is 500 milliseconds, the length of a reconstructed ECG segment is 1 second, and the length of a high-frequency segment is 50 milliseconds.

[0069] Step S43: extract the local average amplitude, autocovariance, and kurtosis corresponding to each high-frequency segment in the high-frequency segment set, extract the local maximum absolute amplitude corresponding to each reconstructed ECG segment in the reconstructed ECG segment set, extract the local maximum absolute amplitude corresponding to each low-frequency segment in the low-frequency segment set, and calculate the adjacent amplitude difference corresponding to each low-frequency segment in the low-frequency segment set. The formula for the adjacent amplitude difference is as follows:

[0070] D n =A n+1 -A n ;

[0071] Among them, D n is the adjacent amplitude difference of the nth low-frequency segment in the low-frequency segment set, A n is the local maximum absolute amplitude of the nth low-frequency segment in the low-frequency segment set, A n+1 is the local maximum absolute amplitude of the n+1th low-frequency segment in the low-frequency segment set;

[0072] Step S44: Calculate the number of zero-crossing points of each high-frequency segment in the high-frequency segment set. The formula for the number of zero-crossing points is as follows:

[0073]

[0074] Among them, ZC represents the number of zero crossing points, sign represents the sign function, S represents the total number of sampling points in the high-frequency segment, and HS i Represents the amplitude of the i-th sampling point in the high-frequency segment. The amplitude of the i-th sampling point in the high-frequency segment has a different sign from the amplitude of the i-th sampling point in the high-frequency segment. |sign(HS i )-sign(HS i-1 )| takes the value of 1, the amplitude of the i-th sampling point in the high-frequency segment has the same sign as the amplitude of the i-th sampling point in the high-frequency segment, |sign(HS i )-sign(HSi-1 )|The value is 0;

[0075] Step S45: Generate a high-frequency sub-band zero-crossing envelope according to the number of zero-crossing points in each high-frequency segment, extract the width and height of each peak in the high-frequency sub-band zero-crossing envelope, and mark the envelope peak width and envelope peak height corresponding to each high-frequency segment.

[0076] Embodiment 4: This embodiment is based on the above embodiment, and step S5 specifically includes the following steps:

[0077] S51: performing global noise classification based on the results of time domain feature extraction;

[0078] S52: performing local noise classification based on the results of time domain feature extraction;

[0079] S53: Summarize the results of the local noise classification into a local noise time series.

[0080] Embodiment 5: This embodiment is based on the above embodiment, and step S51 specifically includes the following steps:

[0081] S511: The maximum absolute amplitude of the reconstructed ECG is less than the no-signal threshold, and the global noise type is marked as no-signal.

[0082] S512: The maximum absolute low-frequency amplitude is greater than the baseline drift amplitude threshold, but the maximum value of the adjacent amplitude difference is less than the adjacent amplitude difference threshold. The global noise type is marked as baseline drift.

[0083] S513: The maximum absolute low-frequency amplitude is greater than the baseline drift amplitude threshold and the maximum value of adjacent amplitude differences is greater than the adjacent amplitude difference threshold. The global noise type is marked as mutation.

[0084] Embodiment 6: This embodiment is based on the above embodiment, and step S52 specifically includes the following steps:

[0085] S521: marking the local noise type of the reconstructed electrocardiogram segment whose local maximum absolute amplitude is less than the no valid signal threshold as no valid signal;

[0086] S522: marking the local noise type of the low-frequency segment whose adjacent amplitude difference is greater than the adjacent amplitude difference threshold as mutation;

[0087] S523: extracting high-frequency segments from the high-frequency segment set whose local average amplitude is greater than the high-frequency noise amplitude threshold, whose envelope peak width is greater than the envelope peak width threshold, and whose envelope peak height is greater than the envelope peak height threshold, and summarizing them into a high-frequency noise segment set;

[0088] S524: determining a white noise kurtosis interval according to the white noise kurtosis radius and the white noise kurtosis center point, and marking the local noise type of high-frequency noise segments whose kurtosis is within the white noise kurtosis interval as white noise;

[0089] S525: Mark the local noise type of the high-frequency segment whose kurtosis is outside the white noise kurtosis range and whose autocovariance is higher than the autocovariance threshold as power line interference;

[0090] S526: The local noise type of the high-frequency segment whose kurtosis is outside the white noise kurtosis range and whose autocovariance is lower than the autocovariance threshold is marked as electromyographic artifact.

[0091] Embodiment 7: This embodiment is based on the above embodiment, and step S53 specifically includes the following steps:

[0092] Step S531: Construct a local noise one-hot encoding corresponding to each sampling point in the electrocardiogram signal. The format of the local noise one-hot encoding is:

[0093] <B1,B2,B3,B4,B5> ;

[0094] Among them, B1 to B5 are Boolean variables. B1 represents whether the local noise type of this sampling point is no valid signal, B2 represents whether the local noise type of this sampling point is mutation, B3 represents whether the local noise type of this sampling point is white noise, B4 represents whether the local noise type of this sampling point is power line interference, and B5 represents whether the local noise type of this sampling point is electromyographic artifact.

[0095] Step S532: Summarize the local noise one-hot encoding into a local noise time series.

[0096] Embodiment 8: This embodiment is based on the above embodiment, and step S6 specifically includes the following steps:

[0097] Step S61: Acquire an ECG database and construct an ECG data set. In this embodiment, the ECG database is the MIT-BIH ECG database.

[0098] Step S62: extracting the electrocardiogram signal instance in the electrocardiogram data set and the actual local noise time series corresponding to the electrocardiogram signal instance, and extracting the theoretical local noise time series of the electrocardiogram signal instance according to the adjustable parameter group;

[0099] Step S63: Optimize the adjustable parameter group using the Bayesian optimization method with the goal of minimizing the average Hamming difference. The formula for the average Hamming difference is as follows:

[0100]

[0101] Where AHTD stands for Average Total Hamming Difference, M stands for the total number of actual local noise time series in the ECG dataset, and HTD k represents the kth Hamming total difference in the ECG data set, T represents the total number of sampling points, ALNOH t Represents the local noise one-hot encoding of the t-th sampling point in the actual local noise time series, TLNOH t represents the local noise one-hot encoding of the t-th sampling point in the theoretical local noise time series, and HD represents the Hamming distance.

[0102] Embodiment 9: This embodiment is based on the above embodiment, and step S61 specifically includes the following steps:

[0103] Step S611: extracting ECG signal instances and ECG signal annotations from the ECG database;

[0104] Step S612: constructing an actual local noise time series of the electrocardiogram signal instance according to the electrocardiogram signal annotation;

[0105] Step S613: performing discrete wavelet decomposition on the ECG signal instance and summarizing to obtain an instance low-frequency subband, an instance reconstruction subband, and an instance high-frequency subband;

[0106] Step S614: stacking the actual local noise time series, the electrocardiogram signal instance, the instance low-frequency subband, the instance reconstructed subband, and the instance high-frequency subband to obtain a multivariate signal time series instance; visualizing the electrocardiogram signal instance, the instance low-frequency subband, the instance reconstructed subband, and the instance high-frequency subband to obtain an electrocardiogram signal instance graph, an instance low-frequency subband graph, an instance reconstructed subband graph, and an instance high-frequency subband graph; annotating the fault type of the electrocardiogram signal instance according to the electrocardiogram signal annotation, including: no significant noise, patient muscle movement, amplifier fault, filter fault, internal circuit break, internal circuit short circuit, wire damage, wire connection error, poor electrode contact, and no signal; and performing one-hot encoding on the fault type of the electrocardiogram signal instance. In this embodiment, matplotlib.pyplot is used to achieve visualization, and keras.utils.to_categorical is used to achieve one-hot encoding;

[0107] Step S615: The fault type of the ECG signal instance, the ECG signal instance, the actual local noise time series, the multivariate signal time series instance, the ECG signal instance graph, the instance low-frequency subband graph, the instance reconstructed subband graph, and the instance high-frequency subband graph of the ECG signal instance are summarized into an ECG dataset.

[0108] Example 10, see Figure 2 、 Figure 3 、 Figure 4 and Figure 5Based on the above embodiment, this embodiment constructs an electrocardiogram fault diagnosis neural network, uses an electrocardiogram dataset to train the electrocardiogram fault diagnosis neural network, and the electrocardiogram fault diagnosis neural network performs electrocardiogram signal quality fault analysis based on the results of global noise classification and local noise classification. The process specifically includes the following steps:

[0109] Step T1: Construct an electrocardiogram fault diagnosis neural network. The electrocardiogram fault diagnosis neural network includes an image feature extraction branch, a signal feature extraction branch, and a comprehensive analysis branch. The image feature extraction branch includes a first splicing layer, a multi-scale convolution block, and a flattening layer. The signal feature extraction branch includes a ConvLSTM1D layer and a first attention layer. The comprehensive analysis branch includes a second attention layer and a fully connected layer. The multi-scale convolution block includes a first convolution layer, a second convolution layer, a third convolution layer, and a second splicing layer. In this embodiment, the convolution kernel size of the first convolution layer is 3×3, the convolution kernel size of the second convolution layer is 5×5, and the convolution kernel size of the third convolution layer is 7×7. The second splicing layer splices the outputs of the first convolution layer, the second convolution layer, and the third convolution layer.

[0110] Step T2: Use the ECG dataset to train the ECG fault diagnosis neural network;

[0111] Step T3: stacking the local noise time series, the electrocardiogram signal, the low-frequency subband, the reconstructed subband, and the high-frequency subband to obtain a multivariate signal time series, and visualizing the electrocardiogram signal, the low-frequency subband, the reconstructed subband, and the high-frequency subband to obtain an electrocardiogram signal graph, a low-frequency subband graph, a reconstructed subband graph, and a high-frequency subband graph;

[0112] Step T4: The ECG signal image, low-frequency subband image, reconstructed subband image, and high-frequency subband image are input into the first splicing layer. The first splicing layer splices the ECG signal image, low-frequency subband image, reconstructed subband image, and high-frequency subband image into a multi-band comprehensive image, and outputs it to the multi-scale convolution block.

[0113] Step T5: The multi-scale convolution block performs multi-scale convolution on the multi-band comprehensive image to obtain a multi-scale convolution feature map. The multi-scale convolution block outputs the multi-scale convolution feature map to the flattening layer for flattening to obtain a multi-scale convolution feature vector, which is output to the second attention layer.

[0114] Step T6: Input the multivariate signal time series into the ConvLSTM1D layer. The ConvLSTM1D layer outputs the multivariate signal feature sequence to the first attention layer. The first attention layer processes the multivariate signal feature sequence using the self-attention mechanism to obtain a self-attention feature sequence, which is then output to the second attention layer.

[0115] Step T7: The second attention layer uses the multi-scale convolution feature vector as the query vector and the self-attention feature sequence as the value vector for attention processing to obtain a comprehensive feature vector, which is output to the fully connected layer;

[0116] Step T8: The fully connected layer remaps the comprehensive feature vector to obtain the fault type;

[0117] In this embodiment, the ECG fault diagnosis neural network combines multivariate signal time series analysis with multi-scale convolution. By splicing the ECG signal graph, low-frequency sub-band graph, reconstructed sub-band graph and high-frequency sub-band graph into a multi-band comprehensive graph and performing multi-scale convolution on the multi-band comprehensive graph, more comprehensive and integrated features are extracted. The ConvLSTM1D layer combines the convolution operation with LSTM and uses the convolution operation in the calculation of each gate. Compared with the conventional LSTM1D layer, it is more suitable for processing multivariate signal time series. The self-attention mechanism is used to capture the internal dependency of the multivariate signal time series, and the attention mechanism is used to capture the dependency between the multi-scale convolution feature vector and the self-attention feature sequence. The comprehensive analysis of the multivariate signal time series and the multi-band comprehensive graph finally achieves comprehensive and accurate ECG fault diagnosis.

[0118] Example 10: This example is based on the above example, and step T2 specifically includes the following steps:

[0119] Step T21: Specify the loss function of the fully connected layer as categorical_crossentropy and the optimizer of the ECG fault diagnosis neural network as Adam;

[0120] Step T22: Specify the ECG signal instance graph, instance low-frequency subband graph, instance reconstructed subband graph, and instance high-frequency subband graph as the input of the first concatenation layer, specify the multivariate signal time series as the input of the ConvLSTM1D layer, and specify the fault type of the ECG signal instance as the target output of the fully connected layer.

[0121] Example 11. This example is based on the above example. The present invention runs in a Windows operating system environment, relies on Anaconda3, and uses Keras as the framework of the electrocardiogram fault diagnosis neural network. The Pandas library and the Numpy library are used to complete the construction of the electrocardiogram data set.

[0122] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or apparatus that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or apparatus.

[0123] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.

[0124] The present invention and its embodiments are described above. This description is not restrictive. What is shown in the accompanying drawings is only one of the embodiments of the present invention. The actual structure is not limited to this. In short, if ordinary technicians in this field are inspired by it and do not depart from the purpose of the invention, they can creatively design structural methods and embodiments similar to the technical solution, which should all fall within the scope of protection of the present invention.

Claims

1. A method for automatically identifying and classifying electrocardiogram signal quality, characterized by: The method comprises the following steps: Step S1: collecting electrocardiogram signals, performing discrete wavelet decomposition on the electrocardiogram signals, and obtaining electrocardiogram subbands; Step S2: Summarize the electrocardiogram subbands to obtain low-frequency subbands, reconstruction subbands, and high-frequency subbands; Step S3: setting an adjustable parameter group; Step S4: extracting time domain features from the low-frequency sub-band, the reconstructed sub-band, and the high-frequency sub-band; Step S5: performing global noise classification and local noise classification according to the results of time domain feature extraction; Step S6: Construct an ECG data set and adjust the adjustable parameter group.

2. According to the method for automatic identification and classification of electrocardiogram signal quality according to claim 1, the adjustable parameter group includes a no valid signal threshold, a baseline drift amplitude threshold, an adjacent amplitude difference threshold, a white noise kurtosis center point, a white noise kurtosis radius, a high-frequency noise amplitude threshold, an envelope peak width threshold, an envelope peak height threshold, and an autocovariance threshold.

3. The method for automatically identifying and classifying electrocardiogram signal quality according to claim 2, wherein step S4 specifically comprises the following steps: Step S41: extracting the maximum absolute amplitude of the low frequency from the low frequency sub-band and extracting the maximum absolute amplitude of the reconstructed electrocardiogram from the reconstructed sub-band; Step S42: performing equidistant division on the low-frequency sub-band to obtain low-frequency segments, which are aggregated into a low-frequency segment set; performing equidistant division on the reconstructed sub-band to obtain reconstructed ECG segments, which are aggregated into a reconstructed ECG segment set; performing equidistant division on the high-frequency sub-band to obtain high-frequency segments, which are aggregated into a high-frequency segment set; Step S43: extracting the local average amplitude, autocovariance, and kurtosis corresponding to each high-frequency segment in the high-frequency segment set, extracting the local maximum absolute amplitude corresponding to each reconstructed ECG segment in the reconstructed ECG segment set, extracting the local maximum absolute amplitude corresponding to each low-frequency segment in the low-frequency segment set, and calculating the adjacent amplitude difference corresponding to each low-frequency segment in the low-frequency segment set; Step S44: Calculate the number of zero-crossing points of each high-frequency segment in the high-frequency segment set; Step S45: Generate a high-frequency sub-band zero-crossing envelope according to the number of zero-crossing points in each high-frequency segment, extract the width and height of each peak in the high-frequency sub-band zero-crossing envelope, and mark the envelope peak width and envelope peak height corresponding to each high-frequency segment.

4. The method for automatically identifying and classifying electrocardiogram signal quality according to claim 3, wherein step S5 specifically comprises the following steps: S51: performing global noise classification based on the results of time domain feature extraction; S52: performing local noise classification based on the results of time domain feature extraction; S53: Summarize the results of the local noise classification into a local noise time series.

5. The method for automatically identifying and classifying electrocardiogram signal quality according to claim 4, wherein step S51 specifically comprises the following steps: S511: The maximum absolute amplitude of the reconstructed ECG is less than the no-signal threshold, and the global noise type is marked as no-signal. S512: The maximum absolute low-frequency amplitude is greater than the baseline drift amplitude threshold, but the maximum value of the adjacent amplitude difference is less than the adjacent amplitude difference threshold. The global noise type is marked as baseline drift. S513: The maximum absolute low-frequency amplitude is greater than the baseline drift amplitude threshold and the maximum value of adjacent amplitude differences is greater than the adjacent amplitude difference threshold. The global noise type is marked as mutation.

6. The method for automatically identifying and classifying electrocardiogram signal quality according to claim 5, wherein step S52 specifically comprises the following steps: S521: marking the local noise type of the reconstructed electrocardiogram segment whose local maximum absolute amplitude is less than the no valid signal threshold as no valid signal; S522: marking the local noise type of the low-frequency segment whose adjacent amplitude difference is greater than the adjacent amplitude difference threshold as mutation; S523: extracting high-frequency segments from the high-frequency segment set whose local average amplitude is greater than the high-frequency noise amplitude threshold, whose envelope peak width is greater than the envelope peak width threshold, and whose envelope peak height is greater than the envelope peak height threshold, and summarizing them into a high-frequency noise segment set; S524: determining a white noise kurtosis interval according to the white noise kurtosis radius and the white noise kurtosis center point, and marking the local noise type of high-frequency noise segments whose kurtosis is within the white noise kurtosis interval as white noise; S525: marking the local noise type of the high-frequency segment whose kurtosis is outside the white noise kurtosis range and whose autocovariance is higher than the autocovariance threshold as power line interference; S526: The local noise type of the high-frequency segment whose kurtosis is outside the white noise kurtosis range and whose autocovariance is lower than the autocovariance threshold is marked as electromyographic artifact.

Citation Information

Patent Citations

  • Electrocardiosignal quality evaluation method, device and equipment

    CN115486849A

  • Electrocardiogram abnormal degree detection method based on artificial intelligence

    CN119577657A

  • Realtime ECG signal quality estimation

    US20240000393A1