Atrial fibrillation detection system, training method, atrial fibrillation detection method and electronic equipment
By using the cross-band cross attention mechanism in the atrial fibrillation detection system to extract and fusion the time-frequency diagram of the BCG signal, the problem of low accuracy of atrial fibrillation detection in the prior art is solved, and more accurate atrial fibrillation detection is achieved.
Patent Information
- Application Number
- CN202510178191.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-18
- Publication Date
- 2025-06-20
AI Technical Summary
The prior art has low accuracy in atrial fibrillation detection, mainly due to insufficient feature extraction of time domain information and neglecting the frequency domain characteristics, resulting in occasional arrhythmia in non-atrial fibrillation patients being misclassified as atrial fibrillation.
Atrial fibrillation detection system is adopted, which includes a preprocessing module, N feature extraction modules, N cross-band cross attention modules, fusion modules and classifiers. By segmenting the time-frequency graph of the BCG signal segment, the feature maps of each frequency band are extracted, and the fusion features are weighted by the cross-band cross attention mechanism to generate the total fusion features for atrial fibrillation detection.
By extracting the characteristics of higher information density and the fusion of cross-band cross-attention mechanisms, it is effective to distinguish patients with atrial fibrillation from individuals with occasional arrhythmia, improving the accuracy of atrial fibrillation detection.
Smart Images

Figure CN120183718A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of medical detection, and more specifically, relates to an atrial fibrillation detection system, a training method, an atrial fibrillation detection method and an electronic device. Background Art
[0002] In recent years, early detection of atrial fibrillation is of great significance in preventing cardiovascular diseases. However, the concealment and paroxysmal nature of atrial fibrillation make early detection difficult. Symptoms such as palpitation, chest tightness, and dizziness during an attack are easily confused with other diseases, or even ignored by patients, resulting in patients seeking medical treatment only when the condition develops to a more serious stage. In addition, excessive stress, overwork, and alcohol consumption are generally considered external incentives for the onset of paroxysmal atrial fibrillation, but patients usually do not choose to go to a medical institution for screening in these situations, which further prevents the timely detection of the condition. Although some wearable electrocardiogram devices can achieve 24-hour dynamic electrocardiogram monitoring and increase the probability of early diagnosis, this contact-based wearing method still causes some patients to refuse to wear the corresponding device due to comfort and convenience reasons.
[0003] BCG (Ballistocardiogram) is a mechanical signal used to record the reaction force generated by the human heart pumping blood into blood vessels on the body, which can relatively fully reflect the health status of the human cardiovascular system. Only by placing a pressure sensor on a mattress, chair or contact surface can BCG signals be continuously and unconsciously collected, thus minimizing the psychological pressure and discomfort of the subject. However, the non-direct contact collection method also causes BCG signals to be easily interfered by noise, and the BCG signals collected in the natural state often contain components generated by human breathing and other body movements. In addition, different from the clear actual meanings of each wave band of each lead of ECG, there is still no generally accepted actual meaning for each wave band in the current BCG waveform, which further brings challenges to its analysis and interpretation.
[0004] At present, certain progress has been made in atrial fibrillation monitoring based on BCG signals. Early researchers started from the relationship between BCG waveforms and cardiovascular activities, and used feature engineering and machine learning techniques to classify the collected BCG segments. In recent years, with the excellent performance demonstrated by deep learning in time series feature mining, some studies have started to classify atrial fibrillation based on deep neural networks and further improved its performance ceiling. However, both the machine learning and deep learning methods in past studies mainly focused on feature extraction in the time domain, lacking the mining of its frequency domain features, ignoring the possible differences in the frequency domain between atrial fibrillation subjects and non-atrial fibrillation subjects, resulting in the model tending to extract heart rhythm features for atrial fibrillation diagnosis, and thus misclassifying the occasional arrhythmia of non-atrial fibrillation patients as atrial fibrillation, and being unable to accurately achieve atrial fibrillation detection. Summary of the Invention
[0005] In view of the above deficiencies or improvement requirements of the prior art, the present invention provides an atrial fibrillation detection system, a training method, an atrial fibrillation detection method, and an electronic device to solve the technical problem of low accuracy of atrial fibrillation detection in the prior art.
[0006] To achieve the above object, in a first aspect, the present invention provides an atrial fibrillation detection system, including: a preprocessing module, N feature extraction modules, N cross-band cross-attention modules, a fusion module, and a classifier; N≥2;
[0007] The preprocessing module is used to obtain the time-frequency diagram of the input BCG signal segment and divide it according to frequency bands to obtain N time-frequency sub-diagrams I1, I2, …, I N ;
[0008] The i-th feature extraction module is used to extract the feature map of the time-frequency sub-diagram I i ; i = 1, 2, …, N;
[0009] The i-th cross-band cross-attention module is used to calculate the feature importance at each element position in the feature map of the time-frequency sub-diagram I i based on the feature maps of the time-frequency sub-diagrams in the remaining N-1 frequency bands except the i-th frequency band, and weight the corresponding elements according to the feature importance to obtain the fusion feature of the i-th frequency band;
[0010] The fusion module is used to fuse the fusion features of N frequency bands to obtain the total fusion feature;
[0011] The classifier is used to obtain the corresponding atrial fibrillation detection result based on the total fusion feature.
[0012] Further preferably, the i-th cross-band cross-attention module is used to multiply the attention map AM i element-wise under each channel dimension of the feature map of the time-frequency sub-diagram I i to obtain the fusion feature of the i-th frequency band;
[0013] Among them, f a (·) is an activation function; ∑ C (·) represents accumulation along the channel dimension; F K is the feature map of the time-frequency sub-diagram I k ; ||·|| represents the L1 norm.
[0014] Further preferably, the feature extraction module is a multi-scale feature extraction module; the i-th feature extraction module is used to extract the feature maps of the time-frequency sub-diagram I i at M different scales
[0015] The i-th cross-band cross-attention module is used to calculate the time-frequency sub-graph I for each scale based on the feature maps of the time-frequency sub-graphs at the corresponding scale in the remaining N - 1 bands except the i-th band. i The feature importance at each element position in the feature map at the corresponding scale is calculated, and the corresponding elements are weighted according to the feature importance to obtain the fused feature of the i-th band at the corresponding scale; the fused features of the i-th band at each scale together constitute the fused feature of the i-th band.
[0016] Further preferably, the cross-band cross-attention module includes M cross-band cross-attention units;
[0017] The j-th cross-band cross-attention unit in the i-th cross-band cross-attention module is used to multiply the attention map point by point under each channel dimension of the feature map to obtain the fused feature of the i-th band at the j-th scale; j = 1, 2, …, M; where
[0018] f (·) is an activation function; ∑ a (·) represents summation along the channel dimension; C is the feature map of the time-frequency sub-graph I at the j-th scale; ||·|| represents the L1 norm. k at the j-th scale; ||·|| represents the L1 norm.
[0019] Further preferably, the above BCG signal segment is obtained by successively performing filtering processing, uniform partitioning, and normalization processing on the originally collected BCG signal.
[0020] Further preferably, the above filtering processing includes: mean square error filtering and band-pass filtering performed successively.
[0021] Further preferably, the length of the above BCG signal segment is 5 seconds to 30 seconds.
[0022] In a second aspect, the present invention provides a training method for the above atrial fibrillation detection system, including: using the BCG signal segments in the pre-collected training set as inputs and the corresponding labels indicating whether atrial fibrillation exists as outputs to train the atrial fibrillation detection system.
[0023] In a third aspect, the present invention provides an atrial fibrillation detection method, including: inputting the BCG signal segment to be detected into the atrial fibrillation detection system provided in the first aspect of the present invention to obtain the corresponding atrial fibrillation detection result.
[0024] In a third aspect, the present invention provides an electronic device, including: a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, it executes the method provided in the second or third aspect of the present invention.
[0025] In a fourth aspect, the present invention further provides a computer-readable storage medium, where the computer-readable storage medium includes a stored computer program, and when the computer program is run by a processor, it controls the device where the storage medium is located to execute the method provided in the second or third aspect of the present invention.
[0026] In a fifth aspect, the invention further provides a computer program product, including a computer program / instructions, and when the computer program / instructions are executed by a processor, the method provided in the second or third aspect of the present invention is implemented.
[0027] Generally speaking, through the above technical solutions conceived by the present invention, the following beneficial effects can be achieved:
[0028] 1. The present invention provides an atrial fibrillation detection system, which uses the time-frequency diagram of BCG signal segments as the processing object, extracts features with higher information density from the image data, and obtains an effective feature representation; on this basis, considering the difference in the energy trend distribution of atrial fibrillation patients and non-atrial fibrillation patients in different frequency bands, the time-frequency diagram of BCG signal segments is divided according to frequency bands, and a cross-band cross-attention mechanism is used to fully combine the features identified in each frequency band of the signals of atrial fibrillation patients, so as to effectively distinguish the features of atrial fibrillation patients and individuals with sporadic arrhythmias, and achieve accurate atrial fibrillation detection.
[0029] 2. Further, in the atrial fibrillation detection system provided by the present invention, considering that at different scales, the features concerned by the atrial fibrillation detection system are different. For example, the low-frequency band focuses on the overall mechanical activity of the heart (such as heartbeat), and the high-frequency band focuses on the changes in the details of the heart (such as whether the blood flow is chaotic), the feature extraction module is designed as a multi-scale feature extraction module to extract the feature maps of the time-frequency sub-diagrams at different scales. By combining the feature maps at multiple scales, the disorder situation between different frequency bands can be avoided, thereby further improving the accuracy of atrial fibrillation detection.
[0030] 3. Further, in the atrial fibrillation detection system provided by the present invention, the input BCG signal segment is obtained by successively performing filtering processing, uniform division, and normalization processing on the originally collected BCG signal; among them, the above filtering processing includes: mean square error filtering and band-pass filtering performed successively; the mean square root filtering is used to eliminate the segments of the patient's violent body movement or getting out of bed, and the band-pass filtering is used to remove the components unrelated to the heartbeat, thereby removing invalid signal segments such as motion artifacts and noise interference, so as to further improve the accuracy of atrial fibrillation detection.
[0031] 4. Further, considering that in the prior art when detecting atrial fibrillation based on heart rate characteristics, the rhythm information usually requires a relatively long segment for calculation, and generally requires long-time and continuous high-quality segments for input. Under the premise that the BCG signal is easily interfered by external factors such as body movement in practical applications, the accuracy is relatively low. In the atrial fibrillation detection system provided by the present invention, the length of the input BCG signal segment is 5 seconds to 30 seconds, so as to get rid of the limitations of overly relying on rhythm information and the length of the input segment in the past work, thereby further improving the accuracy of atrial fibrillation detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 FIG. is a schematic structural diagram of an atrial fibrillation detection system provided by an embodiment of the present invention;
[0033] Figure 2 FIG. is the time-frequency diagrams of each frequency band of a normal person, a patient with arrhythmia, and a patient with atrial fibrillation provided by an embodiment of the present invention; among them, (a) is the low, medium, and high frequency time-frequency diagram of a normal person; (b) is the low, medium, and high frequency time-frequency diagram of a patient with arrhythmia; (c) is the low, medium, and high frequency time-frequency diagram of a patient with atrial fibrillation;
[0034] Figure 3 FIG. is the result visualization diagram of the cross-band cross-attention module provided by an embodiment of the present invention; among them, (a) is the attention area diagram of a normal person; (b) is the attention area diagram of a patient with arrhythmia; (c) is the attention area diagram of a patient with atrial fibrillation. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0035] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0036] To achieve the above object, in a first aspect, the present invention provides an atrial fibrillation detection system, including: a preprocessing module, N feature extraction modules, N cross-band cross-attention modules, a fusion module, and a classifier; N≥2;
[0037] The preprocessing module is used to obtain the time-frequency diagram of the input BCG signal segment, and divide it according to frequency bands to obtain N time-frequency sub-diagrams I1, I2,..., I N ;
[0038] The i-th feature extraction module is used to extract the feature map of the time-frequency sub-diagram I i ; i = 1, 2,..., N;
[0039] The i-th cross-band cross-attention module is used to calculate the time-frequency sub-graph I based on the feature maps of the time-frequency sub-graphs in the remaining N - 1 bands except the i-th band. i The feature importance at each element position in the feature map of is obtained, and the corresponding elements are weighted according to the feature importance to obtain the fused feature of the i-th band.
[0040] The fusion module is used to fuse the fused features of N bands to obtain the total fused feature.
[0041] The classifier is used to obtain the corresponding atrial fibrillation detection result based on the total fused feature.
[0042] The present invention takes the time-frequency diagram of the BCG signal segment as the processing object, can extract features with higher information density from the image data, and can obtain a more effective feature representation compared with the traditional time series analysis. On this basis, considering the difference in the energy trend distribution of atrial fibrillation patients and non-atrial fibrillation patients in different bands, the time-frequency diagram of the BCG signal segment is divided according to the band, and the cross-band cross-attention mechanism is used to fully combine the features identified in each band of the atrial fibrillation patient's signal, so as to effectively distinguish the features of atrial fibrillation patients and individuals with sporadic arrhythmia, and achieve accurate atrial fibrillation detection.
[0043] It should be noted that there are various methods to obtain the time-frequency diagram of the BCG signal segment, such as wavelet decomposition algorithm (wavelet transform algorithm), Fourier transform, WVD algorithm, etc., which are not limited here. Preferably, in an alternative embodiment, the wavelet decomposition algorithm is used to obtain the time-frequency diagram of the BCG signal segment.
[0044] In an alternative embodiment, the i-th cross-band cross-attention module is used to multiply the attention map AM i element-wise under each channel dimension of the feature map of i to obtain the fused feature of the i-th band.
[0045] Among them, f a (·) is an activation function; ∑ C (·) represents accumulation along the channel dimension; F k is the feature map of the time-frequency sub-graph I k ; ||·|| represents the L1 norm. It should be noted that the activation function f a (·) can be various activation functions, such as sigmoid, ReLU, LeakyReLU, Tanh functions, etc., which are not limited here. It should be noted that the element at a certain position in the attention map AM i is the feature importance at the corresponding element position in the feature map of the time-frequency sub-graph I i .
[0046] It should be noted that there are various feature extraction modules that can be used, which can be CNN, RNN, autoencoders, encoders in Transformer, etc., and are not limited here.
[0047] To extract more abundant features, preferably, in an alternative implementation, the feature extraction module is a multi-scale feature extraction module; the i-th feature extraction module is used to extract the time-frequency subgraph I i Feature maps at M different scales
[0048] The i-th cross-band cross-attention module is used to calculate the time-frequency subgraph I for each scale respectively based on the feature maps of the time-frequency subgraphs at the corresponding scale in the remaining N - 1 bands except the i-th band. i The feature importance at each element position in the feature map at the corresponding scale, and weight the corresponding elements according to the feature importance to obtain the fused feature of the i-th band at the corresponding scale; the fused features of the i-th band at each scale together constitute the fused feature of the i-th band.
[0049] Preferably, the cross-band cross-attention module includes M cross-band cross-attention units; the j-th cross-band cross-attention unit in the i-th cross-band cross-attention module is used to calculate the time-frequency subgraph I based on the feature maps of the time-frequency subgraphs at the j-th scale in the remaining N - 1 bands except the i-th band. i The feature importance at each element position in the feature map at the j-th scale, and weight the corresponding elements according to the feature importance to obtain the fused feature of the i-th band at the j-th scale.
[0050] In an alternative implementation, the fused feature of the i-th band at the j-th scale is obtained through the following method: in the feature map Multiply pointwise by the attention map under each channel dimension To obtain the fused feature of the i-th band at the j-th scale; j = 1, 2, …, M;
[0051] Among them, f a (·) is an activation function; ∑ C (·) represents summation along the channel dimension; Is the time-frequency subgraph I k Feature map at the j-th scale; ||·|| represents the L1 norm. It should be noted that the activation function f a (·) can be various activation functions, such as sigmoid, ReLU, LeakyReLU, Tanh functions, etc., and are not limited here. It should be noted that the attention map The element at a certain position in is the feature map The feature importance of the corresponding element position in .
[0052] Preferably, in an optional implementation, the multi-scale feature extraction module includes M serially connected coding blocks; a downsampling layer is provided between two adjacent coding blocks. Preferably, in an optional implementation, the coding block includes multiple cascaded convolutional layers; wherein the input end of the first convolutional layer is connected to the output end of the last convolutional layer through a residual; and a cascaded batch normalization layer and an activation layer are also provided between two adjacent convolutional layers.
[0053] It should be noted that, considering that the BCG signal is easily interfered by external factors such as body movement in actual use, preferably, in an optional implementation, the above-mentioned BCG signal segment is obtained by filtering, evenly dividing and normalizing the original collected BCG signal in sequence. Preferably, the above-mentioned filtering process includes: mean square error filtering and bandpass filtering performed in sequence. The patient's violent body movement or bed leaving segment is eliminated by root mean square filtering, and components unrelated to the heartbeat are removed by bandpass filtering, thereby removing invalid signal segments such as motion artifacts and noise interference.
[0054] Furthermore, considering that the existing technology usually requires a longer segment for calculation when detecting atrial fibrillation based on heart rate characteristics, long-term, continuous, high-quality segments are generally required for input. In actual use, the BCG signal is easily interfered by external factors such as body movement, and the accuracy is low. Preferably, the length of the above BCG signal segment is set to 5 seconds to 30 seconds to get rid of the limitation of over-reliance on heart rhythm information and input segment length in previous work, thereby further improving the accuracy of atrial fibrillation detection.
[0055] It should be noted that there are many normalization processes that can be used, such as LayerNorm normalization, BatchNorm normalization, InstanceNorm normalization, GroupNorm normalization, etc., which are not limited here.
[0056] It should be noted that there are various methods for the fusion module to fuse the fusion features of N frequency bands; when the fusion features only include features of one scale: the fusion features of N frequency bands can be directly concatenated (i.e., concatenation fusion), and methods such as weighted summation and gated mechanism fusion can also be used for fusion, which are not limited here. When the fusion features include features of multiple scales: the fusion features of N frequency bands can be directly concatenated along the frequency band dimension and the scale dimension. For example, the fusion features of other scales except the fusion features of the largest scale among the fusion features of multiple scales of N frequency bands are respectively upsampled, the fusion features of each scale are transformed into the largest scale, divided into N categories according to the frequency band, the fusion features in the same frequency band are concatenated, and then the concatenated fusion features in different frequency bands are added to obtain the total fusion feature; in addition, methods such as spatial pyramid pooling (SPP) and bidirectional feature pyramid (BiFPN) can also be used for fusion, which are not limited here.
[0057] It should be noted that there are various classifiers that can be used, such as MLP, SVM, CNN, fully connected layer, softmax layer, etc., which are not limited here.
[0058] To further illustrate the atrial fibrillation detection system provided by the present invention, a specific embodiment will be described in detail below:
[0059] In this embodiment, taking N = 3 and M = 4 as examples, the specific atrial fibrillation detection system is as Figure 1 shown. Using the BCG signal segment as the detection signal, through signal decomposition and feature extraction, combined with a deep learning model, atrial fibrillation detection is performed through continuous fixed-length signal segments. Specifically, it involves the following processes:
[0060] Signal acquisition:
[0061] Collect the original BCG signal of the user. In this embodiment, a pressure sensor is used to acquire the BCG signal, and the BCG signal of each user is independently stored in the form of a binary group of time and amplitude. The amplitude of the original BCG signal is normalized and standardized to the interval [0, 1], and then the root mean square (RMS) filter is used to detect invalid signals to eliminate the segments of the patient's violent body movement or getting out of bed. The RMS filtering formula is as follows:
[0062]
[0063] Among them, S[n] represents the filtered signal, X[n] is the signal before filtering, and the window length W is taken as 50. The local energy of the signal is squared and summed, and then the root mean square is taken to smooth the signal and highlight the high-energy region, facilitating the detection of anomalies. According to the empirical value, the lower limit threshold of the effective signal is set to 0.1, and the upper limit threshold is set to 0.25. When the amplitude of S[n] is less than 0.1, it is considered that the patient deviates from the sensor and is marked as an invalid signal segment; when the signal amplitude is greater than 0.25, it is considered a motion artifact and is also marked as an invalid signal segment.
[0064] After eliminating the segments of the patient's violent body movement or getting out of bed through the root mean square filter, a band-pass filter of 0.8 Hz - 15 Hz is used to remove the components unrelated to the heartbeat, thereby removing invalid signal segments such as motion artifacts and noise interference.
[0065] After removing invalid signal segments such as motion artifacts and noise interference, the BCG signal is evenly segmented into BCG signal segments of a specified length (preferably 5 seconds to 30 seconds). Subsequently, each segment is normalized by LayerNorm to reduce the dependence on absolute values and focus on the relative change values. The LayerNorm formula is as follows:
[0066]
[0067] Among them, μ is the average value of the input segment, σ 2 is the variance of the input segment, and ε is a small positive number (equal to 1e -5 ) to avoid the situation of division by zero.
[0068] Preprocessing:
[0069] In this embodiment, the given preprocessed BCG signal segment x[t] is decomposed by continuous wavelet transform to obtain wavelet coefficients:
[0070]
[0071] Among them, n is the signal length of each epoch, ψ(t) is the Morlet wavelet basis function (the excellent performance of the Morlet wavelet basis in the field of physiological signal processing), a is the scale parameter, b is the translation parameter, W(a, b) is the coefficient of the wavelet scale a of x[t] at position b, and the corresponding relationship between the wavelet scale and the frequency is:
[0072]
[0073] Among them, f c is the center frequency of the wavelet basis function, and f is the frequency corresponding to the wavelet scale a.
[0074] Thus, the time-frequency diagram of the BCG signal segment is obtained.
[0075] The time-frequency diagram of the BCG signal segment is divided according to the frequency band I ∈ R 3×H×W to obtain time-frequency sub-diagrams x low , x mid , x high ∈ R 3×H / 3×W . Specifically, the time-frequency diagrams (spectrum diagrams) of each frequency band for normal people, patients with arrhythmia, and patients with atrial fibrillation are as Figure 2 shown. Among them, (a) is the low, medium, and high-frequency component diagram of normal people, (b) is the low, medium, and high-frequency component diagram of patients with arrhythmia, and (c) is the low, medium, and high-frequency component diagram of patients with atrial fibrillation. In this embodiment, the low-frequency range is 1 - 5 Hz, the medium-frequency range is 5 - 9 Hz, and the high-frequency range is 9 - 13 Hz. It can be found that the low, medium, and high-frequency energy trends of patients with atrial fibrillation and non-atrial fibrillation patients (including those with arrhythmia) are inconsistent: the low, medium, and high-frequency energy trends of patients with atrial fibrillation are consistent, while the energy distributions of the low, medium, and high-frequency bands of non-atrial fibrillation patients are chaotic.
[0076] Feature extraction and classification:
[0077] The time-frequency sub-diagrams of different frequency bands are sent into their respective feature extraction modules to obtain feature maps of the low, medium, and high-frequency bands at each scale
[0078] Taking the high-frequency band image x high as an example, it is input into the corresponding feature extraction module. In the feature extraction module, x high sequentially passes through four encoding blocks with the same structure. Each encoding block includes three cascaded convolutional layers (a cascaded BatchNorm layer and a Relu layer are also set between two adjacent convolutional layers). The sizes of the convolutional kernels in the convolutional layers are 1*1, 3*3, and 3*3 in sequence (the first convolutional layer is used to increase the number of channels). After each encoding block, a downsampling layer (a max pooling layer with a size of 2 in this embodiment) is followed to extract the most significant features, reducing the risk of overfitting while reducing the data dimension; in addition, a residual connection block for increasing the number of channels is required, and then the outputs of the encoding block and the residual connection block are concatenated as the input of the next encoding block. The corresponding calculation process is expressed as:
[0079]
[0080] where ConvBlock represents the encoding block (convolutional block), Conv is the residual connection block for increasing the number of channels, is the output of the i + 1-th encoding block, which is the feature extraction result at each scale (specifically, when represents the original input x high ).
[0081] Design a cross - band cross - attention mechanism to model the correlation of feature vectors of low, medium, and high frequency bands at each scale, and use the information of the current scale in other bands to reconstruct the feature map of the current band. Take the low - frequency features and medium - frequency features to guide the reconstruction process of high - frequency features as an example. During this process, it is necessary to construct an attention - focused region map of low - frequency and medium - frequency features, and its construction process is described as follows:
[0082]
[0083] Among them, Σ C (·) represents summation along the channel dimension, is the attention map for reconstructing the high - frequency feature vector based on low - and medium - frequencies at the i - th scale. The finally reconstructed feature vector is Here, ((·)×(·)) is broadcast multiplication, that is, point - wise multiplication is performed separately for each channel dimension of the feature map with the attention map As Figure 3 shown is the result visualization diagram of the cross - band cross - attention module. Among them, (a) is the attention - focused region map of normal people, (b) is the attention - focused region map of patients with arrhythmia, and (c) is the attention - focused region map of patients with atrial fibrillation.
[0084] The reconstructed feature vector is expressed as After passing through two 3x3 convolutions in sequence, adaptive average pooling is performed to obtain the feature vector for classification. Subsequently, it passes through two fully - connected layers and is mapped to the classification dimension to generate the atrial fibrillation detection result, which is expressed as:
[0085]
[0086] Among them, Concat fre,scale (·) represents concatenation along the frequency - band dimension and scale dimension. P ∈ R 1×2 is the feature vector for final classification.
[0087] This embodiment uses the BCG signal as the detection signal and introduces an early atrial fibrillation detection system based on time-frequency feature fusion. By processing the time-frequency map obtained through wavelet transform, features with higher information density can be extracted from the image data, and more effective feature representations can be obtained compared with traditional time series analysis. At the same time, a cross-band cross-attention mechanism is innovatively introduced, which fully combines the features identified in each frequency band of the signals of atrial fibrillation patients to effectively distinguish atrial fibrillation patients from individuals with sporadic arrhythmias. Using this method, the present invention can adapt to BCG segments of different lengths and maintain an accuracy of 93.89% even on a dataset as short as 5 s, exceeding the existing state-of-the-art methods and meeting the application requirements in actual scenarios, providing a good strategy for early atrial fibrillation detection.
[0088] The present invention provides an early atrial fibrillation detection system based on the fusion of time-frequency features of ballistocardiogram signals, which is efficient, accurate, and robust, and is applicable to multiple fields, including home health management, intelligent medical devices, public health monitoring, etc., providing a reliable early atrial detection solution for users. The application prospects of the present invention include, but are not limited to, in a medical environment, detecting atrial fibrillation patients through short-time ballistocardiogram signals to assist in the early discovery and intervention of diseases and ensure the accuracy and timeliness of detection results; in intelligent wearable devices, using built-in heart rate sensors to monitor the risk of early atrial fibrillation in real time and providing a convenient means of health management for users; in public health scenarios, through portable non-invasive detection devices, efficient atrial fibrillation detection can be carried out on a large scale of people, significantly improving the detection coverage rate and efficiency.
[0089] In a specific embodiment, sensors are built into a mattress or a seat cushion to continuously collect short-time ballistocardiogram (BCG) signals of each user, which can non-invasively monitor the normal condition of the user's heartbeat and achieve efficient atrial fibrillation detection in actual life scenarios. For example, in intelligent medical devices, through collecting short-time signals and performing rapid analysis, daily health monitoring of home users can be realized.
[0090] In a second aspect, the present invention provides a training method for the above atrial fibrillation detection system, including: using the BCG signal segments in a pre-collected training set as inputs and the corresponding labels indicating the presence or absence of atrial fibrillation as outputs to train the atrial fibrillation detection system.
[0091] Preferably, the above training set includes BCG signal segments of different subjects, specifically including BCG signal segments of normal people, BCG signal segments of atrial fibrillation patients, and BCG signal segments of non-atrial fibrillation patients during sporadic arrhythmias.
[0092] The method for obtaining the above BCG signal segments is the same as the method for obtaining BCG signal segments adopted in the first aspect of the present invention.
[0093] The related technical solutions are the same as the atrial fibrillation detection system provided in the first aspect of the present invention, and will not be elaborated here.
[0094] In a third aspect, the present invention provides an atrial fibrillation detection method, including: inputting a BCG signal segment to be detected into the atrial fibrillation detection system provided in the first aspect of the present invention to obtain a corresponding atrial fibrillation detection result.
[0095] The acquisition method of the above BCG signal segment is the same as the acquisition method of the BCG signal segment adopted in the first aspect of the present invention.
[0096] The related technical solutions are the same as the atrial fibrillation detection system provided in the first aspect of the present invention, and will not be elaborated here.
[0097] In a fourth aspect, the present invention further provides a computer-readable storage medium, which includes a stored computer program. When the computer program is run by a processor, it controls the device where the storage medium is located to execute the method provided in the second aspect or the third aspect of the present invention.
[0098] The related technical solutions are the same as the training method of the atrial fibrillation detection system provided in the second aspect of the present invention and the atrial fibrillation detection method provided in the third aspect, and will not be elaborated here.
[0099] In a fifth aspect, the invention further provides a computer program product, including a computer program / instructions. When the computer program / instructions are executed by a processor, they implement the method provided in the second aspect or the third aspect of the present invention.
[0100] The related technical solutions are the same as the training method of the atrial fibrillation detection system provided in the second aspect of the present invention and the atrial fibrillation detection method provided in the third aspect, and will not be elaborated here.
[0101] Those skilled in the art can easily understand that the above are only the preferred embodiments of the present invention, and are not used to limit the present invention. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. An atrial fibrillation detection system, characterized in that: include: Preprocessing module, N feature extraction modules, N cross-band attention modules, fusion module and classifier; N≥2; The preprocessing module is used to obtain the time-frequency diagram of the input BCG signal segment and divide it according to the frequency band to obtain the time-frequency sub-graphs I1, I2, ..., I N ; The i-th feature extraction module is used to extract the time-frequency sub-graph I i feature map; i = 1, 2, ..., N; The i-th cross-band attention module is used to calculate the time-frequency subgraph I based on the feature graphs of the time-frequency subgraphs in the remaining N-1 frequency bands except the i-th frequency band i The feature importance of each element position in the feature map is calculated, and the corresponding elements are weighted according to the feature importance to obtain the fusion feature of the i-th frequency band; The fusion module is used to fuse the fusion features of N frequency bands to obtain the total fusion feature; The classifier is used to obtain a corresponding atrial fibrillation detection result based on the total fusion feature.
2. The atrial fibrillation detection system according to claim 1, characterized in that: The i-th cross-band attention module is used to i In each channel dimension of the feature map, the point multiplication of the attention map AM is performed i , get the fusion features of the i-th frequency band; in, f a (·) is the activation function; ∑ C (·) indicates accumulation along the channel dimension; F K is the time-frequency subgraph I k The feature map of ; ||·|| represents the L1 norm.
3. The atrial fibrillation detection system according to claim 1, characterized in that: The feature extraction module is a multi-scale feature extraction module; the i-th feature extraction module is used to extract the time-frequency sub-graph I i Feature maps at M different scales M ≥ 2; The i-th cross-band cross attention module is used to calculate the time-frequency subgraph I for each scale based on the feature graphs of the time-frequency subgraphs in the remaining N-1 frequency bands except the i-th frequency band at the corresponding scale. i The feature importance of each element position in the feature map at the corresponding scale, and weight the corresponding elements according to the feature importance to obtain the fusion feature of the i-th frequency band at the corresponding scale; The fusion features of the i-th frequency band at each scale together constitute the fusion features of the i-th frequency band.
4. The atrial fibrillation detection system according to claim 3, characterized in that: The cross-band cross-attention module includes M cross-band cross-attention units; The jth cross-band cross-band attention unit in the i-th cross-band cross-band attention module is used to Point-by-point attention map for each channel dimension Get the fusion features of the i-th frequency band at the j-th scale; j=1,2,…,M; in, f a (·) is the activation function; Σ C (·) indicates accumulation along the channel dimension; is the time-frequency subgraph I k Feature map at the jth scale; ‖·‖ represents the L1 norm.
5. The atrial fibrillation detection system according to any one of claims 1 to 4, characterized in that: The BCG signal segments are obtained by sequentially performing filtering, uniform division and normalization processing on the originally collected BCG signals.
6. The atrial fibrillation detection system according to claim 5, characterized in that: The filtering process includes: mean square error filtering and band pass filtering performed in sequence.
7. The atrial fibrillation detection system according to claim 5, characterized in that: The length of the BCG signal segment is 5 seconds to 30 seconds.
8. The training method for an atrial fibrillation detection system according to any one of claims 1 to 7, characterized in that: include: The atrial fibrillation detection system is trained by taking the BCG signal segments in the pre-collected training set as input and the corresponding labels indicating whether atrial fibrillation exists as output.
9. A method for detecting atrial fibrillation, characterized in that: include: The BCG signal segment to be detected is input into the atrial fibrillation detection system according to any one of claims 1 to 7 to obtain the corresponding atrial fibrillation detection result.
10. An electronic device comprising: A memory and a processor, wherein the memory stores a computer program, and the processor executes the method according to claim 8 or 9 when executing the computer program.