Disease recognition model training method, disease recognition method and device

By constructing a three-dimensional standardized mutual information matrix and training a deep learning model based on an attention mechanism, the problem of insufficient accuracy in disease identification in existing technologies has been solved, and more refined temporal feature capture and improved accuracy in disease identification information extraction have been achieved.

CN121765373APending Publication Date: 2026-03-31MEGAROBO TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-28
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing disease identification methods based on EEG signals are insufficient in terms of accuracy, making it difficult to capture network mutation patterns between key brain regions during disease onset, thus affecting the accuracy of information extraction.

Method used

By acquiring multiple labeled EEG signals, a three-dimensional standardized mutual information matrix is ​​constructed as a training sample, and a deep learning model based on the attention mechanism is used for training. In particular, a dual-channel neural network model is adopted, which combines the Patch Embedding layer and the Channel Attention layer to perform feature extraction and weighted reconstruction, thereby improving the temporal modeling capability.

Benefits of technology

It improves the accuracy of disease identification information extraction, adapts to the changing patterns of functional connectivity between different channels, has cross-individual adaptability and physiological interpretability, and can accurately capture the network mutation patterns of key brain regions during disease onset.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121765373A_ABST
    Figure CN121765373A_ABST
Patent Text Reader

Abstract

The invention provides a training method of a disease recognition model and a disease recognition method and device, and belongs to the field of artificial intelligence, and the method comprises the steps: obtaining a plurality of first electroencephalogram signals with labels; each first electroencephalogram signal comprises electroencephalogram signals of multiple channels under the same time sequence and multiple frames of second electroencephalogram signals divided according to a preset sliding window in the time sequence direction; taking the three-dimensional standardized mutual information matrix corresponding to each first electroencephalogram signal as a training sample; wherein the three-dimensional standardized mutual information matrix corresponding to the first electroencephalogram signal is obtained by combining two-dimensional standardized mutual information matrixes corresponding to multiple frames of second electroencephalogram signals; and training a deep learning model based on the attention mechanism by using the training sample to obtain a disease recognition model. According to the method, the time dependence relationship of the electroencephalogram signals and the connection relationship of the electroencephalogram signals among different channels can be effectively captured, and the extraction accuracy of information for disease recognition is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of artificial intelligence technology, and more specifically, relates to a training method for a disease recognition model, a disease recognition method, and an apparatus. Background Technology

[0002] Electroencephalography (EEG), as a non-invasive, high-temporal-resolution method for recording neural activity, is widely used in disease identification, such as epileptic seizure detection. Current EEG-based disease identification methods involve extracting time-domain or frequency-domain features from EEG signals using techniques such as filtering, wavelet transform, power spectral analysis, and entropy calculation. A disease identification model is then trained based on a traditional deep learning model, and this model is used for disease identification. While this approach improves the automation level of disease identification to some extent, its accuracy still needs improvement; that is, the accuracy of extracting information for disease identification needs further enhancement. Summary of the Invention

[0003] The purpose of this application is to provide a training method for a disease identification model, a disease identification method, and an apparatus to improve the accuracy of information extraction for disease identification.

[0004] A first aspect of this application provides a method for training a disease recognition model, comprising: Acquire multiple labeled first EEG signals; each first EEG signal includes EEG signals from multiple channels in the same time sequence and multiple frames of second EEG signals divided in the time sequence direction according to a preset sliding window; The three-dimensional normalized mutual information matrix corresponding to each first EEG signal is used as a training sample; wherein the three-dimensional normalized mutual information matrix corresponding to the first EEG signal is obtained by combining the two-dimensional normalized mutual information matrices corresponding to each of the multiple frames of second EEG signals. A disease identification model is obtained by training a deep learning model based on an attention mechanism using training samples.

[0005] A second aspect of this application provides a disease identification method, including: Acquire the EEG signal to be identified; The disease recognition model trained using the training method of the disease recognition model based on any embodiment of this application identifies the EEG signal to be identified and obtains the disease recognition result.

[0006] A third aspect of this application provides a training apparatus for a disease recognition model, comprising: The first acquisition module is used to acquire multiple labeled first EEG signals; each first EEG signal includes multiple channels of EEG signals in the same time sequence and multiple frames of second EEG signals divided in the time sequence direction according to a preset sliding window. The sample determination module is used to use the three-dimensional normalized mutual information matrix corresponding to each first EEG signal as a training sample; wherein the three-dimensional normalized mutual information matrix corresponding to the first EEG signal is obtained by combining the two-dimensional normalized mutual information matrices corresponding to each of the multiple frames of second EEG signals. The model training module is used to train an attention-based deep learning model using training samples to obtain a disease recognition model.

[0007] A fourth aspect of this application provides a disease identification device, comprising: The second acquisition module is used to acquire the EEG signal to be identified; The disease identification module is used to identify the EEG signal to be identified by a disease identification model trained using the training method of the disease identification model based on any embodiment of the present application, and to obtain the disease identification result.

[0008] A fifth aspect of this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps of a training method for a disease recognition model according to any embodiment of this application, or the steps of a disease recognition method according to any embodiment of this application.

[0009] A sixth aspect of the present application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of a training method for a disease identification model according to any embodiment of the present application, or the steps of a disease identification method according to any embodiment of the present application.

[0010] A seventh aspect of this application provides a computer program product, including a computer program or computer-executable instructions, wherein the computer program or computer-executable instructions, when executed by a processor, implement the steps of a training method for a disease identification model according to any embodiment of this application, or the steps of a disease identification method according to any embodiment of this application.

[0011] The training method, disease identification method, and apparatus for the disease identification model provided in this application have at least the following effects: First, since the training samples used in the disease identification model training of this application embodiment are standardized mutual information matrices constructed based on standardized mutual information between EEG signals of different channels, the disease identification model trained in this application embodiment can adapt well to the changing patterns of functional connectivity between different channels of EEG signals, and has cross-individual adaptability and physiological interpretability, making it more suitable for real-world scenarios.

[0012] Secondly, the deep learning model based on the attention mechanism in this application embodiment can not only effectively utilize the three-dimensional standardized mutual information matrix to learn the functional connectivity between different channels of EEG signals, but also learn more deeply the correlation between each frame of the second EEG signal in each first EEG signal based on its own temporal modeling capability, thereby capturing more refined temporal features and having a more powerful temporal modeling capability. In turn, it can capture the network mutation patterns of key brain regions during the onset of disease, effectively improving the accuracy of information extraction for disease identification. Attached Figure Description

[0013] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0014] Figure 1 A flowchart illustrating a training method for a disease identification model provided in an embodiment of this application; Figure 2 This is a structural diagram of a dual-channel neural network model provided in an embodiment of this application; Figure 3 This is a structural diagram of the Patch Embedding layer provided in an embodiment of this application; Figure 4 This is a structural diagram of the Channel Attention layer provided in an embodiment of this application; Figure 5 A schematic flowchart illustrating a disease identification method provided in an embodiment of this application; Figure 6 A structural block diagram of a training device for a disease recognition model provided in an embodiment of this application; Figure 7 This is a structural block diagram of a disease identification device provided in an embodiment of this application; Figure 8 This is a schematic block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0015] To enable those skilled in the art to better understand the technical solutions in the embodiments of this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art should fall within the protection scope of the embodiments of this application.

[0016] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Where there is no conflict between the embodiments, the following embodiments and features can be combined with each other. The steps in the following method embodiments are for illustrative purposes only and are not intended to limit the invention.

[0017] In the field of artificial intelligence, the emergence of various deep learning models has improved the automation level of disease identification to some extent, but significant shortcomings remain. They lack characterization of the functional connectivity between different channels of electroencephalogram (EEG) signals, making it difficult to capture network mutation patterns between key brain regions during disease onset, thus affecting the accuracy of information extraction for disease identification and consequently impacting the accuracy of disease identification itself. To at least partially address these issues, embodiments of this application provide a method for training a disease identification model. The trained model can be used to process user EEG signals to obtain one or more intermediate processing results, which can be used as reference information for physicians. Please refer to... Figure 1 , Figure 1 This is a flowchart illustrating a training method for a disease recognition model provided in an embodiment of this application. The method may include steps S101 to S103: Step S101: Acquire multiple labeled first EEG signals, each of which includes multiple channels of EEG signals in the same time sequence and multiple frames of second EEG signals divided in the time sequence direction according to a preset sliding window.

[0018] In this embodiment, the EEG signal includes multiple signal channels and the EEG signal lasts for a period of time. During the duration of the signal, it is divided into multiple time sequences (time periods). Each time sequence corresponds to a first EEG signal. Each first EEG signal includes EEG signals from multiple channels under the same time sequence. That is, the signal start and end times of the EEG signals of each channel belonging to the same first EEG signal are the same.

[0019] In this embodiment, the EEG signals from multiple channels are EEG signals from different brain regions acquired using EEG leads. Each channel's EEG signal corresponds to a specific brain region. Each channel's EEG signal contains multiple pieces of information, such as: signal start and end times, the number of disease episodes in the current channel's EEG signal, and the start and end times of each disease episode in the current channel's EEG signal.

[0020] In this embodiment, each tagged first EEG signal contains multiple frames of second EEG signals. These frames are obtained by dividing each first EEG signal along a preset sliding window in the temporal direction. Since the division is performed on the first EEG signal in the temporal direction, each frame of second EEG signal has the same number of channels as the first EEG signal, and each frame of second EEG signal also contains EEG signals from multiple channels within the same temporal sequence.

[0021] In one embodiment, step S101 may further include acquiring raw EEG signals from a public dataset, and performing one or more of the following preprocessing operations on the raw EEG signals to obtain multiple labeled first EEG signals: 1) The raw EEG signals are filtered based on the number of channels, discarding those that do not meet the required number of channels. For example, to ensure the general applicability of the trained disease recognition model, only raw EEG signals containing a predetermined number of channels are retained, such as those with 22 channels.

[0022] 2) Construct a label data matrix with the same dimensions as the original EEG signal data. This label data matrix is ​​used to store the labels of each data point in each channel of the original EEG signal.

[0023] 3) Perform bandpass filtering on all channels of the original EEG signal; for example, a passband bandwidth of 1-45Hz can be used to perform bandpass filtering on all channels of the original EEG signal.

[0024] 4) Perform Z-score normalization calculation on all channels of the original EEG signal.

[0025] The preprocessed raw EEG signal is segmented according to a predetermined time window to obtain segmented EEG signals. For example, the predetermined time window can be 5 seconds. In this embodiment, the segmented EEG signal is called the first EEG signal. It can be seen that the first EEG signal is obtained by segmenting the raw EEG signal according to the predetermined time window. Each first EEG signal contains multiple channels of EEG signals.

[0026] In one embodiment, the following operations may also be performed for each first EEG signal: Each first EEG signal is divided into multiple frames of second EEG signals by using a preset sliding window in the temporal direction. For example, for the first EEG signal with a 5-second time window at a sampling rate of 256Hz, a time window of 192 sampling points can be used as the preset sliding window, and a step size of 64 sampling points can be used as the sliding step size of the preset sliding window. The 1280 sampling points in the first EEG signal are divided into 18 segments, each containing a temporal sequence matrix of 192 sampling points. Each segment of the temporal sequence matrix is ​​one frame of the second EEG signal.

[0027] Each first EEG signal obtained in this embodiment includes EEG signals from multiple channels in the same time sequence, and each first EEG signal includes multiple frames of second EEG signals. This embodiment ensures the refinement of subsequent feature construction by dividing the first EEG signals.

[0028] In this embodiment, the label of the first EEG signal can be a symptom label or a symptom-free label. Of course, in practical applications, corresponding labels can be set according to actual needs. For example, in practical applications, it can include: symptom-free, suspected symptom, no symptom; it can also include first symptom, second symptom, and third symptom.

[0029] The training method for the disease recognition model provided in this application embodiment may further include the step of determining a label for each first EEG signal. In one embodiment, the method for determining the label corresponding to each first EEG signal includes: S1011. For each first EEG signal, determine the label corresponding to each of the multiple channels of EEG signals in the first EEG signal.

[0030] In one embodiment, a method for determining the labels corresponding to each of the multiple channels of the first EEG signal includes: Sub-labels are determined for each data point of the EEG signal in each channel; based on the proportion of the number of data points of each sub-label in the EEG signal of each channel to the total number of data points in the EEG signal of that channel, the label corresponding to each EEG signal in the channel is determined.

[0031] As mentioned above, when preprocessing the raw EEG signal, a label data matrix with the same data dimension as the raw EEG signal can be constructed. This label data matrix is ​​used to store the labels of each data point in each channel of the raw EEG signal. Therefore, each data point of each channel of the first EEG signal has a corresponding sub-label. The sub-label includes a symptom label and a no-symptom label. The symptom label can include symptom, suspected symptom, and symptom type, while the no-symptom label can include no symptom.

[0032] In one embodiment, the label corresponding to each channel EEG signal is determined based on the proportion of the number of data points of each sub-label in the total number of data points of the channel EEG signal. This can include: If the proportion of data points of a certain type of sub-label in the total number of data points of the EEG signal in a certain channel is greater than a predetermined proportion, then that type of sub-label is determined as the label of the EEG signal in that channel. For example, the predetermined proportion can be 60%. In other embodiments, the predetermined proportion can be other values.

[0033] S1012. Determine the label corresponding to each first EEG signal based on the labels corresponding to the multiple channels of EEG signals in each first EEG signal and the preset rules.

[0034] In one embodiment, the preset rule includes: if at least one channel of the first EEG signal has a label indicating a symptom, then the label corresponding to the first EEG signal is determined to be a symptom-related label; otherwise, the label corresponding to the first EEG signal is determined to be a symptom-free label. According to this rule, the label corresponding to each first EEG signal can be determined.

[0035] It is understandable that the second EEG signal is obtained by dividing the first EEG signal into segments according to a preset sliding window in the temporal direction. Therefore, the labels of the multiple frames of second EEG signals contained in the first EEG signal are consistent with the labels of the first EEG signal.

[0036] In one embodiment, the first EEG signal may be subjected to data equalization processing, and step S101 of acquiring multiple labeled first EEG signals further includes: S1013. Select an existing first EEG signal labeled as the target label. The target label refers to the label of an imbalanced training sample.

[0037] The steps for determining the target label may include: selecting the labels corresponding to the first EEG signals that are fewer than a set threshold number among the first EEG signals corresponding to different labels as the target labels. For example, considering that the duration of some diseases is short, much shorter than the non-onset time, the number of disease samples will be relatively small. In this case, the target label can be a label indicating the presence of the disease.

[0038] S1014. Perform data augmentation processing on the selected first EEG signal to obtain the augmented first EEG signal. If the previously determined target label is a disease label, then the number of samples with disease labels will be augmented in this step.

[0039] In one embodiment, the SMOTE method can be used to perform data augmentation processing on the selected first EEG signal to obtain the augmented first EEG signal.

[0040] S1015. Acquire the existing first EEG signal and the expanded first EEG signal.

[0041] This embodiment can solve the problem of class imbalance by processing data balancing, avoiding the problem that the disease identification model learns too much from training samples of some labels and ignores training samples of other equally important labels, thereby improving the generalization ability of the disease identification model.

[0042] Step S102: Use the three-dimensional normalized mutual information matrix corresponding to each first EEG signal as a training sample, wherein the three-dimensional normalized mutual information matrix corresponding to the first EEG signal is obtained by combining the two-dimensional normalized mutual information matrices corresponding to multiple frames of second EEG signals. Normalization refers to the fact that the values ​​within the matrix have been pre-normalized and restricted to a certain range.

[0043] The training method for the disease recognition model provided in this application embodiment may further include: S1021. Calculate the standardized mutual information of the EEG signals between each pair of channels in the second EEG signal of each frame to obtain the two-dimensional standardized mutual information matrix corresponding to the second EEG signal of each frame.

[0044] S1022. Combine the two-dimensional normalized mutual information matrix corresponding to each frame of the second EEG signal in each first EEG signal to obtain the three-dimensional normalized mutual information matrix corresponding to each first EEG signal.

[0045] Based on this, the three-dimensional standardized mutual information matrix corresponding to each first EEG signal can be used as a training sample.

[0046] For example, taking a first EEG signal comprising 22 channels of EEG signals, and each first EEG signal being divided into 18 frames of second EEG signals, the embodiments of this application are illustrated as follows: First, the normalized mutual information between each pair of channels in each frame of the second EEG signal is calculated, resulting in a two-dimensional normalized mutual information matrix for each frame of the second EEG signal, which is a 22*22 two-dimensional normalized mutual information matrix. This normalized mutual information is used to analyze the correlation between EEG signals from different channels, as well as the association between normal EEG signals and EEG signals with symptoms.

[0047] Based on this, since each first EEG signal contains 18 frames of second EEG signals, the standardized mutual information matrix corresponding to each first EEG signal is obtained by combining the two-dimensional standardized mutual information matrices of the 18 frames of second EEG signals, which is a three-dimensional standardized mutual information matrix of 18*22*22.

[0048] The standardized mutual information between each pair of EEG signals can be calculated using the following formula:

[0049] In the formula, It consists of two channels of EEG signals. For standardized mutual information between the two channels of EEG signals, This refers to the mutual information between the two channels of EEG signals. , These are the entropy values ​​of the EEG signals for each channel.

[0050] In this embodiment, the diagonal values ​​of the two-dimensional normalized mutual information matrix corresponding to each frame of the second EEG signal can also be set to zero.

[0051] Because the training samples used in this embodiment of the application to train the disease recognition model are standardized mutual information matrices constructed based on standardized mutual information between EEG signals from different channels, the disease recognition model trained in this embodiment of the application can adapt well to the changing patterns of functional connectivity between different channels of EEG signals. As described in the foregoing embodiments, each channel of EEG signal corresponds to a brain region; therefore, the functional connectivity between different channels of EEG signals reflects the functional connectivity between different brain regions. In other words, the training samples provided in this embodiment of the application can reflect the functional connections between different brain regions. Based on this, the features learned by the disease recognition model trained using the training samples provided in this embodiment are also related to the actual physiological functional connections of the brain, thus enabling the disease recognition model trained in this embodiment of the application to possess physiological interpretability. Furthermore, since the interaction mechanisms between different brain regions are basically similar, the disease recognition model trained using the training samples in this embodiment also possesses cross-individual adaptability. Based on the physiological interpretability and cross-individual adaptability of the disease recognition model, this embodiment of the application can effectively improve the accuracy of extracting information (EEG signals) used for disease recognition.

[0052] In this embodiment, when determining training samples, instead of directly calculating the standardized mutual information for each first EEG signal, the first EEG signal is finely divided temporally into multiple frames of second EEG signals. A two-dimensional standardized mutual information matrix is ​​calculated for each frame of second EEG signal obtained after fine division. The two-dimensional standardized mutual information matrix of the finely divided second EEG signals is then combined to obtain the three-dimensional standardized mutual information matrix of each first EEG signal, thereby achieving accurate feature characterization through the three-dimensional standardized mutual information matrix.

[0053] Step S103: Train the attention-based deep learning model using training samples to obtain a disease identification model.

[0054] In this embodiment, the label corresponding to each first EEG signal is the label of the three-dimensional normalized mutual information matrix corresponding to that first EEG signal. Based on this, the labeled three-dimensional normalized mutual information matrix can be used as training samples to train the attention-based deep learning model to obtain a disease recognition model. In one embodiment, the attention-based deep learning model can be the Vit model.

[0055] The deep learning model based on the attention mechanism in this application embodiment can effectively utilize a three-dimensional normalized mutual information matrix to learn the functional connectivity between different channels of EEG signals. On this basis, since this application embodiment performs a more refined three-dimensional normalized mutual information matrix calculation for each first EEG signal, the deep learning model based on the attention mechanism can learn the correlation between each frame of the second EEG signal in each first EEG signal more deeply on the basis of its own temporal modeling capability, thereby capturing more refined temporal features and having a more powerful temporal modeling capability. In this way, it can accurately capture the network mutation patterns between key brain regions during the onset of the disease, and effectively improve the accuracy of information extraction for disease identification.

[0056] Considering that disease identification models in this field are typically single-channel models, lacking the ability to jointly model spatial topology and temporal dynamics, this application provides a dual-channel model in one embodiment to at least address this issue. In this embodiment, the deep learning model based on the attention mechanism can be a dual-channel neural network model, such as the DualViT model. Based on this, the steps of training the attention-based deep learning model using training samples specifically include: The first feature is obtained by using the first channel of the dual-channel neural network model to extract features from the training samples.

[0057] The second channel in the dual-channel neural network model is used to perform inter-channel attention-weighted reconstruction of the second EEG signal in each frame of each training sample. Feature extraction is then performed on the training samples after attention-weighted reconstruction to obtain the second feature.

[0058] The first feature and the second feature are fused to obtain the fused feature.

[0059] Classification is based on fusion features.

[0060] This embodiment can be referred to. Figure 2 , Figure 2 Taking "disease identification result as epilepsy or non-epilepsy" as an example, a structural diagram of a dual-channel neural network model is given. Figure 2In this diagram, "Brain Networks" represents the input data consisting of training samples. The left branch of the Brain Networks connection is the first channel of the two-channel neural network. This first channel contains a Channel attention layer for inter-channel attention weighted reconstruction, a Patch Embedding layer for embedding computation, a Vit network for global modeling, and a Reduce layer for data compression. The right branch of the Brain Networks connection is the second channel of the two-channel neural network. This second channel contains a Patch Embedding layer for embedding computation, a Vit network for global modeling, and a Reduce layer for data compression. Figure 2 In this system, the Concatenate layer is used for data concatenation, the LayerNorm layer is used for feature dimension normalization, the Linear layer is used for linear transformation and mapping, and the "Epilepsy / Non-Epilepsy" module uses a softmax linear classifier to obtain disease identification results, which serve as a reference to assist staff in disease diagnosis.

[0061] Combination Figure 2 The following is a detailed description of the steps for training an attention-based deep learning model using training samples, according to an embodiment of this application: First, obtain the Brain Networks, i.e., the input data. Input data After copying, two sets of input data are obtained, namely and Two sets of input data are input into the first channel and the second channel respectively, so that the first channel processes the input data. Processing is performed to obtain the first feature. This enables the second channel to process the input data. Processing is performed to obtain the second feature. .

[0062] This input data The three-dimensional normalized mutual information matrix corresponding to the first EEG signal can be represented by the following matrix dimension: ,in The batch size, or number of samples, is the network input for the first and second channels. The number of second EEG signals contained in each first EEG signal, that is, the number of signal frames in each first EEG signal. The number of channels in each first EEG signal. The three-dimensional normalized mutual information matrix corresponding to the first EEG signal is composed of the two-dimensional normalized mutual information matrices corresponding to each of the multiple frames of second EEG signals.

[0063] Secondly, the first feature is used in conjunction with the concatenate layer. Second feature The fusion process yields fusion features, which are then further processed using LayerNorm and Linear layers. Finally, disease classification is performed based on these further processed fusion features.

[0064] Among them, combined Figure 2 The specific steps executed by the first channel include: First, the input data is processed using the Patch Embedding layer. To perform embedded computation, input data Convert to an input vector. This embodiment can be referenced. Figure 3 , Figure 3 An example structure of a Patch Embedding layer is given. Figure 3 In this diagram, Input Brain Networks represents the input data corresponding to the Patch Embedding layer, Time Series represents the time series, LayerNorm is used for normalization of feature dimensions, Triu_Indices is used to extract upper triangular vectors, Flatten is used to convert the data into one-dimensional vectors, Linear is used to perform linear transformations and mappings, AddPositions is used to add positional encoding information, and Output is used to convert the data into an output sequence.

[0065] Combination Figure 3 The input data is processed using the Patch Embedding layer. To perform embedded computation, input data The conversion to an input vector specifically includes: 1) Use LayerNorm to process the input data After normalization, the Triu_Indices layer is extracted using the following formula. Each trial The upper triangular connection vector of each frame :

[0066] In the formula, , express 3D real vector space, This represents the number of elements in the upper triangular region excluding the diagonal. Represents a vectorized function. This represents the function for extracting the upper triangular matrix. express Each trial , Used to represent The number of batches in the dataset.

[0067] In this embodiment, due to the input data The standardized mutual information matrix is ​​an undirected weighted network with diagonal values ​​of 0. Therefore, this embodiment extracts the input data. The upper triangular connection vector in the algorithm can effectively reduce the computational cost of the first channel.

[0068] 2) Using the Flatten layer to After being converted into a one-dimensional vector, the Linear layer connects the upper triangular vectors of each frame using the following formula. Perform dimensionality reduction on the data to linearly embed it into the spatial dimension:

[0069] In the formula, The upper triangular connection vectors for each frame after dimensionality reduction of the data. It is a linear projection matrix used to... Depend on Linear transformation of dimensional space to 3D space, in which , This represents the number of elements in the upper triangle excluding the diagonal, which is also the spatial dimension of the upper triangular connect vector before dimensionality reduction. The spatial dimension of the predetermined reduced upper triangular connect vector. This is a pre-defined bias term.

[0070] In this embodiment, because Large dimensional space and It contains a large number of redundant brain network connections, therefore the upper triangular connection vectors of each frame... Data dimensionality reduction can effectively improve computing speed.

[0071] 3) The Add Positions layer uses the following formula to define the upper triangular connection vector after dimensionality reduction of each frame's data. Add location encoding information The upper triangular connection vectors of each frame after adding position encoding information are obtained. :

[0072] 4) Utilize the Output layer to The upper triangular connection vector after adding position encoding information to each frame The frames are concatenated to obtain the output frame sequence. .

[0073] in, ,and .

[0074] Secondly, the Vit network (Vision Transformer) is used as an attention-based deep learning network to process the output frame sequence. Perform global modeling to extract evolution patterns across time frames: 1) Utilizing the output frame sequence Each with the initial trainable matrix , , Multiply to obtain the output frame sequence Corresponding linear change , , matrix.

[0075] in, .

[0076] 2) Utilizing the output frame sequence corresponding , , Matrix calculation output frame sequence Multi-headed self-attention, of which the first Output of the head Satisfy the following formula:

[0077] In the formula, The output frame sequence is as follows. The corresponding number Size , , matrix, The dimension of a vector, and Dimensional matching of matrices This represents a multi-head attention function. This is a linear classifier function.

[0078] 3) Concatenate the outputs of each head to obtain the output sequence after multi-head self-attention calculation:

[0079] In the formula, This is the output sequence after multi-head self-attention computation. For concatenation functions, The number of attention heads in multi-head attention. To output the linear transformation matrix.

[0080] 4) The output sequence after multi-head self-attention computation is subjected to residual connection and normalization processing using the following formula to preserve the original vector input information and prevent gradient explosion:

[0081] In the formula, The output sequence is after residual connection and normalization. The representation layer normalization function.

[0082] 5) Process the output sequence after residual connection and normalization using the following formula to obtain the output sequence corresponding to the Vit network. :

[0083] in, Let represent the feedforward neural network function, and its calculation formula is:

[0084] in, This represents the input to the feedforward neural network function. , These are the weight matrices for the first linear transformation of the feedforward neural network function and the weight matrix for the second linear transformation of the feedforward neural network function, respectively. Represents a non-linear activation function. , These are the bias terms of the first linear transformation of the feedforward neural network function and the bias terms of the second linear transformation of the feedforward neural network function, respectively.

[0085] Finally, the output sequence corresponding to the Vit network is calculated using the following formula. Perform average pooling to process the output sequence Compressed into a single vector, the first feature of the first channel output is thus obtained. :

[0086] In the formula, Indicates the output sequence The corresponding number Frame data.

[0087] The specific steps performed by the second channel include: First, the Channel attention layer is used to perform inter-channel attention-weighted reconstruction of the second EEG signal in each frame of each training sample to obtain the output sequence after attention-weighted reconstruction.

[0088] Secondly, the steps performed in the first channel are sequentially applied to the attention-weighted reconstructed output sequence using the Patch Embedding layer, Vit network, and Reduce layer to obtain the second feature output by the second channel. .

[0089] Based on this, the Concatenate layer uses the following formula to define the first feature. Second feature By splicing the data, the fused features are obtained. :

[0090] Finally, the LayerNorm layer is used to fuse the features. Normalization is performed, and the fused features after normalization are processed using a Linear layer. Perform linear transformations and mappings.

[0091] Based on this, the "Epilepsy / Non-Epilepsy" module classifies the fused features after normalization, linear transformation, and mapping using the following formula, resulting in... The prediction results output by the linear classifier :

[0092] In the formula, This is the weight matrix corresponding to the linear classifier. This is the bias term corresponding to the linear classifier.

[0093] In one embodiment of this application, a method for inter-channel attention-weighted reconstruction of the second EEG signal in each frame of each training sample using the second channel of a dual-channel neural network model includes: Calculate the inter-channel attention weights of the second EEG signal in each frame of each training sample; the process of calculating the attention weights here is to adjust the weight values ​​corresponding to each channel based on the calibration results, which can be understood as a fitting process. The attention weight of each training sample is calculated by using the attention weights between the channels of the second EEG signals in multiple frames in each training sample. Based on the attention weights of each training sample, the second EEG signal in each frame of the training sample is reconstructed by inter-channel attention weighting.

[0094] For example, this embodiment can be referred to Figure 4 , Figure 4 This is a structural diagram of the Channel Attention layer provided in an embodiment of this application. Figure 4In this diagram, Input Brain Networks represents the input data corresponding to the Channel Attention layer, X represents the original brain network data, i.e., the input data corresponding to the Channel Attention layer, Linear layer is used for linear transformation and mapping, LayerNorm layer is used for feature dimension normalization, Dropout layer is used for regularization, Average Pool layer is used for average pooling, Attention layer is used for calculating attention weights, Average Attention Coefficient layer is used for calculating the average value of attention weights, Channel-wiseAttention Weighted Connectivity layer is used for inter-channel attention weighted reconstruction, and Output layer is used to convert the data into an output sequence.

[0095] Combination Figure 4 The following is a detailed description of the steps for calculating the inter-channel attention weights of the second EEG signal in each frame of each training sample according to embodiments of this application: 1) Convert the two-dimensional standardized mutual information matrix (referred to as the frame data) corresponding to the second EEG signal in each frame into a learnable attention weight matrix. Specifically, each frame data can be sequentially processed... Figure 4 The "Q and K matrix initialization process" in the code involves processing the corresponding Linear fully connected layer, LayerNorm layer, and Dropout layer to obtain the data corresponding to each frame. Matrix and matrix.

[0096] 2) Utilize the Average Pool layer to process the data corresponding to each frame. Matrix and Matrix average pooling is used to reduce computational dimensionality. For example, it can be applied to the matrix corresponding to each frame of data. Matrix and Matrix length Step size is The average pooling calculation, where This is the predetermined length value.

[0097] 3) The Attention layer calculates the attention weights between channels of each frame of data using the following formula. :

[0098] The attention layer uses the following formula to... Normalization of the vector dimension is performed to obtain the inter-channel attention weights of each frame of the second EEG signal after normalization. :

[0099] in, This represents the attention weights between channels of the second EEG signal in each frame after normalization.

[0100] 4) Calculate the average attention weight between channels of the second EEG signal in each frame of each training sample using the Average Attention Coefficient layer, and determine the average attention weight between channels of the second EEG signal in each frame of each training sample as the attention weight of each training sample.

[0101] 5) Use the Dropout layer to perform regularization calculation on the attention weights of each training sample to prevent overfitting during model training.

[0102] 6) The Channel-wise Attention Weighted Connectivity layer is used to perform einsum calculation on the original brain network data X and the attention weights corresponding to each training sample, so as to perform inter-channel attention weighted reconstruction of the second EEG signal in each frame of the training sample.

[0103] 7) The attention-weighted reconstructed training samples are further processed sequentially using a Linear layer, a LayerNorm layer, a Dropout layer, and an Output layer to obtain the final attention-weighted reconstructed training samples. The final attention-weighted reconstructed training samples are... Figure 4 The output sequence corresponding to the Output layer.

[0104] In this embodiment, after determining the attention weights between channels of the second EEG signal in each frame of each training sample, the second EEG signal in each frame is not directly reconstructed based on the attention weights between channels. Instead, for each training sample, the average value of the attention weights between channels of the second EEG signal in multiple frames of the training sample is calculated, and this average value is used as the attention weight corresponding to that training sample. Finally, the attention weight corresponding to that training sample is used to perform an einsum calculation with the training sample to achieve weighted reconstruction of the second EEG signal in each frame of the training sample.

[0105] Based on this, the weighted reconstruction method provided in this application embodiment has at least the following effects: The weighted reconstruction method provided in this application can reduce transient noise interference and improve the stability of attention weights. Because EEG signals are non-stationary, signals from different frames within the same training sample may fluctuate between channels due to transient interference. If the attention weights of each frame are directly used to reconstruct the second EEG signal of each frame, random noise or fluctuations from a single frame may be included in the reconstruction process, leading to weight distortion. Therefore, this application calculates the average weight of multiple frames within the same training sample, which is equivalent to smoothing the weights over time. This weakens abnormal weight fluctuations caused by transient noise, making the attention weights more stably reflect the overall channel importance of the training sample. This helps the disease identification model focus on channels strongly correlated with the label, reduces interference from irrelevant information, and improves the disease identification model's ability to distinguish training sample categories.

[0106] In one embodiment of this application, the CrossEntropy function can be selected as the loss function used in the training process, an adaptive time estimation method can be used to perform gradient descent, the learning rate of gradient descent can be set to 0.0001, and the threshold for the number of iterations can be set to 200. There are already many examples of related technologies regarding the setting of various functions / parameters associated with the training process, and this embodiment of the application will not elaborate on them.

[0107] In one embodiment of this application, the training method for the disease recognition model may further include: The steps for validating the accuracy of the trained disease identification model may specifically include: The accuracy of the trained disease identification model is validated using a 10-fold cross-validation method to select the optimal disease identification model. Specifically, this may include: The training samples are split into 10 parts, and the following iterative steps are executed multiple times to select the optimal disease identification model from the disease identification models corresponding to the multiple iterative steps based on the classification accuracy of the disease identification model corresponding to each iterative step.

[0108] The cyclic steps in this embodiment include: One training sample is selected from 10 training samples. The remaining 9 training samples are used to train the disease identification model. This selected training sample is then used to validate the disease identification model trained on the previous 9 training samples. The classification accuracy of the disease identification model is calculated after each training / validation process in this loop. Finally, the classification accuracy of the disease identification model is obtained by integrating the "9 training processes + 1 validation process" in this loop, thus obtaining the classification accuracy of the disease identification model for each loop step.

[0109] For example, the average classification accuracy of the disease identification model obtained from "9 training processes + 1 verification process" in this loop can be used as the classification accuracy of the disease identification model corresponding to each loop step.

[0110] For example, after each training / validation process, the classification accuracy of the disease identification model can be calculated using the ACC formula. The ACC formula is:

[0111] In the formula, To improve the classification accuracy of disease identification models, These are the positive training samples predicted as positive by the disease identification model. These are negative training samples predicted as negative by the disease identification model. These are the negative class training samples that are predicted as positive by the disease identification model. These are positive training samples that are predicted as negative by the disease identification model.

[0112] For example, the disease identification model corresponding to the loop step with the highest classification accuracy can be selected as the optimal disease identification model.

[0113] Analyzing the above embodiments, the training method for the disease recognition model provided in this application has at least the following effects: This embodiment utilizes a three-dimensional standardized mutual information matrix to construct a refined brain functional connectivity map as training samples. Based on this, the first channel of a dual-channel neural network directly models the cross-frame structural dynamics using the training samples, extracting temporal evolution features from the training samples. The second channel of the dual-channel neural network reconstructs the second EEG signal in each frame through a channel attention mechanism, highlighting the connectivity relationships of key brain regions and achieving spatial connectivity structure modeling. Finally, this embodiment integrates the features output from both channels for disease classification. In other words, in terms of feature construction and extraction, this embodiment can consider both spatial topological information and temporal dependency modeling, effectively extracting spatiotemporal features and thus improving the accuracy of information extraction for disease identification.

[0114] Based on the training method of the disease recognition model provided in the embodiments of this application, this application provides a disease recognition method. This disease recognition method can process a user's electroencephalogram (EEG) signals to obtain one or more intermediate processing results, which can be used as reference information for physicians. Figure 5 The flowchart shown includes steps S201 to S202: Step S201: Acquire the EEG signal to be identified.

[0115] Step S202: The disease identification model is used to identify the EEG signal to be identified, and the disease identification result is obtained. This disease identification model is trained using the method described in the above embodiment.

[0116] The embodiments of this application have at least the following effects: Deep learning models based on attention mechanisms can effectively utilize a three-dimensional normalized mutual information matrix to learn the functional connectivity between different channels of EEG signals. On this basis, since the embodiments of this application perform more refined three-dimensional normalized mutual information matrix calculations for each first EEG signal, the deep learning model based on attention mechanisms can learn more deeply the correlation between each frame of the second EEG signal in each first EEG signal based on its own temporal modeling capabilities, thereby capturing more refined temporal features and possessing more powerful temporal modeling capabilities. In turn, it can accurately capture the network mutation patterns between key brain regions during disease onset, effectively improving the accuracy of information extraction for disease identification.

[0117] Corresponding to the training method of the disease recognition model in the above embodiments, this application provides a training device for a disease recognition model to train the disease recognition model. The trained disease recognition model can be used to process the user's electroencephalogram (EEG) signals to obtain one or more intermediate processing results. These one or more intermediate processing results can be used as reference information for physicians. Figure 6 This is a structural block diagram of a training device for a disease recognition model provided in one embodiment of this application. For ease of explanation, only the parts relevant to the embodiment of this application are shown. References Figure 6 The training device 30 for the disease identification model includes: a first acquisition module 31, a sample determination module 32, and a model training module 33. The first acquisition module 31 is used to acquire multiple labeled first EEG signals. Each first EEG signal includes multiple channels of EEG signals in the same time sequence and multiple frames of second EEG signals divided in the time sequence direction according to a preset sliding window.

[0118] The sample determination module 32 is used to use the three-dimensional normalized mutual information matrix corresponding to each first EEG signal as a training sample. The three-dimensional normalized mutual information matrix corresponding to the first EEG signal is obtained by combining the two-dimensional normalized mutual information matrices corresponding to each of the multiple frames of second EEG signals.

[0119] The model training module 33 is used to train the attention-based deep learning model using training samples to obtain a disease recognition model.

[0120] In one embodiment of this application, the deep learning model based on the attention mechanism is a dual-channel neural network model. The model training module 33 is specifically used for: The first feature is obtained by using the first channel of the dual-channel neural network model to extract features from the training samples.

[0121] The second channel in the dual-channel neural network model is used to perform inter-channel attention-weighted reconstruction of the second EEG signal in each frame of each training sample. Feature extraction is then performed on the training samples after attention-weighted reconstruction to obtain the second feature.

[0122] The first feature and the second feature are fused to obtain the fused feature.

[0123] Classification is based on fusion features.

[0124] In one embodiment of this application, the model training module 33 is further configured to: Calculate the inter-channel attention weights of the second EEG signal in each frame of each training sample.

[0125] The attention weight of each training sample is calculated using the attention weights between the channels of the second EEG signals in multiple frames of each training sample.

[0126] Based on the attention weights of each training sample, the second EEG signal in each frame of the training sample is reconstructed by inter-channel attention weighting.

[0127] In one embodiment of this application, the training device 30 for the disease recognition model may further include a label confirmation module 34. Figure 6 (Not shown in the image), the label verification module 34 is used for: For each first EEG signal, determine the corresponding label for each of the multiple channels of EEG signal in the first EEG signal.

[0128] The label corresponding to each first EEG signal is determined based on the labels corresponding to the multiple channels of EEG signals in each first EEG signal and the preset rules.

[0129] In one embodiment of this application, the preset rules include: If at least one channel of the first EEG signal is labeled as having a disease, then the label corresponding to the first EEG signal is determined to be a label with a disease; otherwise, the label corresponding to the first EEG signal is determined to be a label without a disease.

[0130] In one embodiment of this application, the tag verification module 34 is specifically used for: Determine the sub-labels for each data point of the EEG signal in each channel.

[0131] The label corresponding to each channel's EEG signal is determined based on the proportion of the number of data points of each sub-label in the total number of data points of the channel's EEG signal.

[0132] In one embodiment of this application, the first acquisition module 31 is specifically used for: The first EEG signal with the target label is selected. Here, the target label refers to the label of the imbalanced training samples.

[0133] The selected first EEG signal is subjected to data augmentation processing to obtain the augmented first EEG signal.

[0134] Acquire the existing first EEG signal and the expanded first EEG signal.

[0135] Corresponding to the training method of the disease recognition model in the above embodiments, one embodiment of this application provides a disease recognition device. The disease recognition device can process the user's electroencephalogram (EEG) signals to obtain one or more intermediate processing results, which can be used as reference information for physicians. Figure 7 This is a structural block diagram of a disease identification device provided according to an embodiment of this application. For ease of explanation, only the parts relevant to the embodiment of this application are shown. References Figure 7 The disease identification device 40 includes a second acquisition module 41 and a disease identification module 42.

[0136] The second acquisition module 41 is used to acquire the EEG signal to be identified.

[0137] The disease identification module 42 is used to identify the EEG signal to be identified using a disease identification model to obtain a disease identification result. This disease identification model is trained using the method described in the above embodiment.

[0138] See Figure 8 , Figure 8 This is a schematic block diagram of an electronic device provided according to an embodiment of this application. Figure 8 The electronic device 500 in this embodiment may include one or more processors 501, one or more input devices 502, one or more output devices 503, and one or more memories 504. The processors 501, input devices 502, output devices 503, and memories 504 communicate with each other via a communication bus 505. The memories 504 store computer programs, including program instructions. The processors 501 execute the program instructions stored in the memories 504. Specifically, the processors 501 are configured to invoke the program instructions to perform the functions of the modules in the aforementioned device embodiments, for example... Figure 6 The functions of the first acquisition module 31, sample determination module 32, and model training module 33 shown are as follows: Figure 7 The functions of the second acquisition module 41 and the disease identification module 42 are shown.

[0139] It should be understood that, in the embodiments of this application, the processor 501 may be a central processing unit (CPU), but it may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0140] Input device 502 may include a touchpad, a fingerprint sensor (for collecting the user's fingerprint information and fingerprint orientation information), a microphone, etc., and output device 503 may include a display (LCD, etc.), a speaker, etc.

[0141] The memory 504 may include read-only memory and random access memory, and provides instructions and data to the processor 501. A portion of the memory 504 may also include non-volatile random access memory.

[0142] In specific implementations, the processor 501, input device 502, and output device 503 described in the embodiments of this application can execute the implementation method described in the training method of the disease recognition model provided in the embodiments of this application, or they can execute the implementation method of the electronic device described in the embodiments of this application, which will not be repeated here.

[0143] In another embodiment of this application, a computer-readable storage medium is provided. This computer-readable storage medium stores a computer program, which includes program instructions. When executed by a processor, the program instructions implement all or part of the processes in the methods described above. Alternatively, the computer program can instruct related hardware to complete the process. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include any entity or device capable of carrying computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.

[0144] The computer-readable storage medium can be an internal storage unit of the electronic device in any of the foregoing embodiments, such as a hard disk or memory of the electronic device. The computer-readable storage medium can also be an external storage device of the electronic device, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., provided on the electronic device. Furthermore, the computer-readable storage medium can include both internal and external storage units of the electronic device. The computer-readable storage medium is used to store computer programs and other programs and data required by the electronic device. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.

[0145] This application provides a computer program product, which includes computer-executable instructions or a computer program. The computer-executable instructions or computer program are stored in a computer-readable storage medium. The processor of an electronic device reads the computer-executable instructions from the computer-readable storage medium and executes the computer-executable instructions, causing the electronic device to perform the implementation described in the training method of the disease recognition model provided in this application, or the implementation described in the disease recognition method.

[0146] Those skilled in the art will recognize that the modules / units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.

[0147] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the electronic devices and units described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0148] In the several embodiments provided in this application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of modules / units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules, units, or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces or modules / units, or it may be an electrical, mechanical, or other form of connection.

[0149] The modules / units described as separate components may or may not be physically separate. Similarly, the components shown as modules / units may or may not be physical modules / units; they may be located in one place or distributed across multiple network modules / units. Some or all of the modules / units can be selected to achieve the purpose of the embodiments of this application, depending on actual needs.

[0150] Furthermore, the functional modules / units in the various embodiments of this application can be integrated into one processing module / unit, or each module / unit can exist physically separately, or two or more modules / units can be integrated into one module / unit. The integrated modules / units described above can be implemented in hardware or in the form of software functional modules / units.

[0151] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A training method for a disease identification model, characterized in that, The method comprises: obtaining a plurality of first electroencephalogram signals with labels; each of the first electroencephalogram signals comprises a plurality of channel electroencephalogram signals at the same time sequence and a plurality of second electroencephalogram signals divided in a preset sliding window in the time sequence direction; using a three-dimensional standardized mutual information matrix corresponding to each of the first electroencephalogram signals as a training sample; wherein the three-dimensional standardized mutual information matrix corresponding to the first electroencephalogram signal is obtained by combining two-dimensional standardized mutual information matrices corresponding to each of the plurality of second electroencephalogram signals; training a deep learning model based on an attention mechanism using the training sample to obtain a disease recognition model. 2.The method of claim 1, wherein, The deep learning model based on the attention mechanism is a two-channel neural network model; The step of training the deep learning model based on the attention mechanism using the training sample specifically comprises: using a first channel in the two-channel neural network model to extract features from the training sample to obtain first features; using a second channel in the two-channel neural network model to perform attention weighting reconstruction between channels for each frame of the second electroencephalogram signal in each of the training samples, and extracting features from the attention weighting reconstruction training sample to obtain second features; fusing the first features and the second features to obtain fused features; classifying based on the fused features. 3.The method of claim 2, wherein, The attention weighting reconstruction between channels for each frame of the second electroencephalogram signal in each training sample comprises: calculating the attention weight between channels for each frame of the second electroencephalogram signal in each training sample; calculating the attention weight of each training sample using the attention weight between channels for each of the plurality of second electroencephalogram signals in the training sample; performing attention weighting reconstruction between channels for each frame of the second electroencephalogram signal in the training sample based on the attention weight of the training sample. 4.The method of claim 1, wherein, The method further comprises: for each of the first electroencephalogram signals, determining a label corresponding to each of the plurality of channel electroencephalogram signals in the first electroencephalogram signal; determining a label corresponding to each of the first electroencephalogram signals according to the label corresponding to each of the plurality of channel electroencephalogram signals in each of the first electroencephalogram signals and a preset rule. 5.The method of claim 4, wherein, The preset rule comprises: if the label of at least one channel electroencephalogram signal in the first electroencephalogram signal is a disease label, then determining that the label corresponding to the first electroencephalogram signal is a disease label, otherwise, determining that the label corresponding to the first electroencephalogram signal is a non-disease label. 6.The method of claim 4, wherein, The determination of the label corresponding to each of the plurality of channel electroencephalogram signals in the first electroencephalogram signal comprises: determining a sub-label of each data point of each channel electroencephalogram signal; determining the label corresponding to each channel electroencephalogram signal based on the proportion of the number of data points of each sub-label in the channel electroencephalogram signal to the total number of data points in the channel electroencephalogram signal.

7. The method of claim 1 to 6, wherein, The obtaining of the plurality of first electroencephalogram signals with labels specifically comprises: selecting an existing first electroencephalogram signal with a target label; wherein the target label refers to a label of an unbalanced training sample; performing data augmentation processing on the selected first electroencephalogram signal to obtain an augmented first electroencephalogram signal; obtaining the existing first electroencephalogram signal and the augmented first electroencephalogram signal.

8. A disease identification method characterized by, The method comprises the following steps: acquiring an electroencephalogram to be identified; identifying the electroencephalogram to be identified by using the disease identification model trained according to any one of claims 1 to 7 to obtain a disease identification result. 9.A device for training a disease identification model, comprising: The method comprises the following steps: A first acquisition module is configured to acquire a plurality of first electroencephalograms with labels. Each of the first electroencephalograms comprises electroencephalograms of multiple channels at the same time sequence and a plurality of second electroencephalograms divided in a time sequence direction according to a preset sliding window. A sample determination module is configured to use a three-dimensional standardized mutual information matrix corresponding to each of the first electroencephalograms as a training sample, wherein the three-dimensional standardized mutual information matrix corresponding to each of the first electroencephalograms is obtained by combining two-dimensional standardized mutual information matrices corresponding to the plurality of second electroencephalograms respectively. A model training module is configured to train a deep learning model based on an attention mechanism by using the training sample to obtain a disease identification model.

10. A disease recognition apparatus characterized by comprising: The method comprises the following steps: A second acquisition module is configured to acquire an electroencephalogram to be identified. A disease identification module is configured to identify the electroencephalogram to be identified by using the disease identification model trained according to any one of claims 1 to 7 to obtain a disease identification result.

11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 7 or the steps of the method according to claim 8.

12. A computer-readable storage medium, the computer-readable storage medium storing a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method according to any one of claims 1 to 7 or the steps of the method according to claim 8.

13. A computer program product comprising computer-executable instructions or a computer program, characterized in that, The computer executable instructions or the computer program are executed by the processor to implement the steps of the method according to any one of claims 1 to 7 or the steps of the method according to claim 8.