BCG signal separation method based on sequence decomposition and two-dimensional convolution
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-04
- Publication Date
- 2026-08-14
AI Technical Summary
[0003]传统BCG信号处理方法对受测者的运动和姿势非常敏感,任何额外的运动或姿势变化都可能引入噪声,使信号处理更加复杂;由于BCG信号非常微弱,来自环境的噪声会对信号质量产生不良影响;在空间分辨率上存在限制,难以捕捉到细微的生物信号变化;
[0049]损失函数可有效平衡拟合数据和防止过拟合之间的关系,具有天然防止过拟合的特性,通过对卷积核进行额外约束和引入正则化项,有效提高了滤波器模型的泛化能力;
Smart Images

Figure CN118021288B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of BCG signal processing technology, and in particular to a BCG signal separation method based on sequence decomposition and two-dimensional convolution. Background Technology
[0002] BCG (Ballistocardiogram) is a biosignal generated by chest vibrations caused by human movement, and is often used to monitor cardiovascular health.
[0003] Traditional BCG signal processing methods are highly sensitive to the subject's movement and posture. Any additional movement or posture changes can introduce noise, making signal processing more complex. Because BCG signals are very weak, noise from the environment can adversely affect signal quality. They also have limitations in spatial resolution, making it difficult to capture subtle changes in biosignals.
[0004] Traditional BCG signal processing methods have difficulty separating the heartbeat component because the vibrations caused by heartbeat and respiration have similar spectral characteristics, making it difficult to accurately separate the heartbeat signal from the BCG signal.
[0005] Furthermore, traditional BCG signal processing methods have complex algorithms, which increases computational costs. Summary of the Invention
[0006] The purpose of this invention is to overcome the shortcomings of the prior art and provide a BCG signal separation method based on sequence decomposition and two-dimensional convolution.
[0007] To achieve the above objectives, the present invention adopts the following technical solution:
[0008] A BCG signal separation method based on sequence decomposition and two-dimensional convolution includes the following steps:
[0009] Step 1, Data Collection:
[0010] Arbitrarily select a 10-second data segment from the acquired BCG signal, with 1250 data points. Arrange these 1250 data points in chronological order into a 1x1250 matrix, denoted as Y.
[0011] Y = [y0 y1 y2 ... y 1249 ], where y j Let j be the elements of matrix Y, where j = 0, 1, 2, ..., 1249;
[0012] Step 2, construct the filter model:
[0013] The filter model is defined with four convolutional layers: Conv1: kernel structure is 1x21, padding = 10, stride is 1; Conv2: kernel structure is 1x201, padding = 100, stride is 1; Conv3 has the same structure and parameters as Conv1, and Conv4 has the same structure and parameters as Conv2.
[0014] Step 2-1: Write Y as matrices Y1 and Y2;
[0015] Step 2-2: Input Y1 and Y2 into convolutional layer Conv1 and convolutional layer Conv2 respectively. Conv1 outputs a 1×1250 matrix Z1 and Conv2 outputs a 1×1250 matrix Z2. Calculate Z = Z1 - Z2 to obtain a 1×1250 matrix Z.
[0016] Step 2-3: Using the method in Step 2-1, write Z as matrices Y3 and Y4. Input Y3 and Y4 into convolutional layers Conv3 and Conv4 respectively. Conv3 outputs a 1×1250 matrix Z3, and Conv4 outputs a 1×1250 matrix Z4. Calculate W = Z3 - Z4 to obtain W; W is the output of the filter model.
[0017] Step 3, construct the loss function;
[0018] Step 4, Model Training;
[0019] Step 5: Use the model to separate the signal.
[0020] Repeat step 1 to collect data and obtain a 1x1250 matrix Y; repeat steps 2-1 to 2-3, input Y into the filter model, and the output W of the filter model is the filtered heartbeat signal.
[0021] Compared with traditional filtering methods, the BCG signal separation method of the present invention can separate signals more cleanly and accurately, thereby improving the accuracy and robustness of the separated BCG signal.
[0022] Preferably, step 2-1 includes the following specific steps:
[0023]
[0024]
[0025] Elements not in matrix Y are filled in using a mirror completion method.
[0026] The padding of elements on the left is calculated using the following formula:
[0027] y i1=y i1+1 -(y i1+2 -y i1+1 ),
[0028] Where i1 is the index of the element that needs to be padded on the left;
[0029] For example, y -1 = y0 - (y1 - y0)
[0030] The padding of elements on the right is calculated using the following formula:
[0031] y i2 =y i2-1 -(y i2-2 -y i2-1 ),
[0032] Where i2 is the index of the element that needs to be padded on the right.
[0033] For example, y 1251 =y 1250 -(y 1249 -y 1250 ).
[0034] Preferably, step 3 includes the following specific steps:
[0035] Let the loss function of Convi be loss i :
[0036] loss i =||Y i c i -Y i || 2 +α||Y i c i || 2 +β|c i | 2
[0037] Where i = 1, 2, 3, 4;
[0038] Among them, c i Here are the convolution kernel parameters for Conv1; for example, the convolution kernel parameters for Conv1 are c1. When training Conv1, the vector is used as c1 and the sampling result Y1 as input into the loss function mentioned above.
[0039] The purpose of filtering is to remove interference and smooth the waveform, but at the same time, it is necessary to ensure that the waveform is consistent with the unfiltered waveform in terms of shape and trend. Furthermore, considering the problem of overfitting, this invention sets up a loss function.
[0040] Y i c i -Yi The result of subtracting each data point from the original signal after filtering is represented by a vector; ||Y i c i || 2 Indicates the calculation of Y i c i The norm of |Y|, used to measure the size of a vector; i c i -Y i || 2 It is to calculate vector Y i c i -Y i The norm of ||Y| gives a nonnegative real number; i c i | 2 It is to calculate Y i c i The norm;
[0041] α and β are both weighting parameters;
[0042] α||Y i c i || 2 Representing regularization terms helps to constrain c. i Data range;
[0043] β|c i | 2 It is also a regularization term, used for c i Add additional constraints;
[0044] The process of minimizing the loss function aims to reconstruct the original data while constraining the encoded representation through regularization terms, thereby maximizing the fit to the data and preventing overfitting, achieving an optimal effect.
[0045] Preferably, step 4 includes the following specific steps:
[0046] Set the number of training epochs to 1000 and set the convolution kernel parameter c. i The initial values are used to train Conv1, Conv2, Conv3, and Conv4 respectively; during training, the newly obtained c is saved in each round. i Finally, c was selected when the loss function value was stable and minimized. i This yields the trained filter model.
[0047] The loss function of this invention is such that the smaller the loss value, the better the effect of the trained filter model, and there is no need to worry about overfitting. The loss function can prevent overfitting.
[0048] Therefore, the present invention has the following beneficial effects:
[0049] The loss function can effectively balance the relationship between fitting data and preventing overfitting, and has the natural characteristic of preventing overfitting. By imposing additional constraints on the convolution kernel and introducing a regularization term, the generalization ability of the filter model is effectively improved.
[0050] The trained model can be used to filter new BCG signals without retraining, which improves the practicality and convenience of the algorithm.
[0051] It removes interference from the signal, preserves the signal's shape and trend, and makes the waveform obtained after filtering smoother and clearer, enabling accurate extraction of heartbeat signal information. Attached Figure Description
[0052] Figure 1 This is a block diagram of the filter model of the present invention;
[0053] Figure 2 This is a primitive BCG signal diagram of the present invention;
[0054] Figure 3 This is a filtered heartbeat signal image obtained according to the present invention. Detailed Implementation
[0055] The present invention will now be further described with reference to the accompanying drawings and specific embodiments.
[0056] like Figures 1-3 The illustrated embodiment is a BCG signal separation method based on sequence decomposition and two-dimensional convolution, comprising the following steps:
[0057] Step 1, Data Collection:
[0058] A PVDF film (6.4 cm wide and 90 cm long) was used to collect BCG signals. The BCG acquisition device (BioBio Technology's SASS-D type acquisition unit) used a 12-bit AD adapter to collect data at a sampling frequency of 125 Hz. A total of 24 young, healthy volunteers participated in the experiment (14 males and 10 females, aged 27 ± 6 years, weighing between 50 and 90 kg, and height between 1.65 and 1.82 meters). Each participant could choose to remain seated, supine, or lateral. Results were obtained as follows... Figure 2 The original BCG signal shown;
[0059] Arbitrarily select a 10-second data segment from the acquired BCG signal, with 1250 data points. Arrange these 1250 data points in chronological order into a 1x1250 matrix, denoted as Y.
[0060] Y = [y0 y1 y2 ... y 1249 ], where yj Let j be the elements of matrix Y, where j = 0, 1, 2, 3, ..., 1249;
[0061] Step 2, construct the filter model:
[0062] The filter model is defined with four convolutional layers: Conv1: kernel structure is 1x21, padding = 10, stride is 1; Conv2: kernel structure is 1x201, padding = 100, stride is 1; Conv3 has the same structure and parameters as Conv1, and Conv4 has the same structure and parameters as Conv2.
[0063] Step 2-1, write Y as matrices Y1 and Y2:
[0064]
[0065]
[0066] Elements not in matrix Y are filled in using the mirror completion method:
[0067] The padding of elements on the left is calculated using the following formula:
[0068] y i1 =y i1+1 -(y i1+2 -y i1+1 ),
[0069] Where i1 is the index of the element that needs to be padded on the left;
[0070] The padding of the right-hand element is calculated using the following formula:
[0071] y i2 =y i2-1 -(y i2-2 -y i2-1 ),
[0072] Where i2 is the index of the element that needs to be padded on the right;
[0073] Step 2-2: Input Y1 and Y2 into convolutional layer Conv1 and convolutional layer Conv2 respectively. Conv1 outputs a 1×1250 matrix Z1 and Conv2 outputs a 1×1250 matrix Z2. Calculate Z = Z1 - Z2 to obtain a 1×1250 matrix Z.
[0074] Step 2-3: Using the method in Step 2-1, write Z as matrices Y3 and Y4. Input Y3 and Y4 into convolutional layers Conv3 and Conv4 respectively. Conv3 outputs a 1×1250 matrix Z3, and Conv4 outputs a 1×1250 matrix Z4. Calculate W = Z3 - Z4 to obtain W; W is the output of the filter model.
[0075] Step 3, construct the loss function:
[0076] Let the loss function of Convi be loss i :
[0077] loss i =||Y i c i -Y i || 2 +α||Y i c i || 2 +β|c i | 2
[0078] Where i = 1, 2, 3, 4;
[0079] Among them, c i For the convolution kernel parameters of Convi;
[0080] Y i c i -Y i The result of subtracting each data point from the original signal after filtering is represented by a vector; ||Y i c i || 2 Indicates the calculation of Y i c i The norm of |Y|, used to measure the size of a vector; i c i -Y i || 2 It is to calculate vector Y i c i -Y i The norm of ||Y| gives a nonnegative real number; i c i | 2 It is to calculate Y i c i The norm;
[0081] α and β are both weighting parameters;
[0082] α||Y i c i || 2Representing regularization terms helps to constrain c. i Data range;
[0083] β|c i | 2 It is also a regularization term, used for c i Add additional constraints;
[0084] Step 4, Model Training;
[0085] Set the number of training epochs to 1000 and set the convolution kernel parameter c. i The initial values are used to train Conv1, Conv2, Conv3, and Conv4 respectively; during training, the newly obtained c is saved in each round. i Finally, c was selected when the loss function value was stable and minimized. i This yields the trained filter model.
[0086] Step 5: Use the model to separate the signal.
[0087] Repeat step 1 to acquire data, obtaining a 1x1250 matrix Y; repeat steps 2-1 to 2-3, inputting Y into the filter model, then the output W of the filter model is the filtered heartbeat signal, as shown below. Figure 3 The heartbeat signal shown.
[0088] The effectiveness of the method of this invention was verified by the data from 24 young, healthy volunteers and the synchronous collection of electrocardiogram data.
[0089] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A BCG signal separation method based on sequence decomposition and two-dimensional convolution, characterized in that, Includes the following steps: Step 1, Data Collection: Arbitrarily select a 10-second data segment from the acquired BCG signal, with 1250 data points. Arrange these 1250 data points in chronological order into a 1x1250 matrix, denoted as Y: Y = [y0 y1 y2 ... y 1249 ], where y j Let j be the elements of matrix Y, where j = 0, 1, 2, ..., 1249; Step 2, construct the filter model: The filter model is defined with four convolutional layers: Conv1: kernel structure is 1x21, padding = 10, stride is 1; Conv2: kernel structure is 1x201, padding = 100, stride is 1; Conv3 has the same structure and parameters as Conv1, and Conv4 has the same structure and parameters as Conv2. Step 2-1: Write Y as matrices Y1 and Y2; Step 2-2: Input Y1 and Y2 into convolutional layer Conv1 and convolutional layer Conv2 respectively. Conv1 outputs a 1×1250 matrix Z1 and Conv2 outputs a 1×1250 matrix Z2. Calculate Z = Z1 - Z2 to obtain a 1×1250 matrix Z. Step 2-3: Using the method in Step 2-1, write Z as matrices Y3 and Y4. Input Y3 and Y4 into convolutional layers Conv3 and Conv4 respectively. Conv3 outputs a 1×1250 matrix Z3, and Conv4 outputs a 1×1250 matrix Z4. Calculate W = Z3 - Z4 to obtain W; W is the output of the filter model. Step 3, construct the loss function; Step 4, Model Training; Step 5: Use the model to separate the signal. Repeat step 1 to collect data and obtain a 1x1250 matrix Y; repeat steps 2-1 to 2-3, input Y into the filter model, and the output W of the filter model is the filtered heartbeat signal.
2. The BCG signal separation method based on sequence decomposition and two-dimensional convolution according to claim 1, characterized in that, Step 2-1 includes the following specific steps: Elements not in matrix Y are filled in by mirror completion. The left-side element completion is calculated using the following formula: and i1 / and i1+1 -(and i1+2 -and i1+1 ), Where i1 is the index of the element that needs to be padded on the left; Padding to the right is calculated using the following formula: y i2 =y i2-1 -(y i2-2 -y i2-1 ), Where i2 is the index of the element that needs to be padded on the right.
3. The BCG signal separation method based on sequence decomposition and two-dimensional convolution according to claim 1, characterized in that, Step 3 includes the following specific steps: Let the loss function of Convi be loss i : loss i =||Y i c i -Y i || 2 +α||Y i c i || 2 +β|c i | 2 Where i = 1, 2, 3, 4; Among them, c i For the convolution kernel parameters of Convi; Y i c i -Y i The result of subtracting each data point from the original signal after filtering is represented by a vector; ||Y i c i || 2 Indicates the calculation of Y i c i The norm of |Y|, used to measure the size of a vector; i c i -Y i || 2 It is to calculate vector Y i c i -Y i The norm of ||Y| gives a nonnegative real number; i c i | 2 It is to calculate Y i c i The norm; α and β are both weighting parameters; α||Y i c i || 2 Representing regularization terms helps to constrain c. i Data range; β|c i | 2 It is also a regularization term, used for c i Add additional constraints.
4. The BCG signal separation method based on sequence decomposition and two-dimensional convolution according to claim 1, 2, or 3, characterized in that, Step 4 includes the following specific steps: Set the number of training epochs to 1000 and set the convolution kernel parameter c. i The initial values are used to train Conv1, Conv2, Conv3, and Conv4 respectively; during training, the newly obtained c is saved in each round. i Finally, c was selected when the loss function value was stable and minimized. i This yields the trained filter model.
Citation Information
Patent Citations
Method and device for processing BCG signal
CN110742581A
Disease classification method based on multi-scale attention network and ballistocardiogram
CN115222987A