Epilepsy disease recognition method based on dual-source domain holistic transfer learning

Through the dual-source domain holistic transfer learning method, a diagnostic model is constructed using arrhythmia and myocardial infarction data sets, which solves the problem of insufficient data volume and inconsistent distribution in epilepsy disease diagnosis, achieves efficient epilepsy disease identification, and significantly improves diagnostic accuracy. and efficiency.

CN115474944BActive Publication Date: 2024-09-13QILU UNIVERSITY OF TECHNOLOGY (SHANDONG ACADEMY OF SCIENCES)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211147148.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-19
Publication Date
2024-09-13
Estimated Expiration
2042-09-19

AI Technical Summary

Technical Problem

The existing technology suffers from insufficient data volume, inconsistent data distribution, and nonlinearity and instability of EEG signals in the diagnosis of epilepsy, resulting in large diagnostic errors and difficulty in effectively identifying epilepsy.

Method used

The dual-source domain holistic transfer learning method is used to perform noise reduction preprocessing and feature arrangement through the arrhythmia and myocardial infarction data sets to build a disease diagnosis model, and apply it to the epilepsy data set for diagnosis, and output F1 score, accuracy, and search results. accuracy and AUC indicators.

Benefits of technology

It effectively shortens the training time and achieves significant improvements in F1-score, accuracy, precision and detection authenticity, and is suitable for the diagnosis of epilepsy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115474944B
    Figure CN115474944B
Patent Text Reader

Abstract

The present invention provides an epilepsy disease recognition method based on dual-source domain overall transfer learning. In the present invention, an arrhythmia source domain dataset, a myocardial infarction source domain dataset and a target domain dataset are selected: 2) the data in the arrhythmia source domain dataset, the myocardial infarction source domain dataset and the target domain dataset are subjected to denoising preprocessing; 3) the ECG signal data in the arrhythmia source domain dataset and the myocardial infarction source domain dataset are arranged in descending order; 4) a disease diagnosis model is constructed, and the ECG signal data that has undergone denoising preprocessing is sent to the model for training; 5) the overall transfer learning method is used to apply the trained disease diagnosis model to the target domain dataset after denoising preprocessing to diagnose epilepsy. The epilepsy disease recognition method based on dual-source domain overall transfer learning in this application can effectively shorten the training time, and at the same time, it also achieves very good results in terms of F1-score, accuracy, precision rate and high detection authenticity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of new generation information technology, and specifically relates to an epilepsy disease recognition method based on dual-source domain overall transfer learning. Background Art

[0002] Epilepsy is a clinical syndrome characterized by abnormal highly synchronized discharges of brain neurons caused by a variety of reasons, which can cause complications such as myoclonus, convulsions, and cerebrovascular diseases. There are currently more than 9 million epilepsy patients in my country, with 650,000 to 700,000 new patients each year, and at least 2 million patients with intractable epilepsy. If effective diagnosis and treatment cannot be carried out, it will cause pressure on patients and their families, and will have an impact on the long-term stable development of society. As artificial intelligence plays an increasingly important role in the prevention, diagnosis, and detection of neurological diseases, the use of computer-assisted epilepsy diagnosis is of great significance.

[0003] Electroencephalogram (EEG) is an important way to diagnose epilepsy, and plays an important role in the diagnosis and classification of epilepsy. In the past, the diagnosis of diseases was mostly based on existing data through basic classifiers, and then deep learning and machine learning methods were used to diagnose the disease. The above methods require a lot of labeled data, and only when the data has a similar distribution can good results be produced. Since medical data involves patient information, the data is not open, and there is a problem of insufficient data volume; on the other hand, EEG signals are nonlinear and unstable signals. Different acquisition equipment, different time, and different patients will produce different signals and have different information, so directly using a certain model for diagnosis may result in large errors.

[0004] In order to solve the above problems, the present invention proposes to use a dual-source domain overall transfer learning method to diagnose epilepsy. Summary of the invention

[0005] In order to solve the above technical problems, the present invention provides an epilepsy disease recognition method based on dual-source domain holistic transfer learning. The dual-source domain holistic transfer learning method proposed in this application allows certain differences between data and has low requirements on the size of the data set, which is suitable for use in the diagnosis of epilepsy diseases.

[0006] A method for identifying epilepsy based on dual-source domain holistic transfer learning, characterized in that it includes the following steps:

[0007] 1) Select arrhythmia source domain dataset, myocardial infarction source domain dataset and target domain dataset:

[0008] 2) performing denoising preprocessing on the data in the arrhythmia source domain dataset, the myocardial infarction source domain dataset, and the target domain dataset;

[0009] 3) Arrange the ECG signal data in the arrhythmia source domain dataset and the myocardial infarction source domain dataset in descending order according to the correlation with the target domain dataset;

[0010] 4) Construct a disease diagnosis model, and send the ECG signal data pre-processed with noise reduction in the arrhythmia source domain data set and the myocardial infarction source domain data set to the disease diagnosis model for training;

[0011] 5) The trained disease diagnosis model is applied to the target domain dataset after denoising preprocessing in the form of overall migration to diagnose epilepsy. At the same time, the F1 score, accuracy, precision, recall and AUC index results are output.

[0012] Wherein, the specific steps of step 4) are:

[0013] 4.1) Constructing a disease diagnosis model, the disease diagnosis model consists of an Input layer, three residual network blocks, two convolutional layers, a global maximum pooling layer, a global Dropout layer, two Dense layers and a Softmax classifier; wherein each residual network block consists of two convolutional layers, a maximum pooling layer, and a Dropout layer; and the Input layer, the first convolutional layer of the first residual network block, the second convolutional layer in the first residual network block, the maximum pooling layer in the first residual network block, the Dropout layer of the first residual network block, and the second residual network block The first convolution layer of the second residual network block, the second convolution layer of the second residual network block, the maximum pooling layer of the second residual network block, the Dropout layer of the second residual network block, the first convolution layer of the third residual network block, the second convolution layer of the third residual network block, the maximum pooling layer of the third residual network block, the Dropout layer of the third residual network block, the first global convolution layer, the second global convolution layer, the global maximum pooling layer, the global Dropout layer, the first Dense layer, the second Dense layer and the Softmax classifier are connected in sequence, and the output of the previous layer is used as the input of the current layer;

[0014] 4.2) The ECG signal data after noise reduction preprocessing in the arrhythmia source domain dataset and the myocardial infarction source domain dataset are sent to the disease diagnosis model for training.

[0015] Preferably, ECG signal data is obtained from the MIT-BIH database as the arrhythmia source domain data set, ECG signal data is selected from the PTB database as the myocardial infarction source domain data set, and EEG signal data is obtained from the database of the Epilepsy Research Center of the University of Bonn, Germany as the target domain data set.

[0016] Preferably, the specific steps of step 2) are:

[0017] 2.1) Using Butterworth high-pass filter, Butterworth band-stop filter and median filter in turn to remove noise from myoelectric interference, power frequency interference and baseline drift in the ECG signal data in the arrhythmia source domain data set; using Butterworth high-pass filter, Butterworth band-stop filter and median filter in turn to remove noise from myoelectric interference, power frequency interference and baseline drift in the data of myocardial infarction source domain data set;

[0018] 2.2) Use Butterworth high-pass filter and 50Hz notch filter in turn to remove eye movement interference, myoelectric interference, electrocardiographic interference and high-frequency noise interference in the EEG signal data in the target domain dataset.

[0019] Preferably, in step 2.1), a Butterworth high-pass filter is used to filter out the myoelectric interference existing in the electrocardiogram signal data in the arrhythmia source domain data set and the myocardial infarction source domain data set. The transfer function of the Butterworth high-pass filter is shown in formula (1.1):

[0020]

[0021] In formula (1.1), n∈N, and n≤10000, N is a non-negative integer set, D0 is a specified non-negative value, and D(u, v) is the distance from the center of the frequency rectangle to the center (origin) of the Fourier transform. The calculation formula of D(u, v) is shown in formula (1.2):

[0022] D(u,v)=(uM / 2) 2 +(vN / 2) 2 ] 1 / 2 (1.2)

[0023] In formula (1.2), u and v are the center coordinate points of the frequency matrix, which are obtained by (u, v) = (M / 2, N / 2); where M×N is the dimension size of the central electrical signal data of the arrhythmia source domain data set and the myocardial infarction source domain data set;

[0024] The Butterworth band-stop filter is used to filter out the power frequency interference in the electrocardiogram data in the arrhythmia source domain data set and the myocardial infarction source domain data set. The transfer function is shown in formula (1.3):

[0025]

[0026] In formula (1.3), n∈N, and n≤10000, N is a non-negative integer set, D0 is a specified non-negative value, D(u, v) is the distance from the center of the frequency rectangle to the Fourier transform center (origin), and W refers to the width of the frequency band.

[0027] The median filter is used to filter out the baseline drift noise in the ECG signal data in the arrhythmia source domain data set and the myocardial infarction source domain data set. The window length is m, where m = 490, and the transfer function is shown in formula (1.4):

[0028] y i =Med{X i-v , ..., X i , ..., X i+v} (1.4)

[0029] In formula (1.4), X i Represents the electrocardiogram signal data in the arrhythmia source domain dataset and the electrocardiogram signal data in the myocardial infarction source domain dataset;

[0030] Preferably, in step 2.2), the transfer function of the Butterworth high-pass filter is as shown in formulas (1.1) and (1.2), wherein M×N in formula (1.2) represents the dimension size of the EEG signal data in the target domain data set, and the transfer function h of the notch filter is:

[0031]

[0032] In formula (1.5), w0 is the center frequency of the notch filter, that is, the frequency that you want to notch, which is 50Hz here; w is the bandwidth of the notch filter, and s refers to the signal frequency of the input EEG signal.

[0033] Preferably, the specific steps of step 3) are:

[0034] 3.1) respectively calculating the mutual information between each feature of the denoised preprocessed ECG signal in the arrhythmia source domain dataset and the myocardial infarction source domain dataset and each feature of the denoised preprocessed EEG signal in the target dataset;

[0035] 3.2 After calculating the mutual information, sort the mutual information in descending order.

[0036] Preferably, in step 3.1), the mutual information is calculated using formula (1.6):

[0037]

[0038] In formula (1.6), X s represents the characteristics of the ECG signal after denoising preprocessing in the source domain dataset, X t represents the characteristics of the EEG signal after denoising preprocessing in the target domain dataset, p(x s , x t ) is the current X s and X tThe joint probability density function, p(x s ) and p(x t ) are X s and X t The marginal probability density function of .

[0039] Preferably, in step 3.2), the descending sequence Y is calculated by using formula (1.7):

[0040] Y=sort(-(I(X s , X t ))) (1.7)

[0041] Preferably, the specific steps of step 4.2) are: inputting the descending sequence Y obtained in step 3.2 into the first convolutional layer in the first residual network block in the disease diagnosis model through the Input layer, and then the convolutional layer learns the local data features in the descending sequence Y; then, the second convolutional layer in the first residual network block learns the feature data output by the first convolutional layer in the first residual network block; then, the maximum pooling layer in the first residual network block rotates the feature data output by the second convolutional layer in the first residual network block; then, the Dropout layer of the first residual network block randomly discards the network nodes in the first residual network block according to the set loss rate to reduce the overfitting of the first residual network block;

[0042] Then, the first convolution layer of the second residual network block performs local learning on the feature data output by the Dropout layer of the first residual network block; then, the second convolution layer of the second residual network block learns the feature data output by the first convolution layer of the second residual network block; then, the maximum pooling layer of the second residual network block rotates the feature data output by the second convolution layer in the second residual network block; then, the Dropout layer of the second residual network block randomly discards the network nodes in the second residual network block according to the set loss rate to reduce the overfitting of the second residual network block;

[0043] Then, the first convolution layer of the third residual network block performs local learning on the feature data output by the Dropout layer of the second residual network block; then, the second convolution layer of the third residual network block learns the feature data output by the first convolution layer of the third residual network block; then, the maximum pooling layer of the third residual network block rotates the feature data output by the second convolution layer in the third residual network block; then, the Dropout layer of the third residual network block randomly discards the network nodes in the third residual network block according to the set loss rate;

[0044] Then, the first global convolution layer in the entire disease diagnosis model locally learns the feature data output by the Dropout layer of the third residual network block; then, the second global convolution layer learns the feature data output by the first global convolution layer;

[0045] Then, the global maximum pooling layer flattens the feature data output by the second global convolutional layer to obtain a vector; then, the global Dropout layer IV randomly discards the network nodes in the entire disease diagnosis model according to the set loss rate to reduce the overfitting of the entire disease diagnosis model;

[0046] Then, the first Dense layer uses the Relu activation function to retain the feature data of the vector output by the Dropout layer IV and map it to the second Dense layer; then, the second Dense layer maps the feature data to the Softmax classifier according to two classification categories;

[0047] Then, the Softmax classifier compares the mapping result with the target domain label. When the mapping result is the same as the target domain label (that is, the mapping result is 1), it is determined that the person suffers from epilepsy, otherwise he or she does not suffer from epilepsy.

[0048] Preferably, in step 5), overall migration refers to: using all parameters in the final disease diagnosis model obtained by training the arrhythmia source domain dataset and the myocardial infarction source domain dataset, and inputting the EEG signal data after denoising preprocessing in the target domain dataset in step 2.2 into the disease diagnosis model for testing.

[0049] Compared with the prior art, the present invention has the following beneficial effects:

[0050] The epilepsy disease identification method "TU" based on dual-source domain holistic transfer learning in the present application effectively shortens the training time, and while effectively shortening the training time, the epilepsy disease identification method "TU" based on dual-source domain holistic transfer learning also achieves very good results in F1-score, accuracy, precision rate and high detection authenticity. This also shows that whether from the perspective of resource utilization or from the perspective of obtaining results, the epilepsy disease identification method "TU" based on dual-source domain holistic transfer learning proposed in the present application has significant advantages in the application of epilepsy diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 It is the overall flow chart of the present invention;

[0052] Figure 2 This is a comparison of ECG signals before and after preprocessing in the myocardial infarction dataset;

[0053] Figure 3This is a comparison chart of EEG signals before and after preprocessing in the target domain dataset;

[0054] Figure 4 The disease diagnosis model diagram of the present invention;

[0055] Figure 5 The data processing results of each layer structure in the disease diagnosis model;

[0056] In the figure, F1-score, also known as F1-score, is a measurement indicator in classification problems, which is the harmonic mean of precision and recall; ACCU is accuracy, that is, the ratio of the number of correct classifications to the total number; Precision is precision, that is, the ratio of the number of correct classifications to the total amount of data retrieved; Recall is recall, which is the ratio of the number of correct classifications to the total amount that should be retrieved; AUC is the area under the ROC curve, which is a commonly used indicator in binary classification; TU is an epilepsy disease recognition method based on dual-source domain overall transfer learning; TFP is an epilepsy disease recognition method based on dual-source domain partial transfer learning; NT is a classification method that uses EEG signal data in the target domain dataset after denoising preprocessing to train the disease diagnosis model instead of using dual-source domain overall transfer learning; RF is a method for classifying EEG signal data in the target domain dataset after denoising preprocessing using a random forest classifier; KNN is a method for classifying EEG signal data in the target domain dataset after denoising preprocessing using a KNN classifier. DETAILED DESCRIPTION

[0057] In order to better understand the technical solution in the present invention, the technical solution in the present invention will be described below in conjunction with the accompanying drawings.

[0058] Explanation of terms in this invention:

[0059] Relu activation function: It is a commonly used activation function in neural networks. It does not have complex exponential operations, and the calculation is simple and the efficiency is improved. At the same time, it will make the output of some neurons 0, making the network sparse and alleviating the occurrence of overfitting problems.

[0060] Loss rate: The ratio of randomly discarded nodes to the total number of nodes. If there are 100 nodes in total and the loss rate is 0.1, then the number of randomly discarded nodes is 10.

[0061] Cross entropy: Mainly used to measure the difference information between two probability distributions. The more different the distributions of P and Q are, the greater the cross entropy of P relative to Q will be than the entropy of P.

[0062] The present invention demonstrates an epilepsy disease recognition method based on dual-source domain overall transfer learning. The overall flow chart is as follows: Figure 1 As shown, the specific steps include:

[0063] 1. Select the arrhythmia source domain dataset, myocardial infarction source domain dataset and target domain dataset:

[0064] The ECG signal data are obtained from the MIT-BIH database as the arrhythmia source domain dataset, the ECG signal data are selected from the PTB database as the myocardial infarction source domain dataset, and the EEG signal data are obtained from the database of the Epilepsy Research Center of the University of Bonn in Germany as the target domain dataset.

[0065] Among them, the MIT-BIH database includes ECG signal recording data of 47 different subjects, and these ECG signal recording data are labeled with "O" or "1", "0" means healthy and healthy, "1" means sick, and the sampling frequency is 360Hz; the PTB database includes ECG signal recording data of 290 subjects, and these ECG signal recording data are labeled with "O" or "1", "0" means healthy and healthy, "1" means sick. Among these 290 subjects, 148 were diagnosed with myocardial infarction, 52 were healthy controls, and the remaining 90 subjects suffered from other heart diseases. The PTB database The data signals in the target domain are recorded at a sampling frequency of 1000 Hz, with a total of 12 leads; the target domain dataset consists of 5 groups of data, which are marked as Group A to Group E, and Group A to Group E respectively represent: EEG signal data of healthy volunteers with eyes open in a relaxed state, EEG signal data of healthy volunteers with eyes closed in a relaxed state, EEG signal data of the hippocampal structure of epileptic patients during the intervals between disease attacks, EEG signal data of the epileptogenic area of ​​the brain of epileptic patients during the intervals between disease attacks, and EEG signal data of epileptic patients during disease attacks. These EEG signal recording data in the target domain dataset are all labeled with "O" or "1", "0" indicates a healthy person who is not sick, and "1" indicates a sick person.

[0066] 2. Perform denoising preprocessing on the data in the arrhythmia source domain dataset, myocardial infarction source domain dataset, and target domain dataset:

[0067] 2.1 The electromyographic interference, power frequency interference and baseline drift in the electrocardiogram signal data in the arrhythmia source domain data set are denoised by using Butterworth high-pass filter, Butterworth band-stop filter and median filter respectively; the electromyographic interference, power frequency interference and baseline drift in the myocardial infarction source domain data set are denoised by using Butterworth high-pass filter, Butterworth band-stop filter and median filter respectively.

[0068] Among them, the Butterworth high-pass filter is used to filter out the electromyographic interference existing in the electrocardiogram data of the arrhythmia source domain data set and the myocardial infarction source domain data set. The transfer function of the Butterworth high-pass filter is shown in formula (1.1):

[0069]

[0070] In formula (1.1), n∈N, and n≤10000, N is a non-negative integer set, D0 is a specified non-negative value, and D(u, v) is the distance from the center of the frequency rectangle to the center (origin) of the Fourier transform. The calculation formula of D(u, v) is shown in formula (1.2):

[0071] D(u,v)=[(uM / 2) 2 +(vN / 2) 2 ] 1 / 2 (1.2)

[0072] In formula (1.2), u and v are the center coordinate points of the frequency matrix, which are obtained by (u, v) = (M / 2, N / 2); where M×N is the dimension size of the central electrical signal data of the arrhythmia source domain data set and the myocardial infarction source domain data set;

[0073] The Butterworth band-stop filter is used to filter out the power frequency interference in the central electrical signal data in the arrhythmia source domain data set and the myocardial infarction source domain data set. The transfer function is shown in formula (1.3):

[0074]

[0075] In formula (1.3), n∈N, and n≤10000, N is a non-negative integer set, D0 is a specified non-negative value, D(u, v) is the distance from the center of the frequency rectangle to the Fourier transform center (origin), and W refers to the width of the frequency band.

[0076] The median filter is used to filter out the baseline drift noise in the ECG signal data in the arrhythmia source domain data set and the myocardial infarction source domain data set. The window length is m, where m = 490, and the transfer function is shown in formula (1.4):

[0077] y i =Med{X i-v , ..., X i , ..., X i+v} (1.4)

[0078] In formula (1.4), X i Represents the electrocardiogram signal data in the arrhythmia source domain dataset and the electrocardiogram signal data in the myocardial infarction source domain dataset;

[0079] 2.2 The eye movement interference, myoelectric interference, electrocardiographic interference and high-frequency noise interference in the EEG signal data in the target domain data set are removed by using the Butterworth high-pass filter and the 50Hz notch filter in turn. The transfer function of the Butterworth high-pass filter is shown in formulas (1.1) and (1.2), where M×N in formula (1.2) represents the dimension size of the EEG signal data in the target domain data set, and the transfer function h of the notch filter is:

[0080]

[0081] In formula (1.5), w0 is the center frequency of the notch filter, that is, the frequency that you want to notch, which is 50Hz here; w is the bandwidth of the notch filter, and s refers to the signal frequency of the input EEG signal.

[0082] 3. Arrange the ECG signal data in the arrhythmia source domain dataset and the myocardial infarction source domain dataset in descending order according to the correlation with the target domain dataset:

[0083] 3.1 Calculate the mutual information between each feature of the denoised preprocessed ECG signal in the arrhythmia source domain data set and the myocardial infarction source domain data set and each feature of the denoised preprocessed EEG signal in the target data set. Since the ECG signal and EEG signal used in this application are continuous, the mutual information in this application is calculated using formula (1.6):

[0084]

[0085] In formula (1.6), X s represents the characteristics of the ECG signal after denoising preprocessing in the source domain dataset, X t represents the characteristics of the EEG signal after denoising preprocessing in the target domain dataset, p(x s , x t ) is the current X s and X t The joint probability density function, p(x s ) and p(x t ) are X s and X t The marginal probability density function of .

[0086] 3.2 After calculating the mutual information, the mutual information is sorted in descending order, where the descending sequence Y is calculated using formula (1.7):

[0087] Y=sort(-(I(X s , X t )))(1.7)

[0088] 4. Build a disease diagnosis model and send the ECG signal data pre-processed with noise reduction in the arrhythmia source domain data set and myocardial infarction source domain data set to the model for training:

[0089] 4.1 Construction of disease diagnosis model: The disease diagnosis model in this application consists of an Input layer, three residual network blocks, two global convolutional layers (i.e., convolutional layer Cov1d_VII, convolutional layer Cov1d_VIII), a global maximum pooling layer, a global Dropout layer (i.e., Dropout layer IV), two Dense layers, and a Softmax classifier; wherein each residual network block is composed of two convolutional layers, a maximum pooling layer, and a Dropout layer; and the Input layer, the first convolutional layer Cov1d_Ⅰ of the first residual network block, the second convolutional layer Cov1d_Ⅱ in the first residual network block, the maximum pooling layer Maxpooling_Ⅰ in the first residual network block, the Dropout layer Ⅰ of the first residual network block, and the second residual network block. The first convolution layer Cov1d_Ⅲ of the difference network block, the second convolution layer Cov1d_Ⅳ of the second residual network block, the maximum pooling layer Maxpooling_Ⅱ of the second residual network block, the Dropout layer Ⅱ of the second residual network block, the first convolution layer Cov1d_Ⅴ of the third residual network block, the second convolution layer Cov1d_Ⅵ of the third residual network block, the maximum pooling layer Maxpooling_Ⅲ of the third residual network block, the Dropout layer Ⅲ of the third residual network block, the convolution layer Cov1d_Ⅶ, the convolution layer Cov1d_Ⅷ, the global maximum pooling layer, the Dropout layer Ⅳ, the first Dense layer, the second Dense layer and the Softmax classifier are connected in sequence, and the output of the previous layer is used as the input of the current layer;

[0090] In the disease diagnosis model described in the present application, the Input layer is used to input the descending sequence Y obtained in step 3.2 into the first convolutional layer Cov1d_Ⅰ in the first residual network block in the disease diagnosis model;

[0091] The first convolutional layer Cov1d_Ⅰ in the first residual network block is used to learn the local data features in the descending sequence Y. After learning the first convolutional layer Cov1d_Ⅰ in the first residual network block, the data dimension of the feature data changes from 178 to 174, and the number of channels changes from 1 to 16;

[0092] The second convolutional layer Cov1d_Ⅱ in the first residual network block is used to further learn the feature data output by the first convolutional layer Cov1d_Ⅰ in the first residual network block. After learning the second convolutional layer Cov1d_Ⅱ in the first residual network block, the data dimension of the feature data changes from 174 to 170, and the number of channels remains unchanged at 16;

[0093] The maximum pooling layer Maxpooling_Ⅰ in the first residual network block is used to rotate the feature data output by the second convolutional layer Cov1d_Ⅱ in the first residual network block, giving the feature data output by the second convolutional layer Cov1d_Ⅱ in the first residual network block rotation invariance. After learning the maximum pooling layer Maxpooling_Ⅰ, the data dimension of the feature data changes from 170 to 85, and the number of channels remains unchanged at 16;

[0094] The Dropout layer I of the first residual network block is used to randomly discard the network nodes of the first residual network block according to the loss rate to reduce the overfitting of the first residual network block. The feature data processed by the Dropout layer I has the same data dimension and number of channels as the feature data output by the maximum pooling layer Maxpooling_I.

[0095] The first convolutional layer Cov1d_Ⅲ of the second residual network block is used to perform local learning on the feature data output by the Dropout layer Ⅰ of the first residual network block. After learning, the data dimension of the feature data changes from 85 to 83, and the number of channels changes from 16 to 32.

[0096] The second convolutional layer Cov1d_Ⅳ of the second residual network block is used to learn the feature data output by the first convolutional layer Cov1d_Ⅲ of the second residual network block. After learning, the data dimension of the feature data changes from 83 to 81, and the number of channels remains unchanged at 32;

[0097] The maximum pooling layer Maxpooling_Ⅱ of the second residual network block is used to rotate the feature data output by the second convolutional layer Cov1d_Ⅳ in the second residual network block, giving the feature data output by the second convolutional layer Cov1d_Ⅳ rotation invariance. After the data processing of the maximum pooling layer Maxpooling_Ⅱ, the data dimension of the feature data changes from 81 to 40, and the number of channels remains unchanged at 32;

[0098] The Dropout layer II of the second residual network block is used to randomly discard the network nodes of the second residual network block according to the loss rate to reduce the overfitting of the second residual network block. The feature data processed by the Dropout layer II has the same data dimension and number of channels as the feature data of the maximum pooling layer Maxpooling_II.

[0099] The first convolutional layer Cov1d_V of the third residual network block is used to perform local learning on the feature data output by the Dropout layer II of the second residual network block. After learning, the data dimension of the feature data changes from 40 to 38, and the number of channels remains unchanged at 32.

[0100] The second convolutional layer Cov1d_VI of the third residual network block is used to learn the feature data output by the first convolutional layer Cov1d_V of the third residual network block. After learning, the data dimension of the feature data changes from 38 to 36, and the number of channels remains unchanged at 32;

[0101] The maximum pooling layer Maxpooling_Ⅲ of the third residual network block is used to rotate the feature data output by the second convolutional layer Cov1d_Ⅵ in the third residual network block, and endow the feature data output by the second convolutional layer Cov1d_Ⅵ with rotation invariance. After data processing by the maximum pooling layer Maxpooling_Ⅲ, the data dimension of the feature data changes from 36 to 18, and the number of channels remains unchanged at 32;

[0102] The Dropout layer III of the third residual network block is used to randomly discard the network nodes of the third residual network block according to the discard rate to reduce the overfitting of the third residual network block. The feature data processed by the Dropout layer III has the same data dimension and number of channels as the feature data output by the maximum pooling layer Maxpooling_III.

[0103] The global convolution layer Cov1d_VII is used to locally learn the feature data output by the Dropout layer III of the third residual network block. After learning, the data dimension of the feature data changes from 18 to 16, and the number of channels changes from 32 to 256;

[0104] The global convolution layer Cov1d_VIII is used to learn the feature data output by the convolution layer Cov1d_VII. After learning, the data dimension of the feature data changes from 16 to 14, and the number of channels remains unchanged at 256.

[0105] The global maximum pooling layer GlobalMaxPooling is used to flatten the feature data output by the convolutional layer Cov1d_Ⅷ into a vector with a dimension size of 256;

[0106] Dropout layer IV is used to randomly discard the network nodes of the entire disease diagnosis model according to the loss rate to reduce the overfitting of the disease diagnosis model after the three residual network blocks. The data dimension and number of channels of the feature data processed by Dropout layer IV are consistent with those of the feature data output by the global maximum pooling layer GlobalMaxPooling.

[0107] The first Dense layer uses the Relu activation function to retain the feature data of the vector output by the Dropout layer IV and map it to the second Dense layer. The Relu activation function is a known function, as shown in formula (1.8). The second Dense layer, the classification category parameter is set to 2, and the feature data is mapped to the Softmax classifier according to the two classification categories.

[0108]

[0109] In formula (1.8), x is the variable input to the Relu function and has universal significance.

[0110] The Softmax classifier is used to compare the mapping result with the target domain label and output the F1 score, accuracy, precision, recall and AUC indicators. If the mapping result is the same as the target domain label and both are 1, the person is judged to have epilepsy, otherwise he or she does not have epilepsy.

[0111] 4.2 Send the ECG signal data after noise reduction preprocessing in the arrhythmia source domain dataset and the myocardial infarction source domain dataset to the disease diagnosis model for training:

[0112] The descending sequence Y obtained in step 3.2 is input into the first convolutional layer Cov1d_Ⅰ in the first residual network block in the disease diagnosis model through the Input layer. Then, the first convolutional layer Cov1d_Ⅰ in the first residual network block learns the local data features in the descending sequence Y. After learning the first convolutional layer Cov1d_Ⅰ in the first residual network block, the data dimension of the feature data changes from 178 to 174, and the number of channels changes from 1 to 16; then, the second convolutional layer Cov1d_Ⅱ in the first residual network block further learns the feature data output by the first convolutional layer Cov1d_Ⅰ in the residual network block. After learning the second convolutional layer Cov1d_Ⅱ in the first residual network block, the data dimension of the feature data changes from 174 to 170, and the number of channels remains unchanged at 16; then, the maximum pooling layer Maxpooling_Ⅰ in the first residual network block performs a multiplication of the feature data output by the second convolutional layer Cov1d_Ⅰ in the first residual network block. _Ⅱ is rotated to give the feature data output by the second convolutional layer Cov1d_Ⅱ in the first residual network block rotation invariance. After learning by the maximum pooling layer Maxpooling_Ⅰ, the data dimension of the feature data changes from 170 to 85, and the number of channels remains unchanged at 16; then, the Dropout layer Ⅰ of the first residual network block randomly discards the network nodes in the first residual network block according to the set loss rate to reduce the overfitting of the first residual network block. Here, because the number of network layers of the first residual network block in the disease diagnosis model used in this application is small, it is not suitable to use a Dropout layer with a large loss rate. Therefore, the loss rate of the Dropout layer Ⅰ of the first residual network block of this application is set to 0.1. The feature data processed by the Dropout layer Ⅰ has the same data dimension and number of channels as the feature data output by the maximum pooling layer Maxpooling_Ⅰ.

[0113] Then, the first convolutional layer Cov1d_Ⅲ of the second residual network block performs local learning on the feature data output by the Dropout layer Ⅰ of the first residual network block. After learning, the data dimension changes from 85 to 83, and the number of channels changes from 16 to 32. Then, the second convolutional layer Cov1d_Ⅳ of the second residual network block performs learning on the feature data output by the first convolutional layer Cov1d_Ⅲ of the second residual network block. After learning, the data dimension changes from 83 to 81, and the number of channels remains unchanged at 32. Then, the maximum pooling layer Maxpooling_Ⅱ of the second residual network block rotates the feature data output by the second convolutional layer Cov1d_Ⅳ in the second residual network block, giving The feature data obtained after learning the second convolutional layer Cov1d_Ⅳ is rotationally invariant. After learning the maximum pooling layer Maxpooling_Ⅱ, the data dimension of the feature data changes from 81 to 40, and the number of channels remains unchanged at 32. Then, the Dropout layer Ⅱ of the second residual network block randomly discards the network nodes in the second residual network block according to the set loss rate to reduce the overfitting of the second residual network block. Here, the loss rate of the Dropout layer Ⅱ is the same as that of the first residual network block, which is also 0.1. The data dimension and number of channels of the feature data after processing by the Dropout layer Ⅱ are consistent with the feature data of the maximum pooling layer Maxpooling_Ⅱ.

[0114] Then, the first convolutional layer Cov1d_Ⅴ of the third residual network block performs local learning on the feature data output by the Dropout layer II of the second residual network block. After learning, the data dimension of the feature data changes from 40 to 38, and the number of channels remains unchanged at 32; then, the second convolutional layer Cov1d_Ⅵ of the third residual network block performs learning on the feature data output by the first convolutional layer Cov1d_Ⅴ of the third residual network block. After learning, the data dimension of the feature data changes from 38 to 36, and the number of channels remains unchanged at 32; then, the maximum pooling layer Maxpooling_Ⅲ of the third residual network block rotates the feature data output by the second convolutional layer Cov1d_Ⅵ in the third residual network block, giving The feature data output by the second convolutional layer Cov1d_VI is rotationally invariant. After learning by the maximum pooling layer Maxpooling_Ⅲ, the data dimension of the feature data changes from 36 to 18, and the number of channels remains unchanged at 32. Then, the Dropout layer III of the third residual network block randomly discards the network nodes in the third residual network block according to the set loss rate to reduce the overfitting of the third residual network block. Here, the loss rate of the Dropout layer III is the same as that of the first two residual network blocks, which is also 0.1. The feature data processed by the Dropout layer III has the same data dimension and number of channels as the feature data output by the maximum pooling layer Maxpooling_Ⅲ.

[0115] Then, the global convolution layer Cov1d_VII in the entire disease diagnosis model performs local learning on the feature data output by the Dropout layer III of the third residual network block. After learning, the data dimension changes from 18 to 16, and the number of channels changes from 32 to 256.

[0116] Then, the global convolution layer Cov1d_VIII in the entire disease diagnosis model learns the feature data output by the convolution layer Cov1d_VII, and the data dimension changes from 16 to 14, while the number of channels remains unchanged at 256.

[0117] Then, the global maximum pooling layer GlobalMaxPooling in the entire disease diagnosis model flattens the feature data output by the convolutional layer Cov1d_Ⅷ to obtain a vector with a dimension size of 256;

[0118] Then, the global Dropout layer IV in the entire disease diagnosis model randomly discards the network nodes in the entire disease diagnosis model according to the set loss rate. Here, the loss rate of the Dropout layer is set to 0.2, because its function is to reduce the overfitting of the entire disease diagnosis model. The number of network layers is more than the number of network layers of each residual network block, so the loss rate is set to 0.2 here. The feature data processed by the global Dropout layer IV has the same data dimension and number of channels as the feature data processed by the global maximum pooling layer GlobalMaxPooling.

[0119] Then, the first Dense layer in the entire disease diagnosis model uses the Relu activation function to retain the feature data of the vector output by the Dropout layer IV and map it to the second Dense layer. Then, the second Dense layer sets the classification category parameter to 2, and the second Dense layer maps the feature data to the Softmax classifier according to the two classification categories.

[0120] Then, the Softmax classifier compares the mapping result with the target domain label. When the mapping result is the same as the target domain label (i.e., the mapping result is 1), it is determined to be suffering from epilepsy, otherwise it is not suffering from epilepsy; at the same time, the Softmax classifier will also output the F1 score, accuracy, precision, recall and AUC index results. Among them, the F1 score, precision, recall and AUC index results can be directly output by the Softmax classifier and are prior art, and the accuracy rate is related to the final parameter selection of the disease diagnosis model in this application. Therefore, this application specifically introduces the way in which the Softmax classifier in this application obtains the accuracy rate. The way in which the Softmax classifier in this application obtains the accuracy rate is as follows: Use the Softmax classifier to minimize the cross entropy between the estimated classification probability and the true distribution to output the accuracy rate. The specific process is: the loss function L of the Softmax classifier calculates the vector data output by the second Dense layer to obtain the score of each category; then the Softmax classifier uses the sigmoid function to map the score to a probability value; finally, the probability of the correct classification, that is, the accuracy, is calculated using the loss function L of the Softmax classifier. Among them, the loss function L of the Softmax classifier is shown in formula (1.9), and the sigmoid function is shown in formula (1.10):

[0121] L = -log(f)(1.9)

[0122] In formula (1.9), It is called the softmax function, x represents the feature data output by the second Dense layer, x iis the i-th feature data output by the second Dense layer, and j is category 1 to category T.

[0123]

[0124] When the accuracy of the data input model after training is greater than the accuracy at the end of the last time, confirm to save the current threshold and data features. If the accuracy of the data input model after training is less than the accuracy at the end of the last time, continue model training.

[0125] In order to verify the performance of the disease diagnosis model obtained after training in step 4.2), before using the EEG signal data pre-processed with denoising in the target domain data set obtained after training in step 4.2) to train the disease diagnosis model, the present invention first trains the ECG signal data pre-processed with denoising in the arrhythmia source domain data set and the myocardial infarction source domain data set respectively. The results are shown in Table 1.

[0126] Table 1

[0127]

[0128] It can be seen from Table 1 that the disease diagnosis model obtained after training in this application has good performance. When the disease diagnosis model obtained after training in this application is used to train the arrhythmia source domain dataset and the myocardial infarction source domain dataset, it can achieve good results in terms of F1-score, precision, accuracy, recall rate and AUC. Specifically:

[0129] The F1-score of the disease diagnosis model trained with the arrhythmia source domain dataset is 96.7%, and the F1-score of the disease diagnosis model trained with the myocardial infarction source domain dataset is 96.2%; "ACCU" is the accuracy rate, the ACCU of the disease diagnosis model trained with the arrhythmia source domain dataset is 97.8%, and the ACCU of the disease diagnosis model trained with the myocardial infarction source domain dataset is 98.2%; "Precision" refers to the precision rate, the Precision of the disease diagnosis model trained with the arrhythmia source domain dataset is 96.3%, and the Precision of the disease diagnosis model trained with the myocardial infarction source domain dataset is 97.1%; "Recall" is the recall rate, the Recall of the disease diagnosis model trained with the arrhythmia source domain dataset is 97.2%, and the Recall of the disease diagnosis model trained with the myocardial infarction source domain dataset is 95.4%; AUC is the area under the ROC curve, the AUC of the disease diagnosis model trained with the arrhythmia source domain dataset is 98.4%, and the AUC of the disease diagnosis model trained with the myocardial infarction source domain dataset is 96.9%. Therefore, from the above results, it can be seen that the disease diagnosis model obtained after training in this application can achieve good disease diagnosis results and is suitable for diagnosing target domain data.

[0130] In the process of training the disease diagnosis model in this application, the dimensional changes of the feature data in the disease diagnosis model during data transmission are as follows: Figure 5 shown.

[0131] 5. Use the transfer learning method to apply the trained disease diagnosis model to the target domain dataset in the form of overall transfer, diagnose epilepsy, and output the F1 score, accuracy, precision, recall, and AUC indicator results, as described in Table 2;

[0132] Among them, overall transfer means: using all the parameters in the final model obtained by training the arrhythmia source domain dataset and the myocardial infarction source domain dataset, inputting the EEG signal data after denoising preprocessing in the target domain dataset in step 2.2) into the model for testing. This method is called an epilepsy disease recognition method based on dual-source domain overall transfer learning. The different evaluation indicators obtained by this method are shown in Table 2.

[0133] In order to verify that the overall migration of the present application is more effective than the partial migration, the present application also specifically adopts the partial migration mode to test the EEG signal data after noise reduction preprocessing in the target domain data set in step 2.2), and the different evaluation indicators obtained by the test are shown in Table 2; wherein, the above-mentioned partial migration refers to: freezing some network layers, specifically freezing the parameters of the three residual network blocks in the final model trained with the arrhythmia source domain data set and the myocardial infarction source domain data set, and only training the 6-layer structure after the residual network block except the softmax classifier, and then outputting the result through the softmax classifier, and the training method of the 6-layer structure after the residual network block except the softmax classifier is the same as the model training method in step 4.2. In order to compare the effects that the epilepsy disease recognition method based on dual-source domain overall transfer learning shown in this application can achieve with other existing basic classification methods in terms of different evaluation indicators, this application specifically uses methods such as "TU", "TFP", "NT", "RF" and "KNN" to test the target domain dataset. The test results are shown in Table 2, where: 1) the epilepsy disease recognition method based on dual-source domain overall transfer learning is recorded as "TU"; 2) the epilepsy disease recognition method based on dual-source domain partial transfer learning is recorded as "TFP"; 3) the method of using the EEG signal data of the target domain dataset after denoising preprocessing to train the disease diagnosis model instead of using dual-source domain overall transfer learning is abbreviated as "NT"; 4) the method of using a random forest classifier to classify the EEG signal data of the target domain dataset after denoising preprocessing, which is abbreviated as "RF"; 5) the method of using a KNN classifier to classify the EEG signal data of the target domain dataset after denoising preprocessing, which is recorded as "KNN".

[0134] Table 2

[0135]

[0136] From Table 2, we can see that the F1 score is the harmonic mean of the precision and recall. The F1 score takes into account both the precision and recall of the disease diagnosis model. When the number of data labels "0" and "1" in the study is very different, the quality of the model cannot be evaluated simply by using the precision or recall rate. The F1 score can solve this problem. The maximum value of the F1 score is 100%, and the minimum value is 0. The larger the value, the better the model. From the perspective of the F1 score, the epilepsy disease recognition method TU based on dual-source domain overall transfer learning has the best result, reaching 97.4%, which is 0.4% higher than the best other methods;

[0137] "ACCU" is the accuracy rate, which is the ratio of the number of correctly classified to the total number. The larger the value, the stronger the ability of the model to classify correctly. In terms of accuracy, the accuracy of the epilepsy disease recognition method TU based on dual-source domain overall transfer learning in this application is the highest, reaching 98.4%, followed by the RF algorithm and the third is the TFP method.

[0138] "Precision" refers to the precision rate, that is, the ratio of the number of correct classifications to the total amount of input data for classification. The larger the value, the better the model. From the perspective of precision rate, the precision rates of training methods other than TFP are not much different. The epilepsy disease recognition method TU based on dual-source domain overall transfer learning in this application is only 0.1% higher than the KNN classifier. This shows that for the EEG signals in the target domain data set, whether it is the basic classifier or the classification using transfer learning, there is not much difference in precision rate.

[0139] "Recall" is the recall rate, which refers to the probability that a number that is actually "1" is also classified as "1". The higher the value, the lower the misdiagnosis rate. As can be seen from Table 2, the RF method has the highest value, followed by NT, and then the epilepsy disease recognition method TU based on dual-source domain overall transfer learning;

[0140] AUC is the area under the ROC curve and is a commonly used indicator in binary classification. The closer it is to 100%, the higher the authenticity of the detection method. As can be seen from Table 2, the AUC of the epilepsy disease recognition method TU based on dual-source domain overall transfer learning in the present application is 97.0%, which also shows that the epilepsy disease recognition method TU based on dual-source domain overall transfer learning in the present application has high detection authenticity.

[0141] In addition, in order to demonstrate the training efficiency of the invention, the present application also compares the training time of the “TU”, “TFP”, “NT”, “RF” and “KNN” methods, as shown in Table 3.

[0142] Table 3

[0143]

[0144] It can be seen from Table 3 that the training time of the "NT" method is 244.3s, the training time of the "RF" method is 436.3s, and the training time of the "KNN" method is 138.4s, while the training time of the dual-source domain overall transfer method "TU" in the present application is 90.1s. Obviously, the training time of the non-transfer learning method is 2-5 times longer than the training time of the epilepsy disease recognition method "TU" based on dual-source domain overall transfer learning in the present application. In other words, the epilepsy disease recognition method "TU" based on dual-source domain overall transfer learning in the present application effectively shortens the training time, and while effectively shortening the training time, the epilepsy disease recognition method "TU" based on dual-source domain overall transfer learning also achieves very good results in F1-score, accuracy, precision rate and high detection authenticity. This also shows that whether from the perspective of resource utilization or from the perspective of obtaining results, the epilepsy disease recognition method "TU" based on dual-source domain overall transfer learning proposed in the present application has significant advantages in the application of epilepsy diagnosis.

[0145] Secondly, this application also compares the results of the epilepsy disease recognition method "TU" based on dual-source domain overall transfer learning with other research methods in the prior art in testing the target domain dataset, as shown in Table 4, where the datasets used in the comparative experiments are all target domain datasets:

[0146] The deep convolutional neural network learning method disclosed in the paper "Deep convolutional neural network for the automated detection and diagnosis of seizure using EEG signals" (Acharya UR, OhS L, Hagiwara Y, et al., Computers in biology and medicine), 2018 (hereinafter referred to as method A) was used to test the target domain data set of this application. As shown in Table 4, the accuracy of the method A was 88.7%.

[0147] The target domain dataset of this application was tested using the wavelet scalogram and AlexNet model migration method (referred to as the R method) disclosed in the paper "Detection of Epileptic Seizures from Wavelet Scalogram of EEG Signal Using Transfer Learning with AlexNet Convolutional Neural Network" (Roy AD, Islam MM, 2020 23rd International Conference on Computer and Information Technology (ICCIT)). IEEE, 2020.

[0148] Table 4

[0149]

[0150] *Transfer leaming means transfer learning, Non-transfer leaming means non-transfer learning

[0151] It can be seen from Table 4 that the accuracy obtained by the A method test is 88.7%, and the accuracy obtained by the R method test is 97.5%; obviously, for the same target domain data set, the epilepsy disease recognition method "TU" based on dual-source domain overall transfer learning in this application achieved an accuracy of 98.4%, which is significantly higher than the A method, R method, TFP method, NT method, RF method, and KN method. Therefore, the epilepsy disease recognition method based on dual-source domain overall transfer learning in this application is very suitable for epilepsy diagnosis.

[0152] Finally, in order to verify that the epilepsy disease recognition method based on dual-source domain overall transfer learning proposed in the present invention has significant advantages over the epilepsy disease recognition method based on dual-source domain partial transfer learning, the single-source domain overall transfer learning method, and the single-source domain partial transfer learning method, the present application also compares the results of the overall transfer learning method and the partial transfer learning method of the single-source domain and the dual-source domain, as shown in Table 5;

[0153] Table 5

[0154]

[0155] In Table 5, the symbols are explained as follows: the target domain dataset performs full migration of the disease diagnosis model trained with the central electrical signal data of the myocardial infarction source domain dataset, which is denoted as "P-TU"; the target domain dataset performs partial migration of the disease diagnosis model trained with the central electrical signal data of all myocardial infarction source domain datasets, which is denoted as "P-TFP", where the definition of partial migration in P-TFP is consistent with the definition of partial migration in the previous article; the target dataset performs overall migration of the disease diagnosis model trained with the central electrical signal data of all arrhythmia source domain datasets, which is denoted as "M-TU"; the target dataset performs partial migration of the disease diagnosis model trained with the central electrical signal data of all arrhythmia source domain datasets, which is denoted as "M-TFP", where the definition of partial migration in M-TFP is consistent with the definition of partial migration in the previous article.

[0156] From Table 5, it can be seen that: through comparison, it is found that the accuracy test results of the overall transfer method and partial transfer method of the dual-source domain are generally higher than those of the overall transfer method and partial transfer method of the single-source domain, especially the epilepsy disease recognition method TU based on the overall transfer learning of the dual-source domain, compared with the epilepsy disease recognition method based on the partial transfer learning of the dual-source domain, the overall transfer learning method of the single-source domain and the partial transfer learning method of the single-source domain, the accuracy of the epilepsy disease recognition method TU based on the overall transfer learning of the dual-source domain is 2% to 12% higher on average. From this gap, it can be seen that the overall transfer method of the dual-source domain proposed in the present invention is more effective.

Claims

1. A method for epilepsy disease recognition based on dual-source domain holistic transfer learning, characterized by: The following steps are involved: 1) selecting an arrhythmia source domain dataset, a myocardial infarction source domain dataset and a target domain dataset; 2) performing denoising preprocessing on the data in the arrhythmia source domain dataset, the myocardial infarction source domain dataset and the target domain dataset; 3) Arrange the ECG signal data in the arrhythmia source domain data set and the myocardial infarction source domain data set in descending order according to the correlation with the target domain data set; 4) Build a disease diagnosis model, and send the ECG signal data in the arrhythmia source domain data set and the myocardial infarction source domain data set that have been pre-processed by noise reduction into the model for training; 5) Apply the trained disease diagnosis model to the target domain dataset after noise reduction preprocessing in the form of overall migration to diagnose epilepsy; Among them, the specific steps of step 4) are: 4.1) constructing a disease diagnosis model, which is composed of a sequentially connected Input layer, a first convolutional layer of the first residual network block, a second convolutional layer in the first residual network block, a maximum pooling layer in the first residual network block, a Dropout layer of the first residual network block, a first convolutional layer of the second residual network block, a second convolutional layer of the second residual network block, a maximum pooling layer of the second residual network block, a Dropout layer of the second residual network block, a first convolutional layer of the third residual network block, a second convolutional layer of the third residual network block, a maximum pooling layer of the third residual network block, a Dropout layer of the third residual network block, a first global convolutional layer, a second global convolutional layer, a global maximum pooling layer, a global Dropout layer, a first Dense layer, a second Dense layer and a Softmax classifier, and the output of the previous layer is used as the input of the current layer; 4.2) The ECG signal data that has been pre-processed with noise reduction in the arrhythmia source domain dataset and the myocardial infarction source domain dataset is sent to the disease diagnosis model for training.

2. The epilepsy disease identification method based on dual-source domain holistic transfer learning according to claim 1 is characterized in that: The ECG signal data are obtained from the MIT-BIH database as the arrhythmia source domain dataset, the ECG signal data are selected from the PTB database as the myocardial infarction source domain dataset, and the EEG signal data are obtained from the database of the Epilepsy Research Center of the University of Bonn in Germany as the target domain dataset.

3. The epilepsy disease identification method based on dual-source domain holistic transfer learning according to claim 1 is characterized in that: The specific steps of step 2) are: 2.1) Using Butterworth high-pass filter, Butterworth band-stop filter and median filter in turn to remove noise from myoelectric interference, power frequency interference and baseline drift in the ECG signal data in the arrhythmia source domain data set; using Butterworth high-pass filter, Butterworth band-stop filter and median filter in turn to remove noise from myoelectric interference, power frequency interference and baseline drift in the data of myocardial infarction source domain data set; 2.2) Use Butterworth high-pass filter and 50Hz notch filter in turn to remove eye movement interference, myoelectric interference, electrocardiographic interference and high-frequency noise interference in the EEG signal data in the target domain dataset.

4. The epilepsy disease identification method based on dual-source domain holistic transfer learning according to claim 3 is characterized by: In step 2.1), the Butterworth high-pass filter is used to filter out the myoelectric interference existing in the electrocardiogram data of the arrhythmia source domain data set and the myocardial infarction source domain data set. The transfer function of the Butterworth high-pass filter is shown in formula (1.1): In formula (1.1), n∈N, and n≤10000, N is a non-negative integer set, D0 is a specified non-negative value, and D(u, v) is the distance from the center of the frequency rectangle to the center of the Fourier transform; where the calculation formula of D(u, v) is shown in formula (1.2): D(u,v)=|(u-M / 2) 2 +(v-N / 2) 2 ] 1 / 2 (1.2) In formula (1.2), u and v are the center coordinate points of the frequency matrix, which are obtained by (u, v) = (M / 2, N / 2); where M×N is the dimension size of the central electrical signal data of the arrhythmia source domain data set and the myocardial infarction source domain data set; The Butterworth band-stop filter is used to filter out the power frequency interference in the central electrical signal data in the arrhythmia source domain data set and the myocardial infarction source domain data set. The transfer function is shown in formula (1.3): In formula (1.3), n∈N, and n≤10000, N is a non-negative integer set, D0 is a specified non-negative value, D(u, v) is the distance from the center of the frequency rectangle to the center of the Fourier transform, and W refers to the width of the frequency band; The median filter is used to filter out the baseline drift noise in the ECG signal data in the arrhythmia source domain data set and the myocardial infarction source domain data set. The window length is m, where m = 490, and the transfer function is shown in formula (1.4): y i =Med{X i-v ,……,X i ,……,X i+v } (1.4) In formula (1.4), X i Represents the ECG signal data in the arrhythmia source domain dataset and the myocardial infarction source domain dataset; i∈N, 5. The epilepsy disease identification method based on dual-source domain holistic transfer learning according to claim 3 is characterized by: In step 2.2), the transfer function of the Butterworth high-pass filter is shown in formulas (1.1) and (1.2), where M×N in formula (1.2) represents the dimension of the EEG signal data in the target domain data set, and the transfer function h of the notch filter is: In formula (1.5), w0 is the center frequency of the notch filter, that is, the frequency that you want to notch, which is 50Hz here; w is the bandwidth of the notch filter, and s refers to the signal frequency of the input EEG signal.

6. The epilepsy disease identification method based on dual-source domain holistic transfer learning according to claim 1 is characterized in that: The specific steps of step 3) are: 3.1) respectively calculating the mutual information between each feature of the denoised preprocessed ECG signal in the arrhythmia source domain dataset and the myocardial infarction source domain dataset and each feature of the denoised preprocessed EEG signal in the target dataset; 3.2) After calculating the mutual information, sort the mutual information in descending order.

7. The epilepsy disease identification method based on dual-source domain holistic transfer learning according to claim 6 is characterized by: In step 3.1), the mutual information is calculated using formula (1.6): In formula (1.6), X s represents the characteristics of the ECG signal after denoising preprocessing in the source domain dataset, X t represents the characteristics of the EEG signal after denoising preprocessing in the target domain dataset, p(x s , x t ) is the current X s and X t The joint probability density function, p(x s ) and p(x t ) are X s and X t The marginal probability density function of .

8. The epilepsy disease identification method based on dual-source domain holistic transfer learning according to claim 6 is characterized by: In step 3.2), the descending sequence Y is calculated by formula (1.7): Y=sort(-(I(X s ,X t ))) (1.7)。 9. The epilepsy disease identification method based on dual-source domain holistic transfer learning according to claim 1 is characterized by: The specific steps of step 4.2) are: input the descending sequence Y obtained in step 3.2 into the first convolution layer in the first residual network block in the disease diagnosis model through the Input layer, and then the convolution layer learns the local data features in the descending sequence Y; then, the second convolution layer in the first residual network block learns the feature data output by the first convolution layer in the first residual network block; then, the maximum pooling layer in the first residual network block rotates the feature data output by the second convolution layer in the first residual network block; then, the Dropout layer of the first residual network block randomly discards the network nodes in the first residual network block according to the set loss rate to reduce the overfitting of the first residual network block; Then, the first convolutional layer of the second residual network block locally learns the feature data output by the Dropout layer of the first residual network block; then, the second convolutional layer of the second residual network block learns the feature data output by the first convolutional layer of the second residual network block; then, the maximum pooling layer of the second residual network block rotates the feature data output by the second convolutional layer in the second residual network block; then, the Dropout layer of the second residual network block randomly discards the network nodes in the second residual network block according to the set loss rate to reduce the overfitting of the second residual network block; then, the first convolutional layer of the third residual network block learns the feature data output by the Dropout layer of the second residual network block. Then, the second convolution layer of the third residual network block learns the feature data output by the first convolution layer of the third residual network block; Then, the maximum pooling layer of the third residual network block rotates the feature data output by the second convolution layer in the third residual network block; Then, the Dropout layer of the third residual network block randomly discards the network nodes in the third residual network block according to the set loss rate; Then, the first global convolution layer in the entire disease diagnosis model learns locally the feature data output by the Dropout layer of the third residual network block; Then, the second global convolution layer learns the feature data output by the first global convolution layer; Then, the global maximum pooling layer The feature data output by the second global convolutional layer is flattened to obtain a vector; then, the global Dropout layer IV randomly discards the network nodes in the entire disease diagnosis model according to the set loss rate to reduce the overfitting of the entire disease diagnosis model; then, the first Dense layer uses the Relu activation function to retain the feature data of the vector output by the Dropout layer IV and map it to the second Dense layer; then, the second Dense layer maps the feature data to the Softmax classifier according to two classification categories; then, the Softmax classifier compares the mapping result with the target domain label. When the mapping result is the same as the target domain label, it is determined to be suffering from epilepsy, otherwise it is not suffering from epilepsy.

10. The epilepsy disease identification method based on dual-source domain overall transfer learning according to claim 3 is characterized by: In step 5), overall migration means: using all parameters in the final disease diagnosis model obtained by training the arrhythmia source domain dataset and the myocardial infarction source domain dataset, and inputting the EEG signal data after denoising preprocessing in the target domain dataset in step 2.2) into the disease diagnosis model for testing.