Method for identifying QRS waves in electrocardiosignals based on multi-task cascade bidirectional GRU network
Through the multitasking cascading bidirectional GRU network, features are extracted using the cascading structure and the bidirectional GRU feature sharing layer, the problem of low recognition accuracy of sliding threshold method is solved, and a more efficient QRS wave recognition effect is achieved.
Patent Information
- Application Number
- CN202411108809.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2024-12-06
AI Technical Summary
When the prior art recognizes the characteristic points of the ECG through the sliding threshold method, the strong correlation between Q wave, S wave and R wave cannot be effectively analyzed, resulting in a low QRS wave detection accuracy.
Using a multi-task cascading bidirectional GRU network, three sub-networks are set up for R wave, Q wave and S wave identification, and features are extracted through the bidirectional GRU feature sharing layer and constructed a cascade structure, considering the commonality and dependence between sub-tasks. and timing to improve identification effect.
It significantly improves the accuracy and reliability of QRS wave recognition, especially in complex scenarios, and is more effective than traditional methods.
Smart Images

Figure CN119074009A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of electrocardiogram signal recognition, and specifically is a method for recognizing QRS waves in electrocardiogram signals based on a multi-task cascaded bidirectional GRU network. Background Art
[0002] With the development of artificial intelligence, smart medicine has gradually emerged in the medical field. Applying artificial intelligence to the analysis of various medical data has become the current trend of smart medical research. Among many medical data, ECG data is very important, so the classification and evaluation of ECG data is particularly important.
[0003] The invention patent application with publication number CN114587377A discloses a method and system for extracting electrocardiogram feature points based on the heart rate sliding threshold method. The application discloses: determining the positions of each feature point of the electrocardiogram R point; according to the position of the feature point of the electrocardiogram R point, obtaining the positions of each feature point of the electrocardiogram P point, Q point, S point and T point by the sliding threshold method. The application does not analyze and identify the strong correlation between the Q wave, S wave and R wave, and only identifies each feature point by the sliding threshold method, which will result in low accuracy in detecting the QRS wave.
[0004] The present application provides a QRS wave recognition method in an electrocardiogram signal based on a multi-task cascaded bidirectional GRU network to solve the above technical problems. Summary of the invention
[0005] The present application aims to solve at least one of the technical problems existing in the prior art; to this end, the present application proposes a QRS wave recognition method in an electrocardiogram signal based on a multi-task cascade bidirectional GRU network, which is used to solve the technical problem that the prior art uses a sliding threshold method to identify each feature point, but does not analyze and identify the strong correlation between the Q wave, S wave and R wave, which leads to low accuracy in detecting the QRS wave. The present application sets up three sub-networks corresponding to the three sub-tasks of R wave recognition, Q wave recognition and S wave recognition, respectively. The three recognition sub-networks form a cascade structure and share features. The cascade structure takes into account the commonality, dependency and timing between the three sub-tasks, and has better recognition effect than the traditional method.
[0006] To achieve the above objectives, the first aspect of the present application provides a QRS wave recognition method in an electrocardiogram signal based on a multi-task cascaded bidirectional GRU network, comprising:
[0007] Acquire an electrocardiogram signal and mark it as an original signal; process the original signal through a bandpass filter to obtain a filtered signal;
[0008] Randomly intercept the filtered signal to obtain a number of samples; feature mark the positions in the samples as labels of the samples; divide the sample groups into test sets and training sets according to a set ratio; wherein the size of the sample is determined by the sampling duration and the sampling rate, and the sample group includes the sample and the label corresponding to the sample;
[0009] Constructing a basic recognition model; training the basic recognition model through a training set to obtain a QRS recognition model; wherein the basic recognition model includes a bidirectional GRU feature sharing layer and three recognition sub-networks in a cascade setting, and the three recognition sub-networks recognize R waves, Q waves, and S waves according to set priorities;
[0010] The recognition result of the QRS recognition model is evaluated for accuracy through a test set; after the accuracy evaluation is qualified, the QRS recognition model is saved for use in identifying the QRS wave in the electrocardiogram signal.
[0011] Preferably, the frequency range of the bandpass filter is [0.5 Hz-40 Hz].
[0012] Preferably, the set ratio includes 4:1 or 3:2.
[0013] Preferably, the three identification subnetworks include a Q wave identification subnetwork, an R wave identification subnetwork and an S wave identification subnetwork;
[0014] The output data of the bidirectional GRU feature sharing layer is used as the input of the R wave recognition subnetwork to recognize the R wave in the QRS wave;
[0015] The output data of the bidirectional GRU feature sharing layer and the R wave recognition sub-network are used as the input of the Q wave recognition sub-network to recognize the Q wave in the QRS wave;
[0016] The output data of the bidirectional GRU feature sharing layer and the Q wave recognition sub-network are used as the input of the S wave recognition sub-network to recognize the S wave in the QRS wave.
[0017] This application sets up a cascade structure of three recognition subnetworks according to the characteristics of the Q wave, R wave and S wave in the QRS wave. First, the bidirectional GRU feature sharing layer is used to extract features, and the features are used as the input of the R wave recognition subnetwork to identify the R wave in the QRS wave; then the output of the R wave recognition subnetwork and the features extracted by the bidirectional GRU feature sharing layer are used as the input of the Q wave recognition subnetwork to identify the Q wave in the QRS wave; finally, the output of the Q wave recognition subnetwork and the features extracted by the bidirectional GRU feature sharing layer are used as the input of the S wave recognition subnetwork to identify the S wave in the QRS wave. The above three recognition subnetworks constitute a cascade structure, which can identify the timing and dependency of the three recognition subtasks of Q wave, R wave and S wave, and the recognition effect is better than that of traditional methods.
[0018] Preferably, randomly intercepting the filtered signal comprises:
[0019] Set the capture parameters, including capture duration and sampling rate.
[0020] The filtered signal is randomly intercepted based on the interception parameter to obtain a number of samples; wherein the size of the samples is determined by the interception parameter.
[0021] Preferably, the setting of interception parameters includes:
[0022] Set the capture duration to 2s and the sampling frequency to 2000Hz.
[0023] Preferably, the step of marking the positions in the plurality of samples includes:
[0024] The position of the characteristic wave in the sample is marked as Z1, and the other positions except the characteristic wave are marked as Z2; wherein Z1 and Z2 are both integers, and the characteristic wave includes a Q wave, an R wave or an S wave;
[0025] The characteristic wave and the position marks of other positions are used as labels of the sample; wherein each sample corresponds to three labels, and the size of the label is consistent with the corresponding sample.
[0026] Preferably, the parameters of the bidirectional GRU feature sharing layer are set as follows: the signal length of the input signal is 4000, the batch size is set to 8, the number of hidden layer features is set to 4, and the nonlinear function is set to tanh; the GRU function in PyTorch is used, and batch_first is set to True, and the Dropout parameter is set to 0.2.
[0027] Preferably, the identification sub-network includes a fully connected layer FC1, an activation layer, a Dropout layer, a fully connected layer FC2 and a Sigmoid layer in sequence;
[0028] The number of input features and the number of output features of the fully connected layer FC1 and the fully connected layer FC2 are set according to the cascade structure;
[0029] Activation layer: Use ReLU activation function, the dimensions of input data and output data remain unchanged;
[0030] Dropout layer: parameter is set to 0.2;
[0031] Sigmoid layer: The classification threshold is set to 0.7; when it is greater than 0.7, the output is 1, otherwise the output is 0.
[0032] Preferably, training the basic recognition model through a training set includes:
[0033] The training set is input into the basic recognition model for training, and during the training process, a binary cross entropy loss function is used to calculate a Q wave detection loss function, an R wave detection loss function, and an S wave detection loss function for each sample; the total loss function is the sum of the Q wave detection loss function, the R wave detection loss function, and the S wave detection loss function;
[0034] The Adam optimizer is used to optimize the network parameters of the basic recognition model until the loss value and the accuracy rate tend to be stable, and the training is stopped; the network parameters and model structure information of the current basic recognition model are saved to obtain the QRS recognition model.
[0035] Preferably, the accuracy of the recognition result of the QRS recognition model is evaluated by a test set, including:
[0036] Inputting the test set into the QRS recognition model, and running the QRS recognition model to obtain an output vector corresponding to the Q wave, R wave or S wave in the sample of the test set;
[0037] The output vector is compared with the label corresponding to the characteristic wave in the sample, and the accuracy is calculated; when the accuracy is greater than the set threshold, the accuracy evaluation is qualified.
[0038] Compared with the prior art, the beneficial effects of the present application are: the basic recognition model constructed by the present application includes a bidirectional GRU feature sharing layer and three recognition sub-networks in cascade arrangement, and the three recognition sub-networks recognize R waves, Q waves and S waves according to set priorities; the bidirectional GRU feature sharing layer is used to extract the features of the electrocardiogram signal, which is shared by three recognition sub-networks; and because the three recognition sub-networks are cascaded, the common learning between the three tasks is strengthened, the reliability of the model is improved, and the QRS wave recognition accuracy in complex scenarios is also improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 This is a schematic diagram of the network structure of the basic recognition model in the embodiment of the present application;
[0041] Figure 2 A schematic diagram of the network structure of the identification sub-network according to an embodiment of the present application. DETAILED DESCRIPTION
[0042] The technical solution of the present application will be described clearly and completely below in conjunction with the embodiments. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0043] See also Figure 1-Figure 2 The first aspect of the present application provides a method for identifying QRS waves in an electrocardiogram signal based on a multi-task cascaded bidirectional GRU network, comprising:
[0044] Obtaining the ECG signal and marking it as the original signal; processing the original signal through a bandpass filter to obtain a filtered signal;
[0045] Randomly intercept the filtered signal to obtain several samples; feature mark the positions in the several samples as labels of the samples; divide the several sample groups into test sets and training sets according to a set ratio; wherein the size of the sample is determined by the sampling duration and the sampling rate, and the sample group includes the sample and the label corresponding to the sample;
[0046] Construct a basic recognition model; train the basic recognition model through the training set to obtain a QRS recognition model; wherein the basic recognition model includes a bidirectional GRU feature sharing layer and three recognition sub-networks in cascade setting, and the three recognition sub-networks recognize R waves, Q waves and S waves according to set priorities;
[0047] The recognition results of the QRS recognition model are evaluated for accuracy using the test set; after the accuracy evaluation is qualified, the QRS recognition model is saved and used to recognize the QRS wave in the electrocardiogram signal.
[0048] Next, the QRS wave recognition method in the electrocardiogram signal based on the multi-task cascade bidirectional GRU network proposed in this application is described in detail.
[0049] 1) Obtain an ECG signal and mark it as an original signal; input the original signal into a designed bandpass filter for filtering to remove baseline drift and noise interference, and obtain a filtered signal. In this embodiment, the frequency range of the bandpass filter is [0.5 Hz-40 Hz].
[0050] It should be noted that the ECG signal can be obtained through an electrocardiograph or a wearable device, and of course the ECG signal data stored in an existing database can also be used.
[0051] 2) The interception time is set to 2s, and the sampling frequency of the ECG signal is set to 2000Hz; the filtered signal is randomly intercepted according to the set interception time and sampling frequency to obtain a number of samples; the size of each sample is 4000 (2×2000=4000).
[0052] It should be noted that the random interception of the signal specifically refers to determining the interception window according to the interception duration, randomly selecting a starting point in the continuous ECG signal, and then determining the signal segment according to the interception window, and then extracting the sampling points in the signal segment according to the sampling rate. Specifically in this embodiment, the interception window is randomly determined in the signal with a length of 2s, and then the sampling points are extracted in the interception window according to the sampling rate of 2000Hz, and a total of 4000 sampling points can be extracted from each interception window.
[0053] 3) In this embodiment, the Q wave, R wave and S wave in the QRS wave are identified separately, and they need to be marked separately, so the same sample will correspond to three labels. Specifically:
[0054] First, the Q wave is used as the characteristic wave, the position of the Q wave in the sample is marked as 1, and the positions of other positions (including R wave and S wave) are marked as 0, and each position mark is used as a set of labels for the sample;
[0055] Then, the R wave is used as the characteristic wave, the position of the R wave in the sample is marked as 1, and the positions of other positions (including Q wave and S wave) are marked as 0, and each position mark is used as a set of labels for the sample;
[0056] Finally, the S wave is used as the characteristic wave, the position of the S wave in the sample is marked as 1, and the positions of other positions (including Q wave and R wave) are marked as 0, and the position marks are used as a set of labels for the sample;
[0057] In this embodiment, other positions refer to positions in the sample other than the characteristic wave. In this way, three labels corresponding to one sample can be obtained, and the size of each label is consistent with the sample size. In this embodiment, the sample size is 4000.
[0058] 4) Take each sample and its corresponding label as a sample group, and divide the sample group according to the set ratio to obtain the training set and the test set. The optimal ratio is 4:1, that is, the ratio of the number of sample groups in the training set and the test set is 4:1. Of course, other ratios can also be selected, such as 3:2.
[0059] 5) The basic recognition model is constructed according to the structure of bidirectional GRU feature sharing layer → three recognition sub-networks. The recognition sub-network is constructed in series according to the fully connected layer FC1 → activation layer → Dropout layer → fully connected layer FC2 → Sigmoid layer. The specific parameter settings include:
[0060] The parameters of the bidirectional GRU feature sharing layer are set as follows: the signal length of the input signal is 4000, the batch size is set to 8, the number of hidden layer features is set to 4, and the nonlinear function is set to tanh; the GRU function in PyTorch is used, and batch_first is set to True, and the Dropout parameter is set to 0.2 (the Dropout parameter is a parameter of the bidirectional GRU feature sharing layer); the dimension of the input data of this layer is [8, 4000, 1]; the dimension of the output data is [8, 4000, 8], and the dimension of the output hidden layer data is [2, 8, 8]. The dimension of the output data is changed to [8, 32000] as one of the inputs of the three sub-networks.
[0061] The three recognition sub-networks recognize R waves, Q waves, and S waves respectively according to their priorities. The three recognition sub-networks are cascaded because the number of input features of the fully connected layer FC1 and the fully connected layer FC2 is different;
[0062] The number of input features and the number of output features of the fully connected layer FC1 and the fully connected layer FC2 are set according to the cascade structure;
[0063] Activation layer: Use ReLU activation function, the dimensions of input data and output data remain unchanged;
[0064] Dropout layer: The parameter is set to 0.2, that is, 20% of the nodes are randomly blocked to reduce network overfitting;
[0065] Sigmoid layer: The classification threshold is set to 0.7, that is, the output is 1 if it is greater than 0.7; otherwise, the output is 0.
[0066] In the QRS wave of the electrocardiogram signal, the Q wave, R wave and S wave have strong correlation, timing and dependence, among which the R wave has an obvious peak value, so the R wave can be detected first, and then the Q wave and S wave can be detected on this basis. In some other preferred embodiments, the Q or S wave can also be detected first, and then the other two waves can be detected on this basis.
[0067] This embodiment divides the recognition of QRS waves into three subtasks, and designs the recognition priority according to the characteristics of each wave in the QRS wave, that is, the R wave has obvious characteristics, and the R wave is recognized first. On the basis of R wave recognition, the Q wave is recognized; on the basis of R wave and Q wave recognition, the S wave is recognized. Referring to this idea, the basic recognition model is designed as a cascade structure, which takes into account the commonality, dependency and timing between the three subtasks, namely Q wave, R wave and S wave recognition, and the effect will be better than the traditional multi-task network.
[0068] In this embodiment, the three identification subnetworks include a Q wave identification subnetwork, an R wave identification subnetwork and an S wave identification subnetwork; the output data of the bidirectional GRU feature sharing layer is used as the input of the R wave identification subnetwork to identify the R wave in the QRS wave; the output data of the bidirectional GRU feature sharing layer and the R wave identification subnetwork is used as the input of the Q wave identification subnetwork to identify the Q wave in the QRS wave; the output data of the bidirectional GRU feature sharing layer and the Q wave identification subnetwork is used as the input of the S wave identification subnetwork to identify the S wave in the QRS wave. Among them, the dimension of the output data features of the feature sharing layer is 32000, the input data feature dimension of the R-wave recognition subnetwork is 32000, and the output data feature dimension is 4000; the input data features of the Q-wave recognition subnetwork are the output data features of the feature sharing layer spliced with the output data features of the R-wave recognition subnetwork, that is, 32000+4000=36000, the feature dimension is 36000, and the output data feature dimension of the Q-wave recognition subnetwork is 4000; the input data features of the S-wave recognition subnetwork are the output data features of the feature sharing layer spliced with the output data features of the Q-wave recognition subnetwork, that is, 32000+4000=36000, the feature dimension is 36000, and the output data feature dimension of the S-wave recognition subnetwork is 4000.
[0069] The cascade structure is a special type of neural network architecture, which is composed of multiple neural network layers. Each layer processes the input data and passes the output to the next layer. This structure imitates the processing method of the biological visual system, that is, visual information is processed in multiple stages in the brain. Through the setting of the cascade structure, this embodiment can not only complete the individual recognition of Q waves, R waves and S waves, but also recognize the correlation between them to improve the recognition accuracy.
[0070] See also Figure 1In this example, the cascade structure of the basic recognition model is to first extract sample features for R wave recognition, use the R wave recognition results and the extracted sample features as features to recognize Q waves, and use the Q wave recognition results and the extracted sample features as features to recognize S waves. Obviously, this network structure can learn the commonalities between the three subtasks, learn the dependencies and timing between subtasks, and improve the recognition accuracy of QRS waves in complex scenarios. Moreover, the bidirectional GRU feature sharing layer is built using a bidirectional GRU network to extract ECG signal features for sharing by the three subnetworks; the bidirectional GRU can take into account the information before and after the current time step, which can further improve the recognition accuracy of the QRS wave.
[0071] See also Figure 2 , the recognition sub-network is constructed in series according to the fully connected layer FC1→activation layer→Dropout layer→fully connected layer FC2→Sigmoid layer; Figure 2 The input signal in is the feature of the previous node input, such as the input signal of the Q wave recognition sub-network is the output of the bidirectional GRU feature sharing layer and the output of the R wave recognition sub-network.
[0072] 6) Network training; the training set is input into the basic recognition model for training. During the training process, the binary cross entropy loss function is used to calculate the Q wave detection loss function, R wave detection loss function and S wave detection loss function for each sample; the total loss function is the sum of the Q wave detection loss function, R wave detection loss function and S wave detection loss function; the Adam optimizer is used to optimize the network parameters of the basic recognition model until the loss value and accuracy are stable near a certain value, then the training can be stopped; the network parameters and model structure information of the current basic recognition model are saved to obtain the QRS recognition model.
[0073] 7) Network test: Input all the divided test set samples into the saved QRS recognition model, turn off the Dropout layer in the network, and run the QRS recognition model to obtain the prediction value vector output y_pred_Q, y_pred_R, y_pred_S corresponding to the test set samples. Compare the QRS wave time points with the labels corresponding to the samples and calculate the accuracy. If the average accuracy is 99%, set the threshold to 97%, because 99%>97%, the accuracy is qualified; of course, you can also compare the accuracy of each characteristic wave.
[0074] In this embodiment, the signal sampling rate is 2000Hz, so if the predicted value appears in a window with a total length of 600 centered on each of the marked QRS points, it is accurate. This accuracy evaluation method refers to the American national standard formulated by the Association for the Advancement of Medical Devices, that is, if the QRS wave detection point obtained by the algorithm is within 150ms before and after the marked position, it can be determined that the detected QRS wave position is accurate. Specifically, 150ms before and after the QRS wave detection point, that is, the time window length that can be accurately determined by the detection point is 150*2=300ms, that is, 0.3s. Since the sampling rate is 2000hz, the number of sampling points corresponding to 0.3s is: 2000*0.3=600, that is, the sampling window length that can be accurately determined by the detection point is 600.
[0075] The above embodiments are only used to illustrate the technical method of the present application and are not intended to limit it. Although the present application has been described in detail with reference to the preferred embodiments, a person of ordinary skill in the art should understand that the technical method of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical method of the present application.
Claims
1. A QRS wave recognition method in ECG signals based on a multi-task cascade bidirectional GRU network, characterized in that: include: Acquire an electrocardiogram signal and mark it as an original signal; process the original signal through a bandpass filter to obtain a filtered signal; Randomly intercept the filtered signal to obtain a number of samples; feature mark the positions in the samples as labels of the samples; divide the sample groups into test sets and training sets according to a set ratio; wherein the size of the sample is determined by the sampling duration and the sampling rate, and the sample group includes the sample and the label corresponding to the sample; Constructing a basic recognition model; training the basic recognition model through a training set to obtain a QRS recognition model; wherein the basic recognition model includes a bidirectional GRU feature sharing layer and three recognition sub-networks in a cascade setting, and the three recognition sub-networks recognize R waves, Q waves, and S waves according to set priorities; The recognition result of the QRS recognition model is evaluated for accuracy through a test set; after the accuracy evaluation is qualified, the QRS recognition model is saved for use in identifying the QRS wave in the electrocardiogram signal.
2. The QRS wave recognition method in the electrocardiogram signal based on the multi-task cascade bidirectional GRU network according to claim 1 is characterized in that: The three identification subnetworks include a Q wave identification subnetwork, an R wave identification subnetwork and an S wave identification subnetwork; The output data of the bidirectional GRU feature sharing layer is used as the input of the R wave recognition subnetwork to recognize the R wave in the QRS wave; The output data of the bidirectional GRU feature sharing layer and the R wave recognition sub-network are used as the input of the Q wave recognition sub-network to recognize the Q wave in the QRS wave; The output data of the bidirectional GRU feature sharing layer and the Q wave recognition sub-network are used as the input of the S wave recognition sub-network to recognize the S wave in the QRS wave.
3. The QRS wave recognition method in the electrocardiogram signal based on the multi-task cascade bidirectional GRU network according to claim 1 is characterized in that: The setting ratio includes 4:1 or 3:
2.
4. The QRS wave recognition method in the electrocardiogram signal based on the multi-task cascade bidirectional GRU network according to claim 1 is characterized in that: Randomly intercepting the filtered signal comprises: Set the capture parameters, including capture duration and sampling rate. The filtered signal is randomly intercepted based on the interception parameter to obtain a number of samples; wherein the size of the samples is determined by the interception parameter.
5. The QRS wave recognition method in the electrocardiogram signal based on the multi-task cascade bidirectional GRU network according to claim 1 is characterized in that: The frequency range of the bandpass filter is [0.5 Hz-40 Hz].
6. The QRS wave recognition method in the electrocardiogram signal based on the multi-task cascade bidirectional GRU network according to claim 1 is characterized in that: The feature marking of the positions in the samples comprises: The position of the characteristic wave in the sample is marked as Z1, and the other positions except the characteristic wave are marked as Z2; wherein Z1 and Z2 are both integers, and the characteristic wave includes a Q wave, an R wave or an S wave; The characteristic wave and the position marks of other positions are used as labels of the sample; wherein each sample corresponds to three labels, and the size of the label is consistent with the corresponding sample.
7. The QRS wave recognition method in the electrocardiogram signal based on the multi-task cascade bidirectional GRU network according to claim 1 is characterized in that: The parameters of the bidirectional GRU feature sharing layer are set as follows: the signal length of the input signal is 4000, the batch size is set to 8, the number of hidden layer features is set to 4, and the nonlinear function is set to tanh; the GRU function in PyTorch is used, and batch_first is set to True, and the Dropout parameter is set to 0.
2.
8. The QRS wave recognition method in the electrocardiogram signal based on the multi-task cascade bidirectional GRU network according to claim 1 is characterized in that: The identification sub-network includes a fully connected layer FC1, an activation layer, a Dropout layer, a fully connected layer FC2 and a Sigmoid layer in sequence; The number of input features and the number of output features of the fully connected layer FC1 and the fully connected layer FC2 are set according to the cascade structure; Activation layer: Use ReLU activation function, the dimensions of input data and output data remain unchanged; Dropout layer: parameter is set to 0.2; Sigmoid layer: The classification threshold is set to 0.
7.
9. The QRS wave recognition method in the electrocardiogram signal based on the multi-task cascade bidirectional GRU network according to claim 1 is characterized in that: The basic recognition model is trained by a training set, including: The training set is input into the basic recognition model for training, and during the training process, a binary cross entropy loss function is used to calculate a Q wave detection loss function, an R wave detection loss function, and an S wave detection loss function for each sample; the total loss function is the sum of the Q wave detection loss function, the R wave detection loss function, and the S wave detection loss function; The Adam optimizer is used to optimize the network parameters of the basic recognition model until the loss value and the accuracy rate tend to be stable, and the training is stopped; the network parameters and model structure information of the current basic recognition model are saved to obtain the QRS recognition model.
10. The QRS wave recognition method in electrocardiographic signal based on multi-task cascade bidirectional GRU network according to claim 1 is characterized in that: The accuracy of the recognition result of the QRS recognition model is evaluated by using a test set, including: Inputting the test set into the QRS recognition model, and running the QRS recognition model to obtain an output vector corresponding to the Q wave, R wave or S wave in the sample of the test set; The output vector is compared with the label corresponding to the characteristic wave in the sample, and the accuracy is calculated; when the accuracy is greater than the set threshold, the accuracy evaluation is qualified.
