Electrocardiogram signal quality evaluation method and system based on multiple feature domains
By employing ensemble learning and multi-feature domain evaluation methods, this study utilizes various deep learning network models to evaluate electrocardiogram (ECG) signals from the time, spatial, and time-frequency domains. This addresses the issues of time-consuming and labor-intensive manual feature extraction and the instability of single-network evaluation in existing technologies, thereby improving the accuracy and robustness of ECG signal quality assessment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-29
- Publication Date
- 2026-03-24
AI Technical Summary
Existing methods for assessing the quality of electrocardiogram signals rely on manual feature extraction, which is time-consuming and labor-intensive. Furthermore, the assessment results of a single deep learning network are unstable and lack error correction capabilities, thus affecting diagnostic accuracy.
An ensemble learning-based approach is adopted to evaluate signals in the time, spatial, and time-frequency domains using multiple deep learning network models. Preprocessing is performed through matrix reconstruction and continuous wavelet transform. Signal quality is evaluated by combining network models with different structural types and then weighted ensemble is used to ensure the accuracy and robustness of the evaluation.
It improves the accuracy and generalization ability of ECG signal quality assessment, reduces the tediousness of manual feature extraction, and provides more reliable diagnostic support.
Smart Images

Figure CN117034187B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electrocardiogram (ECG) signal quality assessment technology, and in particular to a method and system for ECG signal quality assessment based on multiple feature domains. Background Technology
[0002] The statements in this section merely refer to the background art related to this invention and do not necessarily constitute prior art.
[0003] Electrocardiogram (ECG) signals, as a comprehensive representation of cardiac electrical activity, are an important basis for diagnosing cardiovascular diseases. However, ECG signals are characterized by weakness, instability, and low frequency, making them highly susceptible to interference from various noises during acquisition, which can lead to quality problems and affect further diagnosis and analysis. Therefore, accurate and reliable ECG quality assessment is crucial for improving the accuracy of clinical diagnosis.
[0004] Electrocardiogram (ECG) signals are typically collected from the surface of the body. The signals are very weak, with an amplitude range of 10µV to 4mV and a frequency range of approximately 0.05Hz to 100Hz. The ECG waveform mainly includes the P wave, QRS complex, and T wave.
[0005] ECG quality assessment aims to establish a quality evaluation standard before signal processing, analysis, and diagnosis. Early ECG quality assessment research employed simple methods, such as evaluating signals based on waveform features or noise content. Currently, traditional ECG quality assessment methods primarily utilize machine learning approaches. These mainly include classification methods based on Naive Bayes (NB), Support Vector Machine (SVM), and Multilayer Perceptron (MLP) neural networks, using features such as QRS waveform, kurtosis, RR interval stability coefficient, power spectrum, and QRS wave energy for ECG quality assessment classification. However, traditional ECG quality assessment methods require manual feature extraction, consuming time and effort to ensure the accuracy and comprehensiveness of the extracted features. Deep learning-based ECG quality assessment methods can automatically extract features and classify raw signals, avoiding manual labor and improving the accuracy of assessment results to some extent. Furthermore, previous quality assessment methods often used a single classifier or deep learning network, resulting in results that are subject to chance and lack error correction capabilities. Summary of the Invention
[0006] To address the shortcomings of existing technologies, this invention provides a method and system for evaluating the quality of electrocardiogram (ECG) signals based on multiple feature domains. Based on the concept of ensemble learning, network models of different structural types are used to evaluate the signals from the time domain, spatial domain, and time-frequency domain, respectively. The results are then weighted and integrated to ensure the accuracy of the evaluation.
[0007] On the one hand, it provides a method for assessing the quality of electrocardiogram signals based on multiple feature domains;
[0008] Methods for assessing ECG signal quality based on multiple feature domains include:
[0009] Construct a training set and a test set of electrocardiogram (ECG) signals; both the training set and the test set include ECG signals with known ECG signal quality assessment labels; perform preprocessing operations on the training set and the test set to obtain the time-domain signal, spatial-domain signal and time-frequency-domain signal of the ECG signals;
[0010] The time-domain, spatial-domain, and time-frequency-domain signals of the ECG signals from the training set are respectively input into M quality assessment network models to obtain M trained quality assessment network models; where M is a positive integer;
[0011] The time-domain, spatial-domain, and time-frequency-domain signals of the test set ECG signals are respectively input into the trained M quality assessment network models to obtain the quality assessment accuracy of the M quality assessment network models; based on the assessment accuracy of the M quality assessment network models, the weights of each of the M networks are calculated.
[0012] Acquire the ECG signal to be tested, and obtain the time-domain signal, frequency-domain signal, and time-frequency-domain signal of the ECG signal to be tested; input the time-domain signal, frequency-domain signal, and time-frequency-domain signal of the ECG signal to be tested into M quality assessment network models respectively to obtain the probability value of each quality label corresponding to the ECG signal to be tested;
[0013] Based on the weights of each network and the probability values of each quality label corresponding to the current signal output by each network, the score of each quality label is calculated, and the label with the highest score is selected as the final label output.
[0014] On the other hand, a multi-feature domain-based ECG signal quality assessment system is provided;
[0015] A multi-feature domain-based ECG signal quality assessment system includes:
[0016] The construction module is configured to: construct a training set and a test set of electrocardiogram (ECG) signals; both the training set and the test set include ECG signals with known ECG signal quality assessment labels; and perform preprocessing operations on the training set and the test set to obtain the time-domain signal, spatial-domain signal and time-frequency-domain signal of the ECG signals.
[0017] The training module is configured to input the time-domain, spatial-domain, and time-frequency-domain signals of the ECG signals from the training set into M quality assessment network models, respectively, to obtain M trained quality assessment network models; where M is a positive integer.
[0018] The evaluation module is configured to: input the time-domain, spatial-domain, and time-frequency domain signals of the test set ECG signals into the trained M quality evaluation network models respectively, and obtain the quality evaluation accuracy of the M quality evaluation network models; and calculate the weights of the M networks based on the evaluation accuracy of the M quality evaluation network models.
[0019] The acquisition module is configured to: acquire the ECG signal to be tested, acquire the time-domain signal, frequency-domain signal, and time-frequency-domain signal of the ECG signal to be tested; input the time-domain signal, frequency-domain signal, and time-frequency-domain signal of the ECG signal to be tested into M quality assessment network models respectively, and obtain the probability value of each quality label corresponding to the ECG signal to be tested;
[0020] The output module is configured to calculate the score of each quality label based on the weights of each network and the probability value of each quality label corresponding to the current signal output by each network, and select the label with the highest score as the final label output.
[0021] Furthermore, an electronic device is also provided, including:
[0022] Memory, used for non-transitory storage of computer-readable instructions; and
[0023] Processor, for executing the computer-readable instructions,
[0024] When the computer-readable instructions are executed by the processor, they perform the method described in the first aspect above.
[0025] In another aspect, a storage medium is also provided for non-transitory storage of computer-readable instructions, wherein when the non-transitory computer-readable instructions are executed by a computer, the instructions of the method described in the first aspect are executed.
[0026] In another aspect, a computer program product is also provided, including a computer program that, when run on one or more processors, is used to implement the method described in the first aspect above.
[0027] One of the above technical solutions has the following advantages or beneficial effects:
[0028] This invention, based on the concept of ensemble learning, automatically assesses the quality of electrocardiogram (ECG) signals by weighted fusion of the outputs of multiple common deep learning models. First, the ECG signal undergoes preprocessing such as matrix reconstruction and time-frequency analysis. Then, M networks with different structural types are trained, and weights are assigned based on test accuracy. Each network performs a probabilistic evaluation of the input ECG signal, and the probabilities are then weighted to obtain the final evaluation result. Evaluations were performed in the time, spatial, and time-frequency domains using different network models, and the results were then weighted and fused to ensure the accuracy of the evaluation. Attached Figure Description
[0029] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0030] Figure 1 This is a flowchart of the method in Example 1;
[0031] Figures 2(a)-2(c) This is a schematic diagram of three different types of signals of different qualities in Example 1;
[0032] Figures 3(a)-3(i) These are the signal generation results in three different domains in Example 1;
[0033] Figures 4(a)-4(f) This is a schematic diagram of the network structure of the six network models in Example 1;
[0034] Figures 5(a)-5(l) This is a schematic diagram illustrating the training process of the six network models in Example 1;
[0035] Figure 6 Flowchart for weight allocation. Detailed Implementation
[0036] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0037] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments of the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. Furthermore, it should be understood that the terms “comprising” and “having”, and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0038] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.
[0039] Example 1
[0040] This embodiment provides a method for evaluating the quality of electrocardiogram signals based on multiple feature domains;
[0041] like Figure 1 As shown, the ECG signal quality assessment method based on multiple feature domains includes:
[0042] S101: Construct a training set and a test set for electrocardiogram (ECG) signals; the training set and the test set each include: ECG signals with known ECG signal quality assessment labels; perform preprocessing operations on the training set and the test set to obtain the time-domain signal, spatial-domain signal and time-frequency-domain signal of the ECG signals;
[0043] S102: Input the time-domain, spatial-domain, and time-frequency-domain signals of the ECG signals from the training set into M quality assessment network models respectively to obtain M trained quality assessment network models; where M is a positive integer;
[0044] S103: Input the time-domain, spatial-domain, and time-frequency-domain signals of the ECG signals from the test set into the trained M quality assessment network models respectively to obtain the quality assessment accuracy of the M quality assessment network models; calculate the weights of each of the M networks based on the assessment accuracy of the M quality assessment network models.
[0045] S104: Obtain the ECG signal to be tested, and obtain the time-domain signal, frequency-domain signal, and time-frequency-domain signal of the ECG signal to be tested; input the time-domain signal, frequency-domain signal, and time-frequency-domain signal of the ECG signal to be tested into M quality assessment network models respectively to obtain the probability value of each quality label corresponding to the ECG signal to be tested;
[0046] S105: Based on the weights of each network and the probability values of each quality label corresponding to the current signal output by each network, calculate the score of each quality label, and select the label with the highest score as the final label output.
[0047] Further, S101: Construct a training set and a test set of electrocardiogram (ECG) signals; both the training set and the test set include: ECG signals with known ECG signal quality assessment labels; wherein the quality assessment labels include N classes.
[0048] Exemplarily, all data acquisition in this embodiment is conducted in accordance with laws and regulations and user consent, and the data is used legally. This experiment uses a database created by the Cardiology Team of the Department of Biomedical Engineering at Brno University of Technology (BUTQDB). This database includes long-term recordings of 18 single-lead electrocardiograms, collected from 15 subjects aged 21 to 83 years (9 women and 6 men). All data were collected under free-living conditions. The device used was a Bittium Faros 180 (mobile ECG recorder). All ECG recordings were longer than 24 hours, with a sampling frequency of 1000Hz. The database includes signal quality labels provided by three ECG experts, who categorized the signals into three quality levels, N=3: good quality, relatively poor quality, and unusable signal. To ensure accuracy, the labels of the three experts were considered.
[0049] Signals are classified into the following three categories:
[0050] Class 1: Good signal quality, all important waveforms (P wave, T wave and QRS complex) are clearly visible, and the onset and shift of these waveforms can be accurately detected, which has high clinical value;
[0051] Class 2: The signal quality is relatively poor, with a lot of noise and unclear important points (such as the PR interval or QRS duration cannot be measured), but the QRS complex is clearly visible, and the signal can reliably detect the QRS wave, which has clinical value;
[0052] Category 3: QRS waves cannot be accurately detected and cannot be used for clinical analysis.
[0053] In the classification process, the annotations of three experts were taken into account, and the quality levels of the ECG signals were reclassified.
[0054] The initial scores of the expert-labeled Class 1, Class 2, and Class 3 signals were recorded as 1, 0.5, and 0, respectively, and then averaged. The classification method and criteria are shown in Formula (1) and Table 1, respectively.
[0055]
[0056] Among them, S i Let S be the score of the i-th expert, and S be the final score. If the signal S is higher than 0.75, it is relabeled as "Class 1"; if S is higher than 0.25 and lower than 0.75, it is relabeled as "Class 2"; otherwise, the signal is relabeled as "Class 3".
[0057] Table 1 Signal Quality Level Classification Standards
[0058]
[0059]
[0060] Examples of the three types of signals are as follows: Figures 2(a)-2(c) As shown, Figure 2(a) shows the signal of the first quality level, Figure 2(b) shows the signal of the second quality level, and Figure 2(c) shows the signal of the third quality level.
[0061] Further, S101: Constructing a training set and a test set of electrocardiogram signals includes:
[0062] The data is balanced, missing values are filled, and the processed ECG signals are divided into training and testing sets according to a set ratio.
[0063] For example, during the experiment, after extracting each signal class, the ECG segments were divided into segments of equal length. Each segment had an independent label. The sample sizes of the three classes in the dataset may be imbalanced. Considering the requirements of the model input data, it is necessary to select equal amounts of data from the three classes to generate a relatively balanced dataset.
[0064] The Brno University of Technology ECG quality database used in this invention has a smaller data volume for the third type of signal compared to the first two types. Therefore, the sample size was standardized. The three types of ECG signals were divided into 10-second segments of equal length, with 1500 segments selected for each type: Type 1, Type 2, and Type 3. Since the original database sampling frequency was 1000Hz, each ECG signal segment consisted of 10,000 sampling points. Furthermore, the dataset contained some missing values, which were caused by accidental lead detachment or improper human operation during ECG acquisition. To maintain the accuracy of the quality assessment, these missing values were removed, retaining only the data from the other three types.
[0065] Furthermore, the preprocessing operation on the training and test sets to obtain the time-domain, spatial-domain, and time-frequency domain signals of the electrocardiogram signal specifically includes:
[0066] The spatial domain signal of the electrocardiogram (ECG) signal is obtained by matrix reconstruction.
[0067] The time-frequency domain signal of the electrocardiogram (ECG) signal was obtained by using continuous wavelet transform.
[0068] Furthermore, the method of obtaining the time-frequency domain signal of the electrocardiogram signal using continuous wavelet transform includes:
[0069] The original ECG signal is subjected to time-frequency analysis using continuous wavelet transform (CWT) to more intuitively express the dynamic changes in frequency over time. The generated time-frequency plot is then input into an image deep learning network to perform quality assessment using time-frequency domain information.
[0070] Time-frequency analysis techniques are particularly valuable in characterizing electrocardiogram signals and atrial fibrillation. Among various time-frequency analysis methods, the Continuous Wavelet Transform (CWT) inherits and develops the localization concept of the STFT, overcoming its limitation that the window size does not change with frequency. Let the signal x(t)∈L 2 In the (R) space, where ψ(t) is the mother wavelet function, the CWT definition of x(t) is:
[0071]
[0072] Where a and τ are the scaling parameter and time-shifting parameter, respectively; ψa,τ(t) is the wavelet basis function after translation and scaling.
[0073] In computer processing, t needs to be discretized. Since x(t) = x[k] in the interval t = k to k+1, equation (2) becomes:
[0074]
[0075] Where k is the sampling point of the signal, |WT x (a,τ)| 2 The three-dimensional curve is defined as the energy spectrum of the wavelet transform coefficients.
[0076] This invention uses CWT to generate a time-frequency graph from the ECG signal. In the time-frequency graph, the horizontal axis represents time, the vertical axis represents frequency, and the color represents the energy value at the current point.
[0077] Signal generation results in three different domains are as follows Figures 3(a)-3(i) As shown in Figure 3(a), Figure 3(b) is a type 1 time-domain signal; Figure 3(c) is a type 1 time-frequency domain signal; Figure 3(d) is a type 2 time-domain signal; Figure 3(e) is a type 2 spatial domain signal; Figure 3(f) is a type 2 time-frequency domain signal; Figure 3(g) is a type 3 time-domain signal; Figure 3(h) is a type 3 spatial domain signal; Figure 3(i) is a type 3 time-frequency domain signal.
[0078] First, the dataset is divided. ECG signals from the three different domains are divided into training and test sets in an 8:2 ratio. For example, when using time-domain signals, 3600 ECG segments are used as the training set (1200 per class), and 900 segments are used as the test set (300 per class). The same applies when using spatial and time-frequency domain signals.
[0079] Further, in step S102: the time-domain signal, spatial-domain signal, and time-frequency-domain signal of the training set ECG signal are respectively input into six quality assessment network models to obtain M trained quality assessment network models, specifically including:
[0080] The time-domain signals of the training set are input into the first quality assessment network model and the second quality assessment network model, respectively, to obtain the trained first quality assessment network model and the second quality assessment network model.
[0081] The spatial domain signals of the training set are input into the third quality assessment network model and the fourth quality assessment network model, respectively, to obtain the trained third quality assessment network model and the fourth quality assessment network model.
[0082] The time-frequency domain signals of the training set are input into the fifth and sixth quality assessment network models, respectively, to obtain the trained fifth and sixth quality assessment network models.
[0083] Furthermore, the first quality assessment network model is implemented using a one-dimensional convolutional neural network (1D-CNN); the second quality assessment network model is implemented using an LSTM network.
[0084] The third quality assessment network model is implemented using a two-dimensional convolutional neural network (2D-CNN); the fourth quality assessment network model is implemented using a CNN network and an LSTM network connected in series.
[0085] The fifth quality assessment network model is implemented using the GoogleNet network; the sixth quality assessment network model is implemented using SqueezeNet.
[0086] We construct multiple common deep learning network models with different architecture types and simultaneously perform quality assessments on signals from different domains. First, we preprocess the raw ECG data to build a series of common deep learning network models. Each model is designed to process signals from a specific domain and performs quality assessment independently. Each deep learning network model is trained, employing appropriate optimization algorithms and loss functions during training to optimize both performance and accuracy. This approach allows us to fully leverage deep learning network models with different architecture types for multi-faceted signal quality assessment. This comprehensive consideration of signal characteristics from different domains and the strengths of the models improves the accuracy and robustness of the quality assessment. Finally, we save the model with the best performance, providing a reliable and efficient tool for future integrated quality assessment tasks.
[0087] The six deep learning network architectures used are as follows: Figures 4(a)-4(f) As shown, its training process is as follows: Figures 5(a)-5(l) As shown in Figure 4(a), the 1D-CNN network structure is shown in Figure 4(b), the LSTM network structure is shown in Figure 4(c), the CNN-LSTM network structure is shown in Figure 4(d), the 2D-CNN network structure is shown in Figure 4(e), the SqueezeNet network structure is shown in Figure 4(f), and the GoogLeNet network structure is shown in Figure 4(f).
[0088] Figure 5(a) shows the training process of the 1D-CNN model (accuracy), Figure 5(b) shows the training process of the LSTM model (accuracy), Figure 5(c) shows the training process of the 1D-CNN model (loss rate), Figure 5(d) shows the training process of the LSTM model (loss rate), Figure 5(e) shows the training process of the GooLeNet model (accuracy), Figure 5(f) shows the training process of the SqueezeNet model (accuracy), Figure 5(g) shows the training process of the GooLeNet model (loss rate), Figure 5(h) shows the training process of the SqueezeNet model (loss rate), Figure 5(i) shows the training process of the 2D-CNN model (accuracy), Figure 5(j) shows the training process of the CNN-LSTM model (accuracy), Figure 5(k) shows the training process of the 2D-CNN model (loss rate), and Figure 5(l) shows the training process of the CNN-LSTM model (loss rate).
[0089] Further, in S103: the time-domain signal, spatial-domain signal, and time-frequency-domain signal of the test set ECG signal are respectively input into the trained M quality assessment network models to obtain the quality assessment accuracy of the M quality assessment network models, including:
[0090] The time-domain signals of the test set are input into the trained first quality assessment network model and the second quality assessment network model, respectively, to obtain the evaluation accuracy of the trained first quality assessment network model and the second quality assessment network model.
[0091] The spatial domain signals of the test set are input into the trained third and fourth quality evaluation network models, respectively, to obtain the evaluation accuracy of the trained third and fourth quality evaluation network models.
[0092] The time-frequency domain signals of the test set are input into the trained fifth and sixth quality evaluation network models, respectively, to obtain the evaluation accuracy of the trained fifth and sixth quality evaluation network models.
[0093] In the training process of M network models in this invention, accuracy is used as the evaluation metric for model performance. The formula is defined as:
[0094]
[0095] TP, TN, FP, and FN represent true positive, true negative, false positive, and false negative events, respectively.
[0096] Category C i The probability H of the final output j (C i )for:
[0097]
[0098] Where M represents the number of classifiers, N represents the number of classes, and ω j This represents the weights of the j-th network model after normalization. This represents the probability that the j-th classifier classifies a class as the ith class.
[0099] Furthermore, the calculation of the weights of the six networks based on the evaluation accuracy of the M quality assessment network models includes:
[0100] Weights are assigned to the networks based on their test results (classification accuracy). The test accuracies of the M networks are then softmax normalized and used as the weights for the M networks in turn.
[0101] The Softmax formula is:
[0102]
[0103] Where z iLet C be the accuracy of the i-th network and C be the number of networks. The accuracy of all networks is normalized to [0,1] using the Softmax function, and the weights sum to 1.
[0104] That is, the weights of the resulting M network models satisfy:
[0105] W1+W2+……+W M =1, W1, W2, ... W M ∈[0,1] (7)
[0106] Where M is the number of networks, W j Let be the weights of the j-th network model.
[0107] This invention employs six network models, including 1D-CNN, LSTM, 2D-CNN, CNN-LSTM, GoogLeNet, and SqueezeNet. 1D-CNN and LSTM are used for quality assessment of ECG time-domain signals; 2D-CNN and CNN-LSTM are used for quality assessment of ECG spatial-domain signals; and GoogLeNet and SqueezeNet are used for quality assessment of ECG time-frequency-domain signals. The classification accuracies of the six models are 74.33%, 70.11%, 80.78%, 68.67%, 92.67%, and 92.22%, respectively. Based on equations (6) and (7), the weights of the six network models are calculated to be 0.1570, 0.1506, 0.1675, 0.1484, 0.1887, and 0.1878, respectively. The flowchart of the weight allocation for the six network models is shown below. Figure 6 As shown.
[0108] The test set samples are input into M networks, and each network generates N quality levels with probabilities. The probabilities of the N quality levels satisfy the following:
[0109] p1 + p2 + ... + p N =1 (8)
[0110] Where, p i This represents the probability that the network determines the input signal to be of class i. For example, p1 is the probability that the network determines the input signal to be of class 1.
[0111] Further, in step S104: the time-domain signal, frequency-domain signal, and time-frequency-domain signal of the ECG signal to be tested are respectively input into M quality assessment network models to obtain the probability values of each quality label corresponding to the ECG signal to be tested, including:
[0112] The time-domain signal of the ECG signal to be tested is input into the trained first quality assessment network model and the second quality assessment network model, and the probability value of each quality label corresponding to the ECG signal to be tested is output.
[0113] The spatial domain signal of the ECG signal to be tested is input into the trained third and fourth quality assessment network models, and the probability values of each quality label corresponding to the ECG signal to be tested are output.
[0114] The time-frequency domain signal of the ECG signal to be tested is input into the trained fifth and sixth quality assessment network models, and the probability values of each quality label corresponding to the ECG signal to be tested are output.
[0115] For example, S105: Based on the weights of each network and the probability values of each quality label corresponding to the current signal output by each network, calculate the score of each quality label, and select the label with the highest score as the final label output, including:
[0116] The probability matrix of each network classification result can be represented as:
[0117]
[0118] in, Let P be the probability that the j-th network classifies a sample as the k-th class. j The matrix distribution of the probabilities of the N quality levels generated by the j-th network model.
[0119] Then, calculate the sum of probabilities for a certain class for all networks using formula (10).
[0120]
[0121]
[0122] Among them, W1, ... W M Let represent the weights of the M networks, and Prob be the sum of the probabilities of the N quality levels generated by all networks.
[0123] Then, calculate the maximum probability value and its corresponding category.
[0124] [Prob max ,Pred]=max(Prob),Pred=1,2,3……N (12)
[0125] Among them, Prob max Pred represents the highest probability value in Prob and the corresponding quality level category, respectively. Pred is the final classification result.
[0126] The weights assigned to the 6 network models are N=3, therefore:
[0127]
[0128] Furthermore, the method also includes:
[0129] If two or more quality labels have the same score, the quality label output by the network model with the highest weight is selected as the final quality label.
[0130] The highest probability value is calculated according to formula (12), and its corresponding category is taken as the final classification result, which is also the final classification result of the deep ensemble network. If the highest probability value in formula (12) is not unique (the two highest values are equal or all three values are equal), then the result of the network with the highest weight is taken as the final result.
[0131] To verify the effectiveness of the proposed deep ensemble learning-based ECG signal quality assessment, the model was tested using the test set in section 3.2.1, achieving an accuracy of 93.22%. Compared to traditional methods, this invention utilizes deep learning and ensemble learning principles for ECG quality assessment across three dimensions: time, space, and time-frequency domains, improving both the accuracy and generalization ability of the assessment method. Using deep learning networks avoids the tediousness and incompleteness of manual feature extraction, reducing manpower and resources while obtaining accurate and reliable results. Furthermore, this invention, based on the concept of ensemble learning, integrates the assessment results of multiple networks, further enhancing the accuracy and generalization ability of the model.
[0132] Example 2
[0133] This embodiment provides an electrocardiogram signal quality assessment system based on multiple feature domains;
[0134] A multi-feature domain-based ECG signal quality assessment system includes:
[0135] The construction module is configured to: construct a training set and a test set of electrocardiogram (ECG) signals; both the training set and the test set include ECG signals with known ECG signal quality assessment labels; and perform preprocessing operations on the training set and the test set to obtain the time-domain signal, spatial-domain signal and time-frequency-domain signal of the ECG signals.
[0136] The training module is configured to input the time-domain, spatial-domain, and time-frequency-domain signals of the ECG signals from the training set into M quality assessment network models, respectively, to obtain M trained quality assessment network models; where M is a positive integer.
[0137] The evaluation module is configured to: input the time-domain, spatial-domain, and time-frequency domain signals of the test set ECG signals into the trained M quality evaluation network models respectively, and obtain the quality evaluation accuracy of the M quality evaluation network models; and calculate the weights of the M networks based on the evaluation accuracy of the M quality evaluation network models.
[0138] The acquisition module is configured to: acquire the ECG signal to be tested, acquire the time-domain signal, frequency-domain signal, and time-frequency-domain signal of the ECG signal to be tested; input the time-domain signal, frequency-domain signal, and time-frequency-domain signal of the ECG signal to be tested into M quality assessment network models respectively, and obtain the probability value of each quality label corresponding to the ECG signal to be tested;
[0139] The output module is configured to calculate the score of each quality label based on the weights of each network and the probability value of each quality label corresponding to the current signal output by each network, and select the label with the highest score as the final label output.
[0140] It should be noted that the aforementioned construction module, training module, evaluation module, acquisition module, and output module correspond to steps S101 to S105 in Embodiment 1. The examples and application scenarios implemented by these modules and their corresponding steps are the same, but they are not limited to the content disclosed in Embodiment 1. It should also be noted that these modules, as part of the system, can be executed in a computer system, such as a set of computer-executable instructions.
[0141] The descriptions of each embodiment in the above embodiments have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0142] The proposed system can be implemented in other ways. For example, the system embodiments described above are merely illustrative, and the division of modules described above is only a logical functional division. In actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed.
[0143] Example 3
[0144] This embodiment also provides an electronic device, including: one or more processors, one or more memories, and one or more computer programs; wherein, the processor is connected to the memory, and the one or more computer programs are stored in the memory. When the electronic device is running, the processor executes the one or more computer programs stored in the memory to cause the electronic device to perform the method described in Embodiment 1.
[0145] It should be understood that in this embodiment, the processor can be a central processing unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.
[0146] Memory may include read-only memory and random access memory, and provides instructions and data to the processor. A portion of memory may also include non-volatile random access memory. For example, memory may also store information about the device type.
[0147] In the implementation process, each step of the above method can be completed by the integrated logic circuits in the processor hardware or by software instructions.
[0148] The method in Embodiment 1 can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor. The software modules can reside in readily available storage media in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method. To avoid repetition, a detailed description is not provided here.
[0149] Those skilled in the art will recognize that the units and algorithm steps described in connection with the various examples of this embodiment can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this invention.
[0150] Example 4 This example also provides a computer-readable storage medium for storing computer instructions, which, when executed by a processor, complete the method described in Example 1.
[0151] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for assessing the quality of electrocardiogram (ECG) signals based on multiple feature domains, characterized by: include: Construct training and testing sets for electrocardiogram (ECG) signals; Both the training set and the test set include: ECG signals with known ECG signal quality assessment labels; preprocessing operations are performed on the training set and the test set to obtain the time-domain signal, spatial-domain signal and time-frequency-domain signal of the ECG signal; The time-domain, spatial-domain, and time-frequency-domain signals of the ECG signals from the training set are respectively input into M quality assessment network models to obtain M trained quality assessment network models; where M is a positive integer; The time-domain, spatial-domain, and time-frequency-domain signals of the training set of electrocardiogram (ECG) signals are respectively input into M quality assessment network models to obtain M trained quality assessment network models, specifically including: The time-domain signals of the training set are input into the first quality assessment network model and the second quality assessment network model, respectively, to obtain the trained first quality assessment network model and the second quality assessment network model. The spatial domain signals of the training set are input into the third quality assessment network model and the fourth quality assessment network model, respectively, to obtain the trained third quality assessment network model and the fourth quality assessment network model. The time-frequency domain signals of the training set are input into the fifth quality assessment network model and the sixth quality assessment network model, respectively, to obtain the trained fifth quality assessment network model and the sixth quality assessment network model. The time-domain, spatial-domain, and time-frequency-domain signals of the test set ECG signals are respectively input into the trained M quality assessment network models to obtain the quality assessment accuracy of the M quality assessment network models; based on the assessment accuracy of the M quality assessment network models, the weights of each of the M networks are calculated. Acquire the ECG signal to be tested, and obtain the time-domain signal, frequency-domain signal, and time-frequency-domain signal of the ECG signal to be tested; input the time-domain signal, frequency-domain signal, and time-frequency-domain signal of the ECG signal to be tested into M quality assessment network models respectively to obtain the probability value of each quality label corresponding to the ECG signal to be tested; Based on the weights of each network and the probability values of each quality label corresponding to the current signal output by each network, the score of each quality label is calculated, and the label with the highest score is selected as the final label output.
2. The ECG signal quality assessment method based on multiple feature domains as described in claim 1, characterized in that, The preprocessing operations on the training and test sets to obtain the time-domain, spatial-domain, and time-frequency domain signals of the electrocardiogram (ECG) signals specifically include: The spatial domain signal of the electrocardiogram (ECG) signal is obtained by matrix reconstruction. The time-frequency domain signal of the electrocardiogram (ECG) signal was obtained by using continuous wavelet transform.
3. The ECG signal quality assessment method based on multiple feature domains as described in claim 1, characterized in that, The time-domain, spatial-domain, and time-frequency-domain signals of the test set ECG signals are respectively input into M trained quality assessment network models to obtain the quality assessment accuracy of the M quality assessment network models, including: The time-domain signals of the test set are input into the trained first quality assessment network model and the second quality assessment network model, respectively, to obtain the evaluation accuracy of the trained first quality assessment network model and the second quality assessment network model. The spatial domain signals of the test set are input into the trained third and fourth quality evaluation network models, respectively, to obtain the evaluation accuracy of the trained third and fourth quality evaluation network models. The time-frequency domain signals of the test set are input into the trained fifth and sixth quality evaluation network models, respectively, to obtain the evaluation accuracy of the trained fifth and sixth quality evaluation network models.
4. The ECG signal quality assessment method based on multiple feature domains as described in claim 1, characterized in that, The step of calculating the weights of the M quality assessment network models based on their evaluation accuracy includes: Assign weights to the networks based on the test results of each network; The network's test accuracy was performed. Normalize, and then use as follows The weights of each network; The formula is: (6) in For the first The accuracy of the network, The number of networks; via The function normalizes the accuracy of all networks to [0, 1] and the weight values sum to 1; income The weights of the network model satisfy: (7) in, For the number of networks, For the first The weights of each network model.
5. The ECG signal quality assessment method based on multiple feature domains as described in claim 1, characterized in that, The time-domain, frequency-domain, and time-frequency-domain signals of the ECG signal to be tested are respectively input into M quality assessment network models to obtain the probability values of each quality label corresponding to the ECG signal to be tested, including: The time-domain signal of the ECG signal to be tested is input into the trained first quality assessment network model and the second quality assessment network model, and the probability value of each quality label corresponding to the ECG signal to be tested is output. The spatial domain signal of the ECG signal to be tested is input into the trained third and fourth quality assessment network models, and the probability values of each quality label corresponding to the ECG signal to be tested are output. The time-frequency domain signal of the ECG signal to be tested is input into the trained fifth and sixth quality assessment network models, and the probability values of each quality label corresponding to the ECG signal to be tested are output.
6. The ECG signal quality assessment method based on multiple feature domains as described in claim 1, characterized in that, Based on the weights of each network and the probability values of each quality label corresponding to the current signal output by each network, the score of each quality label is calculated, and the label with the highest score is selected as the final label output, including: The probability matrix for each network classification result is represented as follows: (9) in, For the first The network classifies the sample as the first... The probability of a class For the first The matrix distribution of the probabilities of N quality levels generated by a network model; Then, calculate the sum of probabilities for a certain class for all networks using formula (10). (10) (11) in, These are the weights of the M networks, The sum of probabilities for the N quality levels generated by all networks; Then, calculate the maximum probability value and its corresponding category. (12) in, , They are respectively The highest probability value and the corresponding quality level category. This is the final classification result.
7. A multi-feature domain-based electrocardiogram signal quality assessment system, characterized in that: include: The module is configured to build training and testing sets of ECG signals. Both the training set and the test set include: ECG signals with known ECG signal quality assessment labels; preprocessing operations are performed on the training set and the test set to obtain the time-domain signal, spatial-domain signal and time-frequency-domain signal of the ECG signal; The training module is configured to input the time-domain, spatial-domain, and time-frequency-domain signals of the ECG signals from the training set into M quality assessment network models, respectively, to obtain M trained quality assessment network models; where M is a positive integer. The time-domain, spatial-domain, and time-frequency-domain signals of the training set of electrocardiogram (ECG) signals are respectively input into M quality assessment network models to obtain M trained quality assessment network models, specifically including: The time-domain signals of the training set are input into the first quality assessment network model and the second quality assessment network model, respectively, to obtain the trained first quality assessment network model and the second quality assessment network model. The spatial domain signals of the training set are input into the third quality assessment network model and the fourth quality assessment network model, respectively, to obtain the trained third quality assessment network model and the fourth quality assessment network model. The time-frequency domain signals of the training set are input into the fifth quality assessment network model and the sixth quality assessment network model, respectively, to obtain the trained fifth quality assessment network model and the sixth quality assessment network model. The evaluation module is configured to: input the time-domain, spatial-domain, and time-frequency domain signals of the test set ECG signals into the trained M quality evaluation network models respectively, and obtain the quality evaluation accuracy of the M quality evaluation network models; and calculate the weights of the M networks based on the evaluation accuracy of the M quality evaluation network models. The acquisition module is configured to: acquire the ECG signal to be tested, acquire the time-domain signal, frequency-domain signal, and time-frequency-domain signal of the ECG signal to be tested; input the time-domain signal, frequency-domain signal, and time-frequency-domain signal of the ECG signal to be tested into M quality assessment network models respectively, and obtain the probability value of each quality label corresponding to the ECG signal to be tested; The output module is configured to calculate the score of each quality label based on the weights of each network and the probability value of each quality label corresponding to the current signal output by each network, and select the label with the highest score as the final label output.
8. An electronic device, characterized in that it comprises: Memory is used to store computer-readable instructions in a non-transitory manner. as well as Processor, for executing the computer-readable instructions, When the computer-readable instructions are executed by the processor, they perform the method described in any one of claims 1-6.
9. A storage medium, characterized in that, The computer-readable instructions are stored non-transitory, wherein when the non-transitory computer-readable instructions are executed by a computer, the instructions of the method according to any one of claims 1-6 are executed.
Citation Information
Patent Citations
Electrocardio identity recognition method based on quality evaluation and deep transfer learning
CN114861706A
Signal online detection identification and separation method based on deep learning
CN115422969A