A multi-objective domain ECG signal classification method based on deep domain adaptation
Through a deep domain adaptation method, a multi-objective domain electrocardiogram classification model is established, which solves the problem of poor performance in the existing technology in the multi-objective domain, and achieves better generalization ability and adaptability.
Patent Information
- Application Number
- CN202210526548.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-13
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2042-05-13
AI Technical Summary
The existing intelligent ECG signal classification method is not effective on multiple target domains and cannot effectively adapt to ECG signal data in multiple different acquisition devices and environments.
A multi-objective domain ECG signal classification method based on deep domain adaptation is adopted. By acquiring and processing 12-lead ECG signals from different acquisition devices, a deep learning classification model is established, and the model is optimized using Adam optimization algorithm to improve the generalization ability on the multi-objective domain.
The generalization ability of the model in the multi-objective domain is improved, and the problem of poor performance of a single-objective domain adaptation algorithm in the multi-objective domain is solved, and the lead characteristics of multi-lead ECG signals are better adapted to the lead characteristics of multi-lead ECG signals by introducing a deformable convolution kernel.
Smart Images

Figure CN114841209B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electrocardiogram signal classification, and in particular to a multi-target domain electrocardiogram signal classification method based on deep domain adaptation. Background Art
[0002] At present, the existing intelligent ECG signal classification methods have achieved good results in a large amount of labeled ECG data. However, in practical applications, the labeling of ECG signals needs to rely on expert knowledge, which requires a lot of manpower and time costs. The development of domain adaptation in transfer learning provides a way to solve this problem, that is, the neural network trained on the source domain dataset (labeled) can be highly applicable to the target domain dataset (unlabeled) whose feature distribution is significantly different from the source domain, which can effectively solve the problem of misalignment of source and target domain feature distribution. In actual situations, the target domain data comes from the ECG signals of different patients in multiple hospitals with different acquisition equipment and acquisition environments, so an ECG classification model that can adapt to multiple target domains is needed, but most of the current domain adaptation learning methods only target a single target domain data and cannot be generalized to multiple target domains. Summary of the invention
[0003] In order to overcome the deficiencies of the above technologies, the present invention provides a method for improving the ECG classification accuracy of multiple target domains on a classification model trained in a source domain.
[0004] The technical solution adopted by the present invention to overcome the technical problems is:
[0005] A multi-target domain electrocardiogram signal classification method based on deep domain adaptation comprises the following steps:
[0006] a) Acquire multiple 12-lead ECG signals from different individuals and collected by different acquisition devices, label the 12-lead ECG signals, divide the labeled 12-lead ECG signals into a source domain S, and divide the unlabeled 12-lead ECG signals into a target domain combination T, T = {T1, T2, ..., T k ,...,T M}, T k is the kth target domain, k = 1, 2, ..., M, M is the number of target domains;
[0007] b) The source domain S and the target domain combination T are respectively subjected to downsampling, slicing, and normalization processing to obtain the processed source domain S′ and the processed target domain combination T′;
[0008] c) Establish a deep learning classification model for 12-lead ECG signals. The deep learning classification model for 12-lead ECG signals consists of a feature extractor and a fully connected classifier. The processed source domain S′ and the processed target domain combination T′ are input into the deep learning classification model for 12-lead ECG signals, and the label prediction value of the source domain is obtained as output. And the label prediction value of the target domain
[0009] d) Calculate the loss function Optimize the deep learning classification model of 12-lead ECG signals through the Adam optimization algorithm;
[0010] e) Input each target domain data into the optimized deep learning classification model of 12-lead ECG signals, output the label prediction value of each target domain, and complete the classification of target domain ECG signals.
[0011] Furthermore, the slicing method in step b) is: downsample all 12-lead ECG signals in the source domain S or the target domain combination T to the same frequency, randomly intercept 30s of ECG signals, truncate 12-lead ECG signals with data length exceeding 30s, and repeat padding operations on 12-lead ECG signals with data length less than 30s.
[0012] Further, step c) comprises the following steps:
[0013] c-1) The feature extractor is composed of a first residual structure, a second residual structure, a third residual structure, and a fourth residual structure in sequence;
[0014] c-2.1) The first residual structure consists of a first branch unit, a second branch unit, and a third branch unit. The first branch unit is composed of a first convolutional layer, a first batch of normalization layers, a first ReLu activation function layer, a second convolutional layer, a second batch of normalization layers, and a second ReLu activation function layer. The processed source domain S′ and the processed target domain combination T′ are respectively input into the first branch unit and then output to obtain the intra-lead features of the 12-lead ECG signal. Features
[0015] c-2.2) The second branch unit of the first residual structure is composed of a convolution layer, a first batch of normalization layers, a first ReLu activation function layer, a DeformConv variable convolution layer, a second batch of normalization layers, and a second ReLu activation function layer. The processed source domain S′ and the processed target domain combination T′ are respectively input into the second branch unit and then output to obtain the inter-lead features of the 12-lead ECG signal. Features
[0016] c-2.3) The third branch unit of the first residual structure is composed of a convolutional layer and a Maxpool layer in sequence. The processed source domain S′ and the processed target domain combination T′ are input into the third branch unit and then the features of the 12-lead ECG signal are output respectively. Features
[0017] c-2.4) The features in the lead Characteristics between leads After feature splicing, input it into the Maxpool layer to output the feature The characteristics of the lead Characteristics between leads After feature concatenation, the feature is input into the Maxpool layer and output to obtain the feature
[0018] c-2.5) The characteristics With features Superposition is performed to form a new feature F1 S , the feature With features Superposition to form new features
[0019] c-3.1) The second residual structure consists of a first branch unit, a second branch unit, and a third branch unit. The first branch unit is composed of a first convolutional layer, a first batch of normalization layers, a first ReLu activation function layer, a second convolutional layer, a second batch of normalization layers, and a second ReLu activation function layer. The feature F1 is respectively S and Features After being input into the first branch unit, the intra-lead features of the 12-lead ECG signal are outputted respectively. Features
[0020] c-3.2) The second branch unit of the second residual structure is composed of a convolution layer, a first batch of normalization layers, a first ReLu activation function layer, a DeformConv variable convolution layer, a second batch of normalization layers, and a second ReLu activation function layer, respectively. S and Features After being input into the second branch unit, the inter-lead features of the 12-lead ECG signal are output respectively. Features
[0021] c-3.3) The third branch unit of the second residual structure is composed of a convolutional layer and a Maxpool layer, which respectively converts the feature F1 S and Features After being input into the third branch unit, the characteristics of the 12-lead ECG signal are output respectively. Features
[0022] c-3.4) The features in the lead Characteristics between leads After feature splicing, input it into the Maxpool layer to output the feature The characteristics of the lead Characteristics between leads After feature concatenation, the feature is input into the Maxpool layer and output to obtain the feature
[0023] c-3.5) The characteristics With features Superposition to form new features The characteristics With features Superposition to form new features
[0024] c-4.1) The third residual structure consists of a first branch unit, a second branch unit, and a third branch unit. The first branch unit is composed of a first convolutional layer, a first batch of normalized layers, a first ReLu activation function layer, a second convolutional layer, a second batch of normalized layers, and a second ReLu activation function layer. and Features After being input into the first branch unit, the intra-lead features of the 12-lead ECG signal are outputted respectively. Features
[0025] c-4.2) The second branch unit of the third residual structure is composed of a convolution layer, a first batch of normalization layers, a first ReLu activation function layer, a DeformConv variable convolution layer, a second batch of normalization layers, and a second ReLu activation function layer, respectively. and Features After being input into the second branch unit, the inter-lead features of the 12-lead ECG signal are output respectively. Features
[0026] c-4.3) The third branch unit of the third residual structure is composed of a convolutional layer and a Maxpool layer, which respectively converts the features and Features After being input into the third branch unit, the characteristics of the 12-lead ECG signal are output respectively. Features
[0027] c-4.4) The features in the lead Characteristics between leads After feature concatenation, the feature is input into the Maxpool layer and output to obtain the feature The characteristics of the lead Characteristics between leads After feature splicing, input it into the Maxpool layer to output the feature
[0028] c-4.5) The characteristics With features Superposition is performed to form a new feature F3 S , the feature With features Superposition to form new features
[0029] c-5.1) The fourth residual structure consists of a first branch unit, a second branch unit, and a third branch unit. The first branch unit is composed of a first convolutional layer, a first batch of normalized layers, a first ReLu activation function layer, a second convolutional layer, a second batch of normalized layers, and a second ReLu activation function layer. The feature F3 is respectively S and Features After being input into the first branch unit, the intra-lead features of the 12-lead ECG signal are outputted respectively. Features
[0030] c-5.2) The second branch unit of the fourth residual structure is composed of a convolution layer, a first batch of normalization layers, a first ReLu activation function layer, a DeformConv variable convolution layer, a second batch of normalization layers, and a second ReLu activation function layer, respectively. S and Features After being input into the second branch unit, the inter-lead features of the 12-lead ECG signal are output respectively. Features
[0031] c-5.3) The third branch unit of the fourth residual structure is composed of a convolutional layer and a Maxpool layer, which respectively converts the feature F3 S and Features After being input into the third branch unit, the characteristics of the 12-lead ECG signal are output respectively. Features
[0032] c-5.4) The features in the lead Characteristics between leads After feature splicing, input it into the Maxpool layer to output the feature The characteristics of the lead Characteristics between leads After feature concatenation, the feature is input into the Maxpool layer and output to obtain the feature
[0033] c-5.5) The characteristics With features Superposition to form new features The characteristics With features Superposition to form new features
[0034] c-6) The characteristics With features Input into the fully connected classifier and output the label prediction value of the source domain And the label prediction value of the target domain Furthermore, in step c-2.1), the number of channels of the first convolutional layer and the second convolutional layer of the first branch unit are both 32, and the convolution kernel size is 1×3, the number of channels of the convolutional layer of the second branch unit in step c-2.2) is 32, and the convolution kernel size is 1×3, the number of channels of the DeformConv variable convolutional layer is 32, and the convolution kernel size is 3×3, the convolution kernel size of the Maxpool maximum pooling layer in step c-2.3) is 1×4, and the convolution kernel size of the Maxpool maximum pooling layer in step c-2.4) is 1×4.
[0035] Furthermore, in step c-3.1), the number of channels of the first convolutional layer and the second convolutional layer of the first branch unit are both 64, and the convolution kernel size is 1×3, the number of channels of the convolutional layer of the second branch unit in step c-3.2) is 64, and the convolution kernel size is 1×3, the number of channels of the DeformConv variable convolutional layer is 64, and the convolution kernel size is 3×3, the convolution kernel size of the Maxpool maximum pooling layer in step c-3.3) is 1×4, and the convolution kernel size of the Maxpool maximum pooling layer in step c-3.4) is 1×4.
[0036] Furthermore, in step c-4.1), the number of channels of the first convolutional layer and the second convolutional layer of the first branch unit are both 128, and the convolution kernel size is 1×3, the number of channels of the convolutional layer of the second branch unit in step c-4.2) is 128, and the convolution kernel size is 1×3, the number of channels of the DeformConv variable convolutional layer is 128, and the convolution kernel size is 3×3, the convolution kernel size of the Maxpool maximum pooling layer in step c-4.3) is 1×4, and the convolution kernel size of the Maxpool maximum pooling layer in step c-4.4) is 1×4.
[0037] Furthermore, in step c-5.1), the number of channels of the first convolution layer and the second convolution layer of the first branch unit are both 256, and the convolution kernel size is 1×3. In step c-5.2), the number of channels of the convolution layer of the second branch unit is 256, and the convolution kernel size is 1×3. The number of channels of the DeformConv variable convolution layer is 256, and the convolution kernel size is 3×3. In step c-5.3), the convolution kernel size of the Maxpool maximum pooling layer is 1×4.
[0038] The convolution kernel size of the Maxpool layer in c-5.4) is 1×4.
[0039] Further, step d) comprises the following steps:
[0040] d-1) Through the formula Calculate the cross entropy classification loss In the formula N S is the total number of samples in the source domain S, is the number of samples of category j in the source domain S, j = 1, 2, ..., C, C is the number of all categories, N b is the training batch size value, is the true label value of the i-th sample in the source domain S, is the label prediction value of the i-th sample in the source domain S;
[0041] d-2) Through the formula Calculate the class certainty loss Where C is the number of all categories, ω1 and ω2 are the sample certainty weighting coefficients, T is the transpose, Predict the label value for the target domain The predicted probability matrix obtained by Softmax The jth column of Predict the label value for the target domain The predicted probability matrix obtained by Softmax The j′th column of
[0042] d-3) Through the formula Calculate the category diversity loss is the prediction probability matrix rank;
[0043] d-4) Through the formula Calculating the loss function Where α is the coefficient and β is the coefficient.
[0044] The beneficial effects of the present invention are: improving the generalization ability of the model in multi-target domains, and the convergence speed is fast, solving the problem that the single target domain adaptation algorithm is not effective in multi-target domains. In addition, the introduction of the deformable convolution kernel can consciously adjust the receptive field of the convolution during the model training process, and better adapt to the lead characteristics of multi-lead ECG signals. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 It is a schematic diagram of the network structure of the present invention. DETAILED DESCRIPTION
[0046] The following is combined with Figure 1 The present invention is further described.
[0047] A multi-target domain electrocardiogram signal classification method based on deep domain adaptation comprises the following steps:
[0048] a) Acquire multiple 12-lead ECG signals from different individuals and collected by different acquisition devices, label the 12-lead ECG signals, divide the labeled 12-lead ECG signals into a source domain S, and divide the unlabeled 12-lead ECG signals into a target domain combination T, T = {T1, T2, ..., T k ,...,T M}, T k is the kth target domain, k = 1, 2, ..., M, and M is the number of target domains.
[0049] b) The source domain S and the target domain combination T are downsampled, sliced, and normalized in turn to obtain the processed source domain S′ and the processed target domain combination T′.
[0050] c) Establish a deep learning classification model for 12-lead ECG signals. The deep learning classification model for 12-lead ECG signals consists of a feature extractor and a fully connected classifier. The processed source domain S′ and the processed target domain combination T′ are input into the deep learning classification model for 12-lead ECG signals, and the label prediction value of the source domain is obtained as output. And the label prediction value of the target domain
[0051] d) Calculate the loss function The deep learning classification model of 12-lead ECG signals is optimized using the Adam optimization algorithm.
[0052] e) Input each target domain data into the optimized deep learning classification model of 12-lead ECG signals, output the label prediction value of each target domain, and complete the classification of target domain ECG signals.
[0053] This patent is a non-adversarial prediction method that does not require feature alignment between two domains and focuses on the category accuracy and diversity of the target domain. It improves the generalization ability of the model in multiple target domains and converges quickly, solving the problem that the single target domain adaptation algorithm is not effective in multiple target domains. In addition, the introduction of deformable convolution kernels can consciously adjust the receptive field of the convolution during the model training process to better adapt to the lead features of multi-lead ECG signals. During the training process, an adaptive loss function of category certainty and category diversity is used for unlabeled target domain data to improve the classification accuracy of the target domain, so that the target domain samples can also have better classification effects on the model trained with source domain samples. This method is not only for a single target domain, but also highly applicable to multiple target domains. It improves the feature distribution differences between samples in different domains and solves the problem of difficulty in labeling ECG data in practical applications.
[0054] Embodiment 1:
[0055] Furthermore, the slicing method in step b) is: downsample all 12-lead ECG signals in the source domain S or the target domain combination T to the same frequency, randomly intercept 30s of ECG signals, truncate 12-lead ECG signals with data length exceeding 30s, and repeat padding operations on 12-lead ECG signals with data length less than 30s.
[0056] Embodiment 2:
[0057] Further, step c) comprises the following steps:
[0058] c-1) The feature extractor is composed of a first residual structure, a second residual structure, a third residual structure, and a fourth residual structure in sequence.
[0059] c-2.1) The first residual structure consists of a first branch unit, a second branch unit, and a third branch unit. The first branch unit is composed of a first convolutional layer, a first batch of normalization layers, a first ReLu activation function layer, a second convolutional layer, a second batch of normalization layers, and a second ReLu activation function layer. The processed source domain S′ and the processed target domain combination T′ are respectively input into the first branch unit and then output to obtain the intra-lead features of the 12-lead ECG signal. Features
[0060] c-2.2) The second branch unit of the first residual structure is composed of a convolution layer, a first batch of normalization layers, a first ReLu activation function layer, a DeformConv variable convolution layer, a second batch of normalization layers, and a second ReLu activation function layer. The processed source domain S′ and the processed target domain combination T′ are respectively input into the second branch unit and then output to obtain the inter-lead features of the 12-lead ECG signal. Features
[0061] c-2.3) The third branch unit of the first residual structure is composed of a convolutional layer and a Maxpool layer in sequence. The processed source domain S′ and the processed target domain combination T′ are input into the third branch unit and then the features of the 12-lead ECG signal are output respectively. Features
[0062] c-2.4) The features in the lead Characteristics between leads After feature splicing, input it into the Maxpool layer to output the feature The characteristics of the lead Characteristics between leads After feature concatenation, the feature is input into the Maxpool layer and output to obtain the feature
[0063] c-2.5) The characteristics With features Superposition is performed to form a new feature F1 S , the feature With features Superposition to form new features
[0064] c-3.1) The second residual structure consists of a first branch unit, a second branch unit, and a third branch unit. The first branch unit is composed of a first convolutional layer, a first batch of normalization layers, a first ReLu activation function layer, a second convolutional layer, a second batch of normalization layers, and a second ReLu activation function layer. The feature F1 is respectively S and Features After being input into the first branch unit, the intra-lead features of the 12-lead ECG signal are outputted respectively. Features
[0065] c-3.2) The second branch unit of the second residual structure is composed of a convolution layer, a first batch of normalization layers, a first ReLu activation function layer, a DeformConv variable convolution layer, a second batch of normalization layers, and a second ReLu activation function layer, respectively. S and Features After being input into the second branch unit, the inter-lead features of the 12-lead ECG signal are output respectively. Features
[0066] c-3.3) The third branch unit of the second residual structure is composed of a convolutional layer and a Maxpool layer, which respectively converts the feature F1S and Features After being input into the third branch unit, the characteristics of the 12-lead ECG signal are output respectively. Features
[0067] c-3.4) The features in the lead Characteristics between leads After feature splicing, input it into the Maxpool layer to output the feature The characteristics of the lead Characteristics between leads After feature concatenation, the feature is input into the Maxpool layer and output to obtain the feature
[0068] c-3.5) The characteristics With features Superposition to form new features The characteristics With features Superposition to form new features
[0069] c-4.1) The third residual structure consists of a first branch unit, a second branch unit, and a third branch unit. The first branch unit is composed of a first convolutional layer, a first batch of normalized layers, a first ReLu activation function layer, a second convolutional layer, a second batch of normalized layers, and a second ReLu activation function layer. and Features After being input into the first branch unit, the intra-lead features of the 12-lead ECG signal are outputted respectively. Features
[0070] c-4.2) The second branch unit of the third residual structure is composed of a convolution layer, a first batch of normalization layers, a first ReLu activation function layer, a DeformConv variable convolution layer, a second batch of normalization layers, and a second ReLu activation function layer, respectively. and Features After being input into the second branch unit, the inter-lead features of the 12-lead ECG signal are output respectively. Features
[0071] c-4.3) The third branch unit of the third residual structure is composed of a convolutional layer and a Maxpool layer, which respectively converts the features and Features After being input into the third branch unit, the characteristics of the 12-lead ECG signal are output respectively. Features
[0072] c-4.4) The features in the lead Characteristics between leads After feature concatenation, the feature is input into the Maxpool layer and output to obtain the feature The characteristics of the lead Characteristics between leads After feature splicing, input it into the Maxpool layer to output the feature
[0073] c-4.5 will feature With features Superposition is performed to form a new feature F3 S , the feature With features Superposition to form new features
[0074] c-5.1) The fourth residual structure consists of a first branch unit, a second branch unit, and a third branch unit. The first branch unit is composed of a first convolutional layer, a first batch of normalized layers, a first ReLu activation function layer, a second convolutional layer, a second batch of normalized layers, and a second ReLu activation function layer. The feature F3 is respectively S and Features After being input into the first branch unit, the intra-lead features of the 12-lead ECG signal are outputted respectively. Features
[0075] c-5.2) The second branch unit of the fourth residual structure is composed of a convolution layer, a first batch of normalization layers, a first ReLu activation function layer, a DeformConv variable convolution layer, a second batch of normalization layers, and a second ReLu activation function layer, respectively. S and Features After being input into the second branch unit, the inter-lead features of the 12-lead ECG signal are output respectively. Features
[0076] c-5.3) The third branch unit of the fourth residual structure is composed of a convolutional layer and a Maxpool layer, which respectively converts the feature F3 S and Features After being input into the third branch unit, the characteristics of the 12-lead ECG signal are output respectively. Features
[0077] c-5.4) The features in the lead Characteristics between leads After feature concatenation, the feature is input into the Maxpool layer and output to obtain the feature The characteristics of the lead Characteristics between leads After feature splicing, input it into the Maxpool layer to output the feature
[0078] c-5.5) The characteristics With features Superposition to form new features The characteristics With features Superposition to form new features
[0079] c-6) The characteristics With features Input into the fully connected classifier and output the label prediction value of the source domain And the label prediction value of the target domain
[0080] Embodiment 3:
[0081] Furthermore, in step c-2.1), the number of channels of the first convolutional layer and the second convolutional layer of the first branch unit are both 32, and the convolution kernel size is 1×3, the number of channels of the convolutional layer of the second branch unit in step c-2.2) is 32, and the convolution kernel size is 1×3, the number of channels of the DeformConv variable convolutional layer is 32, and the convolution kernel size is 3×3, the convolution kernel size of the Maxpool maximum pooling layer in step c-2.3) is 1×4, and the convolution kernel size of the Maxpool maximum pooling layer in step c-2.4) is 1×4.
[0082] Embodiment 4:
[0083] Furthermore, in step c-3.1), the number of channels of the first convolutional layer and the second convolutional layer of the first branch unit are both 64, and the convolution kernel size is 1×3, the number of channels of the convolutional layer of the second branch unit in step c-3.2) is 64, and the convolution kernel size is 1×3, the number of channels of the DeformConv variable convolutional layer is 64, and the convolution kernel size is 3×3, the convolution kernel size of the Maxpool maximum pooling layer in step c-3.3) is 1×4, and the convolution kernel size of the Maxpool maximum pooling layer in step c-3.4) is 1×4.
[0084] Embodiment 5:
[0085] Furthermore, in step c-4.1), the number of channels of the first convolutional layer and the second convolutional layer of the first branch unit are both 128, and the convolution kernel size is 1×3, the number of channels of the convolutional layer of the second branch unit in step c-4.2) is 128, and the convolution kernel size is 1×3, the number of channels of the DeformConv variable convolutional layer is 128, and the convolution kernel size is 3×3, the convolution kernel size of the Maxpool maximum pooling layer in step c-4.3) is 1×4, and the convolution kernel size of the Maxpool maximum pooling layer in step c-4.4) is 1×4.
[0086] Embodiment 6:
[0087] Furthermore, in step c-5.1), the number of channels of the first convolutional layer and the second convolutional layer of the first branch unit are both 256, and the convolution kernel size is 1×3, the number of channels of the convolutional layer of the second branch unit in step c-5.2) is 256, and the convolution kernel size is 1×3, the number of channels of the DeformConv variable convolutional layer is 256, and the convolution kernel size is 3×3, the convolution kernel size of the Maxpool maximum pooling layer in step c-5.3) is 1×4, and the convolution kernel size of the Maxpool maximum pooling layer in step c-5.4) is 1×4.
[0088] Embodiment 7:
[0089] Further, step d) comprises the following steps:
[0090] The training process is divided into three branches. The first branch is the supervised training of the source domain data with labels. And the label prediction value of the target domain Calculate cross entropy classification loss The second branch is the pseudo-label prediction matrix for each target domain data The class-deterministic loss function that constitutes the target domain The third branch is the pseudo-label prediction matrix of the target domain data The class diversity loss function is constructed The three constitute a joint loss The Adam optimization algorithm is used to optimize the network model parameters to minimize the joint loss, which not only enables the model to have good classification performance, but also improves the category prediction accuracy of the target domain test set, making the model trained in the source domain highly applicable to the target domain. Specifically:
[0091] d-1) Through the formula Calculate the cross entropy classification loss In the formula N S is the total number of samples in the source domain S, is the number of samples of category j in the source domain S, j = 1, 2, ..., C, C is the number of all categories, N b is the training batch size value, is the true label value of the i-th sample in the source domain S, is the label prediction value of the i-th sample in the source domain S.
[0092] d-2) Through the formula Calculate the class certainty loss Where C is the number of all categories, ω1 and ω2 are the sample certainty weighting coefficients, T is the transpose, Predict the label value for the target domain The predicted probability matrix obtained by Softmax The jth column of Predict the label value for the target domain The predicted probability matrix obtained by Softmax The j′th column of .
[0093] d-3) Through the formula Calculate the category diversity loss is the prediction probability matrix rank.
[0094] d-4) Through the formula Calculating the loss function Where α is the coefficient and β is the coefficient.
[0095] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A multi-target domain electrocardiogram signal classification method based on deep domain adaptation, characterized in that: The steps include: a) Acquire multiple 12-lead ECG signals from different individuals and collected by different acquisition devices, label the 12-lead ECG signals, divide the labeled 12-lead ECG signals into a source domain S, and divide the unlabeled 12-lead ECG signals into a target domain combination T, T = {T1, T2, ..., T k ,...,T M }, T k is the kth target domain, k = 1, 2, ..., M, M is the number of target domains; b) The source domain S and the target domain combination T are respectively subjected to downsampling, slicing, and normalization processing to obtain the processed source domain S′ and the processed target domain combination T′; c) Establish a deep learning classification model for 12-lead ECG signals. The deep learning classification model for 12-lead ECG signals consists of a feature extractor and a fully connected classifier. The processed source domain S′ and the processed target domain combination T′ are input into the deep learning classification model for 12-lead ECG signals, and the label prediction value of the source domain is obtained as output. And the label prediction value of the target domain d) Calculate the loss function Optimize the deep learning classification model of 12-lead ECG signals through the Adam optimization algorithm; e) Input each target domain data into the optimized deep learning classification model of 12-lead ECG signals, output the label prediction value of each target domain, and complete the classification of target domain ECG signals.
2. The multi-target domain ECG signal classification method based on deep domain adaptation according to claim 1 is characterized in that: The slicing method in step b) is: downsample all 12-lead ECG signals in the source domain S or the target domain combination T to the same frequency, randomly intercept 30s of ECG signals, truncate the 12-lead ECG signals with a data length exceeding 30s, and repeat the padding operation on the 12-lead ECG signals with a data length less than 30s.
3. The multi-target domain ECG signal classification method based on deep domain adaptation according to claim 1 is characterized in that: Step c) comprises the following steps: c-1) The feature extractor is composed of a first residual structure, a second residual structure, a third residual structure, and a fourth residual structure in sequence; c-2.1) The first residual structure consists of a first branch unit, a second branch unit, and a third branch unit. The first branch unit is composed of a first convolutional layer, a first batch of normalization layers, a first ReLu activation function layer, a second convolutional layer, a second batch of normalization layers, and a second ReLu activation function layer. The processed source domain S′ and the processed target domain combination T′ are respectively input into the first branch unit and then output to obtain the intra-lead features of the 12-lead ECG signal. Features c-2.2) The second branch unit of the first residual structure is composed of a convolution layer, a first batch of normalization layers, a first ReLu activation function layer, a DeformConv variable convolution layer, a second batch of normalization layers, and a second ReLu activation function layer. The processed source domain S′ and the processed target domain combination T′ are respectively input into the second branch unit and then output to obtain the inter-lead features of the 12-lead ECG signal. Features c-2.3) The third branch unit of the first residual structure is composed of a convolutional layer and a Maxpool layer in sequence. The processed source domain S′ and the processed target domain combination T′ are input into the third branch unit and then the features of the 12-lead ECG signal are output respectively. Features c-2.4) The features in the lead Characteristics between leads After feature splicing, input it into the Maxpool layer to output the feature The characteristics of the lead Characteristics between leads After feature concatenation, the feature is input into the Maxpool layer and output to obtain the feature c-2.5) The characteristics With features Superposition is performed to form a new feature F1 S , the feature With features Superposition to form new features c-3.1) The second residual structure consists of a first branch unit, a second branch unit, and a third branch unit. The first branch unit is composed of a first convolutional layer, a first batch of normalization layers, a first ReLu activation function layer, a second convolutional layer, a second batch of normalization layers, and a second ReLu activation function layer. The feature F1 is respectively S and Features After being input into the first branch unit, the intra-lead features of the 12-lead ECG signal are outputted respectively. Features c-3.2) The second branch unit of the second residual structure is composed of a convolution layer, a first batch of normalization layers, a first ReLu activation function layer, a DeformConv variable convolution layer, a second batch of normalization layers, and a second ReLu activation function layer, respectively. S and Features After being input into the second branch unit, the inter-lead features of the 12-lead ECG signal are output respectively. Features c-3.3) The third branch unit of the second residual structure is composed of a convolutional layer and a Maxpool layer, which respectively converts the feature F1 S and Features After being input into the third branch unit, the characteristics of the 12-lead ECG signal are output respectively. Features c-3.4) The features in the lead Characteristics between leads After feature splicing, input it into the Maxpool layer to output the feature The characteristics of the lead Characteristics between leads After feature concatenation, the feature is input into the Maxpool layer and output to obtain the feature c-3.5) The characteristics With features Superposition to form new features The characteristics With features Superposition to form new features c-4.1) The third residual structure consists of a first branch unit, a second branch unit, and a third branch unit. The first branch unit is composed of a first convolutional layer, a first batch of normalized layers, a first ReLu activation function layer, a second convolutional layer, a second batch of normalized layers, and a second ReLu activation function layer. and Features After being input into the first branch unit, the intra-lead features of the 12-lead ECG signal are outputted respectively. Features c-4.2) The second branch unit of the third residual structure is composed of a convolution layer, a first batch of normalization layers, a first ReLu activation function layer, a DeformConv variable convolution layer, a second batch of normalization layers, and a second ReLu activation function layer, respectively. and Features After being input into the second branch unit, the inter-lead features of the 12-lead ECG signal are output respectively. Features c-4.3) The third branch unit of the third residual structure is composed of a convolutional layer and a Maxpool layer, which respectively converts the features and Features After being input into the third branch unit, the characteristics of the 12-lead ECG signal are output respectively. Features c-4.4) The features in the lead Characteristics between leads After feature splicing, input it into the Maxpool maximum pooling layer to output the feature The characteristics of the lead Characteristics between leads After feature concatenation, the feature is input into the Maxpool layer and output to obtain the feature c-4.5) The characteristics With features Superposition to form new features The characteristics With features Superposition to form new features c-5.1) The fourth residual structure consists of a first branch unit, a second branch unit, and a third branch unit. The first branch unit is composed of a first convolutional layer, a first batch of normalized layers, a first ReLu activation function layer, a second convolutional layer, a second batch of normalized layers, and a second ReLu activation function layer, respectively. and Features After being input into the first branch unit, the intra-lead features of the 12-lead ECG signal are outputted respectively. Features c-5.2) The second branch unit of the fourth residual structure is composed of a convolution layer, a first batch of normalization layers, a first ReLu activation function layer, a DeformConv variable convolution layer, a second batch of normalization layers, and a second ReLu activation function layer, respectively. and Features After being input into the second branch unit, the inter-lead features of the 12-lead ECG signal are output respectively. Features c-5.3) The third branch unit of the fourth residual structure is composed of a convolutional layer and a Maxpool layer, which respectively converts the features and Features After being input into the third branch unit, the characteristics of the 12-lead ECG signal are output respectively. Features c-5.4) The features in the lead Characteristics between leads After feature splicing, input it into the Maxpool maximum pooling layer to output the feature The characteristics of the lead Characteristics between leads After feature concatenation, the feature is input into the Maxpool layer and output to obtain the feature c-5.5) The characteristics With features Superposition to form new features The characteristics With features Superposition to form new features c-6) The characteristics With features Input into the fully connected classifier and output the label prediction value of the source domain And the label prediction value of the target domain 4. The multi-target domain ECG signal classification method based on deep domain adaptation according to claim 1, characterized in that: In step c-2.1), the number of channels of the first convolution layer and the second convolution layer of the first branch unit are both 32, and the convolution kernel size is 1×3. In step c-2.2), the number of channels of the convolution layer of the second branch unit is 32, and the convolution kernel size is 1×3. The number of channels of the DeformConv variable convolution layer is 32, and the convolution kernel size is 3×3. In step c-2.3), the convolution kernel size of the Maxpool maximum pooling layer is 1×4, and the convolution kernel size of the Maxpool maximum pooling layer in step c-2.4) is 1×4.
5. The multi-target domain ECG signal classification method based on deep domain adaptation according to claim 1, characterized in that: In step c-3.1), the number of channels of the first convolution layer and the second convolution layer of the first branch unit are both 64, and the convolution kernel size is 1×3. In step c-3.2), the number of channels of the convolution layer of the second branch unit is 64, and the convolution kernel size is 1×3. The number of channels of the DeformConv variable convolution layer is 64, and the convolution kernel size is 3×3. In step c-3.3), the convolution kernel size of the Maxpool maximum pooling layer is 1×4, and the convolution kernel size of the Maxpool maximum pooling layer in step c-3.4) is 1×4.
6. The multi-target domain ECG signal classification method based on deep domain adaptation according to claim 1, characterized in that: In step c-4.1), the number of channels of the first convolution layer and the second convolution layer of the first branch unit are both 128, and the convolution kernel size is 1×3. In step c-4.2), the number of channels of the convolution layer of the second branch unit is 128, and the convolution kernel size is 1×3. The number of channels of the DeformConv variable convolution layer is 128, and the convolution kernel size is 3×3. In step c-4.3), the convolution kernel size of the Maxpool maximum pooling layer is 1×4, and the convolution kernel size of the Maxpool maximum pooling layer in step c-4.4) is 1×4.
7. The multi-target domain ECG signal classification method based on deep domain adaptation according to claim 1, characterized in that: In step c-5.1), the number of channels of the first convolutional layer and the second convolutional layer of the first branch unit are both 256, and the convolution kernel size is 1×3. In step c-5.2), the number of channels of the convolutional layer of the second branch unit is 256, and the convolution kernel size is 1×3. The number of channels of the DeformConv variable convolutional layer is 256, and the convolution kernel size is 3×3. In step c-5.3), the convolution kernel size of the Maxpool maximum pooling layer is 1×4, and the convolution kernel size of the Maxpool maximum pooling layer in step c-5.4) is 1×4.
8. The multi-target domain ECG signal classification method based on deep domain adaptation according to claim 1, characterized in that: Step d) comprises the following steps: d-1) Through the formula Calculate the cross entropy classification loss In the formula N S is the total number of samples in the source domain S, is the number of samples of category j in the source domain S, j = 1, 2, ..., C, C is the number of all categories, N b is the training batch size value, is the true label value of the i-th sample in the source domain S, is the label prediction value of the i-th sample in the source domain S; d-2) Through the formula Calculate the class certainty loss Where C is the number of all categories, ω1 and ω2 are the sample certainty weighting coefficients, T is the transpose, Predict the label value for the target domain The predicted probability matrix obtained by Softmax The jth column of Predict the label value for the target domain The predicted probability matrix obtained by Softmax The j′th column of d-3) Through the formula Calculate the category diversity loss is the prediction probability matrix rank; d-4) Through the formula Calculating the loss function Where α is the coefficient and β is the coefficient.
Citation Information
Patent Citations
Method for reducing arrhythmia false alarm rate of multi-parameter monitor
CN111759298A
ECG signal acquisition method and device, storage medium, and electronic device
WO2021147866A1