BCG signal feature extraction system based on bidirectional LSTM model
Through the BCG signal feature extraction system of the bidirectional LSTM model, the problems of inaccurate and poor robustness in BCG signal processing are solved, and more efficient cardiovascular health monitoring and noise resistance are achieved.
Patent Information
- Application Number
- CN202510260157.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-06
- Publication Date
- 2025-07-18
AI Technical Summary
Existing BCG signal processing methods are difficult to effectively extract the characteristics of cardiovascular health parameters, especially when facing different individuals, poor robustness and susceptible to noise, resulting in a decrease in signal quality.
A BCG signal feature extraction system based on the bidirectional LSTM model is adopted, including data acquisition, preprocessing, feature extraction and tag fusion modules. Data preprocessing is through denoising and standardization processing. The feature extraction module uses BiLSTM network structure to capture the bidirectional timing characteristics of the time series, and the output layer determines the label through classification or regression.
It improves the accuracy and stability of BCG signal feature extraction, enhances the reliability and adaptability of cardiovascular health monitoring, reduces noise interference, and improves the accuracy of signal classification.
Smart Images

Figure CN120336799A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of biomedical signal processing, and in particular to a BCG signal feature extraction system based on a bidirectional LSTM model. Background Art
[0002] Ballistocardiogram (BCG) signal is a non-invasive physiological signal that can reflect the mechanical activity of the heart. It mainly comes from the reaction force generated by blood flow during the contraction and relaxation of the heart, causing tiny displacements or vibrations of the human body. This signal can be collected through mattress sensors, seat pressure sensors, wearable devices, etc., and used to analyze cardiovascular health parameters such as heart rate (HR), stroke volume (SV), and cardiac output (CO). Compared with traditional electrocardiogram (ECG) monitoring methods, BCG signals have the advantages of being non-invasive, non-contact, and suitable for long-term continuous monitoring, and have broad application prospects in the fields of home medical care, intelligent health monitoring, sleep quality assessment, etc. However, the application of BCG signals still faces the following challenges: the amplitude of BCG signals is small and is easily affected by noise such as body movement, respiration, and environmental vibration, resulting in a decrease in signal quality and affecting the accuracy of feature extraction. BCG signals contain multiple characteristic waveforms, such as I wave, J wave, K wave, etc., and their timing information is crucial for cardiovascular parameter estimation. Traditional signal processing methods are difficult to accurately extract their features. Physiological characteristics of different individuals (such as body shape, hemodynamic characteristics) will affect the morphology of BCG signals, making the generalization ability of feature extraction methods based on fixed rules relatively weak.
[0003] Currently, traditional BCG signal processing methods mainly rely on techniques such as time-frequency analysis, template matching, and statistical learning, such as wavelet transform, short-time Fourier transform (STFT), principal component analysis (PCA), etc. However, these methods usually require manual feature design and are difficult to adapt to complex and variable BCG signals. At the same time, traditional machine learning methods or a single LSTM network are generally used for feature extraction in the existing technology, so there are problems such as incomplete feature extraction and low classification accuracy. Especially when facing BCG signals of different individuals, the robustness of the model is poor. Summary of the Invention
[0004] In view of the above-mentioned disadvantages and deficiencies of the prior art, the present invention provides a BCG signal feature extraction system based on a bidirectional LSTM model.
[0005] To achieve the above object, the main technical solutions adopted by the present invention include:
[0006] An embodiment of the present invention provides a BCG signal feature extraction system based on a bidirectional LSTM model, including:
[0007] A data acquisition module for acquiring BCG signals;
[0008] A data preprocessing module, which is used to preprocess the collected BCG signals to obtain preprocessed BCG signals, and crop and segment the preprocessed BCG signals into BCG signals of multiple time series segments with a fixed length;
[0009] A feature extraction module, which processes the BCG signals of each time series segment with a fixed length by using a pre-trained BiLSTM network structure to obtain predicted labels corresponding to the BCG signals of the time series segment with the fixed length;
[0010] The BiLSTM network structure sequentially includes: an input layer, a BiLSTM layer, a fully connected layer, and an output layer;
[0011] The input layer is used to receive the BCG signals of the time series segment with a fixed length;
[0012] The BiLSTM layer is used to simultaneously capture the complete timing characteristics of the BCG signals of the time series segment with a fixed length through forward and backward propagation;
[0013] The fully connected layer is used to integrate the complete timing characteristics output by the BiLSTM layer to obtain a final feature vector;
[0014] The output layer is used to determine the predicted label corresponding to the BCG signal of the time series segment with the fixed length according to the final feature vector.
[0015] Preferably, the data acquisition module includes a ballistocardiogram sensor;
[0016] The acquisition frequency of the ballistocardiogram sensor is 1000 Hz;
[0017] The duration of the BCG signals collected by the data acquisition module is 5 seconds.
[0018] Preferably, the data preprocessing module preprocesses the collected BCG signals to obtain preprocessed BCG signals, specifically including:
[0019] The data preprocessing module denoises the collected BCG signals by using a first method to obtain denoised BCG signals;
[0020] The first method is any one of a band-pass filtering, a Kalman filtering, or a wavelet transform method;
[0021] The denoised BCG signals are standardized by using a Z-score method to obtain standardized BCG signals, and the standardized BCG signals are used as the preprocessed BCG signals;
[0022] Correspondingly,
[0023] The standardized BCG signal is cropped and segmented according to a preset fixed time window to obtain BCG signals of multiple time series segments with a fixed length.
[0024] Preferably, the feature extraction module processes the BCG signal of the fixed-length time series segment by using a pre-trained BiLSTM network structure and outputs the corresponding predicted label, specifically including:
[0025] An input layer for receiving the BCG signal of the fixed-length time series segment and converting it into a numerical matrix format suitable for processing by the BiLSTM layer;
[0026] The BiLSTM layer includes at least one layer of bidirectional long short-term memory units. The bidirectional long short-term memory unit includes a forward LSTM unit and a backward LSTM unit. Among them,
[0027] The forward LSTM unit extracts the temporal features of the BCG signal of the time series segment in the order of the time series;
[0028] The backward LSTM unit extracts the temporal features of the BCG signal of the time series segment in the reverse order of the time series;
[0029] The outputs of the forward LSTM unit and the backward LSTM unit are concatenated in the time dimension to obtain complete temporal features;
[0030] A fully connected layer for receiving the output of the BiLSTM layer, mapping the complete temporal features to a feature vector space of a fixed dimension, and performing feature integration to generate a final feature vector;
[0031] An output layer for determining the predicted label corresponding to the BCG signal of the time series segment by using a predetermined classification or regression method according to the final feature vector generated by the fully connected layer.
[0032] Preferably, the output layer uses a Softmax activation function or other classification functions to map the feature vector generated by the fully connected layer to an M-dimensional output space, where M is the number of predicted label categories, to determine the classification prediction label or regression value corresponding to the BCG signal of the fixed-length time series segment.
[0033] Preferably, among them, the BiLSTM network structure is pre-trained by using a training data set to obtain a trained BiLSTM network structure;
[0034] The training data set includes multiple samples;
[0035] Each sample includes a BCG signal of a first time series segment and a true label corresponding to the BCG signal of the first time series segment;
[0036] Among them, the BCG signal of the first time series segment is obtained by cropping and segmenting the preprocessed historical BCG signal into multiple fixed lengths;
[0037] The preprocessed historical BCG signal is obtained by preprocessing the BCG signal in a historical time period.
[0038] Preferably, during the process of training the BiLSTM network structure with the training data set, the cross-entropy loss function is used to measure the error between the predicted label and the true label of the BiLSTM network, and the gradient is calculated based on this error, and the parameters in the BiLSTM network structure are updated using an optimizer based on the gradient to minimize the cross-entropy loss value and make it converge until the preset training termination condition is satisfied, thereby obtaining the trained BiLSTM network structure.
[0039] Preferably, the optimizer is an Adam optimizer;
[0040] Correspondingly, the Adam optimizer is used to calculate the error between the predicted label output by the BiLSTM network structure and the true label based on the cross-entropy loss function, and the parameters in the BiLSTM network structure are optimized through the parameter update formula;
[0041] The parameter update formula is:
[0042]
[0043] θ t is the parameter of the BiLSTM network structure at the current time step t;
[0044] θ t-1 is the parameter of the BiLSTM network structure at the previous time step t - 1;
[0045] μ is the learning rate;
[0046] m t is the first moment estimate of the gradient;
[0047] v t is the second moment estimate of the gradient;
[0048] ∈ is a constant to prevent division by zero;
[0049] Preferably, the system further includes:
[0050] A label fusion module, which is used to determine the final label of the BCG signal collected by the data acquisition module based on the predicted labels respectively corresponding to all fixed-length time series segments of the BCG signal;
[0051] Wherein, the label fusion module uses the majority voting method or the weighted average method to comprehensively analyze the predicted labels of all fixed-length time series segments, so as to obtain the final label of the complete BCG signal collected by the data acquisition module.
[0052] Preferably, the label fusion module uses the majority voting method or the weighted average method to comprehensively analyze the predicted labels of all fixed-length time series segments, so as to obtain the final label of the complete BCG signal collected by the data acquisition module. Specifically, it includes:
[0053] The label fusion module performs label fusion in at least one of the following ways:
[0054] Count the label that appears most frequently in the predicted labels of all fixed-length time series segments as the final label;
[0055] Based on the BiLSTM network structure, different weights are assigned to the confidence levels of the predicted labels of each time series segment, and the final label is obtained by calculating the weighted average.
[0056] The beneficial effects of the present invention are:
[0057] For a BCG signal feature extraction system based on a bidirectional LSTM model of the present invention, since the BiLSTM network structure is used to extract features from the BCG signal, compared with the prior art, it can capture the bidirectional temporal features of the BCG signal more fully, improve the recognition accuracy of the signal pattern, and achieve the effects of enhancing the feature expression ability of the BCG signal and improving the accuracy and reliability of cardiovascular health monitoring.
[0058] For a BCG signal feature extraction system based on a bidirectional LSTM model of the present invention, since a data preprocessing module is used to denoise, normalize and segment the BCG signal into fixed lengths, compared with the prior art, it can improve the quality of the input data, enable the BiLSTM network to learn signal features more stably, reduce the influence of external noise on the recognition accuracy, and achieve the effects of improving the stability and generalization ability of BCG signal analysis.
[0059] For a BCG signal feature extraction system based on a bidirectional LSTM model of the present invention, since a fully connected layer is used to integrate the temporal features output by the BiLSTM layer, compared with the prior art, it can further improve the discrimination of feature expression, enable the model to classify different categories of BCG signals more accurately, and achieve the effects of optimizing the feature extraction process and improving the signal classification accuracy.
[0060] A BCG signal feature extraction system based on a bidirectional LSTM model of the present invention determines the prediction label of the BCG signal based on the extracted feature vector in the output layer. Compared with the prior art, it can automatically learn features through deep learning methods without relying on manually designed features, improving the adaptability and versatility of the system, and achieving the promotion of non-invasive health monitoring, sleep analysis, remote medical treatment and other applications. Brief Description of the Drawings
[0061] Figure 1 It is a schematic structural diagram of a BCG signal feature extraction system based on a bidirectional LSTM model of the present invention;
[0062] Figure 2 It is a schematic structural diagram of the BiLSTM network in the embodiment of the present invention;
[0063] Figure 3 is. Detailed Embodiments
[0064] In order to better explain the present invention for easy understanding, the present invention will be described in detail below with reference to the drawings through specific embodiments.
[0065] In order to better understand the above technical solution, the exemplary embodiments of the present invention will be described in more detail below with reference to the drawings. Although the exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present invention can be more clearly and thoroughly understood, and the scope of the present invention can be completely conveyed to those skilled in the art.
[0066] Embodiment 1
[0067] See Figure 1 , this embodiment provides a BCG signal feature extraction system based on a bidirectional LSTM model, including:
[0068] A data acquisition module for collecting BCG signals;
[0069] The data acquisition module includes a ballistocardiogram sensor; the acquisition frequency of the ballistocardiogram sensor is 1000 Hz; the duration of the BCG signal collected by the data acquisition module is 5 seconds.
[0070] In this embodiment, the acquisition frequency of the sensor is set to 1000 Hz, that is, 1000 data points are acquired per second, which can capture the details of the BCG signal with high precision. Each time, 5 seconds of BCG signal is acquired, and a total of 5000 data points are obtained to ensure sufficient timing information. Due to the high sampling rate (1000 Hz), the system can capture minute cardiac mechanical vibrations more exquisitely, improving the signal quality and the accuracy of subsequent analysis. Acquiring 5 seconds of data ensures a complete signal containing multiple cardiac cycles, providing a stable basis for subsequent feature extraction.
[0071] A data preprocessing module is used to preprocess the acquired BCG signal to obtain a preprocessed BCG signal, and to crop and segment the preprocessed BCG signal into multiple BCG signals of time series segments with a fixed length.
[0072] In this embodiment, the data preprocessing module preprocesses the acquired BCG signal to obtain a preprocessed BCG signal, which specifically includes:
[0073] The data preprocessing module performs denoising processing on the acquired BCG signal in a first manner to obtain a denoised BCG signal.
[0074] The first manner is any one of band-pass filtering, Kalman filtering, or wavelet transform.
[0075] The Z-score method is used to perform normalization processing on the denoised BCG signal to obtain a normalized BCG signal, and the normalized BCG signal is used as the preprocessed BCG signal.
[0076] Correspondingly,
[0077] According to a preset fixed time window, the normalized BCG signal is cropped and segmented to obtain multiple BCG signals of time series segments with a fixed length.
[0078] For example, the acquired BCG signal may be interfered by factors such as environmental noise and baseline drift. Therefore, the data preprocessing module performs the following steps:
[0079] Denoising processing: Apply wavelet transform or band-pass filtering (0.5 Hz - 20 Hz) to remove low-frequency drift and high-frequency noise.
[0080] Normalization processing;
[0081] Signal segmentation processing: Crop the 5-second signal (assuming the BCG signal after denoising processing and normalization processing is 5 seconds) into multiple time series segments with a fixed length. For example, if the segment length is set to 1 second (1000 data points), the 5-second BCG signal can be divided into 5 time series segments.
[0082] A feature extraction module processes the BCG signal of each time series segment of a fixed length using a pre-trained BiLSTM network structure to obtain a predicted label corresponding to the BCG signal of the time series segment of the fixed length.
[0083] See Figure 2 , in this embodiment, the BiLSTM network structure sequentially includes: an input layer, a BiLSTM layer, a fully connected layer, and an output layer;
[0084] The input layer is used to receive the BCG signal of the time series segment of the fixed length;
[0085] The BiLSTM layer is used to simultaneously capture the complete temporal features of the BCG signal of the time series segment of the fixed length through forward and backward propagation;
[0086] The fully connected layer is used to integrate the complete temporal features output by the BiLSTM layer to obtain a final feature vector;
[0087] The output layer is used to determine the predicted label corresponding to the BCG signal of the time series segment of the fixed length according to the final feature vector.
[0088] In this embodiment, the feature extraction module processes the BCG signal of the time series segment of the fixed length using a pre-trained BiLSTM network structure and outputs the corresponding predicted label, specifically including:
[0089] The input layer is used to receive the BCG signal of the time series segment of the fixed length and convert it into a numerical matrix format suitable for processing by the BiLSTM layer;
[0090] Specifically, it receives the BCG signal of the time series segment with 1000 sampling points and converts it into a format suitable for neural network processing (for example, with a shape of [batch_size, time_steps, features]). This enables the model to effectively read the BCG signal, ensures consistent input formats, and improves training stability.
[0091] The BiLSTM layer includes at least one layer of bidirectional long short-term memory units, and the bidirectional long short-term memory units include forward LSTM units and backward LSTM units, where
[0092] The forward LSTM unit extracts the temporal features of the BCG signal of the time series segment in the order of the time series;
[0093] The backward LSTM unit extracts the temporal features of the BCG signal of the time series segment in the reverse order of the time series;
[0094] The outputs of the forward LSTM unit and the backward LSTM unit are concatenated in the time dimension to obtain complete temporal features;
[0095] For example, a bidirectional LSTM (BiLSTM) network structure is adopted to perform forward propagation and backward propagation simultaneously to capture the complete temporal information of the signal. For instance, at each time step (such as the t-th data point), the BiLSTM not only considers the historical information of t-1, t-2, …, but also utilizes the future information of t+1, t+2, … to obtain a more comprehensive feature representation. In this embodiment, the number of LSTM hidden units is, for example, 128 units to ensure sufficient feature expression ability. The bidirectional propagation enhances the learning ability for long-term dependencies and improves the sensitivity of the model to changes in the BCG signal. By combining past and future information, the representational ability for complex physiological signals is enhanced, and the recognition accuracy is improved.
[0096] A fully connected layer is used to receive the output of the BiLSTM layer, map the complete temporal features to a feature vector space of a fixed dimension, and perform feature integration to generate a final feature vector;
[0097] In this embodiment, the feature vector output by the BiLSTM layer is mapped by the fully connected layer into a more compact feature representation. For example, the output shape of the BiLSTM layer is (1000, 128), and after being converted by the fully connected layer, it becomes a vector of a lower dimension (such as 64 dimensions). The ReLU activation function can be adopted to enhance the feature expression ability. The dimensionality reduction process reduces the computational complexity and improves the model efficiency. The ReLU activation function enhances the non-linear expression ability and improves the recognition accuracy.
[0098] An output layer is used to determine the predicted label corresponding to the BCG signal of the time series segment by using a predetermined classification or regression method according to the final feature vector generated by the fully connected layer.
[0099] In this embodiment, the output layer adopts the Softmax activation function or other classification functions to map the feature vector generated by the fully connected layer to an M-dimensional output space, where M is the number of predicted label categories, to determine the classification prediction label or regression value corresponding to the BCG signal of the fixed-length time series segment.
[0100] Specifically, the output layer maps the feature vector to predicted labels of different classes through a Softmax classifier. This embodiment adopts automatic classification without manual feature engineering, improving the applicability and scalability of the system. It can be used for health monitoring to achieve non-invasive cardiac health assessment.
[0101] Among them, the BiLSTM network structure is pre-trained using a training data set to obtain a trained BiLSTM network structure;
[0102] By pre-training the BiLSTM network structure using a training dataset, it can learn the time series features of historical BCG signals and possess a certain generalization ability.
[0103] For example, in heart rate monitoring applications, the trained BiLSTM network structure can accurately predict the labels corresponding to the user's BCG signals. Even when encountering new BCG signals, it can also better predict the heart rate or other physiological parameters.
[0104] The training dataset includes multiple samples;
[0105] Each sample includes a BCG signal of a first time series segment and the true label corresponding to the BCG signal of the first time series segment;
[0106] Among them, the BCG signal of the first time series segment is obtained by cropping and segmenting the preprocessed historical BCG signal into multiple fixed lengths;
[0107] The preprocessed historical BCG signal is obtained by preprocessing the BCG signal in a historical time period.
[0108] The preprocessed historical BCG signal undergoes operations such as denoising and normalization, making the features learned by the model more stable and reducing the impact of noise on training. Using the method of segmenting into fixed lengths to crop the long-time BCG signal into short segments helps the neural network process efficiently and reduces the computational overhead. For example, in real-time health monitoring, this slicing method can reduce the computational delay and enable the system to detect cardiac arrhythmias (such as atrial fibrillation, bradycardia, etc.) more quickly.
[0109] Among them, in the process of training the BiLSTM network structure using the training dataset, the cross-entropy loss function is used to measure the error between the predicted label and the true label of the BiLSTM network, and the gradient is calculated based on this error. Then, based on the gradient, the optimizer is used to update the parameters in the BiLSTM network structure to minimize the cross-entropy loss value and make it converge until the preset training termination condition is met, thereby obtaining the trained BiLSTM network structure.
[0110] Illustrate with an example. Suppose the BCG signal feature extraction system based on the bidirectional LSTM model in this embodiment is used for processing. Then the training process of the BiLSTM network structure includes:
[0111] Collect the user's historical BCG signals and perform preprocessing (denoising, normalization, etc.).
[0112] The processed BCG signal is cut into multiple time series segments of fixed length, and the true label corresponding to each segment is marked.
[0113] A training dataset is formed, and each sample contains: (BCG time series segment, true label).
[0114] The BiLSTM network structure analyzes the input samples and generates a corresponding predicted label. Then, the cross-entropy loss function is used to calculate the error between the predicted label and the true label:
[0115] In this embodiment, the cross-entropy loss function is:
[0116]
[0117] y i is the true label in the i-th sample of the training dataset;
[0118] is the probability distribution of the label predicted by the BiLSTM network structure for the i-th sample in the training dataset.
[0119] The gradient is calculated based on the error, and the parameters in the BiLSTM network are updated using an optimizer (such as Adam, SGD) to minimize the loss value. This process continues until the preset training termination conditions are met (such as the loss value converges, the number of training epochs reaches the upper limit, etc.). The trained BiLSTM network is obtained.
[0120] In this embodiment, the parameters in the BiLSTM network include the weight matrices (input gate, forget gate, output gate, candidate memory unit) of the LSTM layer, the bias terms of the LSTM layer, the respective independent parameter sets of the forward LSTM and the backward LSTM, and the weights and biases of the output layer (fully connected layer).
[0121] The optimizer is the Adam optimizer;
[0122] Correspondingly, the Adam optimizer is used to calculate the error between the predicted label output by the BiLSTM network structure and the true label based on the cross-entropy loss function, and the parameters in the BiLSTM network structure are optimized through the parameter update formula;
[0123] The parameter update formula is:
[0124]
[0125] θ t is the parameter of the BiLSTM network structure at the current time step t;
[0126] θ t-1are the parameters of the BiLSTM network structure at the previous time step t-1;
[0127] μ is the learning rate;
[0128] m t is the first-order moment estimate of the gradient, which takes into account the historical information of the gradient, makes the parameter update smoother, and reduces gradient oscillation.
[0129] v t is the second-order moment estimate of the gradient, which adaptively scales the range of gradient changes to prevent unstable convergence caused by too large a learning rate.
[0130] ∈ is a constant to prevent division by zero, ensuring numerical stability.
[0131] In this embodiment, since Adam can dynamically adjust the learning rate and balance the direction and magnitude of gradient updates, it can find the optimal parameters faster and more stably compared with traditional SGD (stochastic gradient descent), thus improving the training efficiency and accuracy of BiLSTM.
[0132] The system in this embodiment further includes:
[0133] A label fusion module, which is used to determine the final label of the BCG signal collected by the data acquisition module based on the predicted labels corresponding to all fixed-length time series segments of the BCG signal;
[0134] Among them, the label fusion module uses the majority voting method or the weighted average method to comprehensively analyze the predicted labels of all fixed-length time series segments to obtain the final label of the complete BCG signal collected by the data acquisition module.
[0135] Specifically, the label fusion module uses the majority voting method or the weighted average method to comprehensively analyze the predicted labels of all fixed-length time series segments to obtain the final label of the complete BCG signal collected by the data acquisition module, which specifically includes:
[0136] The label fusion module performs label fusion in at least one of the following ways:
[0137] Count the label that appears most frequently in the predicted labels of all fixed-length time series segments as the final label;
[0138] Based on the BiLSTM network structure, different weights are assigned to the confidence levels of the predicted labels of each time series segment, and the final label is obtained by calculating the weighted average.
[0139] Suppose the system predicts 5 fixed-length BCG segments, and the prediction results and confidence levels of the BiLSTM network structure for each segment are as follows:
[0140] The predicted label hypothesis for the BCG signal of the first time series segment is A, with a confidence level of 0.8; the predicted label hypothesis for the BCG signal of the second time series segment is B, with a confidence level of 0.6; the predicted label hypothesis for the BCG signal of the third time series segment is A, with a confidence level of 0.7; the predicted label hypothesis for the BCG signal of the fourth time series segment is A, with a confidence level of 0.9; the predicted label hypothesis for the BCG signal of the fifth time series segment is B, with a confidence level of 0.5; for each label, calculate its weighted score among all segments, and select the label with the highest score as the final label. The weighted score for the predicted label A is: 0.8 + 0.7 + 0.9 = 2.4; the weighted score for the predicted label B is: 0.6 + 0.5 = 1.1. Since the weighted score of A is higher, the system finally determines that A is the final label of the complete BCG signal.
[0141] Compared with the simple majority voting method (only considering the number of occurrences), the weighted average method utilizes the confidence levels calculated by BiLSTM, making the predictions with high confidence levels have a greater impact on the final decision, thereby improving the reliability of the final label. If the prediction results of some segments have low confidence levels, their impacts will be reduced, avoiding the interference of incorrect predictions with low confidence levels on the final label. In BCG signal analysis, some segments may have unstable predictions due to reasons such as noise, and the weighted average method can better handle this situation, making the final label more accurate.
[0142] Example 2
[0143] See Figure 3 , this example describes the overall architecture of a BCG signal feature extraction system based on a bidirectional LSTM model. The system mainly includes a data acquisition module, a data preprocessing module, a feature extraction module, and a label fusion module.
[0144] The data acquisition module is used to acquire BCG signals. This module includes a ballistocardiogram sensor with a sampling frequency of 1000 Hz. In actual operation, the data acquisition module will continuously acquire BCG signals at a frequency of 1000 Hz for a signal acquisition duration of 5 seconds, generating the original BCG signal data. These data provide the basis for subsequent preprocessing and feature extraction.
[0145] The task of the data preprocessing module is to perform denoising, normalization, and clipping and segmentation processing on the acquired BCG signals. The specific process is as follows:
[0146] Denoising processing: Use one of the methods of band-pass filtering, Kalman filtering, or wavelet transform to remove the noise interference in the BCG signal. Through these denoising techniques, the key features in the BCG signal can be retained, improving the accuracy of subsequent analysis.
[0147] Normalization processing: The Z-score normalization method is used to process the denoised BCG signal to ensure that the signal is within a certain range, facilitating subsequent model processing.
[0148] Cropping and segmentation: To meet the requirements of the bidirectional LSTM model for processing, the normalized BCG signal is cropped into multiple time series segments of a fixed length. Each time series segment represents a specific duration of BCG signal data, facilitating further processing by the feature extraction module.
[0149] The feature extraction module uses a pre-trained bidirectional LSTM (BiLSTM) network structure to process each time series segment of a fixed length. The specific steps are as follows:
[0150] Input layer: The input layer receives the BCG signal of each time series segment and converts it into a numerical matrix format suitable for processing by the BiLSTM layer.
[0151] BiLSTM layer: The BiLSTM layer includes at least one layer of bidirectional long short-term memory units. This layer simultaneously extracts the complete temporal features of the BCG signal through forward and backward propagation. The forward LSTM unit processes the signal in the order of the time series, while the backward LSTM unit processes the signal in reverse, thereby capturing the complete temporal information.
[0152] Fully connected layer: The output temporal features of the BiLSTM layer are passed to the fully connected layer for feature integration to obtain a feature vector of a fixed dimension.
[0153] Output layer: Based on the feature vector generated by the fully connected layer, the output layer predicts the label corresponding to the time series segment using a predetermined classification or regression method. To ensure that the model can handle different types of labels, the output layer uses the Softmax activation function or other classification functions to determine the predicted label.
[0154] In this embodiment, to train the BiLSTM network structure, a training dataset containing multiple samples is used. Each sample includes a time series segment of a fixed length of the BCG signal and its corresponding true label. The training process is as follows:
[0155] On the training dataset, the cross-entropy loss function is used to measure the error between the model-predicted label and the true label. Based on this error, the gradient is calculated, and the parameters in the BiLSTM network are updated through an optimizer (such as the Adam optimizer). The training process is iterated until the loss value converges to a preset termination condition.
[0156] The Adam optimizer is used for parameter update. Specifically, the first and second moment estimates of the gradient are used to update the network parameters to ensure the efficiency of the training process.
[0157] The label fusion module is used to comprehensively analyze the predicted labels of all time series segments and determine the final label of the complete BCG signal. The label fusion module performs fusion in one of the following two ways:
[0158] Majority voting method: Count the label that appears most frequently among the predicted labels of all time series segments, and use this label as the final label.
[0159] Weighted average method: Based on the confidence level output by the BiLSTM network, different weights are assigned to the predicted labels of each segment, and the final label is obtained by calculating the weighted average. This can determine the final label according to the reliability of the prediction results of each segment.
[0160] In this embodiment, the BCG signal feature extraction system is applied to the analysis of human physiological signals. By processing the real-time collected BCG signals, the system can efficiently extract useful features from complex physiological signals and provide accurate data support for medical diagnosis. The training and optimization process of the system ensure the high-accuracy feature extraction ability, making this technology have a wide application prospect in the medical field.
[0161] Through the above embodiments, the BCG signal feature extraction system proposed in this patent can not only effectively process and analyze BCG signals, but also provide efficient and accurate prediction results through the deep learning model.
[0162] Embodiment 3
[0163] This embodiment proposes a BCG signal feature extraction system based on a bidirectional LSTM (BiLSTM) model, including:
[0164] The data acquisition module uses a ballistocardiogram sensor (BCG sensor) to collect BCG signals in real time. The sampling frequency is set to 1000Hz, and the signal acquisition duration is 5 seconds. The data collected by the sensor is transmitted to the data preprocessing module.
[0165] Data preprocessing module, in the data preprocessing stage, first denoises the collected BCG signals. Common denoising methods include band-pass filtering, Kalman filtering, and wavelet transform. Here, a band-pass filter is used to filter the BCG signal with a frequency range of [0.5Hz, 5Hz] to remove low-frequency and high-frequency noise and obtain a more accurate BCG signal.
[0166] Next, the Z-score normalization method is used to normalize the denoised BCG signal. The Z-score normalization formula is as follows:
[0167]
[0168] Where X is the denoised BCG signal, is the mean of the denoised BCG signal, σ is the standard deviation of the denoised BCG signal, and X norm is the standardized BCG signal. The standardized BCG signal is then cropped into multiple time series segments of a fixed length, usually 500 milliseconds for each segment. Each time series segment is fed into the feature extraction module.
[0169] By denoising the collected BCG signal (such as band-pass filtering, Kalman filtering, or wavelet transform), the interference of noise on signal analysis can be effectively removed. Further Z-score standardization ensures that the data is processed on a unified scale, avoiding the influence of the value range differences of different sampling points, and improving the robustness and stability of the model. Cropping and segmenting the BCG signal to form multiple time series segments of a fixed length enables the model to process and analyze data within a fixed time window, which has a significant effect on improving real-time performance and computational efficiency.
[0170] The core of the feature extraction module is the BiLSTM network structure, which can effectively capture the temporal features of the BCG signal. Specifically, the BiLSTM layer includes forward and backward LSTM units, and captures the past and future information of the signal simultaneously through a bidirectional propagation mechanism.
[0171] Set the input of each time series segment as x = [x1, x2,..., x T , where T is the length of the time series. The BiLSTM network processes this sequence through the forward and backward LSTM layers to obtain the complete temporal features. For each LSTM unit in the BiLSTM layer, the update formula of the signal at time step t is as follows: h t = LSTM(x t , h t-1 ); where x t is the input at the current time step, h t-1 is the hidden state at the previous time step, and h t is the hidden state at the current time step. Through the concatenation of forward and backward propagation, the complete temporal feature vector is obtained.
[0172] In this embodiment, the BiLSTM layer can capture more comprehensive temporal features by processing the time series from both the forward and backward directions simultaneously. This is very important for dealing with the dynamic and time-varying characteristics of the BCG signal, and can more accurately extract the key time series features. The traditional unidirectional LSTM can only infer the future state from past time points, while the bidirectional LSTM can consider the past and future context information simultaneously, thus more comprehensively capturing the trends and patterns of signal changes and improving the prediction accuracy.
[0173] This feature vector is then fed into a fully connected layer for integration to obtain a feature vector v of a fixed dimension, v = [v1, v2,..., v D , where D is the dimension of the feature vector. Finally, through the output layer, using the Softmax function or other classification activation functions, the predicted label of the BCG signal segment is calculated based on the feature vector.
[0174] In this embodiment, the system further includes a label fusion module, which is used to combine the predicted labels of all time series segments and output the final label. We use the weighted average method to synthesize the predicted labels of each segment, and set the confidence of the predicted label of each segment as w t The final label is calculated by weighted average:
[0175]
[0176] is the predicted label of the t-th time segment; w t is the confidence of the t-th time segment; M is the total number of time series segments into which the normalized BCG signal is subsequently clipped to a fixed length; is the final label.
[0177] In this embodiment, the weighted average method is used to fuse the predicted labels of multiple time series segments, which can significantly improve the prediction accuracy of the model for the overall BCG signal. By comprehensively analyzing the labels of multiple segments, the error of single-segment prediction is reduced, and the stability and accuracy of the system are improved.
[0178] In the description of the present invention, it should be understood that the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the present invention, "a plurality of" means two or more unless otherwise specifically defined.
[0179] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed", etc. should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or integrated; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium; it can be the internal communication of two components or the interaction relationship between two components. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0180] In the present invention, unless otherwise clearly defined or limited, a first feature being "on" or "under" a second feature may mean that the first and second features are in direct contact, or that the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being "above", "over" and "on top of" a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the horizontal height of the first feature is higher than that of the second feature. A first feature being "under", "below" and "beneath" a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the horizontal height of the first feature is lower than that of the second feature.
[0181] In the description of this specification, the descriptions of terms such as "one embodiment", "some embodiments", "embodiment", "example", "specific example" or "some examples", etc. refer to that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, without contradiction, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.
[0182] Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those of ordinary skill in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A BCG signal feature extraction system based on a bidirectional LSTM model, characterized in that, Including: A data acquisition module for acquiring BCG signals; A data preprocessing module for preprocessing the acquired BCG signals to obtain preprocessed BCG signals, and cropping and segmenting the preprocessed BCG signals into multiple BCG signals of time series segments with a fixed length; A feature extraction module that processes each BCG signal of a time series segment with a fixed length using a pre-trained BiLSTM network structure to obtain a predicted label corresponding to the BCG signal of the time series segment with the fixed length; The BiLSTM network structure sequentially includes: an input layer, a BiLSTM layer, a fully connected layer, and an output layer; The input layer is used to receive the BCG signal of a time series segment with a fixed length; The BiLSTM layer is used to simultaneously capture the complete temporal features of the BCG signal of a time series segment with a fixed length through forward and backward propagation; The fully connected layer is used to integrate the complete temporal features output by the BiLSTM layer to obtain a final feature vector; The output layer is used to determine the predicted label corresponding to the BCG signal of the time series segment with the fixed length according to the final feature vector.
2. The BCG signal feature extraction system based on a bidirectional LSTM model according to claim 1, wherein The data acquisition module includes a ballistocardiogram sensor; The acquisition frequency of the ballistocardiogram sensor is 1000 Hz; The duration of the BCG signal acquired by the data acquisition module is 5 seconds.
3. The BCG signal feature extraction system based on the bidirectional LSTM model according to claim 2, wherein The data preprocessing module preprocesses the acquired BCG signals to obtain preprocessed BCG signals, specifically including: The data preprocessing module performs denoising processing on the acquired BCG signals in a first manner to obtain denoised BCG signals; The first manner is any one of band-pass filtering, Kalman filtering, or wavelet transform; The Z-score method is used to perform normalization processing on the denoised BCG signals to obtain normalized BCG signals, and the normalized BCG signals are used as the preprocessed BCG signals; Correspondingly, According to a preset fixed time window, the normalized BCG signals are cropped and segmented to obtain multiple BCG signals of time series segments with a fixed length.
4. The BCG signal feature extraction system based on the bidirectional LSTM model according to claim 3, wherein The feature extraction module processes the BCG signals of time series segments with a fixed length using a pre-trained BiLSTM network structure and outputs corresponding predicted labels, specifically including: The input layer is used to receive the BCG signal of the time series segment with the fixed length and convert it into a numerical matrix format suitable for processing by the BiLSTM layer; The BiLSTM layer includes at least one layer of bidirectional long short-term memory units, and the bidirectional long short-term memory units include forward LSTM units and backward LSTM units, wherein The forward LSTM unit extracts the temporal features of the BCG signal of the time series segment in the order of the time series; The backward LSTM unit extracts the temporal features of the BCG signal of the time series segment in the reverse order of the time series; The outputs of the forward LSTM cell and the backward LSTM cell are concatenated in the time dimension to obtain complete temporal features; A fully connected layer, configured to receive the output of the BiLSTM layer, map the complete temporal features to a feature vector space of a fixed dimension, and perform feature integration to generate a final feature vector; An output layer, configured to determine a predicted label corresponding to the BCG signal of the time series segment by using a predetermined classification or regression method according to the final feature vector generated by the fully connected layer.
5. The BCG signal feature extraction system based on a bidirectional LSTM model according to claim 4, wherein the output layer uses a Softmax activation function or other classification function to map the feature vector generated by the fully connected layer to an M-dimensional output space, where M is the number of predicted label categories, so as to determine a classification predicted label or a regression value corresponding to the BCG signal of the fixed-length time series segment.
6. The BCG signal feature extraction system based on a bidirectional LSTM model according to claim 5, wherein Among them, the BiLSTM network structure is pre-trained using a training data set to obtain a trained BiLSTM network structure; the training data set includes a plurality of samples; where each sample includes a BCG signal of a first time series segment and a true label corresponding to the BCG signal of the first time series segment; wherein, the BCG signal of the first time series segment is obtained by cropping and segmenting the preprocessed historical BCG signal into a plurality of fixed lengths; the preprocessed historical BCG signal is obtained by preprocessing the BCG signal in a historical time period.
7. The BCG signal feature extraction system based on a bidirectional LSTM model according to claim 6, wherein Among them, during the process of training the BiLSTM network structure using the training data set, a cross-entropy loss function is used to measure the error between the predicted label and the true label of the BiLSTM network, and the gradient is calculated based on this error, and the parameters in the BiLSTM network structure are updated by using an optimizer based on the gradient, so as to minimize the cross-entropy loss value and make it converge until a preset training termination condition is satisfied, thereby obtaining a trained BiLSTM network structure.
8. The BCG signal feature extraction system based on a bidirectional LSTM model according to claim 7, wherein the optimizer is an Adam optimizer; correspondingly, the Adam optimizer is used to calculate the error between the predicted label output by the BiLSTM network structure and the true label based on the cross-entropy loss function, and the parameters in the BiLSTM network structure are optimized through a parameter update formula; the parameter update formula is: θ t are the parameters of the BiLSTM network structure at the current time step t; θ t-1 are the parameters of the BiLSTM network structure at the previous time step t - 1; μ is the learning rate; m t is the first moment estimate of the gradient; v t is the second moment estimation of the gradient; ∈ is a constant to prevent division by zero.
9. The BCG signal feature extraction system based on the bidirectional LSTM model according to claim 7, wherein The system further includes: a label fusion module, configured to determine a final label of the BCG signal collected by the data collection module based on the predicted labels respectively corresponding to the BCG signals of all fixed-length time series segments; Among them, the label fusion module uses the majority voting method or the weighted average method to comprehensively analyze the predicted labels of all time series segments with a fixed length, so as to obtain the final label of the complete BCG signal collected by the data acquisition module.
10. The BCG signal feature extraction system based on the bidirectional LSTM model according to claim 9, wherein, The label fusion module uses the majority voting method or the weighted average method to comprehensively analyze the predicted labels of all time series segments with a fixed length, so as to obtain the final label of the complete BCG signal collected by the data acquisition module, specifically including: The label fusion module performs label fusion in at least one of the following ways: Count the label that appears most frequently among the predicted labels of all time series segments with a fixed length as the final label; Based on the BiLSTM network structure, different weights are assigned to the confidence levels of the predicted labels of each time series segment, and the final label is obtained by calculating the weighted average.