A method and system for dynamic electrocardiogram (ECG) signal quality control based on ECG signal reconstruction

CN118211098BActive Publication Date: 2026-06-30SHAN DONG MSUN HEALTH TECH GRP CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHAN DONG MSUN HEALTH TECH GRP CO LTD
Filing Date
2024-03-15
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Existing technologies suffer from complex and varied noise types during ECG signal acquisition, making it difficult to accurately identify and control noise. This results in signal quality that is hard to assess, affecting the accuracy of ECG diagnosis and the efficiency of clinical treatment.

Method used

By using a method based on ECG signal reconstruction, a trained ECG signal reconstruction model is used to obtain the reconstructed ECG signal and lead reversal prediction results. Combined with Fourier transform and sliding window techniques, noise type identification and level detection are achieved, reducing the dependence on labeled datasets.

Benefits of technology

It enables precise classification and grade detection of electrocardiogram (ECG) signals, improves signal quality control efficiency, reduces labor costs, and enhances the accuracy of ECG diagnosis and clinical treatment efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118211098B_ABST
    Figure CN118211098B_ABST
Patent Text Reader

Abstract

This invention discloses a dynamic electrocardiogram (ECG) signal quality control method and system based on ECG signal reconstruction, belonging to the field of ECG signal processing technology. The method includes: acquiring a noisy ECG signal to be detected; inputting the noisy ECG signal into a trained ECG signal reconstruction model to obtain the reconstructed ECG signal and lead reversal prediction results; obtaining a difference ECG signal based on the noisy ECG signal and the reconstructed ECG signal; performing a Fourier transform on the difference ECG signal to obtain the spectral range; determining the noise type based on the frequency range; setting a sliding window for the difference ECG signal and calculating the interval error energy within the sliding window; determining the noise level based on the error energy; and obtaining the lead reversal result based on the lead reversal prediction results. This method enables accurate classification and level detection of ECG noise, solving the problems of low accuracy in existing ECG noise classification and reliance on noise-labeled datasets.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electrocardiogram (ECG) signal technology, and in particular to a dynamic ECG signal quality control method and system based on ECG signal reconstruction. 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 reflect the electrophysiological activity during cardiac excitation and are an important means of monitoring basic cardiac function and diagnosing cardiovascular diseases, with wide clinical applications. However, ECG signal acquisition is highly susceptible to various noise interferences from both internal and external environments. Common types of noise include power frequency interference, electromyographic interference, baseline drift, and motion artifacts. In long-term dynamic monitoring environments, Holter monitoring reveals diverse variations in internal and external noise and motion artifacts under different exercise states, resulting in more severe signal noise. Furthermore, the types and levels of noise are unpredictable, making wearable signal quality complex, variable, and difficult to control, thus posing a fundamental challenge to the effective extraction of diagnostic information from ECG signals. Additionally, during ECG acquisition, negligence can occasionally lead to reversed connections between the left and right upper limbs, altering the amplitude of leads I, II, III, aVR, aVL, and aVF, affecting the clinical diagnosis of related diseases.

[0004] Therefore, identifying the types and levels of noise in electrocardiogram (ECG) signals, making timely judgments on the positive and negative connections of leads in the left and right upper limbs, assessing and diagnosing the quality of ECG signals, improving the accuracy and reliability of ECG signals, and enhancing the diagnostic efficiency of clinicians are of great significance.

[0005] Currently, commonly used ECG noise classification methods mainly include frequency features, machine learning, and deep learning. However, overlapping frequency bands under different noise types reduce the specificity of frequency features. The training process of machine learning and deep learning requires a large number of ECG datasets with noise annotations, but the amount of publicly available ECG noise databases with accurate annotations is small, and noise annotation requires a lot of time and manpower. Summary of the Invention

[0006] To address the shortcomings of existing technologies, this invention provides a dynamic electrocardiogram (ECG) signal quality control method, system, electronic device, and computer-readable storage medium based on ECG signal reconstruction. This method does not rely on labeled datasets and can achieve accurate classification and level detection of ECG noise. It is of great significance for improving the utilization rate of ECG signal acquisition, reducing the waste of additional medical resources, and improving the efficiency of cardiovascular disease diagnosis and treatment.

[0007] In a first aspect, the present invention provides a dynamic electrocardiogram (ECG) signal quality control method based on ECG signal reconstruction;

[0008] Dynamic ECG signal quality control methods based on ECG signal reconstruction include:

[0009] Acquire the noisy ECG signal to be detected, input the noisy ECG signal into the trained ECG signal reconstruction model, and obtain the reconstructed ECG signal and lead reversal prediction results;

[0010] Based on the noisy ECG signal and the reconstructed ECG signal, obtain the difference ECG signal;

[0011] Perform a Fourier transform on the differential ECG signal to obtain the frequency range; determine the noise type based on the frequency range; set a sliding window for the differential ECG signal and calculate the interval error energy within the sliding window; determine the noise level based on the error energy.

[0012] Based on the lead reversal prediction results, obtain the lead reversal results.

[0013] Furthermore, training the ECG signal reconstruction model specifically includes:

[0014] Obtain raw electrocardiogram data and preprocess it to obtain training dataset and training labels;

[0015] The training dataset and training labels are input into the preset ECG signal reconstruction model. With the goal of minimizing signal reconstruction loss and lead reversal loss, the ECG signal reconstruction model is trained by an optimization algorithm and a decreasing learning rate method.

[0016] Preferably, preprocessing of the raw electrocardiogram data includes:

[0017] The raw ECG data were standardized, denoised, and augmented. Gaussian noise of varying degrees was added to the augmented ECG signal to construct ECG noise data.

[0018] Based on ECG noise data, and according to the amplitude relationship of ECG data before and after reversing the leads in the left and right upper limbs, lead reversal data is constructed to generate a noise ECG dataset as a training dataset.

[0019] Logical rows were added to the augmented ECG signals to serve as training labels.

[0020] Preferably, the signal reconstruction loss is expressed as:

[0021] loss noise =|ECG result -ECG label |

[0022] Among them, ECG result To train the output of the residual sum of squares of the reconstructed ECG signal, ECG label The sum of squared residuals for training output labels;

[0023] The reverse connection loss is expressed as:

[0024]

[0025] Among them, y i This is a label indicating whether the connection is positive or negative; 1 indicates a positive connection and 0 indicates a negative connection. i These are predicted values.

[0026] Furthermore, the ECG signal reconstruction model includes multiple multi-scale convolutional layers, splicing layers, normalization layers, a first multilayer perceptron, a channel attention mechanism, a second multilayer perceptron, an RNN network, and a fully connected layer connected in sequence.

[0027] Furthermore, the interval error energy is expressed as:

[0028]

[0029] Where n1 is the starting point of the nth sliding window, n2 is the ending point of the nth sliding window, and x[n] is the difference ECG signal within the nth sliding window.

[0030] Furthermore, the step of obtaining the lead reversal prediction result based on the lead reversal prediction result specifically involves: smoothing the lead reversal prediction result and calculating the mean; and determining whether the leads of the left and right upper limbs are reversed based on the mean and a preset lead reversal threshold.

[0031] Secondly, the present invention provides a dynamic electrocardiogram (ECG) signal quality control system based on ECG signal reconstruction;

[0032] A dynamic ECG signal quality control system based on ECG signal reconstruction includes:

[0033] The ECG signal reconstruction module is configured to: acquire the noisy ECG signal to be detected, input the noisy ECG signal into the trained ECG signal reconstruction model, and obtain the reconstructed ECG signal and lead reversal prediction results;

[0034] The noise classification module is configured to: obtain the difference ECG signal based on the noisy ECG signal and the reconstructed ECG signal; perform Fourier transform on the difference ECG signal to obtain the frequency range; determine the noise type based on the frequency range; set a sliding window for the difference ECG signal and calculate the error energy within the sliding window; and determine the noise level based on the error energy.

[0035] The lead reversal judgment module is configured to obtain the lead reversal result based on the lead reversal prediction result.

[0036] Thirdly, the present invention provides an electronic device;

[0037] An electronic device includes a memory and a processor, as well as computer instructions stored in the memory and running on the processor. When the processor executes the computer instructions, the computer instructions perform the steps of the above-described dynamic electrocardiogram (ECG) signal quality control method based on ECG signal reconstruction.

[0038] Fourthly, the present invention provides a computer-readable storage medium;

[0039] A computer-readable storage medium for storing computer instructions, which, when executed by a processor, complete the steps of the above-described dynamic electrocardiogram (ECG) signal quality control method based on ECG signal reconstruction.

[0040] Compared with the prior art, the beneficial effects of the present invention are:

[0041] 1. The technical solution provided by this invention allows for the addition of positive and negative connection logic rows to clean electrocardiogram (ECG) signals as label data during model training. This eliminates the need for manually labeled datasets and effectively extracts useful information from the collected ECG signals, restoring them to high-quality ECG signals. This improves the efficiency of ECG signal quality control and assessment and reduces labor costs.

[0042] 2. The technical solution provided by this invention classifies, rates, and determines lead reversal based on reconstructed electrocardiogram (ECG) signals, enabling accurate classification and level detection of ECG noise. Attached Figure Description

[0043] 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.

[0044] Figure 1 This is a flowchart provided for an embodiment of the present invention;

[0045] Figure 2 This is a network architecture diagram of the electrocardiogram signal reconstruction model provided in an embodiment of the present invention. Detailed Implementation

[0046] 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 in this invention have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0047] 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.

[0048] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.

[0049] Terminology Explanation:

[0050] ECG signal reconstruction refers to the process of using algorithms to compress, denoise, and enhance acquired ECG signals to restore them to a high-quality state. Commonly used ECG signal reconstruction algorithms include interpolation, filtering, compressed sensing, and machine learning. These algorithms can effectively extract useful information from acquired ECG signals and reconstruct them into high-quality ECG signals.

[0051] Example 1

[0052] Because different noise types overlap in frequency bands, the frequency specificity of different noise types decreases, leading to a decline in the accuracy of noise classification and assessment. Therefore, this invention provides a dynamic ECG signal quality control method based on ECG signal reconstruction. The method uses constructed noisy ECG signals and upper limb reverse-connection data as training data, and clean ECG signals with added positive and negative connection logic rows as label data. A neural network is used for model training and parameter optimization. The test data is input into the model to obtain the reconstructed ECG signal. The difference between the reconstructed ECG signal and the original ECG signal is used to calculate the Fourier transform, and the noise type is determined based on the frequency range. The difference between the original signal and the reconstructed signal is calculated, and a sliding window is used to calculate the cross-entropy. The noise level is then classified based on the cross-entropy.

[0053] Next, combined Figures 1-2 This embodiment provides a detailed description of a dynamic electrocardiogram (ECG) signal quality control method based on ECG signal reconstruction.

[0054] The dynamic electrocardiogram (ECG) signal quality control method based on ECG signal reconstruction includes the following steps:

[0055] S1. Obtain the noisy ECG signal to be detected, input the noisy ECG signal into the trained ECG signal reconstruction model, and obtain the reconstructed ECG signal and lead reversal prediction results.

[0056] For example, acquiring the noisy electrocardiogram (ECG) signal to be detected. test Its dimension is 12×len, which will include noisy ECG signals. test Input the trained ECG signal reconstruction model to obtain the reconstructed ECG signal. structed Its dimensions are 13×len, where the first 12 dimensions are the reconstructed ECG signal and the 13th dimension is the prediction result of lead reversal.

[0057] Existing ECG signal reconstruction methods are not effective for reconstructing the overall ECG signal. For example, interpolation methods usually assume the signal is smooth, which may not work well for abrupt changes or high-frequency components; filtering methods usually require preset filter parameters, and the selection of these parameters has a significant impact on the filtering effect, which in turn affects the reconstruction effect of the ECG signal; compressed sensing methods usually require certain sparsity or compressibility conditions, which may not work well for ECG signals that do not meet these conditions; and the performance of machine learning methods largely depends on the quantity and quality of training data. If the training data is insufficient or biased, the reconstruction effect of machine learning methods may be affected. Moreover, machine learning methods are usually computationally complex and require long training times and computational resources.

[0058] Therefore, in this embodiment, the existing basic network is spliced ​​and improved by changing the bidirectional RNN to a unidirectional RNN, reducing the number of convolutional network layers (convld), and reducing the number of channel attention modules (se_block) layers to simplify the model structure, shorten the number of network layers, and improve the model running efficiency.

[0059] Specifically, such as Figure 2 As shown, the ECG reconstruction model includes three layers of multi-scale convolutional layers, a splicing layer, a normalization layer, an activation layer, a first multilayer perceptron, two layers of channel attention modules, a second multilayer perceptron, an RNN layer, and a fully connected layer connected in sequence; among them, the three layers of multi-scale convolutional layers and the two layers of channel attention modules are set in parallel.

[0060] As one implementation method, before executing S1, the method further includes training an electrocardiogram signal reconstruction model, the specific process of which is as follows:

[0061] (1) Obtain raw electrocardiogram data and perform preprocessing to obtain training dataset and training labels.

[0062] For example, the specific process is as follows:

[0063] (101) The raw electrocardiogram data is processed to obtain a 12-lead electrocardiogram signal, which is represented as ECG. origin Its dimension is 12×len, where 12 is the number of ECG leads and len is the length of the ECG signal.

[0064] Specifically, the raw ECG data undergoes Z-score normalization, and out-of-band noise is filtered out using a Butterworth filter. The Z-score normalization process is expressed as follows:

[0065]

[0066] Where, x i =x1,x2,…,x n For the original ECG, y i =y1,y2,…,y n The signal after Z-score normalization. is the average value of the original ECG signal, and s is the standard deviation.

[0067] (102) Perform data augmentation on the electrocardiogram (ECG) signal. The data-augmented ECG signal is represented as ECG. enhance This is to improve the model's generalization ability and robustness.

[0068] Specifically, the lead order is randomly shuffled, 30% of the data is randomly selected to amplify or reduce the signal amplitude, 30% of the data leads are randomly selected for lead flipping, and 30% of the data is randomly selected for grid interpolation. The augmented ECG data is then processed. enhance The dimension is 12×len, where 12 is the number of ECG leads and len is the length of the ECG signal.

[0069] (103) ECG data after data augmentation enhance ECG noise data were constructed by adding different levels of Gaussian noise. noise .

[0070] Specifically, randomly select 70% augmented ECG data, randomly select 1-10 1-5 second segments, and randomly select one of the following operations:

[0071] (a) Set the fragment to 0; (b) Add Gaussian noise with a mean of 0 and a variance of 0.01; (c) Add Gaussian noise with a mean of 0 and a variance of 0.05; (d) Add Gaussian noise with a mean of 0 and a variance of 0.1.

[0072] (104) ECG noise data noise Based on this, and according to the amplitude relationship of ECG data before and after lead reversal in the left and right upper limbs, a noisy ECG dataset containing lead reversal data is constructed. train and in the data-enhanced ECG signal enhance Add a logical row, represented as ECG label .

[0073] Specifically, 30% of the ECG noise data were randomly selected for lead reversal calculation of leads I, II, III, aVR, aVL, and aVF. The relationship between the measured amplitude after reversal and the actual amplitude during normal connection is as follows:

[0074] Lead I: I 测 =-Ⅰ 实 Lead II: II 测 =Ⅲ 实 Ⅲ 测 =Ⅱ 实 .

[0075] The amplitudes of aVR, aVL, and aVF are calculated based on leads one through three:

[0076] aVR=-0.5×(Ⅰ+Ⅱ); aVL=Ⅰ-0.5×Ⅱ; aVF=Ⅱ-0.5×Ⅰ.

[0077] The constructed noisy ECG dataset containing reversed lead data from the left and right upper limbs is represented as ECG. train Its dimension is 12×len, where 12 is the number of ECG leads and len is the length of the ECG signal.

[0078] Meanwhile, in the data-enhanced ECG data enhance Add a logical row to the ECG to indicate whether the data is reversed, where 1 indicates reversed data and 0 indicates normal data. enhance Represented as ECG label Its dimensions are 13×len, where the first 12 dimensions are noise reconstruction labels and the 13th dimension is lead positive and negative labels.

[0079] The constructed noisy ECG dataset train As training data, the dataset consists of 70% positive connection noise data and 30% negative connection noise data, and ECG... labe1 As a training label, it indicates that a neural network was used for model training and optimization.

[0080] (2) Input the training dataset and training labels into the preset ECG signal reconstruction model. With the goal of minimizing signal reconstruction loss and lead reversal loss, train the ECG signal reconstruction model by using optimization algorithm and learning rate reduction method.

[0081] In this embodiment, the AdamW algorithm is used for optimization. AdamW is currently the most commonly used optimization algorithm, often used to process large datasets. Its principle is to reduce the gradient of model parameters by a certain ratio, thereby reducing computational load and improving training speed.

[0082] The learning rate is a hyperparameter in deep learning used to control the learning progress of the model. At the beginning of training, a larger learning rate is set, which results in a faster learning progress and a rapid decrease in the network's loss value. Then, as the number of iterations increases, the learning rate is gradually reduced to prevent missing the global optimum.

[0083] In this embodiment, the ECG signal reconstruction model is trained using a decreasing learning rate method. Specifically, when the evaluation index no longer changes (decreases or increases), the learning rate is reduced to 80% of the original value.

[0084] To improve model training efficiency, a batch size was set, allowing multiple datasets to be trained in a single run. Different ECG leads were trained as a separate batch, and then fused using an RNN network to reduce the correlation between leads. The model input parameter is ECG. train With model output parameters ECG structed All dimensions are (12×batch)×len, where 12 is the number of leads, batch is the number of training data sets in a single session, and len is the length of the ECG data.

[0085] For example, the signal reconstruction loss is expressed as:

[0086] loss noise =|ECG result -ECG label |

[0087] Among them, ECG result To train the output of the residual sum of squares of the reconstructed ECG signal, ECG label The sum of squared residuals for training output labels;

[0088] The reverse connection loss is expressed as:

[0089]

[0090] Among them, y i This is a label indicating whether the connection is positive or negative; 1 indicates a positive connection and 0 indicates a negative connection. i These are predicted values.

[0091] S2. Obtain the difference ECG signal based on the noisy ECG signal and the reconstructed ECG signal.

[0092] Specifically, for noisy ECG signals noise and the reconstructed ECG signal structed The first 12 dimensions of ECG structed(1-12) (Reconstructed ECG signal) Subtract the values ​​to obtain the difference ECG signal, i.e., ECG. differential =ECG structed(1-12) -ECG noise .

[0093] S3. Perform Fourier transform on the differential ECG signal to obtain the frequency range; determine the noise type based on the frequency range and the preset noise type frequency threshold.

[0094] Specifically, the formula for the Fourier transform is as follows:

[0095]

[0096] Where f(t) is ECG differential F(jω) is the frequency domain representation after Fourier transform.

[0097] If the frequency of F(jω) is around 50Hz, it is judged as power frequency interference; if the frequency is 30-300Hz, it is judged as electromyographic interference; and if the frequency is 0.15-0.3Hz, it is judged as baseline drift.

[0098] S4. Set a sliding window for the differential ECG signal and calculate the interval error energy within the sliding window; determine the noise level based on the error energy.

[0099] For example, based on the reconstructed electrocardiogram signal, a sliding window of size 10 seconds is set. smooth With a sliding interval w of 2s space Calculate the interval error energy, and based on the magnitude of the interval error energy, classify the noise into four levels from mild to severe:

[0100] The cross-entropy range is 1, which represents a clean signal with no noise; 2 represents slight noise that does not affect diagnosis; 3 represents relatively severe noise that can still be seen, and 4 represents severe noise that makes it impossible to identify the waveform and make a clinical diagnosis.

[0101] As one implementation method, the formula for calculating the interval error energy is:

[0102]

[0103] Where n1 and n2 are the starting points of the nth sliding window, and x[n] is the ECG value within the nth sliding window. differential .

[0104] S5. Based on the lead reversal prediction results, obtain the lead reversal results.

[0105] For example, based on the reconstructed electrocardiogram (ECG) signal structed The 13th dimension (prediction results of lead reversal) is smoothed by mean, and then the mean is calculated to determine whether the leads of the left and right upper limbs are reversed. For example, if the mean is greater than 0.5, it is judged that the left and right upper limbs are reversed; if the mean is less than 0.5, it is judged that the left and right upper limbs are not reversed.

[0106] Example 2

[0107] This embodiment discloses a dynamic electrocardiogram (ECG) signal quality control system based on ECG signal reconstruction, including:

[0108] The ECG signal reconstruction module is configured to: acquire the noisy ECG signal to be detected, input the noisy ECG signal into the trained ECG signal reconstruction model, and obtain the reconstructed ECG signal and lead reversal prediction results;

[0109] The noise classification module is configured to: obtain the difference ECG signal based on the noisy ECG signal and the reconstructed ECG signal; perform Fourier transform on the difference ECG signal to obtain the frequency range; determine the noise type based on the frequency range; set a sliding window for the difference ECG signal and calculate the error energy within the sliding window; and determine the noise level based on the error energy.

[0110] The lead reversal judgment module is configured to obtain the lead reversal result based on the lead reversal prediction result.

[0111] It should be noted that the ECG signal reconstruction module, noise classification module, and lead reversal judgment module described above correspond to the steps 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.

[0112] Example 3

[0113] Embodiment 3 of the present invention provides an electronic device, including a memory and a processor, as well as computer instructions stored in the memory and running on the processor. When the computer instructions are executed by the processor, they complete the steps of the above-mentioned dynamic electrocardiogram signal quality control method based on electrocardiogram signal reconstruction.

[0114] Example 4

[0115] Embodiment 4 of the present invention provides a computer-readable storage medium for storing computer instructions, which, when executed by a processor, complete the steps of the above-described dynamic electrocardiogram signal quality control method based on electrocardiogram signal reconstruction.

[0116] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0117] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0118] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment, whereby a series of operational steps are performed to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0119] 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.

[0120] 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 dynamic electrocardiogram (ECG) signal quality control method based on ECG signal reconstruction, characterized in that, include: Acquire the noisy ECG signal to be detected, input the noisy ECG signal into the trained ECG signal reconstruction model, and obtain the reconstructed ECG signal and lead reversal prediction results; Based on the noisy ECG signal and the reconstructed ECG signal, the difference ECG signal is obtained; Perform a Fourier transform on the differential ECG signal to obtain the frequency range; determine the noise type based on the frequency range; set a sliding window for the differential ECG signal and calculate the interval error energy within the sliding window; determine the noise level based on the error energy. The interval error energy is expressed as: , in, Let n be the starting point of the nth sliding window. Let n be the endpoint of the nth sliding window. The difference in ECG signal within the nth sliding window; Based on the lead reversal prediction results, obtain the lead reversal results.

2. The dynamic electrocardiogram (ECG) signal quality control method based on ECG signal reconstruction as described in claim 1, characterized in that, Training the ECG signal reconstruction model specifically includes: Obtain raw electrocardiogram data and perform preprocessing to obtain training dataset and training labels; The training dataset and training labels are input into the preset ECG signal reconstruction model. With the goal of minimizing signal reconstruction loss and lead reversal loss, the ECG signal reconstruction model is trained by an optimization algorithm and a decreasing learning rate method.

3. The dynamic electrocardiogram (ECG) signal quality control method based on ECG signal reconstruction as described in claim 2, characterized in that, Preprocessing of raw electrocardiogram data includes: The raw ECG data were standardized, denoised, and augmented. Gaussian noise of varying degrees was added to the augmented ECG signal to construct ECG noise data. Based on ECG noise data, and according to the amplitude relationship of ECG data before and after reversing the leads in the left and right upper limbs, lead reversal data is constructed to generate a noise ECG dataset as a training dataset. Logical rows were added to the augmented ECG signals to serve as training labels.

4. The dynamic electrocardiogram (ECG) signal quality control method based on ECG signal reconstruction as described in claim 2, characterized in that, The signal reconstruction loss is expressed as: in, To train the output of the residual sum of squares of the reconstructed ECG signal, The sum of squared residuals for training output labels; The reverse connection loss is expressed as: in, This is a label indicating whether the connection is positive or negative; a positive connection is 1, and a negative connection is 0. These are predicted values.

5. The dynamic electrocardiogram (ECG) signal quality control method based on ECG signal reconstruction as described in claim 1, characterized in that, The ECG signal reconstruction model includes multiple multi-scale convolutional layers, splicing layers, normalization layers, a first multilayer perceptron, a channel attention mechanism, a second multilayer perceptron, an RNN network, and a fully connected layer connected in sequence.

6. The dynamic electrocardiogram (ECG) signal quality control method based on ECG signal reconstruction as described in claim 1, characterized in that, The specific steps for obtaining the lead reversal prediction result are as follows: smooth the lead reversal prediction result and calculate the mean value; based on the mean value and the preset lead reversal threshold, determine whether the leads of the left and right upper limbs are reversed.

7. A dynamic electrocardiogram (ECG) signal quality control system based on ECG signal reconstruction, characterized in that, include: The ECG signal reconstruction module is configured to: acquire the noisy ECG signal to be detected, input the noisy ECG signal into the trained ECG signal reconstruction model, and obtain the reconstructed ECG signal and lead reversal prediction results; The noise classification module is configured to: obtain the difference ECG signal based on the noisy ECG signal and the reconstructed ECG signal; perform Fourier transform on the difference ECG signal to obtain the frequency range; determine the noise type based on the frequency range; set a sliding window for the difference ECG signal and calculate the error energy within the sliding window; and determine the noise level based on the error energy. The interval error energy is represented as: , in, Let n be the starting point of the nth sliding window. Let n be the endpoint of the nth sliding window. The difference in ECG signal within the nth sliding window; The lead reversal judgment module is configured to obtain the lead reversal result based on the lead reversal prediction result.

8. An electronic device, characterized in that, It includes a memory and a processor, as well as computer instructions stored in the memory and running on the processor, which, when executed by the processor, perform the method according to any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, Used to store computer instructions, which, when executed by a processor, perform the method described in any one of claims 1-6.