A physiological signal compression system based on deep autoencoder
Through a physiological signal compression system based on a deep autoencoder, using a combination of an encoder, a decoder, and a discriminator, the problems of low compression rate and insufficient reconstruction accuracy in the existing technology are solved, and efficient ECG data compression is achieved.
Patent Information
- Application Number
- CN202410159173.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-04
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2044-02-04
AI Technical Summary
Existing physiological signal compression methods have problems such as low compression rate, slow speed or low reconstruction accuracy.
A physiological signal compression system based on a deep autoencoder is adopted, including an encoder, a decoder, a fast Fourier transform module and a discriminator. A deep discriminator is added during the training phase to optimize the neural network weights and improve the signal reconstruction quality.
While ensuring acceptable mean square error and normalized RMS difference percentage, the compression ratio is increased to 360 times, the reconstruction quality is improved, and it is suitable for single-core CPU operation, meeting the ECG data compression needs in actual scenarios.
Smart Images

Figure CN119030548B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of physiological signal compression, and particularly relates to a physiological signal compression system based on a deep autoencoder. BACKGROUND
[0002] Existing physiological signal compression methods include compressed sensing, deep learning autoencoder and transform-based compression methods. The compressed sensing method: the input signal is randomly sampled at a sampling rate lower than the Nyquist rate to obtain a compressed data representation. After receiving the randomly sampled signal, the receiving end reconstructs the compressed data through a reconstruction matrix. This process is lossy compression. The deep autoencoder method: an encoder-decoder architecture in deep learning is used to construct an encoder-decoder. The input signal is converted into a latent variable form through the encoder (i.e., encoder), and the latent variable is restored to the original signal through the decoder (i.e., decoder). This process is also lossy compression. The transform-based compression method: such as DCT (discrete cosine transform), DWT (discrete wavelet transform) and fast Fourier transform, etc. This process is also lossy compression. The above three methods all have the problems of low compression rate, slow compression speed or high compression rate but low reconstruction accuracy. SUMMARY
[0003] In view of the deficiencies of the prior art, the present application provides a physiological signal compression system based on a deep autoencoder, which can increase the compression rate to 360 times while ensuring acceptable rms (mean square error) and PRDN (normalized RMS difference percentage), and improve signal reconstruction quality by training a deep discriminator together in the training stage.
[0004] To achieve the above technical solutions, the present application provides a physiological signal compression system based on a deep autoencoder, which includes: an encoder for converting an input physiological signal into a latent variable Z; a decoder for reconstructing the original signal based on the latent variable Z; a fast Fourier transform module for calculating the frequency components of the input and output signals to obtain the frequency spectrum; a discriminator for judging the difference between the input signal features and the output signal features; and an optimizer for updating the neural network weights to obtain better compression and reconstruction results.
[0005] Preferably, the encoder is composed of two convolutional layers at the head and tail, four convolutional blocks, and an LSTM layer. After the input signal enters the encoder, the number of channels of the first layer of convolutional layer is consistent with the number of channels of the input signal, the convolution kernel size is 7, followed by four convolutional blocks with consistent structure, and the number of channels is doubled after each convolutional block. The step lengths of the four convolutional blocks are 2, 4, 5, and 8, respectively, to realize the down-sampling of the input signal. The down-sampled signal will pass through the LSTM layer to extract the timing information. The number of channels of the last convolutional layer is consistent with the number of channels of the last convolutional block, and the convolution kernel size is 3. The output is the required latent variable Z.
[0006] Preferably, the convolutional block is composed of three residual units and a one-dimensional convolutional layer. The input channel of the residual unit is 1 / 2 of the input channel of the convolutional block, and the dilation parameter increases by 1, 3, and 9, respectively, to obtain timing features of different scales. The convolution kernel size of the convolutional layer is twice the step length, and the number of channels and the step length are consistent with the input channel of the convolutional block.
[0007] Preferably, the residual unit is composed of a one-dimensional dilated convolutional layer and a one-dimensional convolutional layer, and a residual connection. After the input signal passes through the two convolutional layers, the output feature is obtained. The output feature is added to the input signal itself as the final output of the residual unit.
[0008] Preferably, the structure of the decoder is the mirror image of the encoder, and the operation of the decoder is the inverse process of the operation of the encoder. The input is the latent variable Z output by the encoder. First, a one-dimensional convolutional layer is input, the convolution kernel size is 7, and the number of channels is 16 times the number of channels of the original signal. Then, an LSTM layer is input, which restores the timing information. Then, four decoding convolutional blocks with the same structure are input, and the step lengths are 8, 5, 4, and 2, respectively. The number of channels is halved after each convolutional block. Finally, a one-dimensional convolutional layer with a convolution kernel size of 7 and a channel number of 1 is used to restore the original signal.
[0009] Preferably, a single discriminator is composed of an STFT block and six two-dimensional convolutional layers. Real represents the real part of the stft output result, and Im represents the imaginary part of the stft output result. After the two parts are spliced, a time-frequency feature map is formed. Then, a two-dimensional convolutional layer with a convolution kernel size of 24 is input, which is converted into a 32-channel feature map. Then, three two-dimensional convolutional layers with a convolution kernel size of 3*8 and a step length of (1, 2) are input, and the dilation parameters are (1, 1), (2, 1), and (4, 1), respectively. Finally, two convolutional layers with a convolution kernel size of 3*3 are input to obtain the final output result.
[0010] Preferably, the operation process of the system is divided into a training stage and an inference stage, wherein the training stage learns the characteristics of electrocardiogram signals of different patients based on the mit-bih electrocardiogram dataset, and maps the learned characteristics to a lower dimension to remove the correlation to obtain latent variables z, and the decoder reconstructs the electrocardiogram signal based on the obtained latent variables z, and the encoder and the decoder are trained together in the training stage to obtain the optimal encoder and decoder. The inference stage includes the encoding and decoding processes, and the encoder and the decoder are used separately, in the compression process, the input signal is input into the encoder to obtain the compressed representation, and in the decompression process, the decoder is used to decompress the received compressed signal to reconstruct the original signal.
[0011] Preferably, the training process is as follows: the input raw data is first preprocessed, and then input into the encoder-decoder network to calculate the output reconstructed signal, the corresponding loss is calculated according to the loss function, and the parameters of the encoder, the decoder and the discriminator are updated according to the loss, the parameters of the encoder and the decoder are updated together, and the parameters of the discriminator are updated according to the adversarial loss.
[0012] Preferably, the training stage needs to preprocess the data, and the adopted dataset is the open-source electrocardiogram database of mit-bih. The original data contains 48 electrocardiogram data, which contains the results collected under different leads, and each lead has 650,000 data points, with a sampling rate of 360Hz. The data is first cut into 1s size windows, and a piece of data is cut into multiple 360-point data segments. The cut data is inverted in time domain and amplitude to obtain inverted data, so as to obtain electrocardiogram characteristics in different spatial and temporal scales. Through this operation, data augmentation is performed to expand the dataset, avoiding the influence of different lead characteristics and positive and negative electrode reverse connection during ECG collection. In the training stage, the encoder and the decoder are connected together, the input data is directly input into the decoder after being input into the encoder to obtain the output, and the input and the output are compared, three losses are calculated, and the neural network weight is updated using the optimizer to obtain a better compression and reconstruction effect.
[0013] Preferably, the training of the discriminator is performed at the same time as the training of the encoder and the decoder, and the task of the discriminator is to judge whether the reconstructed data is real data. The adversarial loss is used for training. Whenever the encoder-decoder calculates the output reconstructed data, the reconstructed data is input into the discriminator to obtain the output of the discriminator, and the adversarial loss is calculated according to the output of the discriminator. The gradient of all parameters of the discriminator is calculated according to the loss, and the parameters of each layer in the discriminator are updated.
[0014] Compared with the prior art, the present application has the following advantages:
[0015] (1) The application can increase the compression rate to 360 times while ensuring that rms (mean square error) and PRDN (normalized RMS difference percentage) are acceptable, and has lower reconstruction loss, better fitting the original electrocardiogram curve.
[0016] (2) The application improves signal reconstruction quality by adding a deep discriminator for training in the training stage.
[0017] (3) The system can run on a single-core CPU, has high running efficiency, and meets the electrocardiogram data compression needs of actual scenarios. BRIEF DESCRIPTION OF DRAWINGS
[0018] Figure 1 The figure is a system architecture diagram of the application in the training stage.
[0019] Figure 2 The figure is a system architecture diagram of the application in the inference stage.
[0020] Figure 3 The figure is a one-dimensional hollow convolution calculation process diagram.
[0021] Figure 4 The figure is a two-dimensional convolution input and output process diagram.
[0022] Figure 5 The figure is a two-dimensional hollow convolution calculation process diagram.
[0023] Figure 6 The figure is a diagram of the overall and internal structure of LSTM.
[0024] Figure 7 The figure is an encoder structure diagram.
[0025] Figure 8 The figure is an encoder convolution block structure diagram.
[0026] Figure 9 The figure is a residual unit structure diagram.
[0027] Figure 10 The figure is a decoder structure diagram.
[0028] Figure 11 The figure is a decoder convolution block structure diagram.
[0029] Figure 12 The figure is a discriminator structure diagram.
[0030] Figure 13 The figure is a training stage flowchart. DETAILED DESCRIPTION
[0031] With reference to the accompanying drawings, the technical solutions in the embodiments of the present application will be described clearly and completely. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. All other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0032] Embodiment: a physiological signal compression system based on deep autoencoder.
[0033] Background knowledge:
[0034] One-dimensional convolution:
[0035] K is the size of the convolution kernel, N is the number of input channels, S (stride) is the step length, and Cout is the number of output channels. The number of output channels is equal to the number of convolution kernels required to perform the following operation:
[0036]
[0037] One-dimensional dilated convolution adds a dilation parameter to the ordinary one-dimensional convolution, as shown in Figure 3 (b) is the case of dilation = 1.
[0038] The output length is
[0039]
[0040] Where padding is the number of input padding, and the padding method can be zero padding or mean value padding, etc.
[0041] Two-dimensional convolution:
[0042] The input matrix is I, the kernel matrix is K, and the shape is m*n. The two-dimensional convolution formula can be defined as:
[0043]
[0044] The process is shown in Figure 4 .
[0045] Two-dimensional dilated convolution adds a dilation parameter to the ordinary one-dimensional convolution, as shown in Figure 5 .
[0046] Compared with ordinary convolution, dilated convolution operation will skip some pixels to obtain a larger receptive field. Figure 4 The convolution kernel size from left to right is 3*3, 5*5, 7*7, and the dilation parameter is (1, 1).
[0047] Residual module:
[0048] Each convolution block contains a residual module to avoid the gradient vanishing problem in the training process, which can be expressed as:
[0049] y = x + f(x)
[0050] Where f(x) can be considered as the output generated by the one-dimensional convolution layer, that is, the final output y is the sum of one-dimensional convolution output and input x.
[0051] STFT is the short-time Fourier transform, which is used to calculate the time-frequency information of the input signal. Different window lengths can be used to calculate the amplitude corresponding to the frequency change over time. The formula is as follows:
[0052]
[0053] LSTM
[0054] i t = σ(W ii x t + b ii + W hi h t-1 + b hi )
[0055] f t = σ(W if x t + b if + W hf h t-1 + b hf )
[0056] g t = tanh(W ig x t + b ig + W hg h t-1 + b hg )
[0057] o t = σ(W io x t + b io + W ho h t-1 + b ho )
[0058] c t = f t ⊙c t-1 + i t ⊙g t
[0059] h t = o t ⊙ tanh(c t)
[0060] In the above formula, ft is the output of the forget gate, ct is the output of the memory gate, ot is the output of the output gate, and gt and it are intermediate variables used to calculate the memory gate output ct.
[0061] The LSTM is a special recurrent neural network, and the overall structure is as shown in Figure 6 .
[0062] Referring to Figure 1 and Figure 2 , a physiological signal compression system based on a deep autoencoder includes an encoder for converting an input physiological signal into a latent variable Z; a decoder for reconstructing an original signal based on the latent variable Z; a fast Fourier transform module for calculating the frequency components of the input and output signals to obtain a frequency spectrum; a discriminator for judging the difference between the features of the input signal and the output signal; and an optimizer for updating the neural network weights to obtain a better compression and reconstruction effect.
[0063] The running process of the system is divided into two stages, a training stage and an inference stage; the inference stage includes an encoding and decoding process. Taking the compression of electrocardiogram (ECG) as an example, the training stage learns the features of ECG signals of different patients based on the mit-bih ECG dataset, and maps the learned features to a lower dimension to remove the correlation to obtain a latent variable Z. The decoder reconstructs the ECG signal based on the obtained latent variable Z. The encoder and the decoder are trained together in the training stage to obtain the optimal encoder and decoder. In the inference stage, the encoder and the decoder are used separately. When compressing, the input signal is input into the encoder to obtain a compressed representation; when decompressing, the decoder is used to decompress the received compressed signal to reconstruct the original signal.
[0064] The overall structure Figure 1 and Figure 2 is shown, wherein Figure 1 is the overall structure of the training stage, Figure 2 is the system structure used in the inference stage. Figure 1 In the above formula, Encoder is the encoder, which is used to convert the input ECG into a latent variable Z; Decoder is the decoder, which is used to reconstruct the ECG signal based on the latent variable Z; FFT is the fast Fourier transform module, which is used to calculate the frequency components of the input and output signals to obtain a frequency spectrum; module D is the discriminator, which is used to judge the difference between the features of the input signal and the output signal. Loss_t is the loss function of the input and output in the time domain, Loss_f is the loss function of the input and output in the frequency domain, and Loss_adv is the adversarial loss function of the input and output signals.
[0065] The structure of the encoder is as shown inFigure 7 As shown in the figure, the encoder is composed of two convolutional layers at the head and tail, four convolutional blocks, and an LSTM layer. After the input signal enters the encoder, it is processed by the first convolutional layer to obtain the feature map, and then the feature map is input into the four convolutional blocks. After each convolutional block, the channel number is doubled, and the step lengths of the four convolutional blocks are 2, 4, 5, and 8, respectively, to realize the down-sampling of the input signal. The down-sampled signal is input into the LSTM layer to extract the time sequence information. The last convolutional layer has the same number of channels as the last convolutional block, and the convolutional kernel size is 3. The output is the required latent variable. Figure 7 As shown in the figure, the first layer of the input convolutional layer has the same number of channels as the input signal (usually 1), and the convolutional kernel size is 7. It is followed by four convolutional blocks with the same structure. After each convolutional block, the channel number is doubled. The step lengths of the four convolutional blocks are 2, 4, 5, and 8, respectively, to realize the down-sampling of the input signal. The down-sampled signal is input into the LSTM layer to extract the time sequence information. The last convolutional layer has the same number of channels as the last convolutional block, and the convolutional kernel size is 3. The output is the required latent variable.
[0066] As shown in the figure, the convolutional block is composed of three residual units and a one-dimensional convolutional layer. The input channel of the residual unit is 1 / 2 of the input channel of the convolutional block, and the dilation parameter increases by 1, 3, and 9, respectively, to obtain time sequence features of different scales. The convolutional kernel size of the convolutional layer is twice the step length, and the channel number and step length are consistent with the input channel of the convolutional block. Figure 8 As shown in the figure, the residual unit is composed of a one-dimensional dilated convolutional layer and a one-dimensional convolutional layer, and a residual connection. After the input signal is processed by the two convolutional layers, the output feature is obtained. The output feature is added to the input signal itself to obtain the final output of the residual unit.
[0067] Figure 9 As shown in the figure, the residual unit is composed of a one-dimensional dilated convolutional layer and a one-dimensional convolutional layer, and a residual connection. After the input signal is processed by the two convolutional layers, the output feature is obtained. The output feature is added to the input signal itself to obtain the final output of the residual unit.
[0068] As shown in the figure, the decoder structure is the mirror image of the encoder. The operation of the decoder is the inverse process of the encoder. The input is the latent variable Z output by the encoder. First, a one-dimensional convolutional layer is input, the convolutional kernel size is 7, and the channel number is 16 times the channel number of the original signal. Then, an LSTM layer is input, which restores the time sequence information. Then, four decoding convolutional blocks with the same structure are input, and the step lengths are 8, 5, 4, and 2, respectively. After each convolutional block, the channel number is halved. Finally, a one-dimensional convolutional layer with a convolutional kernel size of 7 and a channel number of 1 is used to restore the original signal. Figure 10 As shown in the figure, the decoder convolutional block structure is shown in the figure. Conv1D T is a transposed one-dimensional convolution, and the operation is similar to one-dimensional convolution Conv1D. The difference is that the output length is greater than the input length. ResidualUnit is consistent with the residual unit described above.
[0069] Figure 11 As shown in the figure, the discriminator structure is shown in the figure.
[0070] As shown in the figure, the discriminator structure is shown in the figure. Figure 12 As shown in , the complete network structure will contain K discriminators, corresponding to STFTs of different scales / window lengths. Here, K = 5, and the window lengths are 128, 256, 512, 1024, and 2048 respectively. A single discriminator consists of an STFT block and 6 two-dimensional convolutional layers. Figure 12 As shown in the figure, Real represents the real part of the stft output result, and Im represents the imaginary part of the stft output result. The two parts are spliced together to form a time-frequency feature map, which is then input into a two-dimensional convolution layer with a convolution kernel size of 24 and converted into a 32-channel feature map. It then passes through three two-dimensional convolution layers with 32 channels, a convolution kernel size of 3*8, and a step length of (1, 2) (representing the step length of 1 in the x-direction and the step length of 2 in the y-direction). The dilation parameters are (1, 1), (2, 1), and (4, 1), respectively. The definition of two-dimensional void convolution is shown in the previous text. Finally, two convolution layers with a convolution kernel size of 3*3 are passed to obtain the final output result.
[0071] Loss function: Loss_t is the loss function in the time domain, using L1 Norm as the output loss, which is the sum of the absolute values of the difference between each data point of the input and output data. The formula is as follows:
[0072] Loss t =‖x recons -x in ‖1
[0073] Loss_f is the loss function in the frequency domain. First, a 360-point FFT (Fast Fourier Transform) is performed on the input and output data to obtain the frequency-amplitude spectra of the two signals. A linear combination of L1 Norm and mean square error (MSE) is used as the loss function, which is the linear weighted sum of the absolute value of the difference between the two frequency-amplitude spectra and the square of the difference between the amplitude spectra. The formula is as follows:
[0074]
[0075] Where F(·) is the fast Fourier transform function, and α and β are custom weight parameters.
[0076] Loss_feat is the loss function of the discriminator output. The input and output data are simultaneously input into the discriminator's neural network to obtain the corresponding feature output. The KL divergence between the two feature outputs is calculated to obtain the feature loss. The formula is as follows:
[0077]
[0078] where Dk(·) is the k-th discriminator and K is the number of discriminators.
[0079] Loss_g is the discriminator adversarial loss, the input data is the reconstructed data, and the output is the difference between the reconstructed data and the original data. The formula is as follows, note that when the reconstructed data is completely consistent with the original data, the discriminator D(x recons ) outputs 1.
[0080]
[0081] Where K is the number of discriminators, G(·) represents the generator, that is, the entire codec structure dec(enc(x)), and Dk(·) is the kth discriminator.
[0082] The training process is shown in Figure 13 , the input original data is first preprocessed, and then input into the codec network described in the foregoing, to calculate the output reconstructed signal. According to the loss function described in the foregoing, the corresponding loss is calculated, and the parameters of the codec and the discriminator are updated according to the loss, note that the parameters of the encoder and the decoder are updated together, and the parameters of the discriminator are updated according to the adversarial loss.
[0083] Data preprocessing: the training stage in the present application needs to preprocess the data first, and the data set used is the open source ECG database of mit-bih. The original data contains 48 ECG data, which contains the results collected under different leads, and each lead has 650000 data points, and the sampling rate is 360Hz. In the present application, the data is first divided into windows of 1s size, that is, a piece of data is cut into multiple 360-point data segments. The divided data needs to be inverted in time domain and amplitude, to obtain the inverted data, so as to obtain the ECG features in different spatial scales and time scales. This operation is used for data enhancement and expansion of the data set. In addition, it avoids the influence of different lead characteristics and positive and negative electrode connection reversal during ECG collection.
[0084] End-to-end codec training: in the training stage, the encoder and the decoder will be connected together, the input data is directly input into the decoder after being encoded by the encoder to obtain the output, and the input and the output are compared, the three losses described in the foregoing are calculated, and then the Adam optimizer is used to update the neural network weight to obtain better compression and reconstruction effect.
[0085] The overall training loss function is:
[0086] Loss=α*Loss t +β*Loss f +γ*Loss feat
[0087] Wherein, α=1, β=5, γ=1, all are specified parameters.
[0088] The training of the discriminator is performed simultaneously with the encoder and the decoder. The task of the discriminator is to determine whether the reconstructed data is real data, and the discriminator is trained using an adversarial loss, namely Loss_g, which is defined in the foregoing. Whenever the encoder-decoder calculates the output reconstructed data, the reconstructed data is input into the discriminator, the output of the discriminator is obtained, and the adversarial loss Loss_g is calculated according to the output of the discriminator. The gradients of all parameters of the discriminator are calculated according to the loss, and the parameters of each layer in the discriminator are updated. The optimizer used is consistent with the Adam optimizer used in the training of the encoder-decoder in the foregoing.
[0089] The physiological signal compression system provided by the present application can increase the compression ratio to 360 times while ensuring that rms (mean square error) and PRDN (normalized RMS difference percentage) are acceptable, and has a low reconstruction loss and a good fit to the original electrocardiogram curve. At the same time, the system can run on a single-core CPU and has high running efficiency, meeting the electrocardiogram data compression requirements in actual scenarios. Furthermore, the present application improves the ECG signal reconstruction quality by adding a deep discriminator for training together in the training stage.
[0090] The above is a preferred embodiment of the present application, but the present application should not be limited to the embodiment and the content disclosed in the drawings, so any equivalent or modification made without departing from the spirit of the present application falls within the scope of the present application.
Claims
1. A physiological signal compression system based on deep autoencoder, characterized by include: Encoder, used to convert the input physiological signal into a latent variable Z; Decoder, used to reconstruct the original physiological signal based on the latent variable Z; Fast Fourier transform module, used to calculate the frequency components of input and output signals and obtain the spectrum; The discriminator is used to determine the degree of difference between the input signal characteristics and the output signal characteristics; A single discriminator consists of an STFT block and six two-dimensional convolutional layers. Real represents the real part of the stft output result, and Im represents the imaginary part of the stft output result. The two parts are concatenated to form a time-frequency feature map, which is then input into a two-dimensional convolutional layer with a convolution kernel size of 24 to convert it into a 32-channel feature map. It then passes through three two-dimensional convolutional layers with 32 channels, a convolution kernel size of 3*8, and a stride length of (1, 2). The dilation parameters are (1, 1), (2, 1), and (4, 1), respectively. Finally, it passes through two convolutional layers with a convolution kernel size of 3*3 to obtain the final output result. Optimizer, used to update the weights of the neural network to obtain better compression and reconstruction effects; The operation process of this system is divided into a training phase and an inference phase. The training phase is based on the physiological signal dataset that needs to be compressed. The characteristics of the ECG signals of different patients are learned based on the MIT-BIH ECG dataset, and the learned characteristics are mapped to a lower dimension. The correlation is removed to obtain the latent variable z. The decoder reconstructs the ECG signal based on the obtained latent variable z. The encoder and decoder are trained together in the training phase to obtain the optimal encoder and decoder. The inference phase includes the encoding and decoding processes, and the encoder and decoder are used separately. During compression, the input signal is input into the encoder to obtain the compressed representation. During decompression, the decoder is used to decompress the received compressed signal and reconstruct the original signal.
2. The physiological signal compression system based on a deep autoencoder according to claim 1, wherein: The encoder consists of two convolutional layers at the head and tail, four convolutional blocks, and an LSTM layer. After the input signal enters the encoder, the number of channels of the first convolutional layer is consistent with the number of channels of the input signal, and the convolution kernel size is 7. It is followed by four convolutional blocks with the same structure. The number of channels doubles after each convolution block. The step lengths of the four convolution blocks are 2, 4, 5, and 8, respectively, to achieve downsampling of the input signal. The downsampled signal will pass through the LSTM layer to extract timing information. The number of channels of the last convolutional layer is consistent with the number of channels of the last convolution block, the convolution kernel size is 3, and the output is the required latent variable Z.
3. The physiological signal compression system based on a deep autoencoder according to claim 2, wherein: The convolution block consists of three residual units and a one-dimensional convolution layer. The input channel of the residual unit is 1 / 2 of the input channel of the convolution block. The dilation parameter increases successively to 1, 3, and 9 to obtain temporal features of different scales. The convolution kernel size of the convolution layer is twice the step length. The number of channels and step length are consistent with the input channel of the convolution block.
4. The physiological signal compression system based on a deep autoencoder according to claim 3, wherein: The residual unit consists of a one-dimensional hole convolution layer, a one-dimensional convolution layer and a residual connection. The input signal passes through two convolution layers and outputs features. The output features are added to the input signal itself as the final output of the residual unit.
5. The physiological signal compression system based on deep autoencoder according to claim 4, characterized in that: The decoder structure is a mirror image of the encoder. The operation of the decoder is the inverse process of the encoder operation. The input is the latent variable Z output by the encoder. First, a one-dimensional convolution layer is input with a convolution kernel size of 7 and a channel number that is 16 times the number of channels of the original signal. Then, the same LSTM layer as the encoder is input to restore the timing information. After that, four decoding convolution blocks with the same structure are passed, with step lengths of 8, 5, 4, and 2 respectively. The number of channels is halved after each convolution block. Finally, the original signal is restored through a one-dimensional convolution layer with a convolution kernel size of 7 and a channel number of 1.
6. The physiological signal compression system based on deep autoencoder according to claim 1, characterized in that The training process is as follows: the input raw data is first preprocessed and then input into the codec network to calculate the output reconstructed signal. According to each loss function, the corresponding loss is calculated, and the parameters of the codec and discriminator are updated separately according to the loss. The parameters of the encoder and decoder are updated together, and the discriminator parameters are updated separately according to the adversarial loss.
7. The physiological signal compression system based on deep autoencoder according to claim 6, characterized in that During the training phase, the data must be preprocessed. The example dataset used is the open source ECG database of mit-bih. The original data in Mit-bih contains 48 ECG data, including the results collected under different leads, 650,000 data points for each lead, and a sampling rate of 360Hz. The data is first divided into windows of 1s, and a segment of data is cut into multiple 360-point data segments. The segmented data is inverted in the time domain and amplitude to obtain the inverted data to obtain ECG features at different spatial and time scales. This operation is used to enhance the data and expand the data set to avoid the influence of different lead characteristics and reverse connection of positive and negative electrodes during ECG acquisition. During the training phase, the encoder and decoder are connected together, and the input data is directly input into the decoder after passing through the encoder to obtain the output. The input and output are compared. After calculating the three losses, the optimizer is used to update the neural network weights to obtain better compression and reconstruction effects.
8. The physiological signal compression system based on deep autoencoder according to claim 7, characterized in that: The discriminator is trained simultaneously with the encoder and decoder. The task of the discriminator is to determine whether the reconstructed data is real data. It is trained using adversarial loss. Whenever the encoder and decoder calculate and output reconstructed data, the reconstructed data is input into the discriminator, the output of the discriminator is obtained, and the adversarial loss is calculated based on the discriminator output. The gradient of all the parameters of the discriminator is calculated based on the loss, and the parameters of each layer inside the discriminator are updated.
Citation Information
Patent Citations
Time sequence signal efficient denoising and high-precision reconstruction modeling method and system
CN111046824A
Cognitive load judgment method based on brain intelligence technology
CN117171658A