ECG signal anomaly detection method
By combining Fourier filters and Dobesi wavelet filters to preprocess ECG signals, and using LSTM-TA units and SBA-LSTM2GAN models for anomaly detection, the problem of poor noise processing of ECG signals is solved, and the accuracy of cardiac examinations and the reliability of anomaly detection are improved.
Patent Information
- Application Number
- CN202510738717.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-04
- Publication Date
- 2025-09-19
AI Technical Summary
The existing ECG signal noise processing is not effective, resulting in low accuracy of heart examinations.
Fourier filter and Dobesi wavelet filter are combined to preprocess ECG signals, LSTM-TA unit is used to analyze signal fluctuation trend, SBA-LSTM2GAN model is combined for anomaly detection, and abnormal data are interpreted by fusing multi-association classifiers.
It effectively eliminates noise and interference in ECG signals, improves the accuracy and reliability of anomaly detection, reduces false alarm rates, and can better identify and interpret abnormal ECG activity.
Smart Images

Figure CN120661152A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ECG signal processing, and in particular to an abnormality detection method for ECG signals. Background Art
[0002] ECG signals are typical pseudo-periodic health time series data. To record ECG signals, several electrodes are placed at fixed locations on the patient's body. Doctors typically use a 12-lead electrocardiograph (ECG) machine or a Holter monitor to examine the patient. After a period of measurement, a 12-dimensional time series is generated. An ECG pseudo-period consists of the P, QPS, and T waves, which depict cardiac activity such as atrial and ventricular contraction and relaxation. Therefore, ECG signals are characterized by periodicity, high dimensionality, and individual variability.
[0003] ECG signals are of great significance in monitoring heart health. Abnormal heart rhythm or morphology can reflect different diseases. For example, abnormal P waves can indicate dextrocardia, atrial enlargement, intra-atrial block and other diseases; abnormal QRS waves can indicate ventricular hypertrophy, electrical axis deviation, intraventricular block and other diseases; abnormal T waves can often be observed in conjunction with ST segment abnormalities, which can indicate diseases such as myocardial ischemia and myocardial infarction; shortened PR intervals may indicate pre-excitation syndrome, while prolonged PR intervals can indicate atrioventricular block; in addition to these abnormal changes in waveform, band and interval, F waves (sawtooth waves) and f waves (fibrillation waves) may also appear in atrial flutter and atrial fibrillation, respectively. In addition, many ECG diseases contain both rhythm abnormalities and morphological abnormalities. For example, when ventricular flutter occurs, the P waves in each lead disappear, and continuous, regular, wide and deformed QRS complexes appear, accompanied by tachycardia; ventricular fibrillation has no recognizable QRS waves, only high-frequency ventricular fibrillation waves with varying waveforms, amplitudes and spacing. At this time, the electrocardiogram also has no obvious periodicity.
[0004] However, in actual signal acquisition, the original collected ECG signal often contains interference and noise. The noise and interference in ECG signals are mainly caused by human physiological activities, environmental factors, and equipment technical problems. The specific causes can be divided into the following categories:
[0005] (1) Physiological noise
[0006] Myoelectric interference: caused by muscle contraction or body movement, with a wide frequency range, irregular waveform and amplitude up to 10% of the ECG signal.
[0007] Respiratory disturbances: changes in electrical potential caused by chest movement.
[0008] Baseline drift: This can cause the signal baseline to drift slowly due to respiratory movement or poor contact between the electrode and the skin. The amplitude can reach 15% of the ECG peak-to-peak value. In severe cases, it can distort the ST and PR segments, affecting the diagnosis of diseases such as myocardial infarction.
[0009] (2) Environmental and equipment interference
[0010] Power frequency interference: Originated from the electromagnetic coupling between the power line and the human body, it appears as sinusoidal periodic noise with an amplitude of up to 50% of the ECG signal.
[0011] Skin impedance changes: Dry skin or loose electrodes can cause impedance fluctuations, resulting in momentary baseline drift.
[0012] The essence of ECG signal noise is the superposition of human electrophysiological signals and internal and external interference. Preprocessing the noise in ECG signals can improve signal quality and enhance the accuracy of abnormality detection. Summary of the Invention
[0013] In order to solve the problem that the existing ECG signal noise processing is poor and causes low accuracy of heart examination, the present invention proposes an ECG signal abnormality detection method.
[0014] In order to solve the above technical problems, the present invention provides the following technical solution: a method for detecting abnormalities in ECG signals, comprising the following steps:
[0015] Step 1: Processing high-frequency noise and baseline drift in ECG signals
[0016] The original signal is filtered through a Fourier filter to extract the low-frequency steady-state component and a Dobesi wavelet filter to extract the high-frequency detail component. The low-frequency steady-state component ratio and the high-frequency detail component variance are calculated respectively, and the adaptive weighting module is used to fuse the low-frequency steady-state component ratio and the high-frequency detail component variance.
[0017] Step 2: Segment the ECG signal pseudo-cycle
[0018] The ECG signal was filtered using a Savitzky-Golay filter with a step size of 50 to obtain a highly fitted baseline. The baseline was subtracted from the original signal, retaining only the high-frequency signal of the R wave. The peak was highlighted using a square filter. Extreme value screening was performed on points above a certain height to find the R wave position of the ECG signal. Based on the R wave time located in the ECG signal, 40% of the distance between the two R peaks was taken forward and 60% of the distance between the two R peaks was taken backward to form a pseudo-cycle.
[0019] Step 3: Detect anomalies in the time series data of the ECG signal
[0020] The LSTM-TA unit is used to analyze the signal fluctuation trend within each pseudo-cycle, and then the SBA-LSTM2GAN model is used to perform model training and anomaly detection on the signal. After anomaly detection is completed, the fusion multi-association classifier is used to interpret the abnormal data.
[0021] In a preferred embodiment, the calculation formula for the proportion of the low-frequency steady-state component in step 1 is:
[0022]
[0023] The calculation formula of the high-frequency detail component variance is:
[0024]
[0025] The calculation formula for the fusion of the low-frequency steady-state component ratio and the high-frequency detail component variance is:
[0026]
[0027] β=1-α
[0028] Where α is the wavelet weight and β is the Fourier weight;
[0029] Processing using min-max normalization and z-score standardization
[0030]
[0031] In a preferred embodiment, when performing extreme value screening in step 2, it is determined whether there are other extreme value points greater than the extreme value in the minimum neighborhood of an extreme value. If there are other extreme value points greater than the extreme value, the larger one of the two is taken as the true extreme value.
[0032] In a preferred embodiment, when the LSTM-TA unit in step three analyzes the signal fluctuation trend within each pseudo-cycle, a stacked bidirectional LSTM model is used to capture the long-term fluctuation trend of the time series data, and a trend attention mechanism is embedded in the stacked bidirectional LSTM model.
[0033] In a preferred embodiment, the trend attention mechanism is used to accept the input X t The surrounding time series data R t , in order to unify R t The input format is, we will intercept X t The nearby L samples are R t , the calculation formula is as follows:
[0034] T t =σ(W xt X t +σ(W rt *Rt )+b t )
[0035] According to the current T t Adjust the cell output and cell state
[0036]
[0037] H t =tanh(T t ⊙C t ).
[0038] In a preferred embodiment, the SBA-LSTM2GAN model is divided into a model training phase and an anomaly detection phase. The task of the model training phase is to learn the distribution of data, and the task of the anomaly detection phase is to identify whether the data is abnormal data by calculating the anomaly score of the data.
[0039] In a preferred embodiment, the model training stage adopts a hybrid model of a variational autoencoder and a generative adversarial network, which includes an encoder, a decoder, and a discriminator. A latent space is obtained by the encoder. The core of the encoder is to generate the mean μ and logarithmic variance σ of the latent space. The calculation formula is as follows:
[0040] μ=CW cμ +b μ
[0041] logσ 2 =CW cσ +bσ
[0042] By reparameterization techniques, the mean and variance are combined to generate the latent vector Z
[0043] Z=u+εσ
[0044] The encoder approximates a prior distribution q(z|x) and encodes a data sample x into z in the latent space, while sampling a normal distribution from p(z) to N(0, 1) Then use the encoder pair Reconstruct and get
[0045] In a preferred embodiment, the discriminator is followed by a fully connected layer with a sigmoid activation function, which converts x, As input, the discriminator will predict the score of x close to 1. The rating prediction is close to 0
[0046] z~Enc(x)=q(z|x)
[0047]
[0048] The loss function of the three parts is calculated as follows:
[0049] L enc =KL(q(z|x)||p(z))-E q(z|x) [log(p(Dis(x)|z))]
[0050]
[0051] Among them L re =-E q(z|x) [log(p(Dis(x)|z))] is a regularization term that can effectively alleviate the risk of model collapse.
[0052] In a preferred embodiment, the anomaly detection stage uses the SPOT algorithm to continuously monitor the anomaly score in the data stream, and for anomalies exceeding a preset threshold thr f The system will directly determine the abnormal data as abnormal data and add it to the abnormal data set. For abnormal scores greater than thr but less than thr f For samples, the SPOT algorithm will recalculate its anomaly score, which is calculated as follows:
[0053]
[0054] In a preferred embodiment, the fusion of multiple association classifiers in step 3 includes a rule extraction stage and a classifier construction stage. The rule extraction stage uses different features of the instance as matching conditions and the category label of the instance as a discriminant to extract rules. The rule set with the highest accuracy and coverage for classifying data instances is selected from multiple rule sets to construct a rule classifier. Each rule is set with support and confidence indicators when extracting, and thresholds are set for the two indicators respectively. The calculation method of support and confidence is as follows:
[0055]
[0056] The rules in the rule set are sorted from large to small according to confidence and classification ability, and an associated classifier is constructed. The fuzzy weighted matching algorithm is used to interpret the abnormal data. The fuzzy weighted matching algorithm is as follows:
[0057]
[0058] Scope i Indicates the width of the value range of this feature, rule i Indicates the value of the i-th feature of the classification rule, ins i Represents the value of the i-th feature of the data instance.
[0059] Compared with the prior art, the present invention has the following beneficial effects:
[0060] 1. The present invention uses a combination of Fourier filter and Dobesi wavelet filter to preprocess ECG signals, which can eliminate the defects of traditional Fourier filter or Dobesi wavelet filter when used alone, and has a better preprocessing effect on ECG signals;
[0061] 2. This invention uses LSTM-TA units, which can better eliminate unimportant information in the current input through the trend gate attention mechanism, giving more attention to those important information. In addition, it adopts a hybrid model of variational autoencoders and generative adversarial networks, combining the advantages of VAE and GAN, to solve the limitations of a single model. The fuzzy generation problem of VAE is solved through the adversarial training of GAN, and the generated images are clearer and richer in details. The explicit distribution learning of VAE reduces the risk of model collapse of GAN. The SPOT method is used for anomaly detection. The adaptive mechanism allows the algorithm to reduce the false alarm rate while maintaining high sensitivity, so that the SPOT algorithm can better distinguish between fluctuations and true abnormal behavior, thereby improving the accuracy of anomaly detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0063] Figure 1 This is a schematic diagram of the structure of the traditional LSTM;
[0064] Figure 2 Schematic diagram of the structure of the LSTM-TA of the present invention. DETAILED DESCRIPTION
[0065] The following specific embodiments illustrate the implementation of the present invention, clearly and completely describing the technical solutions in the embodiments of the present invention. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0066] Please refer to Figure 2 As shown, the present invention provides an abnormality detection method for ECG signals, comprising the following steps:
[0067] Step 1: Processing high-frequency noise and baseline drift in ECG signals
[0068] The original signal is filtered through Fourier to extract the low-frequency steady-state component and the Dobesi wavelet filter to extract the high-frequency detail component. Then, the proportion of the low-frequency steady-state component and the variance of the high-frequency detail component are calculated respectively, and the adaptive weighting module is used to fuse the proportion of the low-frequency steady-state component and the variance of the high-frequency detail component.
[0069] The typical spectrum of a QRS complex is centered around 10-25 Hz, with components below 40 Hz. P and T waves occur at even lower frequencies: P wave components below 20 Hz, and T wave components below 10 Hz. Baseline wander is a low-frequency (<0.5 Hz) oscillation caused by the patient's respiratory motion. This oscillation is unrelated to the heartbeat morphology and does not provide meaningful information. Design a bandpass filter with a passband frequency range of [0.5, 40] Hz to remove this wander and any high-frequency noise. Removing these components improves LSTM training because the network does not learn irrelevant features.
[0070] The signal is further processed using an adaptive filter module. The filtering operation can remove some useless components in the signal. Different filters can reflect different features in the original signal. Some filters can accurately filter out interference and noise, but some filters may remove important waveforms. The Fourier filter is based on the Fourier transform. By converting the signal from the time domain to the frequency domain, specific frequency components are adjusted in the frequency domain. It has the advantages of high computational efficiency and is suitable for steady-state signal analysis. It can be used to filter out baseline drift and electromyographic interference in ECG signals, but it is difficult to process non-stationary time series. The Dobesi wavelet filter is an orthogonal compactly supported wavelet that realizes multi-resolution analysis through discrete wavelet transform. It is suitable for non-stationary signals and is better in time-frequency locality and noise resistance, but it cannot maintain the main frequency and shape of the original data. The present invention is based on an adaptive variable filter of Fourier filter and Dobesi wavelet filter. Specifically, the original signal will be respectively extracted by Fourier transform to extract low-frequency steady-state components and Dobesi wavelet filter to extract high-frequency detail components. The calculation formula for the proportion of low-frequency steady-state components is:
[0071]
[0072] The calculation formula of the high-frequency detail component variance is:
[0073]
[0074] The calculation formula for the fusion of the low-frequency steady-state component ratio and the high-frequency detail component variance is:
[0075]
[0076] Where α is the wavelet weight and β is the Fourier weight;
[0077] Processing using min-max normalization and z-score standardization
[0078]
[0079] Step 2: Segment the ECG signal pseudo-cycle
[0080] The ECG signal is filtered using a Savitzky-Golay filter with a step size of 50 to obtain a highly fitted baseline. The baseline is subtracted from the original signal to eliminate other low-frequency fluctuations including P waves and T waves, retaining only the high-frequency signal of the R wave. The peak is highlighted using the square filter method, and extreme value screening is performed on points above a certain height to find the R wave position of the ECG signal. According to the R wave time located in the ECG signal, 40% of the distance between the two R peaks is taken forward, and 60% of the distance between the two R peaks is taken backward as a pseudo-cycle.
[0081] When performing extreme value screening, determine whether there are other extreme points greater than this point in the minimum neighborhood of an extreme value. If so, the larger of the two is taken as the true extreme value.
[0082] Step 3: Detect anomalies in the time series data of the ECG signal
[0083] The LSTM-TA unit is used to analyze the signal fluctuation trend within each pseudo-cycle, and then the SBA-LSTM2GAN model is used to perform model training and anomaly detection on the signal. After anomaly detection is completed, the fusion multi-association classifier is used to interpret the abnormal data.
[0084] LSTM is a powerful improved model that solves the problem of vanishing gradients in RNN and is suitable for processing longer time series data. The basic computing unit of LSTM is the LSTM cell, and the state and output of the cell are jointly controlled by three gate logics in the cell. The three gates are the forget gate, the input gate, and the output gate. The forget gate is used to decide which useless information in the cell state at the previous moment will be discarded, the input gate is used to decide which information in the current input will be added to the current state of the cell, and the output gate is used to decide which useful information will be used as the output of the cell. Thanks to the mutual cooperation of the three gate logics, the useful information contained in the input of the past moment can be retained and passed on to the subsequent longer time range in sequence, which makes LSTM suitable for capturing the long-term fluctuation trend of time series data. The structure of LSTM cells is as follows: Figure 1 shown.
[0085] F t =σ(x t W xf +H t-1 W hf +b f )
[0086] I t =σ(X t W xi +H t-1 W hi +b i )
[0087] O t =σ(X t W xo +H t-1 W ho +b o )
[0088]
[0089] H t =O t ⊙tanh(C t )
[0090] In order to better capture the important fluctuation information in each cycle, a trend attention mechanism is also embedded in LSTM. The LSTM-TA structure is as follows Figure 2 shown.
[0091] A trend gate is added in addition to the forget gate, input gate, and output gate. The trend gate is used to accept the input X t The surrounding time series data R t , in order to unify R t The input format is, we will intercept X t The nearby L samples are R t , the calculation formula is as follows:
[0092] T t =σ(W xt X t +σ(W rt *R t )+b t )
[0093] According to the current T t Adjust the cell output and cell state
[0094]
[0095] H t =tnah(T t ⊙C t ).
[0096] By designing the LSTM-TA unit above, we can better eliminate unimportant information in the current input through the trend gate attention mechanism and pay more attention to the important information.
[0097] Generative Adversarial Networks (GANs) are a deep learning model based on game theory. They learn data distributions and generate realistic samples through adversarial training between a generator and a discriminator. The generator generates fake data from random noise, while the discriminator determines whether the input data is real or forged. Through the continuous game between the two, the generator can eventually produce data that is indistinguishable from the real thing.
[0098] Variational Auto Encoder (VAE) is a generative model based on deep learning. The core idea is to learn the potential distribution of data through probabilistic modeling, and combine the encoder-decoder architecture to achieve data reconstruction and generation. VAE introduces randomness in the latent space and maps the data to a probability distribution rather than a fixed value, thereby supporting the sampling and interpolation of continuous latent space. VAE consists of two parts: the encoder and the decoder. The encoder is responsible for compressing the input data into a Gaussian distribution with latent space parameters μ and σ, and the decoder is responsible for sampling z from the latent distribution and reconstructing it into the original data space.
[0099] The model training phase of the present invention adopts a hybrid model of variational autoencoder and generative adversarial network, which includes an encoder, a decoder and a discriminator. The encoder is responsible for mapping the input data to the probability distribution of the latent space, the decoder is responsible for sampling and reconstructing the data from the latent space, and at the same time assumes the role of the GAN generator to generate realistic samples. The discriminator is responsible for distinguishing between real data and generated data, and providing adversarial signals to improve the generation quality. By combining the advantages of VAE and GAN, the limitations of a single model are solved. The fuzzy generation problem of VAE is solved through the adversarial training link of GAN, and the generated images are clearer and richer in details, while the explicit distribution learning of VAE reduces the risk of model collapse of GAN.
[0100] A latent space is obtained through the encoder. The core of the encoder is to generate the mean μ and logarithmic variance σ of the latent space. The calculation formula is as follows:
[0101] μ=CW cμ +b μ
[0102] logσ 2 =CW cσ +bσ
[0103] By reparameterization techniques, the mean and variance are combined to generate the latent vector Z
[0104] Z=u+εσ
[0105] The encoder approximates a prior distribution q(z|x) and encodes a data sample x into z in the latent space, while sampling a normal distribution from p(z) to N(0, 1) Then use the encoder pair Reconstruct and get
[0106] In a preferred embodiment, the discriminator is followed by a fully connected layer with a sigmoid activation function, which converts x, As input, the discriminator will predict the score of x close to 1. The rating prediction is close to 0
[0107] z~Enc(x)=q(z|x)
[0108]
[0109] The loss function of the three parts is calculated as follows:
[0110] L enc =KL(q(z|x)||p(z))-E q(z|x) [log(p(Dis(x)|z))]
[0111]
[0112] Among them L re =-E q(z|x) [log(p(Dis(x)|z))] is a regularization term that can effectively alleviate the risk of model collapse. The overall algorithm flow is as follows:
[0113]
[0114] The SPOT algorithm is used in the anomaly detection phase to continuously monitor the anomaly score in the data stream. The SPOT algorithm is a time series anomaly detection model based on churn data. It uses extreme value optimization theory to dynamically adjust the anomaly detection threshold to adapt to changes in the data stream. During the detection process, for anomalies exceeding the preset threshold thr f The system will directly determine the abnormal data as abnormal data and add it to the abnormal data set. For abnormal scores greater than thr but less than thr f For samples, the SPOT algorithm will recalculate its anomaly score, which is calculated as follows:
[0115]
[0116] This is the key to maintaining efficiency and accuracy when processing complex data. The adaptive mechanism allows the algorithm to reduce the false alarm rate while maintaining high sensitivity, so that the SPOT algorithm can better distinguish between fluctuations and true abnormal behavior, thereby improving the accuracy of anomaly detection. The specific algorithm steps are as follows:
[0117]
[0118] In ECG anomaly detection, we need not only to know whether an anomaly has occurred, but also to understand the cause of the anomaly. To do this, we need to locate the anomaly and, if possible, explain the cause.
[0119] Use fusion multi-association classifier to explain the anomaly. The algorithm is based on the Apriori algorithm, which is a classic association rule mining algorithm with the characteristics of simple calculation process, easy to understand, and low data requirements. The construction of the association classifier is mainly divided into two stages: rule extraction stage and classifier construction stage. Among them, the main work of the rule extraction stage is to use the different features of the instance as matching conditions and the category label of the instance as the discriminant to extract the rule. Specifically, first, the binary<feature,score> Recorded as an item. If the instance has a total of K features (including category features), then we record the binary group with K different items as a rule, where the rule must contain the category label. We call multiple rules a rule set. We can get multiple rule sets, and select the rule set with the highest accuracy and coverage for classifying data instances from multiple rule sets to construct a rule classifier.
[0120] Each rule is extracted with support and confidence indicators, and thresholds are set for each indicator. When both the support and confidence of a rule exceed the threshold, we consider that the rule can classify the data instance well and is reliable. Specifically, the support and confidence are calculated as follows:
[0121]
[0122] Support indicates the proportion of instances of a rule in the data rule set, while confidence indicates the credibility of the labels in the rule set. When extracting rules, we first extract the rule with |rule| = 2, indicating that the rule contains only two labels. We then calculate the rules that meet the requirements and extract the rule with |rule| = 3. This continues, ultimately resulting in a rule set with |rule| = K.
[0123] The rules in the rule set are sorted from large to small according to confidence and classification ability, and an association classifier is constructed. In order to solve the problems of no rule matching and rule conflict, a fuzzy weighted matching algorithm is designed to make the explanation more comprehensive. The fuzzy weighted matching algorithm is as follows:
[0124]
[0125] Scope i Indicates the width of the value range of this feature, rule i Indicates the value of the i-th feature of the classification rule, ins i Represents the value of the i-th feature of the data instance.
[0126] When designing the weights, we believe that the better an item distinguishes the category, the greater the weight it should have. The weights are calculated as follows:
[0127]
[0128] The final category features are calculated based on the weight score and similarity score as the cause explanation of the anomaly.
[0129] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art will be able to modify the technical solutions described in the aforementioned embodiments or substitute equivalents for some of the technical features. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.
Claims
1. A method for detecting abnormalities in ECG signals, characterized in that: The following steps are involved: Step 1: Processing high-frequency noise and baseline drift in ECG signals The original signal is filtered through a Fourier filter to extract the low-frequency steady-state component and a Dobesi wavelet filter to extract the high-frequency detail component. The low-frequency steady-state component ratio and the high-frequency detail component variance are calculated respectively, and the adaptive weighting module is used to fuse the low-frequency steady-state component ratio and the high-frequency detail component variance. Step 2: Segment the ECG signal pseudo-cycle The ECG signal was filtered using a Savitzky-Golay filter with a step size of 50 to obtain a highly fitted baseline. The baseline was subtracted from the original signal, retaining only the high-frequency signal of the R wave. The peak was highlighted using a square filter. Extreme value screening was performed on points above a certain height to find the R wave position of the ECG signal. Based on the R wave time located in the ECG signal, 40% of the distance between the two R peaks was taken forward and 60% of the distance between the two R peaks was taken backward to form a pseudo-cycle. Step 3: Detect anomalies in the time series data of the ECG signal The LSTM-TA unit is used to analyze the signal fluctuation trend within each pseudo-cycle, and then the SBA-LSTM2GAN model is used to perform model training and anomaly detection on the signal. After anomaly detection is completed, the fusion multi-association classifier is used to interpret the abnormal data.
2. The ECG signal abnormality detection method according to claim 1, wherein: The calculation formula for the proportion of the low-frequency steady-state component in step 1 is: The calculation formula of the high-frequency detail component variance is: The calculation formula for the fusion of the low-frequency steady-state component ratio and the high-frequency detail component variance is: β=1-α Where α is the wavelet weight and β is the Fourier weight; Processing using min-max normalization and z-score standardization 3. The ECG signal abnormality detection method according to claim 1, wherein: When performing extreme value screening in step 2, it is determined whether there are other extreme value points greater than the point in the minimum neighborhood of an extreme value. If so, the larger of the two is taken as the true extreme value.
4. The ECG signal abnormality detection method according to claim 1, wherein: In the step three, the LSTM-TA unit uses a stacked bidirectional LSTM model to capture the long-term fluctuation trend of time series data when analyzing the signal fluctuation trend within each pseudo-cycle, and embeds a trend attention mechanism in the stacked bidirectional LSTM model.
5. The ECG signal abnormality detection method according to claim 4, characterized in that: The trend attention mechanism is used to accept the input X t The surrounding time series data R t , in order to unify R t The input format is X. t The nearby L samples are R t , the calculation formula is as follows: T t =σ(W xt X t +σ(W rt *R t )+b t ) According to the current T t Adjust the cell output and cell state H t =tanh(T t ⊙C t ) 6. The ECG signal abnormality detection method according to claim 5, characterized in that: The SBA-LSTM2GAN model is divided into a model training phase and an anomaly detection phase. The task of the model training phase is to learn the distribution of data, and the task of the anomaly detection phase is to identify whether the data is abnormal data by calculating the anomaly score of the data.
7. The ECG signal abnormality detection method according to claim 6, characterized in that: The model training phase adopts a hybrid model of variational autoencoder and generative adversarial network, which includes an encoder, a decoder and a discriminator. A latent space is obtained through the encoder. The core of the encoder is to generate the mean μ and logarithmic variance σ of the latent space. The calculation formula is as follows: μ=CW cμ +b μ logσ 2 =CW cσ +bσ By reparameterization techniques, the mean and variance are combined to generate the latent vector Z Z=u+εσ The encoder approximates a prior distribution q(z|x) and encodes a data sample x into z in the latent space, while sampling a normal distribution from p(z) to N(0,1) Then use the encoder pair Reconstruct and get 8. The ECG signal abnormality detection method according to claim 7, characterized in that: The discriminator is followed by a fully connected layer with a sigmoid activation function, which converts x, The discriminator will predict the score of x to be close to 1, The rating prediction is close to 0 z~Enc(x)=q(z|x) The loss function of the three parts is calculated as follows: L enc =KL(q(z|x)||p(z)-E q(z|x) [log(p(Dis(x)|z))] Among them L re =-E q(z|x) [log(p(Dis(x)|z))] is a regularization term that can effectively alleviate the risk of model collapse.
9. The ECG signal abnormality detection method according to claim 6, characterized in that: The anomaly detection stage uses the SPOT algorithm to continuously monitor the anomaly score in the data stream and f The system will directly determine the abnormal data as abnormal data and add it to the abnormal data set. r But less than thr f For samples, the SPOT algorithm will recalculate its anomaly score, which is calculated as follows:
10. The hierarchical time series prediction system based on tree structure coding according to claim 1, characterized in that: The fusion of multiple association classifiers in step 3 includes a rule extraction stage and a classifier construction stage. The rule extraction stage uses different features of the instance as matching conditions and the category label of the instance as a discriminant to extract rules. The rule set with the highest accuracy and coverage for classifying data instances is selected from multiple rule sets to construct a rule classifier. Each rule is set with support and confidence indicators when extracting, and thresholds are set for the two indicators respectively. The calculation method of support and confidence is as follows: The rules in the rule set are sorted from large to small according to confidence and classification ability, and an associated classifier is constructed. The fuzzy weighted matching algorithm is used to interpret the abnormal data. The fuzzy weighted matching algorithm is as follows: Scope i Indicates the width of the value range of this feature, rule i Indicates the value of the i-th feature of the classification rule, ins i Represents the value of the i-th feature of the data instance.