A QRS complex detection method based on a U-Net network

By utilizing a QRS composite wave detection method based on the U-Net network and employing pre-training and multi-scale convolutional feature reuse modules, the method addresses the issues of poor QRS composite wave detection performance and the need for complex denoising in existing technologies, achieving efficient and accurate QRS composite wave detection.

CN116712083BActive Publication Date: 2026-03-20SUZHOU UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-19
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

Existing QRS complex detection methods have poor detection results and require complex noise reduction operations, especially in cases of abnormal electrocardiograms or those significantly affected by noise.

Method used

A QRS complex detection method based on U-Net network is adopted. The network is pre-trained and initialized with noisy ECG signals. Multi-scale convolution and feature reuse modules are combined. Grouped convolutional units and skip connections are used to alleviate gradient vanishing and degradation problems, reduce redundant feature representations, and realize direct detection of ECG signals.

Benefits of technology

It improves the robustness and accuracy of QRS composite wave detection, avoids complex denoising operations before detection, enhances noise resistance, and improves the model's generalization ability and detection effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116712083B_ABST
    Figure CN116712083B_ABST
Patent Text Reader

Abstract

The application relates to a QRS complex detection method based on a U-Net network, which comprises the following steps: adding clean electrocardio signals and noises to generate noise electrocardio signals, obtaining pre-training data; taking the noise electrocardio signals and corresponding clean electrocardio signals as the input and output of a pre-constructed QRS complex detection network, pre-training the QRS complex detection network; the QRS complex detection network is constructed based on a U-Net network; using mean square error as a loss function, outputting network parameters after training for a preset number of times; collecting original electrocardio signals and corresponding QRS complex labels, initializing the QRS complex detection network by using the network parameters; inputting the original electrocardio signals into the initialized QRS complex detection network, continuously reducing the Dice loss function of the network output result and the corresponding QRS complex label, obtaining the trained QRS complex detection network after training for a preset number of times; obtaining an electrocardio signal graph to be detected, inputting the electrocardio signal graph into the trained QRS complex detection network, and obtaining a QRS complex label graph.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of electrocardiogram detection, in particular to a QRS complex detection method, device and equipment based on a U-Net network. BACKGROUND

[0002] A typical electrocardiogram heartbeat is mainly composed of P wave, QRS complex and T wave; among them, the QRS waveform indicates the ventricular depolarization state, which provides rich information about ventricular excitation and conduction. Since the QRS waveform is the most prominent feature in the electrocardiogram (ECG) signal, it is often used as the basis for determining the heart rate, and also has important significance for the diagnosis of ectopic beats and the analysis of HRV.

[0003] The traditional QRS complex detection method mainly includes a preprocessing stage and a decision stage. The purpose of preprocessing is to enhance the QRS complex component and attenuate other waves and noise. In the decision stage, detection rules are designed to identify the QRS complex group. Some studies additionally design post-processing schemes to optimize the detection results. Traditional QRS wave detection methods mainly include wavelet transform, empirical mode decomposition, Hilbert transform and machine learning methods. Overall, traditional detection methods largely rely on manually crafted handcrafted features and parameters, which makes these methods lack the generalization ability for unknown data, making it difficult to generalize to out-of-distribution data, especially on low-quality electrocardiograms between patients and arrhythmias.

[0004] In recent years, some studies have also applied deep learning methods to QRS complex detection. Runnan He first applied a preprocessor with mean filtering and discrete wavelet transform to remove different types of noise, etc.; then designed a new algorithm for automatic detection of QRS complex based on U-Net and bidirectional long short-term memory in dual channels; the accuracy rates from the MIT-BIH arrhythmia database and the CPSC2019 dataset are 98.29% and 78.73%, respectively. Cai et al. proposed two deep learning models based on multiple expansion convolution blocks; one model (CNN) mainly consists of convolution blocks and squeeze-and-excitation networks (SENet), and the other model (CRNN) contains a hybrid convolution and recurrent neural network; both of these two models won first place in the Chinese Physiological Signal Challenge (2019). Mohamed et al. proposed a low-complexity stacked autoencoder deep neural network model, which does not require preprocessing and has a simple structure, only containing two hidden layers, and the algorithm runs fast and is more suitable for implementation in embedded systems; the experimental results using multiple benchmark datasets such as MIT / BIH, INCART DB, etc. demonstrate the generalization and high performance of the algorithm.

[0005] However, the existing QRS complex detection method has poor detection effect on abnormal electrocardiogram or electrocardiogram affected by noise, and needs complex denoising operation on the electrocardiogram signal before detection. SUMMARY

[0006] Therefore, the technical problem to be solved by the present application is to overcome the problems of poor detection effect and the need for complex denoising operation before QRS wave detection in the prior art.

[0007] To solve the above technical problems, the present application provides a QRS complex detection method based on U-Net network, comprising:

[0008] The clean electrocardiogram signal and the noise are added to generate a noisy electrocardiogram signal, and the pre-training data is obtained;

[0009] The noisy electrocardiogram signal and the corresponding clean electrocardiogram signal are used as the input and output of the pre-constructed QRS complex detection network, and the QRS complex detection network is pre-trained; the QRS complex detection network is constructed based on U-Net network;

[0010] The mean square error is used as the loss function, and after training for a preset number of times, the network parameters of the QRS complex detection network are outputted;

[0011] The original electrocardiogram signal and the corresponding QRS complex label are collected, and the network parameters are used to initialize the QRS complex detection network;

[0012] The original electrocardiogram signal is inputted into the initialized QRS complex detection network, and the Dice loss function of the network output result and the corresponding QRS complex label is continuously reduced, and after training for a preset number of times, the trained QRS complex detection network is obtained;

[0013] The electrocardiogram signal graph to be detected is obtained, inputted into the trained QRS complex detection network, and the QRS complex label graph of the electrocardiogram signal graph to be detected is obtained.

[0014] In an embodiment of the present application, the electrocardiogram signal graph to be detected is obtained, inputted into the trained QRS complex detection network, and the QRS complex label graph of the electrocardiogram signal graph to be detected is obtained, comprising:

[0015] The electrocardiogram signal graph to be detected is inputted into the multi-scale convolution and feature reuse module of the pre-trained QRS complex detection network, and passes through three parallel convolution branches with different convolution kernel sizes;

[0016] The electrocardiogram to be detected is input into the first convolution unit, the second convolution unit and the 1*1 convolution unit connected in sequence along the positive propagation direction, the output images of the three convolution units are spliced as the output image of the convolution branch, the output images of the three parallel convolution branches are spliced as the output feature image of the multi-scale convolution and feature extraction module;

[0017] After the output feature image is down-sampled, it is input into the encoding path of the QRS complex detection network for multiple times of down-sampling, and an encoded image is output;

[0018] After the encoded image is up-sampled, it is input into the decoding path of the QRS complex detection network, and the same number of up-sampling is performed, and a decoded image is output;

[0019] The decoded image is input into the 1*1 convolution and then the activation function layer to obtain the QRS complex label image of the electrocardiogram to be detected.

[0020] In an embodiment of the present application, the first convolution unit and the second convolution unit each include a feature disturbance layer Disout, a feature dropout layer Dropout, a 1D convolution layer with a preset kernel size, a batch normalization layer BN, an activation function layer ReLU and an effective channel attention layer EAC connected in sequence along the positive propagation direction.

[0021] In an embodiment of the present application, the down-sampling is realized by using a large-step depth convolution module; the large-step depth convolution module includes: after the input feature image is input into the feature disturbance layer Disout, the feature dropout layer Dropout, the 1D depth convolution layer with the preset kernel size, the batch normalization layer BN, the activation function layer ReLU and the effective channel attention layer EAC connected in sequence along the positive propagation direction, the output is output as the input feature image of the next layer of encoding layer.

[0022] In an embodiment of the present application, the encoding path includes four encoding layers connected in sequence along the positive propagation direction; each encoding layer uses the GConv-Block module to convolve the input feature image and then outputs the encoding feature image of the encoding layer;

[0023] The GConv-Block module includes a 1*1 convolution, a first group convolution unit with Group=6, a second group convolution unit with Group=3 and a third convolution unit connected in sequence along the positive propagation direction;

[0024] The output image of the first group convolution unit and the output image of the second group convolution unit are added pixel by pixel as the input of the third convolution unit;

[0025] The pixel points of the output image of the 1*1 convolution and the output image of the third convolution unit are added, as the output of the GConv-Block module.

[0026] In an embodiment of the present application, the first grouping convolution unit and the second grouping convolution unit each comprise, in sequence along the positive propagation direction, a feature disturbance layer Disout, a feature dropout layer Dropout, a 1D grouping convolution layer with a preset convolution kernel size, a batch normalization layer BN, an activation function layer ReLU, and an effective channel attention layer EAC.

[0027] The third convolution unit comprises, in sequence along the positive propagation direction, a feature disturbance layer Disout, a feature dropout layer Dropout, a 1D convolution layer with a preset convolution kernel size, a batch normalization layer BN, an activation function layer ReLU, and an effective channel attention layer EAC.

[0028] In an embodiment of the present application, the decoding path comprises, in sequence along the positive propagation direction, four decoding layers;

[0029] Each decoding layer is connected with the corresponding encoding layer in a skip connection manner, obtains the output image of the corresponding encoding layer and the output image of the upper decoding layer, and performs concatenation and splicing, as the input feature image of the decoding layer;

[0030] The upsampling adopts a nearest neighbor interpolation method.

[0031] In an embodiment of the present application, after the QRS complex label image of the to-be-detected electrocardio signal image is obtained, post-processing is performed to obtain the position of the QRS complex, and the post-processing comprises:

[0032] The QRS complex label image is smoothed by using a moving average algorithm to obtain the peak point coordinates after smoothing, as the QRS complex position of the to-be-detected electrocardio signal image.

[0033] The embodiment of the present application further provides a QRS complex detection device based on a U-Net, comprising:

[0034] A pre-training module generates a noise electrocardio signal by adding noise to a clean electrocardio signal, obtains pre-training data, takes the noise electrocardio signal and the corresponding clean electrocardio signal as the input and output of a QRS complex detection network, pre-trains the QRS complex detection network, uses a mean square error as a loss function, and outputs the network parameters of the QRS complex detection network after training for a preset number of times.

[0035] The formal training module collects original electrocardiosignal and corresponding QRS complex label, and initializes the QRS complex detection network by using the network parameter; the original electrocardiosignal is input into the initialized QRS complex detection network, the Dice loss function of the network output result and the corresponding QRS complex label is continuously reduced, and after the preset number of training, the trained QRS complex detection network is obtained;

[0036] The detection module acquires the electrocardiosignal graph to be detected, inputs the trained QRS complex detection network, and acquires the QRS complex label graph of the electrocardiosignal graph to be detected.

[0037] The embodiment of the application further provides a QRS complex detection device based on U-Net, comprising:

[0038] The electrocardiosignal acquisition device is used for acquiring the electrocardiosignal graph to be detected;

[0039] The host computer is in communication connection with the electrocardiosignal acquisition device, and is used for executing the computer program to realize the steps of the QRS complex detection method based on U-Net.

[0040] The display device is in communication connection with the host computer, and is used for displaying the QRS complex label graph of the electrocardiosignal graph to be detected.

[0041] The above technical scheme of the application has the following advantages compared with the prior art:

[0042] The QRS complex detection method based on the U-Net network has the following advantages:

[0043] The QRS complex detection method based on the U-Net network has the following advantages:

[0044] The application utilizes a group convolution unit on the encoding path and the decoding path, reduces the amount of parameters, compresses the expression of redundant features, utilizes a conventional convolution unit, effectively improves the connection between feature maps, further extracts image features, and sets a jump connection at a symmetrical position to splice deep features and shallow features, and relieve gradient degradation. BRIEF DESCRIPTION OF DRAWINGS

[0045] In order to make the content of the application more easily understood, the application will be further described in detail below according to specific embodiments of the application and in conjunction with the drawings, in which

[0046] Figure 1 is a step flow chart of the QRS complex detection method based on the U-Net network provided by the application;

[0047] Figure 2 is a binary label diagram provided by the embodiment of the application, Figure 2 (a) of is an original signal diagram, Figure 2 (b) of is a QRS complex label diagram;

[0048] Figure 3 is a network structure diagram of the QRS complex detection network U QRS -Net provided by the embodiment of the application;

[0049] Figure 4 is a structure composition diagram of the multi-scale convolution and feature reuse module MCRF provided by the embodiment of the application;

[0050] Figure 5 is a structure composition diagram of the GConv-Block module provided by the embodiment of the application;

[0051] Figure 6 is a structure composition diagram of the large-step deep convolution module provided by the embodiment of the application;

[0052] Figure 7 is a post-processing process diagram provided by the embodiment of the application, Figure 7 (a) of is a QRS complex label diagram output by the QRS complex detection network, Figure 7 (b) of is a post-processing result diagram, Figure 7 (c) of is an original electrocardio signal diagram.

[0053] Figure 8 is a specific method flow chart of the QRS complex detection method based on the U-Net network provided by the embodiment of the application. DETAILED DESCRIPTION

[0054] The application will be further described below in conjunction with the drawings and specific embodiments so that those skilled in the art can better understand the application and implement it, but the embodiments are not limiting to the application.

[0055] Embodiment 1:

[0056] Referring to Figure 1 The QRS complex detection method based on the U-Net network of the application includes the following specific steps:

[0057] S101: Generate a noise ECG signal by adding clean ECG signals and noise, and obtain pre-training data;

[0058] S102: Use the noise ECG signal and the corresponding clean ECG signal as the input and output of the pre-constructed QRS complex detection network U QRS -Net, and pre-train the QRS complex detection network; the QRS complex detection network is constructed based on the U-Net network;

[0059] S103: Use the mean square error as the loss function, and output the network parameters of the QRS complex detection network after a preset number of training;

[0060] S104: Collect the original ECG signal and the corresponding QRS complex label, and initialize the QRS complex detection network using the network parameters;

[0061] S105: Input the original ECG signal into the initialized QRS complex detection network, and continuously reduce the Dice loss function of the network output result and the corresponding QRS complex label, and obtain the trained QRS complex detection network after a preset number of training;

[0062] S106: Obtain the ECG signal graph to be detected, input it into the trained QRS complex detection network, and obtain the QRS complex label graph of the ECG signal graph to be detected.

[0063] Specifically, in the task of QRS wave detection, how to achieve accurate detection in a noisy environment is also one of the key problems, therefore, the application uses the ECG signal recovery task to carry out pre-training of the model. The ECG data contaminated by noise and the clean ECG data are respectively used as the input and output of the model, so that the model directly obtains more general features of the ECG signal in the process of learning how to recover the complete ECG signal, which is beneficial to improve the quality of the learning representation, thereby improving the effect of QRS complex detection.

[0064] Specifically, in step S101, the acquisition of the pre-training data includes: first, selecting and intercepting single-lead clean electrocardiogram signals with a length of 10s from the CPSC2018 (the China Physiological Signal Challenge 2018) dataset, wherein 9 different types of diseases including normal electrocardiogram, ventricular premature beat, premature ventricular contraction, ST segment depression, etc. are included; then, randomly intercepting noise signals from the NSTDB (the MIT-BIH Noise Stress Test Database) dataset, wherein the database contains three different noise signals: muscle artifact (MA), electrode motion (EM) and baseline wander (BW), and each noise source is composed of two channels; 10s of each noise is randomly intercepted and resampled to 500Hz; finally, the noise and the clean electrocardiogram signal are added to generate a noisy electrocardiogram signal, and the generation method is represented as:

[0065] Noise-convolved ECG=a×MA+b×EM+c×BW+Ground-truth ECG;

[0066] Wherein, a, b, c belongs to (0, 1) and a+b+c=1;

[0067] Specifically, in step S104, the original electrocardiogram signal and the corresponding QRS complex label are collected, and the collection includes:

[0068] CPSC2019 (the China Physiological Signal Challenge 2019), MITDB (MIT-BIH arrhythmia database) and INCART DB (Incardiology saint petersburg database) are selected as the training set and test set for QRS complex detection, 10s single-lead electrocardiogram signals are randomly intercepted, and all are sampled to 500Hz without any pretreatment.

[0069] The application designs a binary label, and converts the QRS complex positioning task into a target detection task; referring to Figure 2 Fig. 2 is a binary label diagram provided by the embodiment of the application, Figure 2 (a) is a schematic diagram of an original signal, Figure 2(b) is a QRS complex label map, the label is based on the official QRS position point, and 37 sample points (75 ms) are added to the left and right sides respectively, and the width of 1 label corresponding to each QRS wave position is 37+37+1=75 sample points (150 ms).

[0070] Specifically, in step S106, the application is modified based on the structure of Unet, and the modified model is named U QRS -net; refer to Figure 3 As shown in the figure, in this embodiment, the U QRS -net has four times of down-sampling and corresponding up-sampling, and uses a skip connection to splice the features of the corresponding encoding and decoding modules. The input size and output size of the model remain consistent, and the lowest resolution of the feature map in Unet is 1 / 40 of the highest resolution (original signal). And with the increase of the depth of the network, the convolution kernel size gradually decreases, and the specific parameters are shown in Table 1:

[0071] Table 1: U QRS -net network parameters

[0072] Layer Output Kernel Size Padding Stride MCFR (27×1×5000) 1x15, 1x35 and 1x65 same 1 Downsampling (27×1×1000) 1×35 same 5 GConv-block (24×1×1000) 1×25 same 1 Downsampling (24×1×500) 1×25 same 2 GConv-block (36×1×500) 1×15 same 1 Downsampling (36×1×250) 1×15 same 2 GConv-block (48×1×250) 1×9 same 1 Downsampling (48×1×125) 1×9 same 2 GConv-block (48×1×125) 1×5 same 1 Downsampling (48×1×250) 1×2 - - same (36×1×250) 1×9 GConv-block 1 same (36×1×500) 1×2 - - Upsampling (24×1×500) 1×15 GConv-block 1 same (24×1×1000) 1×2 - - Upsampling (12×1×1000) 1×25 GConv-block 1 same (12×1×5000) 1×5 - - Upsampling (12×1×5000) 1×35 GConv-block 1 same (1×1×5000) 1×1 Upsampling 1

[0073] Embodiment 2:

[0074] The QRS complex of different electrocardiograms varies greatly, some signals have short QRS complex intervals (steep edges), and some signals have wide and deformed QRS complexes. The key to improving the performance of the model is to pay attention to the diversity and complexity of the QRS complex in shape. Therefore, the application specifically designs a multi-scale convolution and feature reuse module (MCFR); the MCFR module has three branches, which use three different sizes of convolution kernels (1x15, 1x35 and 1x65) respectively, and padding is used to keep the size of the feature map consistent.

[0075] Based on the above embodiment, specifically, after inputting the electrocardiogram to be detected into the pre-trained QRS complex detection network, the multi-scale convolution and feature fusion module MCFR is used to process it; refer to GConv-blockAs shown, the ECG signal graph to be detected passes through three parallel convolution branches with different convolution kernel sizes; the ECG signal graph to be detected passes through a 1x1 convolution unit, a first convolution unit and a second convolution unit connected in series along the positive propagation direction in each convolution branch; the output images of the three convolution units are spliced as the output image of the convolution branch; the output images of the three parallel convolution branches are spliced as the output feature image of the multi-scale convolution and feature reuse module; after the output feature image is down-sampled, it is input into the encoding path of the QRS complex detection network U QRS -Net for multiple times of down-sampling, and an encoded image is output; after the encoded image is up-sampled, it is input into the decoding path of the QRS complex detection network U

[0076] The first convolution unit and the second convolution unit each include a feature disturbance layer Disout, a feature dropout layer Dropout, a 1D convolution layer with a preset convolution kernel size, a batch normalization layer BN, an activation function layer ReLU and an effective channel attention layer EAC connected in series along the positive propagation direction.

[0077] The multi-scale convolution and feature reuse module MCRF provided by the application makes the input image pass through three parallel convolution branches with different convolution kernel sizes, extracts as much effective information of different scales of the input feature image as possible, and effectively alleviates the problem of gradient disappearance by repeatedly using shallow features through jump connection.

[0078] Embodiment 3:

[0079] Based on the above embodiment, the convolution module GConv-Block specially (unified) designed is used in the encoding path and the decoding path to replace the original continuous conventional convolution in the U-net.

[0080] Specifically, the QRS complex detection network U QRS -Net provided by the embodiment of the application includes four encoding layers connected in series along the positive propagation direction; each encoding layer uses the GConv-Block module to convolve the input feature image and outputs the encoding feature image of the encoding layer; the decoding path includes four decoding layers connected in series along the positive propagation direction; each decoding layer is connected with the corresponding encoding layer by jump connection, obtains the output image of the corresponding encoding layer and the output image of the upper decoding layer, and is spliced in series as the input feature image of the decoding layer.

[0081] Reference sameAs shown, the GConv-Block module includes a 1x1 convolution, a first Group=6 group convolution unit, a second Group=3 group convolution unit and a third convolution unit connected in series along the positive propagation direction. The input feature map is first subjected to 1x1 convolution transformation of the channel number, and the channel number is kept consistent in the subsequent convolution layer. The pixel points of the output image of the first group convolution unit and the output image of the second group convolution unit are added to serve as the input of the third convolution unit; the pixel points of the output image of the 1x1 convolution and the output image of the third convolution unit are added to serve as the output of the GConv-Block module.

[0082] The first group convolution unit and the second group convolution unit each include a feature disturbance layer Disout, a feature dropout layer Dropout, a 1D group convolution layer with a preset convolution kernel size, a batch normalization layer BN, an activation function layer ReLU and an effective channel attention layer EAC connected in series along the positive propagation direction; and the third convolution unit includes a feature disturbance layer Disout, a feature dropout layer Dropout, a 1D convolution layer with a preset convolution kernel size, a batch normalization layer BN, an activation function layer ReLU and an effective channel attention layer EAC connected in series along the positive propagation direction.

[0083] In the embodiment of the application, p=0.1 in Dropout, dist_prob=0.1 in Disout, block_size=the current convolution layer size and alpha=30.

[0084] The GConv-Block module provided by the embodiment of the application uses group convolution to compress the expression of redundant features while reducing the parameter amount, and the third convolution unit is a regular convolution used to enhance the connection between effective feature maps and further extract features. The application sets two jump connections at symmetrical positions to add deep and shallow features and relieve gradient degradation generated in the training process. The Disout layer and the Dropout layer are arranged in front of each convolution layer in the embodiment of the application, which can more effectively suppress overfitting in the training process; the Dropout layer and the Disout layer are both effective methods for improving the robustness of the model. The Dropout layer realizes feature map dropout with a certain probability in the forward propagation process, and the Disout layer realizes feature map disturbance with a certain probability. The feature map dropout is conducive to improving the generality of features in the training process of the model and achieving the purpose of regularization; and the feature map disturbance is similar to the random superposition of Gaussian noise in an electrocardiogram to some extent, which is conducive to improving the noise resistance of the model.

[0085] Embodiment 4:

[0086] Based on the above embodiments, in this embodiment, the encoding path utilizes a large-stride deep convolution module for downsampling. Deep convolution can be viewed as a special type of grouped convolution, where the number of groups equals the number of channels; therefore, no feature interaction occurs between channels in deep convolution. This embodiment uses a large-stride deep convolution module instead of the downsampling in the original U-net, which helps reduce the loss of high-frequency information while improving the model's analytical capabilities. Furthermore, in the upsampling at the decoding end, nearest neighbor interpolation, which has low computational cost, continues to be used.

[0087] Reference Convolution As shown, the large stride depth convolution module includes a feature perturbation layer Disout, a feature dropout layer Dropout, a 1D depth convolution layer with a preset kernel size, a batch normalization layer BN, an activation function layer ReLU, and an effective channel attention layer EAC, which are passed in series along the forward propagation direction. The output is then used as the input feature image for the next coding layer.

[0088] Specifically, in the embodiments of the present invention, the conventional convolutional layers, grouped convolutional layers and deep convolutional layers provided by the present invention are all followed by normalization layers and ReLU activation functions, and all use ECA (Efficient Channel Attention) to achieve channel enhancement.

[0089] Specifically, to reduce noise in the model output and make the predicted location of the QRS complex more accurate, based on the above embodiment, after obtaining the QRS complex label map of the ECG signal to be detected, post-processing is performed on the QRS complex label map to obtain the location of the QRS complex; specifically, this includes: using a three-level moving average to suppress noise and smooth the predicted output. Peak detection is performed using scipy.signal. The location of the QRS complex can be obtained in Python's find_peaks function. See Figure 7 for a schematic diagram of the post-processing process. same (a) represents the QRS composite wave detection network U QRS -Net output QRS composite wave tag map, Figure 4 (b) represents the post-processing result image. Figure 5 (c) represents the original electrocardiogram signal; in the moving average function, set the parameter: window_width = 30 (corresponding to 60ms). In the peak lookup function, set the parameters: height = 0.4, distance = 100 (corresponding to 200ms).

[0090] Specifically, based on the above embodiments, referring to Figure 6 As shown, in this embodiment, the QRS composite wave detection method based on U-Net network includes:

[0091] S201: Prepare pre-training data, use U QRS -net network, remove the last Sigmoid layer, and train the network using the noisy electrocardiogram signal and the clean electrocardiogram signal as the network input and output respectively. The mean square error is used as the loss function, and the network is trained for 50 times. The batch size is 256, and the training method adopts Adam, wherein Ir=0.01, beta1=0.9, beta2=0.999, epsilon=le-08, and clipvalue=0.5.

[0092] S202: Prepare formal training data, initialize the network weight after pre-training, and use the 10s original electrocardiogram signal as the input and the corresponding QRS complex position as the output. Dice is used as the loss function, and the network is trained for 250 times. The batch size is 256, and the training method adopts Adam, wherein Ir=0.01, beta1=0.9, beta2=0.999, epsilon=le-08, and clipvalue=0.5.

[0093] S203: Use the network weight parameter after formal training to test the electrocardiogram signal graph to be detected, and output the network result after post-processing to obtain the final QRS complex position.

[0094] Based on the above embodiment, the embodiment of the application also provides a QRS complex detection device based on a U-Net network, which specifically comprises:

[0095] A pre-training module 100 generates a noisy electrocardiogram signal by adding noise to a clean electrocardiogram signal, obtains pre-training data, and uses the noisy electrocardiogram signal and the corresponding clean electrocardiogram signal as the input and output of a pre-constructed QRS complex detection network to pre-train the QRS complex detection network. The QRS complex detection network is constructed based on a U-Net network. The mean square error is used as the loss function, and the network parameters of the QRS complex detection network are output after training for a preset number of times.

[0096] A formal training module 200 collects original electrocardiogram signals and corresponding QRS complex labels, initializes a QRS complex detection network U QRS -Net based on the network parameters; and inputs the original electrocardiogram signal into the initialized QRS complex detection network U QRS -Net, and continuously reduces the Dice loss function of the network output result and the corresponding QRS complex label. After training for a preset number of times, a trained QRS complex detection network U QRS -Net is obtained.

[0097] The detection module 300 acquires the electrocardio signal graph to be detected and inputs the trained QRS complex detection network U QRS In the Net, the QRS complex label graph of the electrocardio signal graph to be detected is acquired.

[0098] The QRS complex detection device based on the U-Net network in the embodiment is used to implement the QRS complex detection method based on the U-Net network, and therefore the specific embodiments of the QRS complex detection device based on the U-Net network can be seen from the foregoing embodiment part of the QRS complex detection method based on the U-Net network. For example, the pre-training module 100 is used to implement steps S101, S102 and S103 in the foregoing QRS complex detection method based on the U-Net network; the formal training module 200 is used to implement steps S104 and S105 in the foregoing QRS complex detection method based on the U-Net network; and the detection module 300 is used to implement step S106 in the foregoing QRS complex detection method based on the U-Net network. Therefore, the specific embodiments can be referred to the description of the corresponding embodiment part, and will not be described here again.

[0099] Based on the foregoing embodiment, the embodiment further provides a QRS complex detection device based on the U-Net network, and the device specifically comprises:

[0100] An electrocardio signal acquisition device is used to acquire the electrocardio signal graph to be detected;

[0101] A host computer is in communication connection with the electrocardio signal acquisition device and is used to execute a computer program to implement the steps of the QRS complex detection method based on the U-Net network.

[0102] A display device is in communication connection with the host computer and is used to display the QRS complex label graph of the electrocardio signal graph to be detected.

[0103] The QRS complex detection method based on the U-Net network in the embodiment is used to train the QRS complex detection network U QRS -Net, and the network parameters obtained through the pre-training are used to initialize the QRS complex detection network U QRS -Net; and then the original electrocardio signal is acquired, and the initialized QRS complex detection network U QRS -Net is formally trained; the network parameters obtained through the pre-training are used to initialize the QRS complex detection network U QRS -Net, which avoids using random initialization parameters during the direct training, realizes the pre-noise removal, has good anti-noise ability, does not need to perform a complex noise removal operation on the electrocardio signal before the detection, and effectively improves the QRS complex detection network UQRS Robustness of Net; the application uses multi-scale convolution and feature reuse module MCRF, so that the input image passes through three parallel convolution branches with different convolution kernel sizes, as much as possible to extract the effective information of the input feature image of different scales, and through the jump connection, the shallow features are repeatedly used, effectively alleviating the problem of gradient disappearance; in the encoding path and the decoding path, the grouping convolution unit is used, which reduces the parameter amount while compressing the expression of redundant features; the conventional convolution unit is used to effectively improve the connection between feature maps and further extract image features; and the jump connection is set at the symmetric position to splice the deep features and the shallow features, and alleviate the gradient degradation.

[0104] Those skilled in the art will understand that embodiments of the application can be provided as methods, systems, or computer program products. Therefore, the application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage, etc.) containing computer-usable program code.

[0105] The application is described with reference to flowcharts and / or block diagrams according to the methods, devices (systems), and computer program products of the embodiments of the application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing apparatus produce a device that implements the functions specified in the flowcharts and / or block diagrams. Figure 7 The functions specified in one or more flows and / or blocks Figure 7 The functions specified in one or more flows and / or blocks

[0106] These computer program instructions can also be stored in a computer-readable memory that can direct the computer or other programmable data processing apparatus to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including instruction devices that implement the functions specified in the flowcharts and / or block diagrams. Figure 7 The functions specified in one or more flows and / or blocks Figure 8 The functions specified in one or more flows and / or blocks

[0107] These computer program instructions can also be loaded into a computer or other programmable data processing apparatus, so that a series of operation steps are performed on the computer or other programmable data processing apparatus to produce a computer-implemented process, so that the instructions executed on the computer or other programmable data processing apparatus provide a process for implementing the functions specified in the flowcharts and / or block diagrams.Figure One one or more processes and / or functions described in one or more blocks Figure One Figure One Figure One Figure One Figure One one or more processes and / or functions described in one or more blocks

[0108] Obviously, the above-mentioned embodiments are only examples for clearly illustrating the present application, and are not intended to limit the present application. Based on the above-mentioned embodiments, other different forms of changes or variations can be made by those skilled in the art. Here, it is not necessary or possible to enumerate all the embodiments. The obvious changes or variations derived from the above-mentioned embodiments are still within the protection scope of the present application.

Claims

1. A method for detecting QRS composite waves based on a U-Net network, characterized in that, include: By adding clean ECG signals to noise, noisy ECG signals are generated, thus obtaining pre-training data; The noisy ECG signal and the corresponding clean ECG signal are used as the input and output of a pre-constructed QRS complex detection network, which is then pre-trained. The QRS complex detection network is built based on the U-Net network. Using mean square error as the loss function, after training a preset number of times, the network parameters of the QRS composite wave detection network are output. The raw electrocardiogram signal and the corresponding QRS complex wave label are acquired, and the QRS complex wave detection network is initialized using the network parameters. The original electrocardiogram signal is input into the initialized QRS complex detection network. The Dice loss function of the network output and the corresponding QRS complex label is continuously reduced. After a preset number of training cycles, the trained QRS complex detection network is obtained. The ECG signal to be detected is acquired and input into the trained QRS complex detection network to obtain the QRS complex label map of the ECG signal to be detected, including: The ECG signal image to be detected is obtained and input into the multi-scale convolution and feature reuse module of the pre-trained QRS complex wave detection network. It goes through three parallel convolution branches with different kernel sizes. The ECG signal to be detected passes through a 1×1 convolutional unit, a first convolutional unit, and a second convolutional unit sequentially connected in the forward propagation direction in each convolutional branch; the output images of the three convolutional units are stitched together as the output image of that convolutional branch; the output images of the three parallel convolutional branches are stitched together as the output feature image of the multi-scale convolution and feature multiplexing module; After downsampling the output feature image, it is input into the encoding path of the QRS composite wave detection network for multiple downsampling, and the encoded image is output. The encoded image is upsampled and then input into the decoding path of the QRS composite wave detection network. After the same number of upsampling operations, the decoded image is output. The decoded image is input into a 1×1 convolution, and then passed through an activation function layer to obtain the QRS complex wave label map of the electrocardiogram to be detected.

2. The QRS composite wave detection method based on U-Net network according to claim 1, characterized in that, Both the first convolutional unit and the second convolutional unit include a feature perturbation layer Disout, a feature dropout layer Dropout, a 1D convolutional layer with a preset kernel size, a batch normalization layer BN, an activation function layer ReLU, and an effective channel attention layer EAC, which are connected in series along the forward propagation direction.

3. The QRS composite wave detection method based on U-Net network according to claim 1, characterized in that, The downsampling is implemented using a large stride depth convolution module; the large stride depth convolution module includes: passing the input feature image through a feature perturbation layer Disout, a feature dropout layer Dropout, a 1D depth convolution layer with a preset kernel size, a batch normalization layer BN, an activation function layer ReLU, and an effective channel attention layer EAC in sequence along the forward propagation direction, and outputting it as the input feature image of the next coding layer.

4. The QRS composite wave detection method based on U-Net network according to claim 1, characterized in that, The encoding path includes four encoding layers connected in series along the forward propagation direction; each encoding layer uses the GConv-Block module to convolve the input feature image and outputs the encoded feature image of that encoding layer. The GConv-Block module includes a 1×1 convolution, a first grouped convolution unit with Group=6, a second grouped convolution unit with Group=3, and a third convolution unit connected in series along the forward propagation direction. The output images of the first grouped convolutional unit and the output images of the second grouped convolutional unit are summed pixel by pixel and used as the input of the third convolutional unit; The output image of the 1×1 convolution is added pixel by pixel to the output image of the third convolution unit, and the result is the output of the GConv-Block module.

5. The QRS composite wave detection method based on U-Net network according to claim 4, characterized in that, Both the first grouped convolutional unit and the second grouped convolutional unit include a feature perturbation layer Disout, a feature dropout layer Dropout, a 1D grouped convolutional layer with a preset kernel size, a batch normalization layer BN, an activation function layer ReLU, and an effective channel attention layer EAC, which are connected in series along the forward propagation direction. The third convolutional unit includes a feature perturbation layer Disout, a feature dropout layer Dropout, a 1D convolutional layer with a preset kernel size, a batch normalization layer BN, an activation function layer ReLU, and an effective channel attention layer EAC, which are connected in series along the forward propagation direction.

6. The QRS composite wave detection method based on U-Net network according to claim 4, characterized in that, The decoding path includes four decoding layers connected in series along the forward propagation direction; Each decoding layer is skipped to the corresponding coding layer. The output image of the corresponding coding layer and the output image of the upper decoding layer are obtained, concatenated and stitched together, and used as the input feature image of the decoding layer. The upsampling uses the nearest neighbor interpolation method.

7. The QRS composite wave detection method based on U-Net network according to claim 1, characterized in that, After acquiring the QRS complex label map of the ECG signal to be detected, post-processing is performed to obtain the location of the QRS complex. The post-processing includes: The QRS complex label map is smoothed using a moving average algorithm, and the coordinates of the smoothed peak points are obtained as the location of the QRS complex in the ECG signal to be detected.

8. A QRS composite wave detection device based on U-Net, characterized in that, include: The pre-training module generates a noisy ECG signal by adding a clean ECG signal to noise, thus obtaining pre-training data. The noisy ECG signal and the corresponding clean ECG signal are used as the input and output of a pre-constructed QRS complex detection network to pre-train the QRS complex detection network. The QRS complex detection network is built based on the U-Net network. The mean squared error is used as the loss function, and after training for a preset number of times, the network parameters of the QRS complex detection network are output. The formal training module collects raw electrocardiogram (ECG) signals and corresponding QRS complex wave labels, initializes the QRS complex wave detection network using the network parameters, inputs the raw ECG signals into the initialized QRS complex wave detection network, continuously reduces the Dice loss function of the network output and the corresponding QRS complex wave labels, and after a preset number of training iterations, obtains the trained QRS complex wave detection network. The detection module acquires the ECG signal image to be detected and inputs it into a pre-trained QRS complex detection network to obtain the QRS complex label image of the ECG signal image to be detected. This includes: acquiring the ECG signal image to be detected and inputting it into the multi-scale convolution and feature reuse module of the pre-trained QRS complex detection network, passing it through three parallel convolution branches with different kernel sizes; in each convolution branch, the ECG signal image to be detected passes through a 1×1 convolution unit, a first convolution unit, and a second convolution unit sequentially connected along the forward propagation direction; the output images of the three convolution units are stitched together as the output image of that convolution branch; the output images of the three parallel convolution branches are stitched together as the output feature image of the multi-scale convolution and feature reuse module; the output feature image is downsampled and then input into the encoding path of the QRS complex detection network for multiple downsampling operations to output an encoded image; the encoded image is upsampled and then input into the decoding path of the QRS complex detection network for the same number of upsampling operations to output a decoded image. The decoded image is input into a 1×1 convolution, and then passed through an activation function layer to obtain the QRS complex wave label map of the electrocardiogram to be detected.

9. A QRS composite wave detection device based on U-Net, characterized in that, include: An electrocardiogram (ECG) signal acquisition device is used to acquire ECG signals to be detected. The host computer is communicatively connected to the electrocardiogram signal acquisition device and is used to execute computer programs to implement the steps of the QRS complex wave detection method based on U-Net as described in any one of claims 1 to 7. The display device is connected to the host computer and is used to display the QRS complex wave label map of the electrocardiogram signal to be detected.

Citation Information

Patent Citations

  • Automatic denoising method of electrocardiogram signals

    CN110169768A

  • Electrocardiosignal premature beat detection method for

    CN112617850A

  • ECG signal R peak detection method and system based on deep learning segmentation network

    CN114010204A