Deep multi-module fusion neural network and application thereof
Through deep multi-module fusion neural networks, including feature extraction, convolution, attention and long and short-term memory networks, it solves the problem that traditional ECG classification methods require a lot of manpower and time, and achieves efficient automatic feature extraction and classification of ECG signals. Improved classification performance.
Patent Information
- Application Number
- CN202410766362.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-14
- Publication Date
- 2024-10-08
AI Technical Summary
Traditional ECG classification methods require a lot of manpower and time, and cannot effectively capture the potential complex relationships in ECG signals, resulting in an increase in the complexity of automatic classification tasks.
A deep multi-module fusion neural network is designed, including feature extraction network, convolutional neural network, attention network and long short-term memory network. By dynamically adjusting channel weights and obtaining the influence of front and rear waveforms, automatic feature extraction and processing of ECG signals are achieved. Classification.
It improves the efficiency of ECG signal feature extraction and reconstruction, enables more accurate ECG signal classification, reduces manual intervention, captures complex signal relationships, and improves classification performance.
Smart Images

Figure CN118747283A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of electrocardiogram signal processing, and in particular relates to a deep multi-module fusion neural network and its application. Background Art
[0002] Cardiovascular disease (CVD) has become a major cause of death worldwide, attracting widespread attention from the medical community and society. Among the various manifestations of CVD, arrhythmia is one of the common manifestations, posing a huge challenge to the healthcare system. Electrocardiogram (ECG) is a key clinical tool used to diagnose patients' heart health and monitor cardiovascular conditions by recording the propagation process of cardiac electrical signals. ECG detection plays a key role in detecting various arrhythmias and heart diseases because it is a non-invasive, low-energy and easily accessible method. Traditional ECG classification methods usually involve manually extracting morphological features or time-frequency features, then using feature dimension reduction methods to obtain the main features, and finally classifying. For example, Gao et al. used a manifold learning algorithm with neighbor-preserving embedding to obtain local epidemic structures in cardiac rhythms. Ye et al. obtained an effective signal feature set through wavelet transform and independent component analysis. Although these methods have achieved certain success in ECG classification, they require manual feature extraction and are labor-intensive.
[0003] With the rapid development of computer science and deep learning, deep learning technology has been widely used in various fields, including computer vision, natural language processing, etc. Many deep learning algorithms, such as convolutional neural networks (CNN), recurrent neural networks (RNN), and long short-term memory neural networks (LSTM), have been widely used in medical diagnosis and clinical medicine. CNN has also achieved remarkable results in ECG classification due to its outstanding performance in computer vision. However, although deep learning methods have demonstrated excellent performance in many fields, their application in ECG classification tasks remains challenging. ECG data is diverse and complex, including signal variations from different patients and different devices, which makes the automatic classification task more complicated. In addition, ECG data is usually time series data, and the time series information of cardiac signals needs to be taken into account for more accurate classification. Traditional ECG classification methods usually rely on manual extraction of morphological and time-frequency features, but these methods require a lot of manpower and time, and may not capture the underlying complex relationships.
[0004] In this context, it is urgent to design a new ECG signal anomaly detection method to overcome the limitations of traditional ECG classification methods and solve the problems existing in the above-mentioned existing technologies. Summary of the invention
[0005] 1. Technical issues to be solved
[0006] In view of the shortcomings of the prior art, the present invention provides a deep multi-module fusion neural network and its application. By introducing deep learning technology, the task of electrocardiogram signal feature extraction and reconstruction can be completed more efficiently, solving the problems of traditional ECG classification methods that require a lot of manpower and time and cannot effectively capture potential complex relationships.
[0007] (II) Technical solution
[0008] In order to achieve the above-mentioned purpose of efficiently completing the task of ECG signal feature extraction and reconstruction, the present invention provides the following technical solutions:
[0009] A deep multi-module fusion neural network for automatic extraction and classification of signal features, including
[0010] A feature extraction network for extracting signal features from ECG signals;
[0011] A convolutional neural network is arranged at the output end of the feature extraction network and is used to further perform convolution processing on the signal features extracted by the feature extraction network;
[0012] The attention network is set at the output end of the convolutional neural network, including the channel attention module and the multi-head self-attention module, which is used to dynamically adjust the channel weights and highlight the key information;
[0013] The long short-term memory network is set at the output end of the attention network to obtain the influence of the waveform in a certain period of time before and after on the current waveform;
[0014] The fully connected layer network is set at the output end of the long short-term memory network and is used to classify the information output by the fully connected layer network.
[0015] Preferably, the feature extraction network includes two adjacent MaxPoolConvBlock modules and two AcgPoolConvBlock modules, and the AcgPoolConvBlock module is arranged at the output end of the MaxPoolConvBlock module.
[0016] Preferably, the convolutional neural network includes 5 cross-distributed convolutional layers and 4 average pooling layers, and each convolutional layer is followed by BN and Relu operations.
[0017] Preferably, the feature processing process of the channel attention module includes
[0018] Step 1. Use global average pooling and global maximum pooling to compress the spatial dimension of the input feature map to obtain the feature vectors of the two channels:
[0019]
[0020]
[0021] Step 2. Pass the obtained vectors through the multi-layer perceptron respectively, add the output features according to the corresponding positions, and use the sigmoid activation function to generate the channel attention score:
[0022]
[0023] Among them, σ represents the sigmoid activation function and PC(X) represents the channel attention score.
[0024] Preferably, the multi-head self-attention module is composed of a plurality of scaled dot product attention modules stacked together, and in the multi-head self-attention module, the process of attention calculation includes:
[0025] Step 1. Assume that the input matrix contains Q∈Rn, K∈Rn*dk, V∈Rn*dv,
[0026]
[0027] Step 2. When one of the scaled dot product attention modules is running, the vectors Q, K, and V in the multi-head attention module are first linearly transformed as shown in Equation (5)
[0028]
[0029] Step 3. For the input data q i Perform self-attention calculation, q i Calculate the similarity with each Kt and obtain the weight, then divide by to scale;
[0030] Step 4. Apply the softmax function to normalize the weights;
[0031] Step 5. Use the weighted sum of the weight and the corresponding key value to get the attention value of a block. The expression of scaled dot product attention is shown in (6)
[0032]
[0033] Step 6. Get N heads and concatenate them after each attention calculation. Through linear transformation, we can get the final attention calculation result with the same dimension as the input.
[0034] MultiHead(Q,K,V)=Concat(head1,...,head N )W O (7)
[0035] Where d represents the dimension of the input data, and the input matrices Q, K, and V have the same dimensions.
[0036] Preferably, the long short-term memory network includes an input gate, an output gate and a forget gate, and the process of obtaining the influence of the waveforms in a certain period of time before and after on the current waveform includes:
[0037] Step 1: The input consists of the current input Xt, the output Ht at the previous moment, and the cell state Ct. Ht and Ct are used as the input at the next moment.
[0038] Step 2: The calculation formulas for each gate of the long short-term memory network are as follows:
[0039] F t =σ(w f [H t-1 , X t ]+b f ) (8)
[0040] F t =σ(w i [H t-1 , X t ]+b i ) (9)
[0041] O t =σ(w o [H t-1 , X t ]+b o ) (10)
[0042] K t =tanh(W k [H t-1 , X t ]+b k ) (11)
[0043] C t =F t *C t-1 +I t *K t (12)
[0044] Among them, σ and tanh are sigmoid function and tanh function respectively, Ct is the cell state information of the memory unit; w and b are weight and bias terms respectively; Ft, It, Ot, Ct represent the forget gate, input gate, output gate and unit state respectively; Kt represents the accumulated information at the current moment.
[0045] The present invention provides a second technical solution, which is an application of a deep multi-module fusion neural network in abnormal electrocardiogram signal detection.
[0046] Preferably, the application method comprises the steps of
[0047] Step 1. Send the preprocessed ECG signal to the feature extraction network to extract the signal features in the ECG signal;
[0048] Step 2. Send the feature-extracted signal to the convolutional neural network to obtain as many information features as possible;
[0049] Step 3. After the last convolutional layer of the convolutional neural network is processed, the attention network is used to dynamically adjust the channel weights to highlight the key information;
[0050] Step 4. After the multi-head self-attention module processes the information, feature information with a length of 37 is obtained. The number of units in the LSTM network is set to 32, and LSTM is used to obtain the influence of the waveforms in a certain period of time before and after on the current waveform;
[0051] Step 5. Finally, the information output by LSTM is sent to the fully connected layer network for classification to complete the abnormal ECG signal detection.
[0052] (III) Beneficial effects
[0053] Compared with the prior art, the present invention provides a deep multi-module fusion neural network and its application, which has the following beneficial effects:
[0054] 1. When constructing a deep multi-module fusion neural network (DMMF-Net), the present invention introduces two MaxPoolConvBlock modules and two AcgPoolConvBlock modules. The MaxPoolConvBlock module extracts local features through a convolution layer and further highlights important local feature information through maximum pooling. In the AcgPoolConvBlock module, convolution is also used to learn feature representation, and then the average value of the overall feature is calculated through average pooling, which cleverly integrates global information.
[0055] 2. The deep multi-module fusion neural network adds LSTM between the last convolutional layer and the fully connected layer. LSTM can be used to obtain the impact of the waveform in a certain period of time before and after on the current waveform;
[0056] 3. The deep multi-module fusion neural network introduces a channel attention module and a multi-head self-attention module between the convolutional layer and the LSTM layer, which can dynamically adjust the channel weight and highlight the key information;
[0057] 4. Introducing residual blocks in deep multi-module fusion neural networks. Residual blocks solve the gradient problem by introducing a shortcut connection mechanism, allowing multiple network layers to be skipped. Residual connections can make the network deeper while maintaining good training performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 A modeling diagram of a deep multi-module fusion neural network of the present invention;
[0059] Figure 2 A schematic diagram of the structure of a convolutional neural network for heartbeat classification of a multi-task learning network of the present invention;
[0060] Figure 3 This is a structural diagram of the channel attention module in the multi-task learning network of the present invention;
[0061] Figure 4 This is a schematic diagram of the structure of the scaled dot product attention and multi-head self-attention model of the present invention;
[0062] Figure 5 This is a diagram of the LSTM structure in the multi-task learning network of the present invention;
[0063] Figure 6 This is the structural diagram of the DMMF-Net model of the present invention;
[0064] Figure 7 This is a schematic diagram of the wavelet noise reduction effect of the present invention;
[0065] Figure 8 It is the accuracy curve of DMMF-Net training and testing of the present invention;
[0066] Fig. 9 This is the confusion matrix diagram obtained by DMMF-Net of the present invention on the test set. DETAILED DESCRIPTION
[0067] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0068] Example 1: Please refer to Figure 1-6 The present invention provides a technical solution: a deep multi-module fusion neural network (DMMF-Net), including a feature extraction network, a convolutional neural network (CNN network), an attention network, a long short-term memory network (LSTM) and a fully connected layer network; wherein
[0069] The feature extraction network is used to extract signal features in ECG signals;
[0070] The convolutional neural network is arranged at the output end of the feature extraction network, and includes a plurality of convolutional layers and an average pooling layer. The front convolution is used to extract low-level features such as the local shape and edge information of the signal, and the back convolution can capture high-level features such as waveform and spectrum.
[0071] The attention network is set at the output end of the convolutional neural network, including a channel attention module and a multi-head self-attention module, which is used to dynamically adjust the channel weight to highlight key information;
[0072] The long short-term memory network is arranged at the output end of the attention network, and includes an input gate, an output gate and a forget gate, and is used to solve the gradient vanishing and gradient exploding problems that occur during the training of the recurrent neural network;
[0073] The fully connected layer network is arranged at the output end of the long short-term memory network, and is used for data classification of the information output by the fully connected layer network.
[0074] As a preferred embodiment, the feature extraction network includes two adjacent MaxPoolConvBlock modules and two AcgPoolConvBlock modules, the MaxPoolConvBlock module is used to extract local features, and the AcgPoolConvBlock module is used to extract overall features; when in use, the preprocessed ECG signal is first sent to two adjacent MaxPoolConvBlocks to extract local features, and then two adjacent AvgPoolConvBlocks are used to extract overall features.
[0075] As a preferred embodiment, Figure 2 As shown, the convolutional neural network (CNN network) is used to further process the features processed by the feature extraction network, including 5 convolution layers and 4 average pooling layers, the convolution layers and the pooling layers are arranged crosswise, and each convolution layer is followed by BN and Relu operations; wherein the BN is mainly used to accelerate the training of the neural network, which helps to solve the problems of gradient disappearance and gradient explosion, and Relu can learn complex feature mapping and solve the problem of gradient disappearance.
[0076] As a preferred embodiment, Figure 3As shown in the figure, the channel attention module uses global average pooling and global maximum pooling to compress the spatial dimension of the input feature map; finally, the feature vectors of the two channels are obtained; the average pooling process can obtain the overall information, and the maximum pooling process is used to obtain local details; the obtained vectors are respectively passed through the multi-layer perceptron (MLP), and then the output features are added according to the corresponding positions; finally, the sigmoid activation function is used to generate the channel attention score:
[0077]
[0078]
[0079]
[0080] Among them, σ represents the sigmoid activation function and PC(X) represents the channel attention score.
[0081] As a preferred embodiment, Figure 4 As shown in the figure, the multi-head self-attention module is composed of multiple scaled dot product attention modules stacked together. This self-attention mechanism can deeply learn the input data to improve local attention; at the same time, through parallel calculation and the use of the position and semantic information of individual words in the input data, combined with multiple self-attention mechanisms, information in different spatial representations is captured; this enables the network to fully obtain hidden features in the data from all angles. The self-attention mechanism plays an important role in fields such as machine translation and conversation systems because it has high parallelism and long-distance information dependence, and can effectively solve the problems of long-distance information being difficult to use, gradient disappearance, and gradient explosion in the RNN model; in the multi-head self-attention module, the input matrix contains Q∈Rn, K∈Rn*dk, V∈Rn*dv; the process of attention calculation is as follows:
[0082]
[0083]
[0084]
[0085] MultiHead(Q,K,V)=Concat(head1,...,head N )W O (7)
[0086] Where d represents the dimension of the input data. The multi-head attention adopts the self-attention mechanism, and the dimensions of the input matrices Q, K, and V are the same. When one of the scaled dot-product attention modules (ScaledDot-ProductAttention) is running, the vectors Q, K, and V in the multi-head attention module are first linearly transformed, as shown in equation (5), and the input data q is i Perform self-attention calculation, q i Calculate the similarity with each Kt and obtain the weight, then divide by To scale, so as to avoid the result falling on very small gradients; apply the softmax function to normalize the weights; finally, use the weighted sum of the weight and the corresponding key value to get the attention value of a block; the expression of scaled dot product attention is shown in (6); obtain N heads, splice them together after each attention calculation, and through linear changes, we can obtain the final result with the same dimension as the input.
[0087] As a preferred embodiment, Figure 5 As shown, when the long short-term memory network (LSTM) is used, the input consists of three parts: the current input Xt, the output Ht at the previous moment, and the cell state Ct, and Ht and Ct are used as the input at the next moment; the calculation formulas of each LSTM gate are as follows:
[0088] F t =σ(w f [H t-1 , X t ]+b f ) (8)
[0089] F t =σ(w i [H t-1 , X t ]+b i ) (9)
[0090] O t =σ(w o [H t-1 , X t ]+b o ) (10)
[0091] K t =tanh(w k [H t-1 , X t ]+b k ) (11)
[0092] C t =F t *C t-1 +I t *Kt (12)
[0093] Among them, σ and tanh are sigmoid function and tanh function respectively, Ct is the cell state information of the memory unit; w and b are weight and bias terms respectively; Ft, It, Ot, Ct represent the forget gate, input gate, output gate and unit state respectively; Kt represents the accumulated information at the current moment.
[0094] The optimization method of the deep multi-module fusion neural network (DMMF-Net) described in this embodiment includes:
[0095] 1. On the basis of the original convolutional neural network (CNN network), LSTM is added between the last convolution layer and the fully connected layer. LSTM can obtain the influence of the waveform in a certain period of time before and after on the current waveform. After a series of convolution and pooling operations, the original signal obtains feature information with a length of 37. The number of units in the LSTM network is set to 32, and finally the information output by LSTM is sent to the fully connected network for classification. The entire training process uses the same hyperparameter settings as the above CNN.
[0096] 2. The MaxPoolConvBlock module extracts local features through convolution layers and further highlights important local feature information through maximum pooling. In the AcgPoolConvBlock module, convolution is also used to learn feature representation, and then the average value of the overall feature is calculated through average pooling, which cleverly integrates global information; the following convolution, batch normalization, Relu activation and Dropout layers help to conduct deeper feature learning and improve the stability of the network;
[0097] 3. The introduction of residual blocks enhances the depth of feature learning; the channel attention mechanism is used to dynamically adjust the weight of the channel to highlight key information; the multi-head self-attention module is used to capture long-distance dependencies in sequence data;
[0098] 4. LSTM is used to process sequence data and generate 32-dimensional output. The subsequent two fully connected layers map the features to 5 classification outputs. The comprehensive structure of DMMF-Net is designed to maximize the model performance and effectively adapt to the needs of ECG signal classification tasks. At the same time, it fully inherits the advantages of CNN and LSTM models and shows excellent performance.
[0099] Embodiment 2: A method for detecting abnormal ECG signals based on the deep multi-module fusion neural network (DMMF-Net) described in Embodiment 1, the method comprising feature extraction and classification of ECG signals, specifically comprising the steps of:
[0100] Step 1. Send the preprocessed ECG signal to the feature extraction network to extract the signal features in the ECG signal;
[0101] The feature extraction network includes two adjacent MaxPoolConvBlock modules and two AcgPoolConvBlock modules, wherein the MaxPoolConvBlock module is used to extract local features, and the AcgPoolConvBlock module is used to extract overall features;
[0102] Step 2. Send the feature-extracted signal to the convolutional neural network to obtain as many information features as possible;
[0103] The feature convolutional neural network includes 5 convolutional layers and 4 average pooling layers, the convolutional layers and the pooling layers are arranged crosswise, and each convolution is followed by BN and Relu operations;
[0104] Step 3. After the last convolutional layer of the convolutional neural network is processed, the attention network is used to dynamically adjust the channel weights to highlight the key information;
[0105] Wherein, the attention network includes a channel attention module and a multi-head self-attention module;
[0106] Step 4. After the multi-head self-attention module processes the information, feature information with a length of 37 is obtained. The number of units in the LSTM network is set to 32, and LSTM is used to obtain the influence of the waveforms in a certain period of time before and after on the current waveform;
[0107] Step 5. Finally, the information output by LSTM is sent to the fully connected layer network for classification.
[0108] Example 3: Please refer to Figure 7-9 In order to verify the filial piety and superiority of the deep multi-module fusion neural network (DMMF-Net) described in Example 1, this example is designed for verification, including
[0109] Step 1: Collect ECG data
[0110] The deep multi-module fusion neural network (DMMF-Net) was verified using the ECG signal composed of the MIT-BIH arrhythmia dataset (Moody and Mark 2001). The above model was used as the training set and verification set of the deep multi-module fusion neural network (DMMF-Net). The dataset contains 48 and a half hours of two-channel dynamic ECG signals from 47 patients, one of which is the modified limb lead II (MLII), which is obtained by placing electrodes on the chest, and the other channel will use one of the channels V1, V4, and V5 according to different subjects;
[0111] Step 2: ECG data preprocessing;
[0112] Step 3: Establish a deep multi-module fusion neural network model;
[0113] Step 3.1: Establish a feature extraction network for extracting signal features in ECG signals;
[0114] Step 3.2: Build a convolutional neural network;
[0115] Step 3.3: Build an attention network;
[0116] Step 3.4: Build a long short-term memory network;
[0117] Step 3.5: Establish a fully connected layer network;
[0118] Step 4: Input the training data set of step 1 into the deep multi-module fusion neural network model to train the deep multi-module fusion neural network model;
[0119] Step 5: Bring the validation data set from step 1 into the deep multi-module fusion neural network model trained in step 4 for model testing and optimization;
[0120] After step 5, the validation data set of step 1 is brought into the deep multi-module fusion neural network model trained in step 4 for model testing and optimization, and the schematic diagram of wavelet denoising effect is obtained as shown in the figure. Figure 7 As shown in the figure, the accuracy curves of DMMF-Net training and testing are as follows Figure 8 As shown in the figure, the confusion matrix obtained by DMMF-Net on the test set is as follows Fig. 9 As shown;
[0121] 1. As Figure 7As shown, the wavelet denoising effect diagram is displayed; the ECG signal is affected by factors such as power frequency interference and electromyographic noise during the acquisition process, so it needs to be denoised before use. Currently common denoising methods include empirical mode decomposition, filter denoising and wavelet transform; empirical mode decomposition can reduce the distortion of small waveforms, but the result of the processing will show waveform aliasing; the filter has a good effect on high-frequency noise, but it is easy to cause waveform distortion; the wavelet transform can well distinguish the time domain signal and the frequency domain signal in the data, and has good adaptability; the present invention uses the Dobesi wavelet basis for denoising; by comparison, it can be found that the denoised signal retains the original characteristic information, and the curve becomes smoother, which shows that the wavelet has a good denoising effect;
[0122] 2. Individual heartbeats of each category are as follows Figure 8 As shown, the whole process obtained 104877 heart beats;
[0123] Using a single MLII lead, the ECG signal records of two patients with pacemakers in the data set (102, 104) were removed. Using the international standard specifications of the Association for the Advancement of Medical Instrumentation (AAMI), the 15 arrhythmia types in the MIT-BIH arrhythmia database have been merged into five categories, including normal or bundle branch block (N), supraventricular abnormality (S), ventricular abnormality (V), fusion class (F) and unknown class (Q). This embodiment uses the Pan-Tompkins algorithm to detect the position of the R wave, and the signal is segmented according to the detected position of the R wave. The length of each heart beat division is 300 sampling points, 100 points are sampled forward, and 200 points are sampled backward. The single heart beat of each category is as follows: Figure 8 As shown;
[0124] The whole process obtained 104877 heartbeats. Each time the model was trained and evaluated, the training set and the test set were randomly divided in a ratio of 7:3, where the total number of heartbeats used for training the model was 74907 and the number of heartbeats used for testing was 32102.
[0125] 3. Such as Fig. 9 As shown, there are respectively an accuracy curve diagram based on the DMMF-Net network for training and a confusion matrix diagram obtained on the test set after the training. It can be seen from the figure that the accuracy curve of DMMF-Net is around 0.99, which achieves a very good effect. The confusion matrix diagram also shows that the DMMF-Net model proposed in Example 1 of the present invention has a very good effect in solving the problem of data imbalance.
[0126] In order to further analyze the effect of the model, the accuracy, specificity, sensitivity and corresponding F1 score are further calculated according to the confusion matrix; the accuracy of DMMF-Net is 99.62%±0.25%; the specificity of DMMF-Net is 91.78%±9.46%; the sensitivity of DMMF-Net is 91.78%±9.46%; the F1 score of DMMF-Net is 94.02%±6.94%. The results show that the DMMF-Net model proposed in Example 1 of the present invention has a good effect on abnormal heartbeat detection.
[0127] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0128] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A deep multi-module fusion neural network, characterized by: Used to achieve automatic extraction and classification of signal features, including A feature extraction network for extracting signal features from ECG signals; A convolutional neural network is arranged at the output end of the feature extraction network and is used to further perform convolution processing on the signal features extracted by the feature extraction network; The attention network is set at the output end of the convolutional neural network, including the channel attention module and the multi-head self-attention module, which is used to dynamically adjust the channel weights and highlight the key information; The long short-term memory network is set at the output end of the attention network to obtain the influence of the waveform in a certain period of time before and after on the current waveform; The fully connected layer network is set at the output end of the long short-term memory network and is used to classify the information output by the fully connected layer network.
2. The deep multi-module fusion neural network according to claim 1, characterized in that: The feature extraction network includes two adjacent MaxPoolConvBlock modules and two AcgPoolConvBlock modules, and the AcgPoolConvBlock module is arranged at the output end of the MaxPoolConvBlock module.
3. The deep multi-module fusion neural network according to claim 1, characterized in that: The convolutional neural network includes 5 cross-distributed convolutional layers and 4 average pooling layers, and each convolutional layer is followed by BN and ReLU operations.
4. The deep multi-module fusion neural network according to claim 1, characterized in that: The feature processing process of the channel attention module includes Step 1. Use global average pooling and global maximum pooling to compress the spatial dimension of the input feature map to obtain the feature vectors of the two channels: Step 2. Pass the obtained vectors through the multi-layer perceptron respectively, add the output features according to the corresponding positions, and use the sigmoid activation function to generate the channel attention score: Among them, σ represents the sigmoid activation function and PC(X) represents the channel attention score.
5. The deep multi-module fusion neural network according to claim 1, characterized in that: The multi-head self-attention module is composed of multiple scaled dot product attention modules stacked together. In the multi-head self-attention module, the attention calculation process includes: Step 1. Assume that the input matrix contains Q∈Rn, K∈Rn*dk, V∈Rn*dv, Step 2. When one of the scaled dot product attention modules is running, the vectors Q, K, and V in the multi-head attention module are first linearly transformed as shown in Equation (5) Step 3. For the input data q i Perform self-attention calculation, q i Calculate the similarity with each Kt and obtain the weight, then divide by to scale; Step 4. Apply the softmax function to normalize the weights; Step 5. Use the weighted sum of the weight and the corresponding key value to get the attention value of a block. The expression of scaled dot product attention is shown in (6) head i =attention(QW i Q ,KW i K ,VW i V ) (6) Step 6. Get N heads and concatenate them after each attention calculation. Through linear transformation, we can get the final attention calculation result with the same dimension as the input. MultiHead(Q,K,V)=Concat(head1,...,head N )W O (7) Where d represents the dimension of the input data, and the input matrices Q, K, and V have the same dimensions.
6. The deep multi-module fusion neural network according to claim 1, characterized in that: The long short-term memory network includes an input gate, an output gate and a forget gate, and the process of obtaining the influence of the waveforms in a certain period of time before and after on the current waveform includes: Step 1: The input consists of the current input Xt, the output Ht at the previous moment, and the cell state Ct. Ht and Ct are used as the input at the next moment. Step 2: The calculation formulas for each gate of the long short-term memory network are as follows: F t =σ(w f [H t-1 ,X t ]+b f ) (8) F t =σ(w i [H t-1 ,X t ]+b i ) (9) The t =σ(w o [H t-1 ,X t ]+b o ) (10) K t =tanh(w k [H t-1 ,X t ]+b k ) (11) C t =F t *C t-1 +I t *K t (12) Among them, σ and tanh are sigmoid function and tanh function respectively, Ct is the cell state information of the memory unit; w and b are weight and bias terms respectively; Ft, It, Ot, Ct represent the forget gate, input gate, output gate and unit state respectively; Kt represents the accumulated information at the current moment.
7. An application of a deep multi-module fusion neural network in abnormal ECG signal detection, characterized in that: The deep multi-module fusion neural network is as described in any one of claims 1-6.
8. An application of a deep multi-module fusion neural network in abnormal ECG signal detection, characterized by: The application method comprises the steps of Step 1. Send the preprocessed ECG signal to the feature extraction network to extract the signal features in the ECG signal; Step 2. Send the feature-extracted signal to the convolutional neural network to obtain as many information features as possible; Step 3. After the last convolutional layer of the convolutional neural network is processed, the attention network is used to dynamically adjust the channel weights to highlight the key information; Step 4. After the multi-head self-attention module processes the information, feature information with a length of 37 is obtained. The number of units in the LSTM network is set to 32, and LSTM is used to obtain the influence of the waveforms in a certain period of time before and after on the current waveform; Step 5. Finally, the information output by LSTM is sent to the fully connected layer network for classification to complete the abnormal ECG signal detection.
Citation Information
Cited By
Motor imagery electroencephalogram decoding method based on multi-attention bridge structure network
CN119441984A
Method and system for monitoring coal cinder cooling process
CN120103757A
