Atrial fibrillation abnormality detection method and system based on multimodal time-frequency pseudo-abnormality
By generating pseudo-abnormal time-frequency signals of atrial fibrillation and combining them with a time-frequency encoder to optimize the decision boundary, the problem of lack of multimodal features in ECG signal detection is solved, efficient and accurate atrial fibrillation abnormality detection is achieved, and dependence on real data is reduced.
Patent Information
- Application Number
- CN202411636350.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2044-11-15
AI Technical Summary
Existing technologies lack multimodal feature extraction across different time series representation domains in ECG signal anomaly detection, and rely on real atrial fibrillation data to train models, resulting in high computing resources and time costs, making it difficult to construct an effective decision boundary.
By generating atrial fibrillation pseudo-abnormal time and frequency domain ECG signals, combining the time and frequency domain information, using time and frequency domain encoders to extract features, and mapping them to the hypersphere space through a predictor, the decision boundary is optimized to construct a multimodal time-frequency pseudo-abnormality detection method.
It improves the accuracy and efficiency of atrial fibrillation anomaly detection, expands the data set without the need for real atrial fibrillation data, reduces computing resources and time costs, and provides more comprehensive anomaly detection capabilities.
Smart Images

Figure CN119700133B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of electrocardiogram (ECG) signal detection, and in particular relates to a method and system for detecting atrial fibrillation anomalies based on multimodal time-frequency pseudo-anomalies. Background Art
[0002] Atrial fibrillation is a common and dangerous heart rhythm disorder that can lead to serious health problems such as ischemic stroke and heart failure. Electrocardiogram (ECG) signals are physiological signals used to monitor changes in the heart's electrical activity and are commonly used to diagnose cardiovascular diseases such as atrial fibrillation. With the growth of the aging population, the prevalence of atrial fibrillation is also increasing. How to accurately and quickly detect atrial fibrillation using ECG is becoming increasingly important.
[0003] Atrial fibrillation anomaly detection aims to identify atrial fibrillation (AF) ECG signals that differ significantly from non-AF ECG signals from large amounts of ECG data, assisting physicians in diagnosing AF and playing a crucial role in improving the accuracy and efficiency of medical diagnosis. To date, researchers have conducted extensive research on anomaly detection. Autoencoders aim to learn low-dimensional feature representations of samples, use these features to reconstruct the original data samples, and identify anomalies based on reconstruction errors. DeepSVDD models normal features as hyperspheres and separates normal and abnormal samples by learning the sphere's boundary. Building on DeepSVDD, Huang et al. introduced pseudo-anomaly samples during training to modify the decision boundary, resulting in a more discriminative hypersphere and achieving more accurate anomaly detection. Chen et al. utilized recursive complex networks and underlying features extracted from coherent spectra for AF anomaly detection. Choi et al. employed an autoencoder based on a long short-term memory network to learn the reconstruction of normal ECG signals and used the reconstruction error to detect AF.
[0004] Although the above methods have achieved considerable success, they rarely consider multimodal features across different time series representation domains and lack appropriate pseudo-abnormal samples to optimize decision boundaries. Faced with ECG signals with complex temporal and distributional characteristics, considering only normal time domain features is not enough to learn a comprehensive representation of normal patterns, and it is difficult to obtain a clear decision boundary. Since atrial fibrillation ECG data is usually difficult to obtain in large quantities, most of the current methods for constructing atrial fibrillation pseudo-abnormal ECG data that is extremely similar to real atrial fibrillation ECG data use deep learning methods. Deep learning-based methods often require a large amount of real atrial fibrillation data, as well as a lot of computing resources and time to train the model. Therefore, how to fully extract time and frequency domain information, learn a more comprehensive normal pattern representation, construct atrial fibrillation pseudo-abnormal ECG signals, and reasonably correct the decision boundary is a challenging problem. Summary of the Invention
[0005] The purpose of the present invention is to address the problems existing in the prior art and propose a method and system for atrial fibrillation anomaly detection based on multimodal time-frequency pseudo anomalies (MTFPA). The method combines time domain and frequency domain information to comprehensively characterize the normal mode and constructs atrial fibrillation pseudo anomaly ECG signals to optimize the decision boundary. This not only improves the accuracy and efficiency of atrial fibrillation detection, but also expands the atrial fibrillation dataset without the need for real atrial fibrillation data.
[0006] In order to achieve the above purpose, the technical solutions adopted are:
[0007] A method for detecting atrial fibrillation abnormality based on multimodal time-frequency pseudo-abnormality, comprising:
[0008] The normal time-domain ECG signal is enhanced through data to generate atrial fibrillation pseudo-abnormal time-domain ECG signal, atrial fibrillation pseudo-abnormal frequency-domain ECG signal and normal frequency-domain ECG signal;
[0009] The features of normal time-domain ECG signals and normal frequency-domain ECG signals are extracted through time-domain encoder and frequency-domain encoder respectively, and then mapped to the hypersphere space through the predictor;
[0010] The features of atrial fibrillation pseudo-abnormal time domain ECG signal and atrial fibrillation pseudo-abnormal frequency domain ECG signal are extracted through time domain encoder and frequency domain encoder respectively, and mapped to hypersphere space through predictor;
[0011] Calculate the distance between the normal time and frequency domain hypersphere mapping and the center of the hypersphere, and train the model to reduce this distance; calculate the distance between the pseudo-abnormal time and frequency domain hypersphere mapping and the center of the hypersphere, and train the model to increase this distance;
[0012] Atrial fibrillation abnormality is predicted by the sum of the distances between the ECG signal's hypersphere mapping and the center of the hypersphere in the time domain and frequency domain.
[0013] According to the atrial fibrillation abnormality detection method based on multimodal time-frequency pseudo-abnormality of the present invention, further, generating an atrial fibrillation pseudo-abnormal time-domain electrocardiogram signal specifically includes:
[0014] Perform P wave masking on normal ECG signals to simulate the disappearance of P waves in atrial fibrillation and obtain masked ECG signals;
[0015] Downsampling the masked ECG signal to simulate the characteristics of atrial fibrillation with increased heart rate, and obtaining a downsampled signal;
[0016] The downsampled signal is time-distorted to simulate the irregular characteristics of atrial fibrillation intervals and obtain the final atrial fibrillation pseudo-abnormal ECG signal.
[0017] According to the atrial fibrillation abnormality detection method based on multimodal time-frequency pseudo-anomalies of the present invention, further, P-wave mask processing of normal electrocardiogram signals includes: first, using an electrocardiogram segmentation method based on wavelet transform to identify the position of the P wave and calculate the average amplitude of the P wave; then replacing the data of the P wave position with the average amplitude of the P wave, and adding noise at the P wave position.
[0018] According to the atrial fibrillation abnormality detection method based on multimodal time-frequency pseudo-abnormality of the present invention, further, downsampling the masked ECG signal to obtain a downsampled signal includes: for each new sampling point t′, t′ n =nΔT2, n=0,1,…,L ds -1, its F1 is the current sampling rate, F2 is the target sampling rate, and L is the length of the ECG signal; the signal value x at the new sampling point is calculated using the cubic Lagrange interpolation method. ds,i (t′); Repeat this interpolation process for each new sampling point t′ to obtain the complete downsampled signal x ds,i .
[0019] According to the atrial fibrillation abnormality detection method based on multimodal time-frequency pseudo-abnormality of the present invention, further, time warping processing of the downsampled signal includes: downsampled signal x ds,i The sampling point is t′ n ; Generate random distortion coefficients by sampling from a normal distribution:
[0020]
[0021] in represents a normal distribution with mean 1 and standard deviation σ; next, create the distortion points as follows:
[0022]
[0023] Where K represents the number of distortion points;
[0024] Use cubic spline interpolation to calculate the mapping function from the new sampling points to the distorted sampling points Make based on Calculate distortion sampling points For each warped sampling point t″, locate the two closest new sampling points t′ n and t′ n+1 , satisfying t′ n ≤t″ <t′ n+1 ; Finally calculate the signal value x of the distorted sampling point tm,i (t″), the formula is as follows:
[0025]
[0026] Repeat this process for each distorted sampling point t″ to obtain the complete atrial fibrillation artifact abnormal ECG signal x tm,i .
[0027] According to the atrial fibrillation abnormality detection method based on multimodal time-frequency pseudo-abnormality of the present invention, further, the normal time domain electrocardiogram signal x i and atrial fibrillation pseudo-abnormal time domain ECG signal x tm,i Perform Fourier transform respectively to obtain the normal frequency domain ECG signal x f,i and atrial fibrillation artifact abnormal frequency domain ECG signal x fm,i .
[0028] According to the atrial fibrillation abnormality detection method based on multimodal time-frequency pseudo-abnormality of the present invention, further, x i and x f,i As the input of the time domain encoder and frequency domain encoder respectively, the normal time domain feature z is obtained t,i and normal frequency domain characteristics z f,i , the two sets of features are then mapped to the hypersphere space through the predictor Pr, and the normal time domain hypersphere mapping q is obtained t,i and the normal frequency domain hypersphere mapping q f,i ; x tm,i and x fm,i As the input of the time domain encoder and frequency domain encoder respectively, the pseudo abnormal time domain feature z is obtained tm,i and pseudo-abnormal frequency domain features z fm,i The two sets of features are then mapped to the hypersphere space through the predictor Pr to obtain the pseudo-anomaly time domain hypersphere mapping q tm,i and pseudo-anomalous frequency domain hypersphere mapping q fm,i .
[0029] According to the atrial fibrillation abnormality detection method based on multimodal time-frequency pseudo-anomalies of the present invention, the hypersphere center C is further defined as the average value of the normal time-domain hypersphere mapping and the normal frequency-domain hypersphere mapping of the initialization model; for normal time-domain and frequency-domain electrocardiogram signals, the loss function is defined as follows:
[0030]
[0031] Where M is the number of ECG signal samples, sim(·) is the cosine similarity;
[0032] For atrial fibrillation pseudo-abnormal time domain and frequency domain ECG signals, the loss function is defined as follows:
[0033]
[0034] Finally, the overall loss function of the model is as follows:
[0035]
[0036] Where λ is the trade-off control coefficient;
[0037] The model learns and optimizes according to the overall loss function to learn the optimal hypersphere boundary.
[0038] According to the atrial fibrillation abnormality detection method based on multimodal time-frequency pseudo-anomalies of the present invention, the sum of the distances between the hypersphere mapping of the ECG signal in the time domain and the frequency domain and the center of the hypersphere is further defined as the abnormality score Score:
[0039] Score=2-sim(q t ,C)-sim(q f ,C)
[0040] When the abnormality score is greater than the hypersphere radius, the ECG signal is an atrial fibrillation ECG signal; when the abnormality score is less than the hypersphere radius, the ECG signal is a normal ECG signal.
[0041] Furthermore, the present invention also provides an atrial fibrillation abnormality detection system based on multimodal time-frequency pseudo-anomaly, which is used to implement the above-mentioned atrial fibrillation abnormality detection method based on multimodal time-frequency pseudo-anomaly, comprising:
[0042] A data enhancement module is used to enhance the normal time-domain ECG signal to generate an atrial fibrillation pseudo-abnormal time-domain ECG signal, an atrial fibrillation pseudo-abnormal frequency-domain ECG signal, and a normal frequency-domain ECG signal;
[0043] A first hypersphere mapping module is used to extract features of normal time-domain ECG signals and normal frequency-domain ECG signals through a time-domain encoder and a frequency-domain encoder respectively, and map them to a hypersphere space through a predictor;
[0044] The second hypersphere mapping module is used to extract features of atrial fibrillation pseudo-abnormal time domain ECG signals and atrial fibrillation pseudo-abnormal frequency domain ECG signals through a time domain encoder and a frequency domain encoder respectively, and map them to the hypersphere space through a predictor;
[0045] The model training module is used to calculate the distance between the normal time domain and frequency domain hypersphere mapping and the center of the hypersphere, and train the model to reduce this distance; calculate the distance between the pseudo-abnormal time domain and frequency domain hypersphere mapping and the center of the hypersphere, and train the model to increase this distance;
[0046] The abnormality prediction module is used to predict atrial fibrillation abnormality by calculating the sum of the distances between the electrocardiogram signal and the center of the hypersphere in the time domain and the frequency domain.
[0047] The beneficial effects achieved by adopting the above technical solution are:
[0048] 1. The atrial fibrillation anomaly detection method based on multimodal time-frequency pseudo-anomalies (MTFPA) proposed in this invention solves the problem of incomplete learning of ECG signal representation and difficulty in obtaining an accurate decision boundary. MTFPA jointly learns the time domain features and frequency domain features of the ECG signal to construct a time-frequency hypersphere, and introduces atrial fibrillation pseudo-anomaly ECG signals to optimize the hypersphere boundary, thereby achieving more effective atrial fibrillation anomaly detection. Extensive experiments on different ECG datasets have shown that MTFPA is effective compared to the most advanced baseline methods. The present invention can improve the accuracy and efficiency of atrial fibrillation detection, help reduce the workload of doctors, help doctors diagnose atrial fibrillation more quickly, and reduce patients' health risks.
[0049] 2. This invention also proposes a method for constructing pseudo-abnormal atrial fibrillation ECG signals. This method constructs simulated abnormal atrial fibrillation ECG signals based on heart rate and waveform features. This method does not rely on real atrial fibrillation data and requires no training. It can directly generate simulated atrial fibrillation ECG data using normal ECG data. This method can quickly and efficiently expand atrial fibrillation datasets, providing an effective data augmentation method for atrial fibrillation detection methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings of the embodiments of the present invention. The drawings are only used to illustrate some embodiments of the present invention, but not to limit all embodiments of the present invention thereto.
[0051] Figure 1 1 is a flow chart of a method for detecting atrial fibrillation abnormality based on multimodal time-frequency pseudo-abnormality according to an embodiment of the present invention;
[0052] Figure 2 is a framework diagram of a method for detecting atrial fibrillation abnormality based on multimodal time-frequency pseudo-abnormality according to an embodiment of the present invention;
[0053] Figure 3 1 is a flow chart of generating a pseudo-abnormal time-domain electrocardiogram signal of atrial fibrillation according to an embodiment of the present invention;
[0054] Figure 4 3 is a waveform diagram of a normal ECG signal and a pseudo-abnormal ECG signal of atrial fibrillation according to an embodiment of the present invention. DETAILED DESCRIPTION
[0055] The following will be combined with the accompanying drawings of specific embodiments of the present invention to clearly and completely describe the exemplary embodiments of the present invention. Unless otherwise defined, technical or scientific terms used in the present invention should be given the common meanings understood by people with ordinary skills in the relevant field.
[0056] like Figure 1 and Figure 2As shown, this embodiment discloses a method for detecting atrial fibrillation abnormality based on multimodal time-frequency pseudo-abnormality, comprising the following steps:
[0057] Step S1: A normal time-domain ECG signal is enhanced by data to generate an atrial fibrillation pseudo-abnormal time-domain ECG signal, an atrial fibrillation pseudo-abnormal frequency-domain ECG signal, and a normal frequency-domain ECG signal.
[0058] The specific process of generating atrial fibrillation pseudo-abnormal time domain ECG signal is as follows: Figure 3 As shown:
[0059] Step S101 , performing P wave masking processing on a normal ECG signal, and introducing noise in the masking segment to accurately simulate atrial fibrillation abnormality characterized by disappearance of the P wave and appearance of irregular f waves, to obtain a masked ECG signal.
[0060] The ECG signal set with length L, sampling rate F1 and sample number M is defined as
[0061] ECG signal x i Perform mask processing. First, a wavelet transform-based electrocardiogram segmentation method is used to identify the location of the P wave. Definition is the signal x i The set of P-wave positions in n, where n represents the signal x i The number of P waves in is the starting position of the P wave, is the end position of the P wave. Calculate the average amplitude of the P wave
[0062]
[0063] Then use the average amplitude of the P wave Replace the data at the P-wave position and add noise at the P-wave position.
[0064]
[0065] Among them, j represents the position of the current data, and f represents the frequency of the noise. In this way, a masked ECG signal x is obtained. mask,i , where the P wave is masked.
[0066] Step S102: downsample the masked ECG signal to simulate the accelerated heart rate feature of the abnormal atrial fibrillation ECG signal to obtain a downsampled signal.
[0067] Mask ECG signal x mask,i Perform downsampling. Define the current sampling rate as F1 and the target sampling rate as F2. The original sampling interval is The corresponding sampling point is defined as tn =nΔT1, n=0,1,…,L. The target sampling interval is The target sampling point is t′ n =nΔT2, n=0,1,…,L ds -1, where
[0068] For each new sampling point t′, locate the 4 nearest original sampling points t n-1 ,t n ,t n+1 ,t n+2 , satisfying t n-1 ≤t′ <t n+2 . Use the cubic Lagrange interpolation method to calculate the signal value x of the new sampling point ds,i (t′), the formula is as follows:
[0069]
[0070] where l k (t′) is a Lagrange basis polynomial:
[0071]
[0072] Repeat this interpolation process for each target sampling point t′ to obtain the complete downsampled signal x ds,i .
[0073] Step S103 : performing time distortion processing on the downsampled signal to simulate the irregular interval characteristics of the abnormal atrial fibrillation ECG signal, and obtaining a final pseudo abnormal atrial fibrillation ECG signal.
[0074] For the downsampled signal x ds,i Perform a time warp. x ds,i The sampling point is t′ n =nΔT2, n=0,1,…,L ds -1. Generate random distortion coefficients by sampling from a normal distribution:
[0075]
[0076] in represents a normal distribution with mean 1 and standard deviation σ. Next, create the distortion points as follows:
[0077]
[0078] Where K represents the number of distortion points.
[0079] Use cubic spline interpolation to calculate the mapping function from the new sampling points to the distorted sampling points Make based on Calculate distortion sampling points For each warped sampling point t″, locate the two closest new sampling points t′ n and t′ n+1 , satisfying t′ n ≤t″ <t′ n+1 Finally, calculate the signal value x of the distorted sampling point tm,i (t″), the formula is as follows:
[0080]
[0081] Repeat this process for each distorted sampling point t″ to obtain the complete atrial fibrillation artifact abnormal ECG signal x tm,i The waveform of the atrial fibrillation pseudo-abnormal ECG signal is as follows: Figure 4 shown.
[0082] Finally, for the normal time domain ECG signal x i and atrial fibrillation pseudo-abnormal time domain ECG signal x tm,i Perform Fourier transform respectively to obtain the normal frequency domain ECG signal x f,i and atrial fibrillation artifact abnormal frequency domain ECG signal x fm,i .
[0083] The method for constructing atrial fibrillation pseudo-abnormal ECG signals in this scheme does not require real atrial fibrillation data. It constructs simulated abnormal ECG signals of atrial fibrillation based on heart rate and waveform characteristics. This method does not rely on traditional data training process and can directly use normal ECG data to generate simulated atrial fibrillation ECG data.
[0084] Step S2: Features of the normal time-domain ECG signal and the normal frequency-domain ECG signal are extracted through a time-domain encoder and a frequency-domain encoder respectively, and mapped to a hypersphere space through a predictor.
[0085] x i and x f,i As time domain encoder E t and frequency domain encoder E f Input, get the normal time domain feature z t,i and normal frequency domain characteristics z f,i , the two sets of features are then mapped to the hypersphere space through the predictor Pr, and the normal time domain hypersphere mapping q is obtained t,i and the normal frequency domain hypersphere mapping q f,i .
[0086] z t,i =E t (x i )
[0087] z f,i =E f (x f,i )
[0088] q t,i =Pr(z t,i )
[0089] q f,i =Pr(z f,i )
[0090] Step S3: The time domain electrocardiogram signal of the pseudo-abnormal atrial fibrillation and the frequency domain electrocardiogram signal of the pseudo-abnormal atrial fibrillation are respectively extracted with features by a time domain encoder and a frequency domain encoder, and are mapped to the hypersphere space by a predictor.
[0091] x tm,i and x fm,i As time domain encoder E t and frequency domain encoder E f Input, get the pseudo abnormal time domain feature z tm,i and pseudo-abnormal frequency domain features z fm,i The two sets of features are then mapped to the hypersphere space through the predictor Pr to obtain the pseudo-anomaly time domain hypersphere mapping q tm,i and pseudo-anomalous frequency domain hypersphere mapping q fm,i .
[0092] z tm,i =E t (x tm,i )
[0093] z fm,i =E f (x fm,i )
[0094] q tm,i =Pr(z tm,i )
[0095] q fm,i =Pr(z fm,i )
[0096] Step S4: Calculate the distance between the normal time domain and frequency domain hypersphere mapping and the center of the hypersphere, and train the model to reduce this distance; calculate the distance between the pseudo-abnormal time domain and frequency domain hypersphere mapping and the center of the hypersphere, and train the model to increase this distance.
[0097] The distances between each type of hypersphere and the hypersphere center C are calculated respectively. In this embodiment, cosine similarity is used as the distance metric, and its formula is as follows:
[0098]
[0099] where q i and q′ iRepresents the value of the i-th bit in vectors q and q′ respectively, and N represents the vector length. The hypersphere center C is defined as the average value of the normal time domain hypersphere mapping and the normal frequency domain hypersphere mapping of the initialized model:
[0100]
[0101] The overall training goal of MTFPA is to shorten the distance between the normal hypersphere mapping and the hypersphere center C, while increasing the distance between the pseudo-abnormal hypersphere mapping and the hypersphere center C.
[0102] For normal time domain and frequency domain ECG signals, the loss function is defined as follows:
[0103]
[0104] For atrial fibrillation pseudo-abnormal time domain and frequency domain ECG signals, the loss function is defined as follows:
[0105]
[0106] Finally, the overall loss function of the model is as follows:
[0107]
[0108] where λ is the trade-off coefficient. Based on this loss function, the model shifts the hypersphere mapping of normal time-domain and frequency-domain ECG signals closer to the center of the hypersphere, while shifting the hypersphere mapping of atrial fibrillation artifact-induced abnormalities in the time-domain and frequency-domain ECG signals further away from the center. This allows the model to learn more precise hypersphere boundaries and produce a more discriminative hypersphere.
[0109] The model learns and continuously optimizes based on the loss function, gradually approaching the optimal solution. At this point, MTFPA effectively pulls the hyperspherical mapping of normal time-domain and frequency-domain ECG signals closer to the center of the hypersphere, placing them inside the hypersphere. However, the hyperspherical mapping of atrial fibrillation artifacts in the time-domain and frequency-domain ECG signals moves away from the center of the hypersphere, falling outside the hypersphere.
[0110] Step S5: predicting atrial fibrillation abnormality by calculating the sum of the distances between the electrocardiogram signal and the center of the hypersphere in the time domain and the frequency domain.
[0111] The trained model learns the optimal hypersphere boundary. The sum of the distances between the ECG signal's hypersphere mapping in the time domain and frequency domain and the hypersphere center is defined as the anomaly score:
[0112] Score=2-sim(q t ,C)-sim(q f ,C)
[0113] When the anomaly score is greater than the hypersphere radius, the ECG signal is atrial fibrillation. When the anomaly score is less than the hypersphere radius, the ECG signal is normal. The hypersphere radius is defined as follows: sort the anomaly scores in ascending order and take the middle value as the hypersphere radius.
[0114] Corresponding to the above method, this embodiment further discloses a system for detecting atrial fibrillation abnormality based on multimodal time-frequency pseudo-abnormality, comprising:
[0115] The data enhancement module is used to generate atrial fibrillation pseudo-abnormal time domain ECG signal, atrial fibrillation pseudo-abnormal frequency domain ECG signal and normal frequency domain ECG signal through data enhancement of normal time domain ECG signal.
[0116] The first hypersphere mapping module is used to extract features of normal time-domain ECG signals and normal frequency-domain ECG signals through a time-domain encoder and a frequency-domain encoder respectively, and map them to the hypersphere space through a predictor.
[0117] The second hypersphere mapping module is used to extract features of atrial fibrillation pseudo-abnormal time domain ECG signals and atrial fibrillation pseudo-abnormal frequency domain ECG signals through a time domain encoder and a frequency domain encoder respectively, and map them to the hypersphere space through a predictor.
[0118] The model training module is used to calculate the distance between the normal time domain and frequency domain hypersphere mapping and the center of the hypersphere, and train the model to reduce this distance; calculate the distance between the pseudo-anomaly time domain and frequency domain hypersphere mapping and the center of the hypersphere, and train the model to increase this distance.
[0119] The abnormality prediction module is used to predict atrial fibrillation abnormality by calculating the sum of the distances between the electrocardiogram signal and the center of the hypersphere in the time domain and the frequency domain.
[0120] Unless otherwise specifically stated, the relative steps, numerical expressions and values of the components and steps set forth in these embodiments do not limit the scope of the present invention.
[0121] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.
[0122] The units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. A person of ordinary skill in the art may use different methods to implement the described functions for each specific application, but such implementation is not considered to be beyond the scope of the present invention.
[0123] Those skilled in the art will appreciate that all or part of the steps in the above method can be performed by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a magnetic disk, or an optical disk. Alternatively, all or part of the steps in the above embodiment can be implemented using one or more integrated circuits. Accordingly, each module / unit in the above embodiment can be implemented in the form of hardware or software functional modules. The present invention is not limited to any specific combination of hardware and software.
[0124] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the above-described embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above-described embodiments within the technical scope disclosed by the present invention, or replace some of the technical features therein with equivalents. Such modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.
Claims
1. A system for detecting atrial fibrillation abnormality based on multimodal time-frequency pseudo-abnormality, characterized in that: Include: The data enhancement module is used to enhance the normal time domain ECG signal to generate atrial fibrillation pseudo abnormal time domain ECG signal, atrial fibrillation pseudo abnormal frequency domain ECG signal and normal frequency domain ECG signal; specifically: the normal time domain ECG signal x i and atrial fibrillation pseudo-abnormal time domain ECG signal x tm,i Perform Fourier transform respectively to obtain the normal frequency domain ECG signal x f,i and atrial fibrillation artifact abnormal frequency domain ECG signal x fm,i ; A first hypersphere mapping module is used to extract features of normal time-domain ECG signals and normal frequency-domain ECG signals through a time-domain encoder and a frequency-domain encoder respectively, and map them to a hypersphere space through a predictor; Specifically: x i and x f,i As the input of the time domain encoder and frequency domain encoder respectively, the normal time domain feature z is obtained t,i and normal frequency domain characteristics z f,i , the two sets of features are then mapped to the hypersphere space through the predictor Pr, and the normal time domain hypersphere mapping q is obtained t,i and the normal frequency domain hypersphere mapping q f,i ; The second hypersphere mapping module is used to extract features of atrial fibrillation pseudo-abnormal time domain ECG signals and atrial fibrillation pseudo-abnormal frequency domain ECG signals through a time domain encoder and a frequency domain encoder respectively, and map them to the hypersphere space through a predictor; Specifically: x tm,i and x fm,i As the input of the time domain encoder and frequency domain encoder respectively, the pseudo abnormal time domain feature z is obtained tm,i and pseudo-abnormal frequency domain features z fm,i The two sets of features are then mapped to the hypersphere space through the predictor Pr to obtain the pseudo-anomaly time domain hypersphere mapping q tm,i and pseudo-anomalous frequency domain hypersphere mapping q fm,i ; The model training module is used to calculate the distance between the normal time domain and frequency domain hypersphere mapping and the center of the hypersphere, and train the model to reduce this distance; calculate the distance between the pseudo-anomaly time domain and frequency domain hypersphere mapping and the center of the hypersphere, and train the model to increase this distance; specifically: Calculate the distance between each type of hypersphere and the hypersphere center C respectively, and use cosine similarity as the distance metric. The formula is as follows: Among them, q i and q i ′ represents the value of the i-th bit in vectors q and q′, respectively, and N represents the vector length. The hypersphere center C is defined as the average value of the normal time domain hypersphere mapping and the normal frequency domain hypersphere mapping of the initialized model: Where M is the number of ECG signal samples; the training goal of the system is to shorten the distance between the normal hypersphere and the hypersphere center C, while increasing the distance between the pseudo-abnormal hypersphere and the hypersphere center C. For normal time domain and frequency domain ECG signals, the loss function is defined as follows: Among them, sim(·) is the cosine similarity; For atrial fibrillation pseudo-abnormal time domain and frequency domain ECG signals, the loss function is defined as follows: Finally, the overall loss function of the model is as follows: Where λ is the trade-off control coefficient; The model learns and optimizes based on the overall loss function to learn the optimal hypersphere boundary; The abnormality prediction module is used to predict atrial fibrillation abnormality by calculating the sum of the distances between the electrocardiogram signal and the center of the hypersphere in the time domain and the frequency domain.
2. The atrial fibrillation abnormality detection system based on multimodal time-frequency pseudo-abnormality according to claim 1, characterized in that: Generating atrial fibrillation pseudo-abnormal time domain ECG signal specifically includes: Perform P wave masking on normal ECG signals to simulate the disappearance of P waves in atrial fibrillation and obtain masked ECG signals; Downsampling the masked ECG signal to simulate the characteristics of atrial fibrillation with increased heart rate, and obtaining a downsampled signal; The downsampled signal is time-distorted to simulate the irregular characteristics of atrial fibrillation intervals and obtain the final atrial fibrillation pseudo-abnormal ECG signal.
3. The atrial fibrillation abnormality detection system based on multimodal time-frequency pseudo-abnormality according to claim 2, characterized in that: The P-wave masking process for normal ECG signals includes: firstly, using an ECG segmentation method based on wavelet transform to identify the position of the P-wave and calculate the average amplitude of the P-wave; then, replacing the data at the P-wave position with the average amplitude of the P-wave and adding noise at the P-wave position.
4. The atrial fibrillation abnormality detection system based on multimodal time-frequency pseudo-abnormality according to claim 2, characterized in that: Downsampling the masked ECG signal to obtain the downsampled signal includes: for each new sampling point t′, t′ n =nΔT2, n=0,1,…,L ds -1, its F1 is the current sampling rate, F2 is the target sampling rate, and L is the length of the ECG signal; the signal value x at the new sampling point is calculated using the cubic Lagrange interpolation method. ds,i (t′); Repeat this interpolation process for each new sampling point t′ to obtain the complete downsampled signal x ds,i .
5. The atrial fibrillation abnormality detection system based on multimodal time-frequency pseudo-abnormality according to claim 4, characterized in that: The time warping process of the downsampled signal includes: downsampled signal x ds,i The sampling point is t′ n ; Generate random distortion coefficients by sampling from a normal distribution: in represents a normal distribution with mean 1 and standard deviation σ; next, create the distortion points as follows: Where K represents the number of distortion points; Use cubic spline interpolation to calculate the mapping function from the new sampling points to the distorted sampling points Make based on Calculate distortion sampling points For each warped sampling point t″, locate the two closest new sampling points t′ n and t′ n+1 , satisfying t′ n ≤t″ <t′ n+1 ;Finally calculate the signal value x of the distorted sampling point tm,i (t″), the formula is as follows: Repeat this process for each distorted sampling point t″ to obtain the complete atrial fibrillation artifact abnormal ECG signal x tm,i .
6. The atrial fibrillation abnormality detection system based on multimodal time-frequency pseudo-abnormality according to claim 1, characterized in that: The sum of the distances between the ECG signal's hypersphere mapping in the time domain and frequency domain and the center of the hypersphere is defined as the anomaly score Score: Score=2-sim(q t ,C)-sim(q f ,C) When the abnormality score is greater than the hypersphere radius, the ECG signal is an atrial fibrillation ECG signal; when the abnormality score is less than the hypersphere radius, the ECG signal is a normal ECG signal.
Citation Information
Patent Citations
Image anomaly detection method based on deep learning auto-encoder
CN116645344A
Corridor Anomaly Detection System Based on Adaptive Resampling Deep Encoder Network
JP7381815B1