Atrial fibrillation anomaly detection method and system based on multi-mode time-frequency pseudo anomaly
By introducing multimodal time-frequency pseudo-anomaly technology in electrocardiogram detection, the pseudo-anomaly ECG signals are generated and hypersphere spatial mapping is carried out, which solves the problem of unclear decision boundaries in the existing technology, and efficient atrial fibrillation detection is achieved.
Patent Information
- Application Number
- CN202411636350.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-11-15
AI Technical Summary
The prior art lacks multimodal feature analysis across different time series representation domains in electrocardiogram signal detection, and lacks appropriate pseudo-anomaly samples to optimize decision boundaries, making it difficult to obtain clear decision boundaries, and relies on a large amount of real AF data for model training.
A method for detecting atrial fibrillation abnormality based on multimodal time frequency pseudo-analysis is proposed. The time domain and frequency domain ECG signals are generated through data augmentation. Combining time domain and frequency domain information, the time domain encoder and frequency domain encoder are used to extract features, and map them to the hypersphere space through predictors to optimize the decision boundary.
Improve the accuracy and efficiency of AF detection, expanding the AF dataset without real AF data, achieving more comprehensive normal pattern characterization and clearer decision-making boundaries.
Smart Images

Figure CN119700133A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of electrocardiogram signal detection, and in particular relates to a method and system for detecting atrial fibrillation abnormality based on multi-modal time-frequency pseudo-abnormality. Background Art
[0002] Atrial fibrillation is a common and dangerous arrhythmia 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 often 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 electrocardiograms is becoming increasingly important.
[0003] Atrial fibrillation anomaly detection aims to identify atrial fibrillation ECG signals that are significantly different from non-atrial fibrillation ECG signals from a large amount of ECG data, assist doctors in diagnosing atrial fibrillation, and play a vital role in improving the accuracy and efficiency of medical diagnosis. To date, researchers have conducted a lot of research on anomaly detection. Autoencoder is committed to learning low-dimensional feature representations of samples, reconstructing original data samples using these features, and identifying anomalies based on reconstruction errors. DeepSVDD models normal features as hyperspheres and separates normal and abnormal samples by learning the boundaries of the sphere. Based on DeepSVDD, Huang et al. introduced pseudo-abnormal samples during the training process to correct the decision boundary, thereby generating more discriminative hyperspheres and achieving more accurate anomaly detection. Chen et al. used recursive complex networks and underlying features extracted from coherent spectra for atrial fibrillation anomaly detection. Choi et al. used an autoencoder based on long short-term memory networks to learn the reconstruction of normal ECG signals and detected atrial fibrillation using reconstruction errors.
[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 clear decision boundaries. 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 representation of normal patterns, construct atrial fibrillation pseudo-abnormal ECG signals, and reasonably correct decision boundaries 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), which comprehensively characterizes the normal mode by combining time domain and frequency domain information, and constructs atrial fibrillation pseudo anomaly ECG signals to optimize the decision boundary, which not only improves the accuracy and efficiency of atrial fibrillation detection, but also expands the atrial fibrillation data set without the need for real atrial fibrillation data.
[0006] To achieve the above purpose, the technical solution adopted is:
[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 by 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 mapped to the hypersphere space through the predictor;
[0010] The features of the atrial fibrillation pseudo-abnormal time-domain ECG signal and the atrial fibrillation pseudo-abnormal frequency-domain ECG signal are extracted through the time-domain encoder and the frequency-domain encoder respectively, and mapped to the hypersphere space through the predictor;
[0011] 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 expand this distance;
[0012] Atrial fibrillation abnormality is predicted by the sum of the distances from the ECG signal to the center of the hypersphere in the time domain and frequency domain.
[0013] According to the atrial fibrillation abnormality detection method based on multi-modal 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 increased heart rate of atrial fibrillation and obtain a downsampled signal;
[0016] The downsampled signal is time-distorted to simulate the irregular characteristics of the atrial fibrillation interval 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 ECG signals includes: first, 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 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, 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 of 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 multi-modal time-frequency pseudo-abnormality of the present invention, further, time-warping the downsampled signal includes: downsampling the 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 a mean of 1 and a standard deviation of σ; 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 the distortion sampling points For each warped sample point t″, locate the two closest new sample 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 pseudo-abnormal ECG signal x tm,i .
[0027] According to the atrial fibrillation abnormality detection method based on multi-modal 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 pseudo-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 the frequency domain encoder respectively, the normal time domain feature z is obtained. t,i and normal frequency domain feature 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 the 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-abnormality of the present invention, further, 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 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 the 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-abnormality of the present invention, further, the sum of the distances of the hypersphere mapping of the electrocardiogram signal to the center of the hypersphere in the time domain and the frequency domain is defined as the abnormality score Score:
[0039] Score = 2-sim(q t ,C)-sim(q f ,C)
[0040] When the abnormal score is greater than the hypersphere radius, the ECG signal is an atrial fibrillation ECG signal; when the abnormal 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 multi-modal time-frequency pseudo-abnormality, which is used to implement the atrial fibrillation abnormality detection method based on multi-modal time-frequency pseudo-abnormality as described above, comprising:
[0042] A data enhancement module, used for generating 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;
[0043] A first hypersphere mapping module is used for extracting 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 mapping them to a hypersphere space through a predictor;
[0044] The second hypersphere mapping module is used for extracting 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 mapping 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 expand this distance;
[0046] The abnormality prediction module is used to predict atrial fibrillation abnormality by the sum of the distances from the hypersphere mapping of the ECG signal to 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 abnormality detection method (MTFPA) based on multimodal time-frequency pseudo-anomaly proposed in the present invention solves the problem of incomplete learning of ECG signal representation and difficulty in obtaining accurate decision boundaries. MTFPA jointly learns the time domain features and frequency domain features of ECG signals, constructs a time-frequency hypersphere, and introduces atrial fibrillation pseudo-anomaly ECG signals to optimize the hypersphere boundary, thereby achieving more effective atrial fibrillation abnormality detection. A large number of experiments on different ECG data sets 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 faster, and reduce patients' health risks.
[0049] 2. The present invention also proposes a method for constructing a pseudo-abnormal ECG signal of atrial fibrillation, which constructs a simulated abnormal ECG signal of atrial fibrillation based on heart rate and waveform features. This method does not rely on real atrial fibrillation data, does not require training, and can directly use normal ECG data to generate simulated atrial fibrillation ECG data. In this way, the atrial fibrillation data set can be expanded quickly and efficiently, providing an effective data enhancement method for the atrial fibrillation detection method. 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, wherein 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 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 is a schematic diagram of a process for generating atrial fibrillation pseudo-abnormal time-domain electrocardiogram signals according to an embodiment of the present invention;
[0054] Figure 4 It 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 drawings of specific embodiments of the present invention to clearly and completely describe the exemplary scheme of the embodiment of the present invention. Unless otherwise defined, the technical terms or scientific terms used in the present invention should be the common meanings understood by people with ordinary skills in the 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, the 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, perform P wave masking on a normal ECG signal, and introduce noise into the masking segment to accurately simulate atrial fibrillation abnormality characterized by disappearance of P waves 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 Mask processing is performed. First, an electrocardiogram segmentation method based on wavelet transform is used to identify the location of the P wave. Definition For signal x i The set of P wave positions in , 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 the average amplitude of the P wave is 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: down-sample the masked ECG signal to simulate the accelerated heart rate feature of the abnormal atrial fibrillation ECG signal to obtain a down-sampled signal.
[0067] Mask ECG signal x mask,i Downsampling is performed. 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] Among them 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 atrial fibrillation abnormal ECG signal to obtain the final atrial fibrillation pseudo abnormal ECG signal.
[0074] For the downsampled signal x ds,i Perform a time warp. 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 the distortion sampling points For each warped sample point t″, locate the two closest new sample points t′ n and t′ n+1 , satisfying t′ n ≤t″ <t′ n+1 Finally, the signal value x of the distorted sampling point is calculated 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 pseudo-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 pseudo-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. A simulated abnormal ECG signal of atrial fibrillation is constructed based on heart rate and waveform characteristics. This method does not rely on the traditional data training process and can directly use normal ECG data to generate simulated atrial fibrillation ECG data.
[0084] Step S2: extract features from 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.
[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 feature 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 features of the atrial fibrillation pseudo-abnormal time-domain ECG signal and the atrial fibrillation pseudo-abnormal frequency-domain ECG signal are extracted through a time-domain encoder and a frequency-domain encoder respectively, and mapped to the hypersphere space through a predictor.
[0091] x tm,i and x fm,i As time domain encoder E t and frequency domain encoder E f 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 .
[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 expand 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′ iRepresent the value of the i-th bit in vector 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 initialization 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 the 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] Among them, λ is the trade-off control coefficient. According to the loss function, the model makes the hypersphere mapping of normal time domain and frequency domain ECG signals close to the center of the hypersphere, and the hypersphere mapping of atrial fibrillation pseudo-abnormal time domain and frequency domain ECG signals far away from the center of the hypersphere, so as to learn more accurate hypersphere boundaries and obtain more discriminative hyperspheres.
[0109] The model learns and optimizes according to the loss function, gradually approaching the optimal solution. At this time, MTFPA can effectively pull the hypersphere mapping of normal time domain and frequency domain ECG signals closer to the center of the hypersphere, making them inside the hypersphere, while the hypersphere mapping of atrial fibrillation pseudo-abnormal time domain and frequency domain ECG signals is far away from the center of the hypersphere and falls outside the hypersphere.
[0110] Step S5: predicting atrial fibrillation abnormality by calculating the sum of the distances between the ECG signal mapped from the hypersphere to 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 from the hypersphere mapping of the ECG signal in the time domain and frequency domain to the center of the hypersphere is defined as the anomaly score 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 an atrial fibrillation ECG signal; when the anomaly score is less than the hypersphere radius, the ECG signal is a normal ECG signal. The hypersphere radius here is defined as follows: Arrange the anomaly scores in ascending order and take the middle value as the hypersphere radius.
[0114] Corresponding to the above method, this embodiment also discloses an atrial fibrillation abnormality detection system 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-abnormal time domain and frequency domain hypersphere mapping and the center of the hypersphere, and train the model to expand this distance.
[0119] The abnormality prediction module is used to predict atrial fibrillation abnormality by the sum of the distances from the hypersphere mapping of the ECG signal to 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] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0122] The units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. 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 completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, such as a read-only memory, a disk or an optical disk. Optionally, all or part of the steps in the above embodiment can also be implemented using one or more integrated circuits, and accordingly, each module / unit in the above embodiment can be implemented in the form of hardware or in the form of software function modules. The present invention is not limited to any specific form of combination of hardware and software.
[0124] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A method for detecting atrial fibrillation abnormality based on multimodal time-frequency pseudo-abnormality, characterized in that: Include: The normal time-domain ECG signal is enhanced by 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; 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 mapped to the hypersphere space through the predictor; The features of the atrial fibrillation pseudo-abnormal time-domain ECG signal and the atrial fibrillation pseudo-abnormal frequency-domain ECG signal are extracted through the time-domain encoder and the frequency-domain encoder respectively, and mapped to the hypersphere space through the predictor; 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 hypersphere center, and train the model to expand this distance; Atrial fibrillation abnormality is predicted by the sum of the distances from the ECG signal to the center of the hypersphere in the time domain and frequency domain.
2. The method for detecting atrial fibrillation abnormality 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 increased heart rate of atrial fibrillation and obtain a downsampled signal; The downsampled signal is time-distorted to simulate the irregular characteristics of the atrial fibrillation interval and obtain the final atrial fibrillation pseudo-abnormal ECG signal.
3. The method for detecting atrial fibrillation abnormality 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 of the P wave position with the average amplitude of the P wave and adding noise to the P wave position.
4. The method for detecting atrial fibrillation abnormality based on multimodal time-frequency pseudo-abnormality according to claim 2, characterized in that: 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, 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 of 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 method for detecting atrial fibrillation abnormality 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 a mean of 1 and a standard deviation of σ; 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 the distortion sampling points For each warped sample point t″, locate the two closest new sample 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 pseudo-abnormal ECG signal x tm,i .
6. The method for detecting atrial fibrillation abnormality based on multimodal time-frequency pseudo-abnormality according to claim 1, characterized in that: For 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 pseudo-abnormal frequency domain ECG signal x fm,i .
7. The method for detecting atrial fibrillation abnormality based on multimodal time-frequency pseudo-abnormality according to claim 6, characterized in that: x i and x f,i As the input of the time domain encoder and the frequency domain encoder respectively, the normal time domain feature z is obtained. t,i and normal frequency domain feature 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 the 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 .
8. The method for detecting atrial fibrillation abnormality based on multimodal time-frequency pseudo-abnormality according to claim 7, characterized in that: The center of the hypersphere C is defined as the average 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 ECG signals, the loss function is defined as follows: Where M is the number of ECG signal samples, sim(·) is the cosine similarity; For the 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 according to the overall loss function to learn the optimal hypersphere boundary.
9. The method for detecting atrial fibrillation abnormality based on multimodal time-frequency pseudo-abnormality according to claim 8, characterized in that: The sum of the distances between the ECG signal mapped from the hypersphere to the center of the hypersphere in the time domain and frequency domain is defined as the anomaly score Score: Score=2-sim(q t ,C)-sim(q f ,C) When the abnormal score is greater than the hypersphere radius, the ECG signal is an atrial fibrillation ECG signal; when the abnormal score is less than the hypersphere radius, the ECG signal is a normal ECG signal.
10. A multi-modal time-frequency pseudo-abnormality based atrial fibrillation abnormality detection system, characterized in that: The method for detecting atrial fibrillation abnormality based on multimodal time-frequency pseudo-abnormality according to any one of claims 1 to 9 comprises: A data enhancement module, used for generating 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; A first hypersphere mapping module is used for extracting 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 mapping them to a hypersphere space through a predictor; The second hypersphere mapping module is used for extracting 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 mapping them to the hypersphere space through a predictor; Model training module, used to calculate the distance from the normal time domain and frequency domain hypersphere mapping to 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 hypersphere center, and train the model to expand this distance; The abnormality prediction module is used to predict atrial fibrillation abnormality by the sum of the distances from the hypersphere mapping of the ECG signal to the center of the hypersphere in the time domain and the frequency domain.
Citation Information
Patent Citations
Wearable device-oriented electrocardiosignal anomaly detection method
CN114587365A
Image anomaly detection method based on deep learning auto-encoder
CN116645344A
Monitoring video anomaly detection method and system based on dynamic self-supervised network
CN116883896A
Satellite anomaly detection method and system based on prototype negative sample mixed comparison
CN117009897A
Industrial control system anomaly detection method based on adversarial driving depth support vector data description
CN118734225A
Cited By
Wearable senile atrial fibrillation early warning equipment and monitoring system based on multi-modal fusion
CN121129229A