BCG heartbeat detection system, training method and detection method
By using a cross-modal semantic anchoring module and a fine-grained waveform reconstruction module, the implicit ventricular depolarization information of the BCG signal is extracted using the cardiac electromechanical coupling mechanism. This solves the problems of false detection and false negative detection in BCG heartbeat detection in arrhythmia scenarios and achieves high-precision heartbeat detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-30
- Publication Date
- 2026-04-10
AI Technical Summary
Existing BCG heart rate detection technology is difficult to achieve accurate and robust heart rate detection under complex and variable pathological conditions, especially in arrhythmia scenarios where the false detection and false negative rates are high and it is easily affected by motion.
A cross-modal semantic anchoring module and a fine-grained waveform reconstruction module are employed to extract the implicit ventricular depolarization information of the BCG signal through convolutional embedding and cross-attention mechanisms, convert it into a heartbeat indication signal of the QRS wave, and detect it using the cardiac electromechanical coupling mechanism.
Maintaining high detection accuracy and robustness under arrhythmic conditions, significantly improving the accuracy and cross-device generalization ability of non-contact cardiac rhythm monitoring.
Smart Images

Figure CN121817837A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of medical signal processing technology, and more specifically, relates to a BCG heartbeat detection system, training method, and detection method. Background Technology
[0002] Heart rhythm monitoring is crucial for cardiovascular risk assessment. While electrocardiography (ECG) is the gold standard for assessing heart rhythm, it requires skin contact electrodes, making it unsuitable for long-term, daily monitoring. BCG signals, as a non-invasive monitoring method, capture the minute body movements caused by the heart's ejection of blood, offering the potential for unobtrusive, long-term monitoring.
[0003] However, existing BCG heartbeat detection techniques (such as J-peak detection, template matching, and energy envelope analysis) and most deep learning methods essentially rely on the assumptions of external morphological consistency and periodicity of the BCG signal. These methods are often limited to the extraction of shallow features from the mechanical vibration waveform. In arrhythmia scenarios (such as atrial fibrillation and premature atrial contractions), the patient's cardiac electrical activity pattern is disrupted, leading to significant variations and inconsistencies in the downstream mechanical vibration (BCG) morphology. In this case, methods that only focus on BCG morphology will fail due to the loss of stable feature anchors, resulting in a large number of false positives and false negatives. Furthermore, BCG signals contain complex peaks (H, I, J, K, etc.) and are highly susceptible to motional interference; therefore, existing methods struggle to achieve accurate and robust heartbeat detection under complex and variable pathological conditions. Summary of the Invention
[0004] In view of the above-mentioned defects or improvement needs of the existing technology, the present invention provides a BCG heartbeat detection system, training method and detection method to solve the technical problem that the existing technology is difficult to achieve accurate and robust heartbeat detection under complex and variable pathological conditions.
[0005] To achieve the above objectives, in a first aspect, the present invention provides a BCG heartbeat detection system, comprising: The cross-modal semantic anchoring module is used to perform convolutional embedding on the BCG signal segments to be detected and superimpose positional encoding to obtain a feature sequence; it captures long-range dependencies in the feature sequence to extract global semantic features containing implicit ventricular depolarization information. The fine-grained waveform reconstruction module is a U-Net network structure. The encoder in the U-Net network structure is used to receive the input of BCG signal segments and corresponding global semantic features, encode the features of the BCG signal segments, and inject global semantic features into the encoded features of the BCG signal segments based on the cross-attention mechanism during the encoding process. The decoder in the U-Net network structure is used to decode the encoded features of the BCG signal segments to obtain the heartbeat indication signal of the QRS wave. The heartbeat detection output module is used to detect the peak value of the heartbeat indication signal in order to locate the heartbeat moment and calculate heart rate parameters.
[0006] More preferably, the encoder includes: a first encoding branch and a second encoding branch; the decoder includes: a decoding branch; Both the first and second coding branches include N cascaded coding units for extracting spatial features; a downsampling unit is set between two adjacent coding units; after the last coding unit of the first coding branch, there is also an N+1th coding unit for extracting temporal features; between the i-th and i+1th coding units of the first coding branch, there is also an i-th cross-attention unit located before the corresponding downsampling unit. ; ; The first and second coding branches respectively receive the input of the BCG signal segment and the corresponding global semantic features; the i-th cross-attention unit is used to perform feature fusion based on the cross-attention mechanism, using the feature output by the i-th coding unit in the first coding branch as the Q vector, and the feature output by the i-th coding unit in the second coding branch as the K vector and V vector, to obtain the i-th fused feature. The decoding branch includes: N cascaded decoding units; the i-th decoding unit is preceded by the i-th upsampling unit and the i-th fusion unit connected in sequence; The output of the (N+1)th level coding unit is connected to the input of the first upsampling unit; The i-th fusion unit is used to fuse the features output by the i-th upsampling unit and the fusion features output by the N-i+1-th cross-attention unit, and then output the fusion features to the i-th decoding unit.
[0007] More preferably, the N+1th level coding unit is a Bi-LSTM model.
[0008] More preferably, the cross-modal semantic anchoring module includes: a convolutional embedding unit, a positional encoding unit, and a multi-head self-attention encoding unit; Convolutional embedding units are used to map BCG signal segments into high-dimensional features through multi-scale one-dimensional convolutional layers; Position coding units are used to inject sinusoidal position codes into high-dimensional features to obtain feature sequences; The multi-head self-attention encoding unit includes: a Transformer encoder or multiple stacked Transformer encoders, used to capture long-range dependencies in the feature sequence to extract global semantic features containing implicit ventricular depolarization information.
[0009] More preferably, the BCG signal segment is obtained by filtering and segmenting the acquired raw BCG signal, including: performing bandpass filtering on the raw BCG signal, using a sliding window to overlap and slice the filtered BCG signal, and generating a BCG signal segment of fixed length.
[0010] In a second aspect, the present invention provides a training method for a BCG heartbeat detection system, wherein the BCG heartbeat detection system is the BCG heartbeat detection system provided in the first aspect of the present invention. The above training methods include: Obtain a training sample set; wherein, the training sample set includes: multiple BCG signal segment samples; each BCG signal segment sample carries a QRS composite wave label of an ECG signal synchronized with it; Each BCG signal segment sample in the training sample set is input into the cross-modal semantic anchoring module of the BCG heartbeat detection system to obtain the corresponding global semantic features, which are then mapped to the preliminary detection results of the corresponding heartbeat indication signal. The cross-modal semantic anchoring module is trained by minimizing the difference loss between the preliminary detection results and the corresponding QRS composite wave label. By fixing the parameters in the cross-modal semantic anchoring module, each BCG signal segment sample in the training sample set is input into the trained cross-modal semantic anchoring module to obtain the corresponding global semantic features. The BCG signal segment samples and the corresponding global semantic features are then input into the fine-grained waveform reconstruction module of the BCG heartbeat detection system to obtain the final detection result of the corresponding heartbeat indication signal. The fine-grained waveform reconstruction module is trained by minimizing the difference loss between the final detection result and the corresponding QRS composite wave label, thereby realizing the training of the BCG heartbeat detection system.
[0011] Thirdly, the present invention provides a BCG heartbeat detection method, comprising: inputting a BCG signal segment to be detected into the BCG heartbeat detection system provided in the first aspect of the present invention to obtain the corresponding heart rate parameters.
[0012] Fourthly, the present invention provides an electronic device comprising: a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the method provided in the second or third aspect of the present invention.
[0013] Fifthly, the present invention also provides a computer-readable storage medium comprising a stored computer program, wherein the computer program, when executed by a processor, controls the device in which the storage medium is located to perform the method provided in the second or third aspect of the present invention.
[0014] In a sixth aspect, the invention also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the method provided in the second or third aspect of the invention.
[0015] In summary, the above-described technical solutions conceived in this invention can achieve the following beneficial effects: 1. This invention provides a BCG heartbeat detection system. Research has shown that although the morphology of BCG in patients with arrhythmia is extremely unstable, the ventricular depolarization events represented by their cardiac electrophysiological activity (i.e., QRS complexes in ECG) still have high physiological semantic stability. Based on this, this invention utilizes the cardiac "electromechanical" coupling mechanism to mine the implicit physiological semantics in BCG signal segments through a cross-modal semantic anchoring module and a fine-grained waveform reconstruction module, and converts them into heartbeat indication signals of QRS waves. Among them, the cross-modal semantic anchoring module extracts the implicit global semantics of ventricular depolarization by capturing long-range dependencies in BCG signal segments, so as to roughly lock the "semantic anchor point" of heartbeat occurrence in uncertain waveforms. The fine-grained waveform reconstruction module integrates global semantic features into local waveform features through a cross-attention mechanism, realizing the dynamic fusion and alignment of morphological features and semantic features. Based on this, the present invention overcomes the dependence of traditional methods on the consistency of BCG waveform morphology, and can still maintain high detection accuracy in scenarios where arrhythmias such as atrial fibrillation and premature beats cause severe signal distortion, significantly improving the robustness, accuracy and cross-device generalization ability of non-contact heart rhythm monitoring.
[0016] 2. This invention provides a training method for a BCG heartbeat detection system. Considering that models trained through end-to-end training methods directly reconstruct ECG waveforms from BCG, aiming for overall waveform fidelity, can easily lead to coupling between non-critical features such as P waves and T waves and QRS wave features, affecting the extraction accuracy of core rhythm information. Therefore, this invention employs a two-stage training approach. The first stage trains the cross-modal semantic anchoring module to achieve accurate global semantic anchoring. The second stage, with parameters fixed in the cross-modal semantic anchoring module, trains the fine-grained waveform reconstruction module to achieve local waveform refinement. This avoids coupling between non-critical features such as P waves and T waves and QRS wave features, further improving the detection accuracy of the trained system. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of the structure of a BCG heartbeat detection system provided in an embodiment of the present invention; Figure 2 Example diagrams of ECG signals, BCG signals, and heartbeat indication signals generated by the BCG heartbeat detection system provided in this embodiment of the invention; Figure 3This is a flowchart illustrating the training method of the BCG heartbeat detection system provided in an embodiment of the present invention. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the 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 merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.
[0019] To achieve the above objectives, in a first aspect, the present invention provides a BCG heartbeat detection system, comprising: The cross-modal semantic anchoring module is used to perform convolutional embedding on the BCG signal segments to be detected and superimpose positional encoding to obtain a feature sequence; it captures long-range dependencies in the feature sequence to extract global semantic features containing implicit ventricular depolarization information. The fine-grained waveform reconstruction module is a U-Net network structure. The encoder in the U-Net network structure is used to receive the input of BCG signal segments and corresponding global semantic features, encode the features of the BCG signal segments, and inject global semantic features into the encoded features of the BCG signal segments based on the cross-attention mechanism during the encoding process. The decoder in the U-Net network structure is used to decode the encoded features of the BCG signal segments to obtain the heartbeat indication signal of the QRS wave. The heartbeat detection output module is used to detect the peak value of the heartbeat indication signal in order to locate the heartbeat moment and calculate heart rate parameters.
[0020] This invention reveals that although the morphology of cardiac blood glucose (BCG) in patients with arrhythmia is extremely unstable, the ventricular depolarization events represented by their cardiac electrophysiological activity (i.e., the QRS complex in ECG) still possess high physiological semantic stability (ventricular depolarization is the electrophysiological trigger for cardiac mechanical contraction). Therefore, the core of this invention lies in accurately capturing the "ventricular depolarization semantics" hidden in the BCG signal. To this end, the heartbeat detection system provided by this invention takes "capturing ventricular depolarization semantics" as its core guiding principle and adopts a phased modeling approach of "global semantic anchoring" and "local waveform refinement." The system utilizes a cross-modal attention mechanism to reconstruct the BCG signal detection task into a "semantic feature conversion task"—that is, extracting stable electrophysiological semantic features from chaotic mechanical vibration signals, thereby balancing detection robustness and temporal positioning accuracy.
[0021] This invention utilizes the electrophysiological stability of the ECG-QRS wave as a semantic anchor point, without relying on the waveform morphology consistency of the BCG signal, thereby enabling the identification of irregular heartbeats under arrhythmic conditions such as atrial fibrillation and premature atrial contractions.
[0022] In one alternative implementation, the encoder includes: a first encoding branch and a second encoding branch; the decoder includes: a decoding branch; Both the first and second coding branches include N cascaded coding units for extracting spatial features; a downsampling unit is set between two adjacent coding units; after the last coding unit of the first coding branch, there is also an N+1th coding unit for extracting temporal features; between the i-th and i+1th coding units of the first coding branch, there is also an i-th cross-attention unit located before the corresponding downsampling unit. ; ; The first and second coding branches respectively receive the input of the BCG signal segment and the corresponding global semantic features; the i-th cross-attention unit is used to perform feature fusion based on the cross-attention mechanism, using the feature output by the i-th coding unit in the first coding branch as the Q vector, and the feature output by the i-th coding unit in the second coding branch as the K vector and V vector, to obtain the i-th fused feature. The decoding branch includes: N cascaded decoding units; the i-th decoding unit is preceded by the i-th upsampling unit and the i-th fusion unit connected in sequence; The output of the (N+1)th level coding unit is connected to the input of the first upsampling unit; The i-th fusion unit is used to fuse the features output by the i-th upsampling unit and the fusion features output by the N-i+1-th cross-attention unit, and then output the fusion features to the i-th decoding unit.
[0023] It should be noted that there are multiple methods for the above-mentioned fusion unit to fuse features, such as splicing along the channel dimension, weighted summation, and gating mechanism fusion. No limitation is made here; the preferred method is splicing along the channel dimension.
[0024] It should be noted that the encoding unit for extracting spatial features mentioned above can be a CNN model, an attention mechanism model, a Transformer model, etc., and is not limited here, but a CNN model is preferred. The N+1 level encoding unit for extracting temporal features mentioned above can be an LSTM model, a Bi-LSTM model, an RNN model, etc., and is not limited here. Preferably, in one optional implementation, the N+1 level encoding unit is a Bi-LSTM model.
[0025] In one optional implementation, the cross-modal semantic anchoring module includes: a convolutional embedding unit, a positional encoding unit, and a multi-head self-attention encoding unit; Convolutional embedding units are used to map BCG signal segments into high-dimensional features through multi-scale one-dimensional convolutional layers; Position coding units are used to inject sinusoidal position codes into high-dimensional features to obtain feature sequences; The multi-head self-attention encoding unit includes: a Transformer encoder or multiple stacked Transformer encoders, used to capture long-range dependencies in the feature sequence to extract global semantic features containing implicit ventricular depolarization information.
[0026] In one optional implementation, the BCG signal segment is obtained by filtering and segmenting the acquired raw BCG signal, including: performing bandpass filtering on the raw BCG signal, using a sliding window to overlap and slice the filtered BCG signal, and generating a BCG signal segment of fixed length.
[0027] It should be noted that the specific implementation of each module in this invention is not limited to the examples described above. For instance, the encoder used in the cross-modal semantic anchoring module to capture long-range dependencies in the feature sequence to extract global semantic features containing implicit ventricular depolarization information is not limited to the Transformer encoder in the above embodiments, but can also be a dilated convolutional network (TCN) with a long receptive field or a Conformer structure, etc., which is not limited here. The U-Net network structure of the fine-grained waveform reconstruction module is not limited to the basic U-Net network structure, but can also be ResU-Net, Attention U-Net, etc. The scaling factor calculation method in the cross-attention mechanism of the cross-attention unit can also be adjusted; as long as the local waveform can be reconstructed under the conditional constraints of global semantic features, it should be considered to fall within the protection scope of this invention.
[0028] To further illustrate the BCG heartbeat detection system provided by the present invention, a detailed description is provided below with reference to an embodiment: In the context of arrhythmias (such as atrial fibrillation and premature beats), the disruption of the regularity of cardiac mechanical contraction leads to significant beat-by-beat variations in the morphology of BCG signals, which are highly susceptible to interference from motional noise, rendering traditional detection methods based on the assumption of morphological consistency ineffective.
[0029] To overcome the limitation of existing BCG detection technologies in arrhythmia scenarios due to significant morphological variations, this embodiment provides a two-stage heartbeat detection system called SemiHID (Semantics-indicated Heartbeat Identification), based on cross-modal semantic alignment. Utilizing the heart's electromechanical coupling mechanism, it mines the implicit physiological semantics within the BCG signal using a deep learning model, converting it into a QRS heartbeat indication signal, thereby achieving robust heart rhythm monitoring. Figure 1 As shown, it specifically includes: a preprocessing module, a cross-modal semantic anchoring module, a fine-grained waveform reconstruction module, and a heartbeat detection output module.
[0030] 1) Preprocessing module The preprocessing module is used to preprocess the acquired raw BCG signal to obtain BCG signal segments. Specifically, it includes bandpass filtering and resampling of the raw BCG signal.
[0031] In this embodiment, the preprocessing module includes a signal filtering unit and a data enhancement unit. The signal filtering unit performs bandpass filtering of 1-12Hz on the original BCG signal. The data enhancement unit uses a sliding window to perform overlapping slicing on the filtered BCG signal to generate a fixed-length (5s in this embodiment) BCG signal segment.
[0032] 2) Cross-modal semantic anchoring module The cross-modal semantic anchoring module is used to perform convolutional embedding on the BCG signal segments to be detected and superimpose positional encoding to obtain a feature sequence; it captures long-range dependencies in the feature sequence to extract global semantic features that contain hidden ventricular depolarization information.
[0033] Specifically, in this embodiment, the cross-modal semantic anchoring module aims to capture long-range dependencies in BCG signal segments using the Transformer architecture and extract implicit global semantics of ventricular depolarization. First, convolutional embedding is performed on the input BCG signal segments, using multi-scale one-dimensional convolution to capture local geometric features and superimposing positional encoding to preserve temporal information. Then, the resulting feature sequence is input into a Transformer-based encoder network structure, utilizing a multi-head self-attention mechanism to capture long-range dependencies and global rhythm patterns across the entire sequence, outputting global semantic features containing potential ventricular depolarization information. The role of this module is to roughly pinpoint the "semantic anchor point" of heartbeat occurrence within an uncertain waveform.
[0034] The key operations in the cross-modal semantic anchoring module are explained in detail below: Convolutional Embedding and Position Encoding: Let the input single-channel BCG signal segment be... ,in is the time step. To extract high-dimensional features and preserve temporal location information, the model first performs convolutional embedding and positional encoding stacking, calculated as follows:
[0035] in, The convolutional embedding operation consists of three cascaded one-dimensional convolutional layers (with kernel sizes of 1, 3, and 5), used to map scalar signals into high-dimensional feature vectors. This represents the sine wave position code.
[0036] Transformer encoder calculation: This embodiment stacks... A layer (preferably 2 layers) Transformer encoder block. For the first... layer( ), input features are This layer's computation consists of two sub-modules: Multi-Head Self-Attention (MHSA) and Feedforward Network (FFN). Each sub-module is followed by residual connections and Layer Normalization (LN).
[0037] Specifically, for multi-head self-attention calculation: First, using three non-linear convolutional blocks Input features Projected into Q, K, and V spaces:
[0038] Then Decomposed into channels A separate head. For the first Size, calculate scaled dot product attention:
[0039] in, This is a scaling factor used to prevent gradient vanishing.
[0040] Finally, the outputs of all the heads are concatenated to obtain the output of MHSA:
[0041] For feedforward and output updates: The MHSA output, after residual connection and normalization, enters the feedforward network FFN. FFN consists of two linear layers and an intermediate ReLU activation function. The final output of the layer The calculation is as follows:
[0042]
[0043] go through After stacking layers, the final output is a feature sequence. This sequence contains potential global semantic information about ventricular depolarization in the BCG signal fragment.
[0044] 3) Fine-grained waveform reconstruction module The fine-grained waveform reconstruction module is a U-Net network structure. The encoder in the U-Net network structure is used to receive the input of BCG signal segments and corresponding global semantic features, perform feature encoding on the BCG signal segments, and inject global semantic features into the encoded features of the BCG signal segments based on the cross-attention mechanism during the encoding process. The decoder in the U-Net network structure is used to decode the encoded features of the BCG signal segments to obtain the heartbeat indication signal of the QRS wave.
[0045] Specifically, in this embodiment, the fine-grained waveform reconstruction module is built on the U-Net architecture and is used to fuse the waveform details of the BCG signal segment with the global semantic features extracted by the cross-modal semantic anchoring module. This module contains two parallel encoding paths: a morphological path processes the BCG signal segment, and a semantic path processes the global semantic features of the BCG signal segment output by the cross-modal semantic anchoring module. In this embodiment, a cross-attention mechanism is introduced at each skip connection of the encoder: the local features of the morphological path generate a query vector. Generate key vectors from global features of semantic paths. Sum value vector By employing attention computation, global semantics are forcibly "injected" into local waveform features. This design enables the model to leverage local waveform details to retrieve matching heartbeat events from the global semantic library, effectively suppressing artifact noise in non-heartbeat regions. Furthermore, a Bi-LSTM is set at the bottleneck layer of U-Net to enhance explicit modeling of the temporal rhythm consistency of deep features.
[0046] The key operations in the fine-grained waveform reconstruction module are explained in detail below: Dual-path encoding and feature extraction: This includes a morphological path for processing the raw BCG signal and a semantic path for processing the global semantic feature sequence, extracting local waveform features respectively. and semantic features Specifically, in each layer of the encoder There are two parallel paths: the morphological path processes the features of the original BCG signal, and the semantic path processes the semantic features output from the first stage. Let the morphological characteristics of the upper layer be... The semantic features are Features at the current resolution are extracted using convolutional blocks respectively:
[0047]
[0048] Cross-attention fusion: A cross-attention module is introduced at each skip connection of the encoder to fuse global semantic features into local waveform features. Specifically, morphological features... Generate query vectors semantic features Generate key vectors Sum value vector Output of cross-attention The calculation formula is:
[0049] In the formula here This indicates a residual connection that superimposes the original morphological features onto the cross-attention output.
[0050] Temporal bottleneck modeling: A bidirectional long short-term memory network (Bi-LSTM) is connected in series at the bottom layer of U-Net to further perform bidirectional temporal scanning of deep features, constrain the consistency of heartbeat rhythm, and model the temporal rhythm of deep features.
[0051] Decoding and Reconstruction: The decoder restores the resolution through transposed convolution and fuses the features from the coding layer to finally output a high-precision QRS-like heartbeat indicator signal. .
[0052] 4) Heartbeat detection output module The heartbeat detection output module is used to perform peak detection on the heartbeat indication signal to locate the heartbeat moment and calculate heart rate parameters. Specifically, in this embodiment, the heartbeat detection output module is used to apply a peak detection algorithm (such as the Pan-Tompkins algorithm or thresholding method, etc., which is not limited here) to locate the R-peak position on the heartbeat indication signal, thereby determining the heartbeat moment and calculating the heart rate and heart rate variability parameters.
[0053] In this embodiment, the entire workflow of the BCG heartbeat detection system is as follows: The input is a 5-second BCG signal segment (sampling rate 125Hz). First, the signal undergoes preprocessing before entering the first stage. A convolutional embedding layer maps the single-channel signal into high-dimensional features. The Transformer encoder uses a self-attention mechanism to analyze the fluctuation patterns of the entire signal segment, outputting a high-dimensional global semantic feature sequence. At this point, the sequence This already implicitly contains information about "approximately which locations contain heartbeats." Following this, a BCG signal segment... With characteristic sequence Simultaneously, it enters the second stage. During the U-Net encoding process, the cross-attention module plays a crucial role: it examines BCG signal segments. For each peak in the wave, if the peak is in If the corresponding semantic meaning in the text indicates "a heartbeat should be present here," then that feature is enhanced; if If the message "Silent period" is displayed, the peak is considered a motion artifact and suppressed. After smoothing the rhythm with Bi-LSTM and upsampling by the decoder, a clean indicator signal with a shape similar to the ECG QRS wave is finally output. Finally, the heartbeat time can be accurately read from the indicator signal using a peak-finding algorithm.
[0054] Experiments show that this embodiment significantly reduces heart rate estimation error on public databases containing patients with arrhythmias such as atrial fibrillation and premature beats (e.g., the SRRSH and WHU datasets), and demonstrates excellent zero-shot generalization ability in cross-device testing. Specifically, as Figure 2 The diagram shows an example of an ECG signal, a BCG signal, and a heartbeat indication signal generated by the BCG heartbeat detection system provided in this embodiment. The topmost marker indicates the position of the R peak detected by the heartbeat indication signal.
[0055] In a second aspect, the present invention provides a training method for a BCG heartbeat detection system, wherein the BCG heartbeat detection system is the BCG heartbeat detection system provided in the first aspect of the present invention. The above training methods include: Obtain a training sample set; wherein, the training sample set includes: multiple BCG signal segment samples; each BCG signal segment sample carries a QRS composite wave label of an ECG signal synchronized with it; The first stage of training involves inputting each BCG signal segment sample from the training sample set into the cross-modal semantic anchoring module of the BCG heartbeat detection system to obtain the corresponding global semantic features. These features are then mapped (using methods such as linear mapping, multilayer perceptron mapping, convolutional neural network mapping, or nonlinear function mapping; linear mapping is preferred in this embodiment) to the preliminary detection result of the corresponding heartbeat indication signal. By minimizing the difference loss between the preliminary detection result and the corresponding QRS complex wave label, the cross-modal semantic anchoring module is trained to learn how to extract the semantic features of ventricular depolarization from the BCG. The second stage of training involves fixing the parameters in the cross-modal semantic anchoring module, inputting each BCG signal segment sample from the training sample set into the trained cross-modal semantic anchoring module to obtain the corresponding global semantic features; inputting the BCG signal segment samples and the corresponding global semantic features into the fine-grained waveform reconstruction module of the BCG heartbeat detection system to obtain the final detection result of the corresponding heartbeat indication signal; training the fine-grained waveform reconstruction module by minimizing the difference loss between the final detection result and the corresponding QRS composite wave label, enabling the fine-grained waveform reconstruction module to learn to use the cross-attention mechanism for waveform refinement and noise suppression, thereby achieving the training of the BCG heartbeat detection system.
[0056] It should be noted that there are multiple training methods for the BCG heart rate detection system. In addition to the training methods mentioned above, end-to-end methods can also be used for training. There is no limitation here. The training methods mentioned above are just one of the preferred methods.
[0057] This invention addresses the issue that models trained via end-to-end methods directly reconstruct ECG waveforms from BCG, aiming for overall waveform fidelity. However, this approach can easily lead to coupling between non-critical features like P-waves and T-waves and QRS wave features, affecting the accuracy of core rhythm information extraction. Therefore, this invention employs a two-stage training method. The first stage trains the cross-modal semantic anchoring module to achieve accurate global semantic anchoring. The second stage, with parameters fixed in the cross-modal semantic anchoring module, trains the fine-grained waveform reconstruction module to refine local waveforms. This avoids coupling between non-critical features like P-waves and T-waves and QRS wave features, further improving the detection accuracy of the trained system.
[0058] In one optional implementation, the QRS composite wave labels corresponding to the BCG signal segment samples in the training sample set are obtained in advance in the following manner: The synchronously acquired ECG signal was used as the source of ground truth. First, the acquired raw ECG and BCG signals were resampled and bandpass filtered (ECG: 0.5-40Hz; BCG: 1-12Hz). To obtain a clean ventricular depolarization semantic label, the ECG signal was input into a pre-trained QRS segmentation model (such as the U-Net model), which outputs a time-synchronized 0 / 1 binary mask. This mask was then multiplied point-by-point with the raw ECG signal to filter out P waves, T waves, and baseline noise, generating a target waveform sequence that retains only the QRS complex morphology. , which serves as the truth label for subsequent supervised training.
[0059] In one alternative implementation, the first stage of training uses the weighted mean square error (MSE) loss function. By minimizing This enables the cross-modal semantic anchoring module to learn to extract semantic features of ventricular depolarization from the BCG. Specifically, a high weight (set to 3) is assigned to the QRS complex region, forcing the model to prioritize the timing of heartbeats to address the sparsity problem. The formula is as follows:
[0060] in, The signal length; The first-stage predicted waveform (i.e., the preliminary detection result of the heartbeat indicator signal) at time point The amplitude below; For QRS composite wave tags at time points The amplitude below; These are weighting coefficients, at time points When located within the QRS wave region, Take the larger value (preferably 3), otherwise take the smaller value (preferably 1).
[0061] In one alternative implementation, the second-stage training uses the weighted mean square error (MSE) loss function. By minimizing This enables the fine-grained waveform reconstruction module to learn to use cross-attention mechanisms for waveform refinement and noise suppression. The calculation formula is:
[0062] in, The second-stage predicted waveform (i.e., the final detection result of the heartbeat indicator signal) at time point The amplitude below.
[0063] It should be noted that the above methods for measuring difference loss are not limited to the mean squared error (MSE) method. They can also be measured by cross-entropy loss, L2 loss, hinge loss, exponential loss, etc., which are not limited here.
[0064] like Figure 3 The diagram shows a flowchart of a training method for a BCG heartbeat detection system under one optional implementation.
[0065] The related technical solutions are the same as those provided in the first aspect of this invention for the BCG heartbeat detection system, and will not be described in detail here.
[0066] Thirdly, this invention provides a BCG heartbeat detection method, comprising: inputting a BCG signal segment to be detected into the BCG heartbeat detection system provided in the first aspect of this invention; extracting global semantic features via a cross-modal semantic anchoring module; fusing semantic and morphological features via a fine-grained waveform reconstruction module using a cross-attention mechanism to generate a QRS wave heartbeat indication signal; and finally locating the heartbeat moment in the heartbeat detection output module and calculating the corresponding heart rate parameters. This method is not only suitable for healthy individuals, but is particularly suitable for the daily, unobtrusive monitoring of patients with arrhythmias such as atrial fibrillation and premature atrial contractions.
[0067] The related technical solutions are the same as those provided in the first aspect of this invention for the BCG heartbeat detection system, and will not be described in detail here.
[0068] Fourthly, the present invention provides an electronic device comprising: a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the method provided in the second or third aspect of the present invention.
[0069] It should be noted that the aforementioned electronic devices can be smart mattresses, smart cushions, wearable health monitoring devices, medical servers, or cloud computing platforms, etc., and there are no restrictions here.
[0070] The related technical solutions are the same as the training method provided in the second aspect of this invention and the atrial fibrillation detection method provided in the third aspect of this invention, and will not be described in detail here.
[0071] Fifthly, the present invention also provides a computer-readable storage medium comprising a stored computer program, wherein the computer program, when executed by a processor, controls the device in which the storage medium is located to perform the method provided in the second or third aspect of the present invention.
[0072] The related technical solutions are the same as the training method provided in the second aspect of this invention and the atrial fibrillation detection method provided in the third aspect of this invention, and will not be described in detail here.
[0073] In a sixth aspect, the invention also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the method provided in the second or third aspect of the invention.
[0074] The related technical solutions are the same as the training method provided in the second aspect of this invention and the BCG heartbeat detection method provided in the third aspect of this invention, and will not be described in detail here.
[0075] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A BCG heartbeat detection system, characterized in that, include: The cross-modal semantic anchoring module is used to perform convolutional embedding on the BCG signal segment to be detected and superimpose positional encoding to obtain a feature sequence; capture the long-range dependencies in the feature sequence to extract global semantic features containing implicit ventricular depolarization information; The fine-grained waveform reconstruction module is a U-Net network structure. The encoder in the U-Net network structure is used to receive the input of the BCG signal segment and the corresponding global semantic features, perform feature encoding on the BCG signal segment, and inject the global semantic features into the encoded features of the BCG signal segment based on the cross-attention mechanism during the encoding process. The decoder in the U-Net network structure is used to decode the encoded features of the BCG signal segment to obtain the heartbeat indication signal of the QRS wave. The heartbeat detection output module is used to perform peak detection on the heartbeat indication signal in order to locate the heartbeat moment and calculate heart rate parameters.
2. The BCG heartbeat detection system according to claim 1, characterized in that, The encoder includes: a first encoding branch and a second encoding branch; the decoder includes: a decoding branch; Both the first coding branch and the second coding branch include N cascaded coding units for extracting spatial features; a downsampling unit is provided between two adjacent coding units; after the last coding unit of the first coding branch, there is also an N+1th level coding unit for extracting temporal features; between the i-th level and the i+1th level coding units of the first coding branch, there is also an i-th cross attention unit located before the corresponding downsampling unit. ; ; The first coding branch and the second coding branch respectively receive the input of the BCG signal segment and the corresponding global semantic feature; the i-th cross attention unit is used to perform feature fusion based on the cross attention mechanism, using the feature output by the i-th coding unit in the first coding branch as the Q vector, and the feature output by the i-th coding unit in the second coding branch as the K vector and V vector, to obtain the i-th fused feature; The decoding branch includes: N cascaded decoding units; the i-th decoding unit is preceded by an i-th upsampling unit and an i-th fusion unit connected in sequence; The output of the (N+1)th level coding unit is connected to the input of the first upsampling unit; The i-th fusion unit is used to fuse the features output by the i-th upsampling unit and the fusion features output by the N-i+1-th cross-attention unit, and then output the fusion features to the i-th decoding unit.
3. The BCG heartbeat detection system according to claim 2, characterized in that, The N+1 level coding unit is a Bi-LSTM model.
4. The BCG heartbeat detection system according to any one of claims 1-3, characterized in that, The cross-modal semantic anchoring module includes: a convolutional embedding unit, a positional encoding unit, and a multi-head self-attention encoding unit; The convolutional embedding unit is used to map BCG signal segments into high-dimensional features through multi-scale one-dimensional convolutional layers; The position encoding unit is used to inject sinusoidal position codes into the high-dimensional features to obtain a feature sequence; The multi-head self-attention encoding unit includes: a Transformer encoder or multiple stacked Transformer encoders, used to capture long-range dependencies in the feature sequence to extract global semantic features containing implicit ventricular depolarization information.
5. The BCG heartbeat detection system according to any one of claims 1-3, characterized in that, The BCG signal segments are obtained by filtering and segmenting the acquired raw BCG signal, including: bandpass filtering the raw BCG signal, and overlapping slicing the filtered BCG signal using a sliding window to generate BCG signal segments of fixed length.
6. A training method for a BCG heartbeat detection system, characterized in that, The BCG heartbeat detection system is the BCG heartbeat detection system according to any one of claims 1-5; The training method includes: Obtain a training sample set; the training sample set includes: multiple BCG signal segment samples; each BCG signal segment sample carries a QRS composite wave label of an ECG signal synchronized with it; Each BCG signal segment sample in the training sample set is input into the cross-modal semantic anchoring module of the BCG heartbeat detection system to obtain the corresponding global semantic features, which are then mapped to the preliminary detection result of the corresponding heartbeat indication signal. The cross-modal semantic anchoring module is trained by minimizing the difference loss between the preliminary detection result and the corresponding QRS composite wave label. By fixing the parameters in the cross-modal semantic anchoring module, each BCG signal segment sample in the training sample set is input into the trained cross-modal semantic anchoring module to obtain the corresponding global semantic features. The BCG signal segment sample and the corresponding global semantic features are then input into the fine-grained waveform reconstruction module of the BCG heartbeat detection system to obtain the final detection result of the corresponding heartbeat indication signal. The fine-grained waveform reconstruction module is trained by minimizing the difference loss between the final detection result and the corresponding QRS composite wave label, thereby achieving the training of the BCG heartbeat detection system.
7. A BCG heartbeat detection method, characterized in that, include: The BCG signal segment to be detected is input into the BCG heartbeat detection system according to any one of claims 1-5 to obtain the corresponding heart rate parameters.
8. An electronic device, characterized in that, include: A memory and a processor, the memory storing a computer program, the processor executing the computer program to perform the method of claim 6 or 7.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein the computer program, when executed by a processor, controls the device containing the storage medium to perform the method of claim 6 or 7.
10. A computer program product, characterized in that, Includes a computer program / instruction that, when executed by a processor, implements the method of claim 6 or 7.