Intelligent generation method of electrocardiogram signal based on multi-scale feature fusion of heart impact signal

By constructing a multi-scale feature fusion transformation network, the problem of insufficient generalization ability of BCG signal to ECG signal generation was solved, and ECG signal generation with high accuracy and stability was achieved, supporting long-term home monitoring of heart disease.

CN115935295BActive Publication Date: 2026-01-02JILIN UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310016282.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-05
Publication Date
2026-01-02
Estimated Expiration
2043-01-05

AI Technical Summary

Technical Problem

Existing methods for generating ECG signals based on BCG signals lack generalization ability and are difficult to implement for long-term home monitoring of heart disease with small sample data.

Method used

A Multi-Scale Feature Fusion Transformation Network (MFFTN) is constructed. Through a sequence transformation module, a multi-scale feature fusion module, and a transformation module, combined with a fully connected layer and an attention module, ECG signals are generated. Different scale features are extracted using different convolutional kernels, and the waveform is calibrated through sequence transformation to improve the accuracy and stability of the model.

Benefits of technology

It effectively generates ECG signals with a correlation coefficient of 98.9%, possesses generalization ability, and can accurately recover the main waveform characteristics of ECG signals, making it suitable for long-term home monitoring of heart diseases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115935295B_ABST
    Figure CN115935295B_ABST
Patent Text Reader

Abstract

The intelligent generation method of electrocardiosignal based on multi-scale feature fusion of ballistocardiogram belongs to the technical field of human physiological signal processing, and a multi-scale feature fusion transformation network, namely MFFTN, is provided.The network is composed of a sequence transformation module, a multi-scale feature fusion module and a transformation module;the MFFTN normalizes the ballistocardiogram waveform through the sequence transformation module, extracts and fuses different scale features of the ballistocardiogram through the multi-scale feature fusion module, generates the electrocardiosignal through the transformation module, and finally calibrates the waveform through the sequence transformation module;the network can effectively recover the electrocardiosignal from the ballistocardiogram, the correlation coefficient of the generated electrocardiosignal and the reference electrocardiosignal is 98.9%, and the foundation is laid for subsequent home monitoring and identification of heart diseases.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of machine learning and human physiological signals, and particularly relates to an electrocardiogram intelligent generation method based on multi-scale feature fusion of ballistocardiogram signals. BACKGROUND

[0002] With the aging of society in China, the demand for monitoring the heart disease state of the elderly at home is increasingly strong. The elderly often suffer from some chronic diseases, such as hypertension and cardiovascular disease. These diseases often reflect on the abnormality of heart rhythm and jumping waveform. In order to ensure the heart health state of the elderly, home monitoring is an effective way to improve heart disease management. At present, the main way to monitor heart disease at home is through wearable devices. Such devices are inconvenient to use, stimulate the skin, and may reduce the acceptance of patients, and are not suitable for long-term real-time monitoring. For some cases where there are no children to take care of or cannot be hospitalized for a long time, long-term real-time monitoring is more needed. Based on the above background, researchers have begun to pay attention to the non-contact heart disease monitoring technology of ballistocardiogram (BCG). BCG signal is a non-contact method for monitoring heart activity, which can record physiological information of human body continuously without disturbance and trauma, and can realize effective detection of abnormal states such as heart disease and heart rate variation. For nursing homes, communities and hospitals, it can help to screen heart disease; for ordinary families, users can view the heart state in real time and receive heart abnormality warnings in real time. The non-contact measurement method of BCG signal has certain advantages, but its application is limited, and its clinical application is also very few. Electrocardiogram (ECG) is a mature technology used to analyze the heart condition of patients in cardiology, and is one of the most recognized and most commonly used biomedical signals in the medical field. Establishing a BCG signal generation ECG signal model can combine the non-contact measurement method of BCG signal with the mature theory and application of electrocardiogram (ECG), and realize long-term home monitoring of heart disease.

[0003] At present, some scholars explore the potential link between BCG signal and ECG signal, establish BCG-ECG model, Srinivasan et al. utilize the different time and frequency structure of BCG signal and ECG signal, design a method based on wavelet analysis, decompose the electrocardiogram signal into wavelet components, and use system identification to link the BCG signal with the wavelet components of the ECG signal, and estimate the important wavelet components of the ECG signal by using the BCG signal to reconstruct the ECG waveform; Zhao Yaqin et al. introduce the non-parametric scale space method (PSA) and combine it with the empirical wavelet transform (EWT) algorithm to decompose the heartbeat component from the BCG signal, and on this basis, the improved deep convolutional, generates the ECG signal through the generated adversarial network (DCGAN); Li Qian et al. use wavelet decomposition to extract the heart cycle interval of the BCG signal, cut the data slice into heartbeats, and use a one-dimensional convolutional neural network to reconstruct the ECG signal from the BCG signal.

[0004] Based on the above background, the related research on generating ECG signal based on BCG signal is relatively less, and is aimed at small sample data, which is not universal, and needs to be further studied and a better method of generating ECG signal based on BCG signal with generalization ability is needed. SUMMARY

[0005] The purpose of the present application is to establish a model for generating ECG signal based on BCG signal. The network composed of sequence transformation module and transformation module is applied to the model for generating ECG signal based on BCG signal, which has generalization. In addition, a multi-scale feature fusion module is added to extract different scale features using different convolution kernels, and the multi-scale features are fused through a fully connected layer to fuse different scale features, thereby improving the accuracy of the network model. The P wave, Q wave, R wave, S wave and T wave of the ECG signal have different amplitudes and phases, and the neural network is easily affected when generating the ECG signal, which leads to the model not reaching the optimal state. A sequence transformation network is added at the end of the network model to calibrate the waveform, improve the accuracy and stability of the network model. Finally, the multi-scale feature fusion transformation network proposed in the present application can make the correlation coefficient of the generated ECG signal and the reference ECG signal reach 98.9%.

[0006] The method for intelligently generating electrocardiogram signal based on multi-scale feature fusion of heart impact signal of the present application comprises the following steps:

[0007] 1) Construct a multi-scale feature fusion transformation network:

[0008] The multi-scale feature fusion transformation network constructed, referred to as MFFTN, is composed of a sequence transformation module, a multi-scale feature fusion module and a transformation module.

[0009] 1.1) Sequence transformation module is composed of locator, time transformer, amplitude transformer; locator learns time transformation and amplitude transformation parameters, the first 2 layers of locator are composed of convolution Conv and maximum pooling MaxPOOL, the convolution kernel size of convolution is 1x5 and 1x7 respectively, followed by fully connected layer FC, linear rectifier function ReLU, fully connected layer;

[0010] 1.2) The first layer of multi-scale feature fusion module is composed of convolution with a convolution kernel size of 1x31 and maximum pooling, followed by a three-branch convolution block, each convolution block has three groups of the same convolution and maximum pooling, the convolution kernel sizes of the three convolution blocks are 1x3, 1x5 and 1x7 respectively, and the multi-scale features output by the three convolution blocks are fused through a concat layer and a fully connected layer;

[0011] 1.3) The transformation module is composed of an attention module and an encoder-decoder module;

[0012] 1.3.1) The attention module structure is a Resnet structure, including a weight branch and a short-cut branch, the first layer of the weight branch is composed of a fully connected layer and a ReLU, the second layer is a fully connected layer, followed by a Softmax layer; the short-cut branch elementarily multiplies the output of the multi-scale feature fusion module and the output of the weight branch;

[0013] 1.3.2) The encoder-decoder module has 10 layers, the encoder is a 5-layer convolutional neural network structure, each convolutional layer is composed of a convolution with a convolution kernel size of 1x31 and a parameterized rectified linear unit PReLU, wherein: the number of convolution kernels is 32, 64, 128, 256 and 512 respectively, and the convolution step is 2, 1, 2, 1 and 2 respectively; the decoder is a 5-layer deconvolutional neural network structure, except for the last layer, each convolutional layer is composed of a deconvolution TConv with a convolution kernel size of 1x31 and a PReLU, the last layer is composed of a deconvolution with a convolution kernel size of 1x31 and a hyperbolic tangent function Tanh, the number of convolution kernels is 256, 128, 64, 32 and 1 respectively, and the convolution step is 2, 1, 2, 1 and 2 respectively;

[0014] 2) Generating electrocardiogram signal based on heart impact signal, given a heart impact signal x=(x1,...,x t ,…x T ), wherein: x t represents the heart impact signal at time t, t=1,2,...,T, T represents the total length of the heart impact signal; MFFTN generates electrocardiogram signal, including the following steps:

[0015] 2.1) The cardiac impact signal x is input into the MFTN. The sequence transformation module normalizes the waveform of the cardiac impact signal to remove inter-individual differences, resulting in a normalized signal. First, the locator learns the transformation parameters θ1 = [α1, β1], where: α1 = [α... 10 ,α 11 ] represents the time transformation parameter; β1 = [β 10 ,β 11 [Amplitude transformation parameter]; the time transformer transforms x according to α1. t Mapped to Where: t'=α 10 t+α 11 When t' is a non-positive integer, linear sampling is used to select the two x' closest to t'. t' The mean is assigned to get The amplitude converter uses β1 to... Perform amplitude transformation.

[0016] 2.2) Multi-scale feature fusion of cardiac impact signals: This involves fusing the normalized signal... The input is fed into the multi-scale feature fusion module. First, 1×31 convolution and max pooling are used to extract features. Then, three convolutional blocks are used to extract features a1, a2, a3 at three scales. Finally, the features are concatenated through a concat layer to obtain a = [a1, a2, a3]. The fully connected layer is used to fuse the features to obtain the multi-scale fused features m. The mapping to m is denoted as Where: Θ1 represents Network parameters to m;

[0017] 2.3) The transformation module generates ECG signals based on the multi-scale fusion feature m.

[0018] 2.3.1) Extract the weight vector of the multi-scale fusion feature m: The fully connected layer and the Softmax layer calculate the weight vector A of the multi-scale fusion feature m, which is mapped as A = ψ(m; Θ2), where: Θ2 represents the network parameters from m to A. A is multiplied by m through the short-cut branch, and the weighted feature n = A⊙m is output, where: ⊙ represents element-wise multiplication;

[0019] 2.3.2) Encoding and Decoding of Weighted Feature n: First, the weighted feature n is encoded. A 5-layer convolutional neural network structure reduces the dimensionality of the weighted feature n and extracts the cardiac impulse signal features p = Encoder(n). Then, a 5-layer deconvolutional neural network structure maps the low-resolution features output by the encoder to the size of the ECG signal, and the higher-order representation of the ECG signal... n to The mapping is denoted as wherein: Θ3 represents n to network parameters,

[0020] 2.4) Calibration of ECG signal waveform: the decoded ECG signal is input into the sequence transformation module to calibrate the waveform, and the calibrated ECG signal is output. Firstly, the calibration parameters θ2 = [α2, β2] are learned by the locator, wherein: α2 = [α 20 , α 21 ] are time calibration parameters; β2 = [β 20 , β 21 ] are amplitude calibration parameters; the time transformer calibrates to wherein: t' = α 20 t + α 21 , when t' is not a positive integer, the linear sampling method is used to take the two means of the two closest to t' and assign them to , the amplitude transformer calibrates to

[0021] The modeling process of steps 2.1) to 2.4) is represented by the network mapping ;

[0022] 3) From the Bed-Based Ballistocardiography dataset with a sampling frequency of 1000Hz, 32 subjects aged 18 to 65 years old were selected for synchronous measurement of BCG and ECG signals, wherein: 15 males and 17 females, 28 healthy and 4 patients, with a total length of 3.4 hours; the data is resampled at a sampling rate of 100Hz, then the amplitude is normalized to [-1, 1] according to the maximum and minimum value, and the data is segmented with a step length of 100 sampling points and a window length of 500 sampling points, obtaining 13382 pieces of ballistocardiogram electrocardiogram data D = {x i , y i}, wherein: x i , y i represent the ballistocardiogram signal and the electrocardiogram signal of the i-th sample respectively, and the constructed dataset is 80% as a training set and 20% as a validation set;

[0023] 3.1) Training the network model using the training set D = {x i , y i}, including the following steps:

[0024] 3.1.1) First, the reference electrocardiogram signal y i = (yi,1 ,…y i,t ,…y i,T )Adopt pan-tompkins algorithm to detect R wave peak moment, and mark as Wherein: y i,t Indicate the i section at t time ECG signal, t=1,2,...,T, T indicates signal time total length, c i,k Indicate the i section ECG signal R wave peak moment, k=1,2,...,K i , K i Indicate the i section ECG signal contains R wave peak moment total number;

[0025] 3.1.2) based on the minimum absolute value deviation and the position of R wave Loss function is constructed, and the calculation formula of loss function is as follows:

[0026]

[0027] Wherein: λ indicates the hyperparameter of control Gaussian weighting function influence;Hyperparameter σ is the variance of Gaussian weighting function;

[0028] 3.1.3) the training of multi-scale feature fusion transformation network is carried out, and the loss function is iterated using Adam optimizer to update network parameters, and the model of BCG signal x is obtained, and ECG signal Is generated,

[0029] The beneficial effects of the application are that ECG signal is the most commonly used means of heart disease monitoring, has a strong theoretical and technical foundation, and uses a contact measurement method, which is not suitable for long-term home heart disease monitoring, and BCG signal uses a non-contact measurement method and can realize long-term home heart disease monitoring, and the cost is relatively low, in order to increase the application of BCG signal and realize long-term heart disease home monitoring and identification, the application proposes a kind of ECG signal intelligent generation method MFFTN based on multi-scale feature fusion of ballistocardiogram, effectively generates ECG signal based on BCG signal, and restores the main waveform characteristics of ECG signal.The application does not need to be based on the beat ECG segmentation step, reduces the error introduced by period division, and can utilize the rich clinical knowledge of the signals detected in ECG signal for heart disease monitoring based on BCG signal to generate ECG signal.The application normalizes BCG signal waveform using sequence transformation module to eliminate the differences of BCG signals of different people, has generalization ability, calibrates ECG signal waveform using sequence transformation module, has stability;Different scale features of BCG signal are extracted and fused to effectively enhance the recovery of ECG signal, and have accuracy.The network of the application effectively generates ECG signal, and lays a foundation for subsequent home monitoring and identification of heart disease. BRIEF DESCRIPTION OF DRAWINGS

[0030] Figure 1 Figure 1 is a multi-scale feature fusion transform network structure diagram;

[0031] Figure 2(a) is a sequence transform module structure diagram;

[0032] Figure 2(b) is a multi-scale feature fusion module structure diagram;

[0033] Figure 2(c) is an attention module structure diagram;

[0034] Figure 2(d) is an encoder-decoder module structure diagram;

[0035] Figure 3 Figure 3 is a convolution transform network structure diagram;

[0036] Figure 4 Figure 4 is a multi-scale fusion convolution transform network structure diagram;

[0037] Figure 5 Figure 5 is a schematic diagram of a periodic BCG signal;

[0038] Figure 6 Figure 6 is a schematic diagram of a periodic ECG signal;

[0039] Figure 7 Figure 7 is a schematic diagram of a BCG signal;

[0040] Figure 8 Figure 8 is a convolution transform network experimental result diagram;

[0041] Figure 9 Figure 9 is a multi-scale fusion convolution transform experimental result diagram;

[0042] Figure 10 Figure 10 is an experimental result diagram of the method of the present application. DETAILED DESCRIPTION

[0043] The present application will be described below in conjunction with the accompanying drawings.

[0044] The present application is a method for intelligent generation of electrocardiogram signals based on multi-scale feature fusion of ballistocardiogram signals, comprising the following steps:

[0045] 1) Construct a multi-scale feature fusion transform network:

[0046] The constructed multi-scale feature fusion transform network, referred to as MFFTN, is composed of a sequence transform module, a multi-scale feature fusion module, and a transform module;

[0047] 1.1) Sequence transformation module is composed of locator, time transformer, amplitude transformer; locator learns time transformation and amplitude transformation parameters, the first 2 layers of locator are composed of convolution Conv and maximum pooling MaxPOOL, the convolution kernel size of convolution is 1x5 and 1x7 respectively, followed by fully connected layer FC, linear rectifier function ReLU, fully connected layer;

[0048] 1.2) The first layer of multi-scale feature fusion module is composed of convolution with a convolution kernel size of 1x31 and maximum pooling, followed by a three-branch convolution block, each convolution block has three groups of the same convolution and maximum pooling, the convolution kernel sizes of the three convolution blocks are 1x3, 1x5 and 1x7 respectively, and the multi-scale features output by the three convolution blocks are fused through a concat layer and a fully connected layer;

[0049] 1.3) The transformation module is composed of an attention module and an encoder-decoder module;

[0050] 1.3.1) The attention module structure is a Resnet structure, including a weight branch and a short-cut branch, the first layer of the weight branch is composed of a fully connected layer and a ReLU, the second layer is a fully connected layer, followed by a Softmax layer; the short-cut branch elementarily multiplies the output of the multi-scale feature fusion module and the output of the weight branch;

[0051] 1.3.2) The encoder-decoder module has 10 layers, the encoder is a 5-layer convolutional neural network structure, each convolutional layer is composed of a convolution with a convolution kernel size of 1x31 and a parameterized rectified linear unit PReLU, wherein: the number of convolution kernels is 32, 64, 128, 256 and 512 respectively, and the convolution step is 2, 1, 2, 1 and 2 respectively; the decoder is a 5-layer deconvolutional neural network structure, except for the last layer, each convolutional layer is composed of a deconvolution TConv with a convolution kernel size of 1x31 and a PReLU, the last layer is composed of a deconvolution with a convolution kernel size of 1x31 and a hyperbolic tangent function Tanh, the number of convolution kernels is 256, 128, 64, 32 and 1 respectively, and the convolution step is 2, 1, 2, 1 and 2 respectively;

[0052] 2) Generating electrocardiogram based on heart impact signal, given a heart impact signal x=(x1,...,x t ,…x T ), wherein: x t represents the heart impact signal at time t, t=1,2,...,T, T represents the total length of the heart impact signal; MFFTN generates electrocardiogram, including the following steps:

[0053] 2.1) The heart impact signal x is input into the MFFTN, and the sequence transformation module normalizes the waveform of the heart impact signal, removes individual differences, and obtains the normalized signal First, the locator learns the transformation parameter θ1=[α1,β1], where: α1=[α 10 ,α 11 ] is the time transformation parameter; β1=[β 10 ,β 11 ] is the amplitude transformation parameter; the time transformer maps x t to where: t' = α 10 t + α 11 ; when t' is not a positive integer, the linear sampling method is used to take the mean of the two x t' closest to t' and assign it to to obtain The amplitude transformer performs amplitude transformation on through β1,

[0054] 2.2) Heart impact signal multi-scale feature fusion: the normalized signal is input into the multi-scale feature fusion module, first 1×31 convolution and maximum pooling are used to extract features, then three convolution blocks are used to extract features a1, a2, a3 at three scales, finally the concat layer is used to splice to obtain a=[a1, a2, a3], and the fully connected layer is used for fusion to obtain the multi-scale fusion feature m; The mapping from m to m is denoted as where: Θ1 represents the network parameters from m to m;

[0055] 2.3) The transformation module generates the electrocardiogram signal

[0056] 2.3.1) Extract the multi-scale fusion feature weight vector: the fully connected layer and the Softmax layer calculate the weight vector A of the multi-scale fusion feature m, and the mapping is A=ψ(m; Θ2), where: Θ2 represents the network parameters from m to A, A is multiplied with m through the short-cut branch, and the weighted feature n=A⊙m is output, where: ⊙ represents element multiplication;

[0057] 2.3.2) Encode and decode the weighted feature n: first, the weighted feature n is encoded, and a 5-layer convolutional neural network structure is used to reduce the dimension of the weighted feature n to extract the heart impact signal feature p=Encoder(n); then, a 5-layer deconvolutional neural network structure is used to map the low-resolution feature output by the encoder to the size of the electrocardiogram signal, and the high-order represents the electrocardiogram signal The mapping from n to is denoted as ​wherein: Θ3 represents n to network parameters,

[0058] 2.4) Calibration of ECG signal waveform: the decoded ECG signal is input into the sequence transformation module to calibrate the waveform, and the calibrated ECG signal First, the calibrating parameter θ2 = [α2, β2] is learned by the locator, wherein: α2 = [α 20 ,α 21 ] is the time calibration parameter; β2 = [β 20 ,β 21 ] is the amplitude calibration parameter; the time transformer calibrates to wherein: t' = α 20 t + α 21 , when t' is not a positive integer, the linear sampling method is used to take the two means of the two closest to t' and assign them to to obtain The amplitude transformer calibrates

[0059] The modeling process of steps 2.1) to 2.4) is represented by the network mapping ;

[0060] 3) From the Bed-Based Ballistocardiography data set with a sampling frequency of 1000Hz, 32 subjects aged 18 to 65 years old were selected for synchronous measurement of BCG and ECG signals, wherein: 15 males and 17 females, 28 healthy, 4 patients, total length of 3.4 hours; resample the data at a sampling rate of 100Hz, then normalize the amplitude to [-1,1] according to the maximum and minimum value, segment the data with a step length of 100 sampling points and a window length of 500 sampling points, to obtain 13382 segments of ballistocardiogram electrocardio data D = {x i ,y i}, wherein: x i , y i represent the ballistocardiogram signal and electrocardio signal of the i-th sample respectively, the constructed data set is 80% as a training set and 20% as a validation set;

[0061] 3.1) Train the network model using the training set D = {x i ,y i}, including the following steps:

[0062] 3.1.1) First, the reference electrocardio signal y i = (yi,1 ,…y i,t ,…y i,T )Adopt pan-tompkins algorithm to detect R wave peak moment, recorded as c i =(c i,1 ,…,c i,k ,…,c i,Ki ), wherein: y i,t Indicate the i-th segment of electrocardiogram signal at t time, t=1,2,...,T, T indicates the total length of signal time, c i,k Indicate the i-th segment of electrocardiogram signal R wave peak moment, k=1,2,...,K i , K i Indicate the total number of R wave peak moments contained in the i-th segment of electrocardiogram signal;

[0063] 3.1.2) Based on the minimum absolute value deviation and the position of R wave, a loss function is constructed, and the calculation formula of the loss function is:

[0064]

[0065] Wherein: λ represents the hyperparameter for controlling the influence of Gaussian weighting function; The hyperparameter σ is the variance of Gaussian weighting function;

[0066] 3.1.3) Training the multiscale feature fusion transform network, using Adam optimizer to iterate the loss function, updating the network parameters, obtaining the BCG signal x, generating the model of ECG signal

[0067] Embodiment

[0068] The effect of the present application will be illustrated by the results of the experiment of generating ballistocardiogram signal from electrocardiogram signal, and the implementation process of the present application will be further illustrated combined with the drawings, so that the person skilled in the art can better understand the present application.

[0069] The experimental platform of the present application adopts Intel(R)Core(TM)i5-7500 CPU@3.40GHz 3.40GHz, the memory is 8GB, the PC machine running Windows 7, and the language is python language. The running environment is python==3.7, torch==1.7.0.

[0070] The main purpose of the present application is to establish a model for generating ECG signal from BCG signal, based on this purpose, the present application proposes a multiscale feature fusion transform network (Multiscale Feature Fusion Transform Network, MFFTN), the network structure diagram of which is as Figure 1 shown, and the network structure diagram of each module is as​Figures 2(a) to 2(d) In this embodiment, in order to illustrate the effect of adding different modules to the present application, the present application constructs a convolutional transformation network, a multi-scale fusion convolutional transformation network and a multi-scale feature fusion transformation network for comparison. The network structure of the convolutional transformation network is as shown in Figure 3 The convolutional transformation network is composed of a sequence transformation module and a transformation module, and the transformation module is composed of an attention module and an encoder-decoder module. The network structure of the multi-scale fusion convolutional transformation network is as shown in Figure 4 The multi-scale fusion convolutional transformation network is constructed by adding a multi-scale feature fusion module to the convolutional transformation network. The training set constructed by the Bed-Based Ballistocardiography dataset is used to train the convolutional transformation network, the multi-scale fusion convolutional transformation network and the multi-scale feature fusion transformation network, and the constructed verification set is used to verify the model, and the model is continuously adjusted according to the situation. The training label of the three networks is the reference ECG signal, the initial learning rate is 0.0001, the batch size is 256, the iteration number is 1000, the Adam optimization algorithm is used, and the training is stopped when the maximum iteration number is reached. The BCG signal is composed of H, I, J, K, L, M and N waves, as shown in Figure 5 The ECG signal is composed of QRS complex, P wave and T wave, as shown in Figure 6 The present application is based on the waveform structure as shown in Figure 5 The waveform structure as shown in Figure 6 The J wave of the BCG signal corresponds to the R wave of the ECG signal. The data in the Bed-Based Ballistocardiography dataset is normalized to [-1, 1], and resampled at a sampling frequency of 100 Hz, as shown in Figure 7 The three trained models are tested, and the generated ECG signal and the reference ECG signal are respectively as shown in Figure 8 , 9, 10, the dashed line is the reference ECG signal, and the solid line is the generated ECG signal.

[0071] The test results are analyzed, Figure 8 The modeling result of the convolutional transformation network, the network modeling only extracts single scale features of the BCG signal for modeling, the overall waveform trend of the generated ECG signal is consistent, the amplitude of the QRS complex, P wave and T wave exists attenuation, and the phase exists offset; Figure 9 The experimental result of the multi-scale fusion convolutional transformation network, the amplitude attenuation of the P wave and T wave of the generated ECG signal is improved, and the QRS complex amplitude attenuation still exists; Figure 10The network experiment results of the present application can be seen. It can be seen that the method of the present application can effectively improve the accuracy of the network model by adding a multi-scale feature fusion module. The sequence transformation network module is added at the end of the network to calibrate the ECG signal waveform, which can further improve the accuracy and stability of the waveform. The accuracy of the ECG signal amplitude generated by the present application is verified by experiments. The phase is not delayed, and the physiological information such as the RR time interval is retained, thereby proving the effectiveness of the present application.

[0072] To verify the experimental results of the present application, the inventors calculated the mean absolute error (MAE) and root mean square error (RMSE) of the reference ECG signal and the generated ECG signal, and the correlation coefficient (r), as shown in Table 1. The MAE and RMSE values of the network model reconstruction results of the present application are the smallest, and the r value is the largest, which shows that the present application can effectively improve the ECG signal generation effect by adding a multi-scale feature fusion module and a sequence transformation module.

[0073] The calculation formulas of MAE, RMSE and r are as follows:

[0074]

[0075]

[0076]

[0077] Wherein: T represents the signal time length; y represents the reference ECG signal; represents the generated ECG signal.

[0078] Table 1: Comparison of average absolute error, root mean square error and correlation coefficient of reconstruction results of different methods

[0079]

Claims

1. An intelligent electrocardiosignal generation method based on multi-scale feature fusion of ballistocardiogram signals, comprising the following steps: 1) Constructing a multi-scale feature fusion transformation network: The multi-scale feature fusion transformation network, referred to as MFFTN, is composed of a sequence transformation module, a multi-scale feature fusion module and a transformation module; 1.1) The sequence transformation module is composed of a locator, a time transformer and an amplitude transformer; the locator learns time transformation and amplitude transformation parameters, the first two layers of the locator are both composed of a convolution Conv and a maximum pooling MaxPOOL, the convolution kernel sizes of the convolution are 1x5 and 1x7 respectively, followed by a fully connected layer FC, a linear rectifier function ReLU and a fully connected layer; 1.2) The first layer of the multi-scale feature fusion module is composed of a convolution with a convolution kernel size of 1x31 and a maximum pooling, followed by a three-branch convolution block, each convolution block has three groups of the same convolution and maximum pooling, the convolution kernel sizes of the three convolution blocks are 1x3, 1x5 and 1x7 respectively, and the multi-scale features output by the three convolution blocks are fused through a concat layer and a fully connected layer; 1.3) The transformation module is composed of an attention module and an encoder-decoder module; 1.3.1) The attention module is of a Resnet structure, including a weight branch and a short-cut branch, the first layer of the weight branch is composed of a fully connected layer and a ReLU, the second layer is a fully connected layer, followed by a Softmax layer; the short-cut branch performs element multiplication on the outputs of the multi-scale feature fusion module and the weight branch; 1.3.2) The encoder-decoder module has 10 layers, the encoder is a 5-layer convolutional neural network structure, each convolutional layer is composed of a convolution with a convolution kernel size of 1x31 and a parameterized rectified linear unit PReLU, wherein: the number of convolution kernels is 32, 64, 128, 256 and 512 respectively, and the convolution step is 2, 1, 2, 1 and 2 respectively; the decoder is a 5-layer deconvolutional neural network structure, except for the last layer, each convolutional layer is composed of a deconvolution TConv with a convolution kernel size of 1x31 and a PReLU, the last layer is composed of a deconvolution with a convolution kernel size of 1x31 and a hyperbolic tangent function Tanh, the number of convolution kernels is 256, 128, 64, 32 and 1 respectively, and the convolution step is 2, 1, 2, 1 and 2 respectively; 2) Generate ECG signals based on cardiac impact signals, given a segment of cardiac impact signal x = (x1, ..., x...). t ,…x T ), where: x t The cardiac impulse signal at time t is represented, where t = 1, 2, ..., T, and T represents the total duration of the cardiac impulse signal. The MFFTN generates the electrocardiogram signal, including the following steps: 2.1) The heart impact signal x is input into MFFTN, the sequence transformation module normalizes the waveform of the heart impact signal, removes the individual differences, and obtains the normalized signal First, the locator learns the transformation parameters θ1 = [α1, β1], where: α1 = [α 10 , α 11 ] is the time transformation parameter; β1 = [β 10 , β 11 ] is the amplitude transformation parameter; the time transformer maps x t to where: t' = α 10 t + α 11 ; when t' is not a positive integer, the linear sampling method is used to take the mean of the two x t' closest to t' and assign it to to obtain The amplitude transformer performs amplitude transformation on through β1, 2.2) Multi-scale feature fusion of heart shock signals: the normalized signal is input into the multi-scale feature fusion module. First, a 1 x 31 convolution and max pooling are used to extract features, then three convolution blocks are used to extract features a1, a2, a3 at three scales, and finally a concat layer is used to splice a = [a1, a2, a3], and a fully connected layer is used for fusion to obtain a multi-scale fusion feature m; The mapping from a to m is denoted as where: Θ1 represents the network parameters from a to m; 2.3) Transforming module to generate electrocardiosignal according to multi-scale fusion feature m 2.3.1) Extracting the feature weight vector for multi-scale fusion: The fully connected layer and the Softmax layer compute the weight vector A for the feature m of multi-scale fusion, which is mapped as A = ψ(m; Θ2), where: Θ2 represents the network parameters from m to A, A is multiplied by m through the short-cut branch, and the weighted feature n=A⊙m is output, wherein: represents element multiplication; 2.3.2) Decoding the weighted feature n: First, the weighted feature n is encoded, a 5-layer convolutional neural network structure reduces the dimension of the weighted feature n, extracts the characteristic p = Encoder(n) of the ballistocardiogram, then a 5-layer deconvolutional neural network structure maps the low-resolution feature output by the encoder to the size of the electrocardiogram, and the high-order represents the electrocardiogram n to is denoted as wherein: Θ3 represents the network parameters of n to , 2.4) Calibration of ECG signal waveform: Decode the ECG signal into the sequence transform module to calibrate the waveform, output the calibrated ECG signal First, learn the calibration parameters θ2 = [α2, β2] by the locator, where: α2 = [α 20 , α 21 ] is the time calibration parameter; β2 = [β 20 , β 21 ] is the amplitude calibration parameter; the time transformer calibrates to , where: t' = α 20 t + α 21 , when t' is not a positive integer, the linear sampling method is used to take the two closest to t' The mean of the two is given to The amplitude transformer calibrates to The modeling process of steps 2.1) to 2.4) is represented by the network map ; 3) From the Bed-Based Ballistocardiography dataset with a sampling frequency of 1000 Hz, select the BCG and ECG signals of 32 subjects aged 18 to 65 years old measured synchronously to construct the dataset, wherein: 15 males and 17 females, 28 healthy, 4 patients, total length of 3.4 hours; resample the data at a sampling rate of 100 Hz, then normalize the amplitude to [-1, 1] according to the maximum and minimum value, segment the data with a step length of 100 sampling points and a window length of 500 sampling points to obtain 13382 segments of heart impact electrocardiogram data D = {x i ,y i} wherein: x i , y i represent the heart impact signal and electrocardiogram signal of the i th sample respectively, 80% of the constructed dataset is used as the training set and 20% is used as the validation set; 3.1) Training the network model with the training set D = {x i ,y i} comprising the following steps: 3.1.1) First, the reference ECG signal y i = (y i,1 ,…y i,t ,…y i,T ) is detected by the pan-tompkins algorithm for R-wave peak time, denoted as where y i,t represents the i-th segment of the ECG signal at time t, t = 1, 2,..., T, T represents the total length of the signal time, c i,k represents the i-th segment of the ECG signal R-wave peak time, k = 1, 2,..., K i , K i represents the total number of R-wave peak times contained in the i-th segment of the ECG signal; 3.1.2) Construct a loss function based on the least absolute deviation and the position of R wave, the calculation formula of the loss function is: wherein: λ represents a hyperparameter for controlling the influence of the Gaussian weighting function; the hyperparameter σ is the variance of the Gaussian weighting function; 3.1.3) Train the multi-scale feature fusion transformation network, use the Adam optimizer to iterate the loss function, update the network parameters, get the BCG signal x, and generate the ECG signal model,

Citation Information

Patent Citations

  • Electrocardiosignal graph classification method based on deep learning

    CN112508110A

  • Transfer learning-based method for improved VGG16 network pig identity recognition

    WO2022252272A1