A method and device for classifying electroencephalogram time series data in the medical field

Through time-frequency domain complementarity and cross-domain reconstruction, negative samples of frequency domain noise and dynamic channel attention alignment are introduced, which solves the problem of insufficient noise resistance of self-supervised learning in EEG and achieves a more robust EEG classification.

CN120067823BActive Publication Date: 2025-08-12HARBIN INSTITUTE OF TECHNOLOGY (SHENZHEN) (INSTITUTE OF SCIENCE AND TECHNOLOGY INNOVATION HARBIN INSTITUTE OF TECHNOLOGY SHENZHEN)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510552497.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-29
Publication Date
2025-08-12
Estimated Expiration
2045-04-29

AI Technical Summary

Technical Problem

The existing self-supervised learning methods lack explicit noise modeling in EEG, and the negative sample selection is unreasonable, and the video domain information is neglected, resulting in insufficient noise immunity and difficulty in adapting to complex and changing real-life scenarios.

Method used

Through time-frequency domain complementarity and cross-domain reconstruction, frequency domain noise is introduced as negative samples, and the dynamic channel attention alignment mechanism is used to construct signal-noise discrimination tasks to enhance the noise immunity and robustness of the model.

Benefits of technology

Effectively integrate time-frequency domain information, improve the noise resistance and adaptability of the model in complex environments, enhance the ability to identify noise interference, and improve the accuracy of EEG classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120067823B_ABST
    Figure CN120067823B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for classifying electroencephalogram (EEG) time series data in the medical field, and relates to the field of medical image processing technology. The method includes: obtaining raw EEG data in the medical field, converting the time domain data into frequency domain data; obtaining frequency domain enhancement data and frequency domain noise data based on the frequency domain data, and converting the data back to the time domain; obtaining feature-level channel embedding representations of various data through their respective first Transformers; reconstructing the frequency domain data representation based on the time domain enhancement data representation, and reconstructing the time domain data representation based on the frequency domain enhancement data representation; obtaining the attention of each channel and the final embedding representation of each data through their respective second Transformers; using the attention in the frequency domain to guide the attention in the time domain; determining the representation of the enhanced data as a positive sample, and determining the remaining representations and the noise data representation as negative samples, and performing comparative learning on the medical data classifier. The present invention can enhance the ability of the self-supervised learning model to resist various noise interferences.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of medical image processing, and in particular to a method and device for classifying electroencephalogram (EEG) time series data in the medical field. Background Art

[0002] Electroencephalography (EEG) is a noninvasive technique for monitoring the brain's electrical activity. It is widely used in the diagnosis of neurological diseases such as epilepsy, brain injury, and sleep disorders. However, traditional supervised learning methods require large amounts of labeled data, which is often difficult to obtain in the EEG field.

[0003] Self-supervised learning offers a new approach to alleviating label dependency by leveraging unlabeled data and learning the intrinsic structure of the data. Given an EEG input X, its corresponding features Y, and its corresponding label Z, we need to use self-supervised learning to enable the neural network to learn a mapping f:X->Y, also known as an encoder. In the subsequent fine-tuning phase, this learned mapping f is adjusted using a small number of labels, and a new mapping g:Y->Z, also known as a classification head, is learned to map the EEG feature representation output by the encoder to its corresponding label. For example, in epilepsy detection, the preprocessed EEG is fed into the trained encoder f to extract features, and then passed through the classification head g to obtain the epilepsy label, forming an end-to-end diagnostic process: X→f→Y→g→Z. In short, self-supervised learning exploits the intrinsic structure of data to learn highly generalizable feature representations without requiring extensive and expensive annotation, and is playing an increasingly important role in the EEG field.

[0004] Current self-supervised learning techniques lack a suitable solution for dealing with noise in EEGs. First, these methods generally lack explicit mechanisms for modeling and processing noisy signals, making the learned representations susceptible to noise. For example, frequency band noise not only corrupts the time-domain waveform, resulting in a loss of semantic meaning in the original signal, but also alters the inherent inter-channel correlations in the EEG. Second, the existing time series contrastive learning paradigm ignores the unique pattern information inherent in noise. Due to a lack of appropriate sampling strategies, negative samples constructed by existing contrastive learning methods are mostly normal EEG data, failing to capture the various types of noise found in real-world environments. Finally, most existing methods focus solely on time-domain waveform features, neglecting the important information contained in the frequency domain. The significant differences in the impact of frequency band noise between the time and frequency domains indicate that the time and frequency domains each have their own advantages in noise immunity. Fully exploiting and integrating the complementary time-frequency information promises to enhance noise immunity from a more comprehensive perspective, a field that existing methods have yet to fully explore.

[0005] In summary, existing self-supervised learning methods still face many challenges in learning noise-resistant EEG representations. It is urgent to introduce new mechanisms such as explicit noise modeling, negative sample enhancement, and time-frequency domain fusion to comprehensively improve the robustness of the model in order to cope with complex and changeable real-world scenarios. Summary of the Invention

[0006] In order to solve the technical problems existing in the prior art, the present invention provides a method and device for classifying electroencephalogram (EEG) time series data in the medical field. The technical solution is as follows:

[0007] On the one hand, a method for classifying electroencephalogram (EEG) time series data in the medical field is provided. The method is implemented by an EEG time series data classification device in the medical field, and the method includes:

[0008] S1. Obtaining raw EEG data in the medical field and converting the time domain data in the raw EEG data into frequency domain data;

[0009] S2. Obtain frequency domain enhancement data and frequency domain noise data based on the frequency domain data, and convert the frequency domain data, the frequency domain enhancement data, and the frequency domain noise data back to the time domain to obtain converted time domain data, the time domain enhancement data, and the time domain noise data;

[0010] S3, passing the frequency domain data, frequency domain enhanced data, frequency domain noise data, converted time domain data, time domain enhanced data and time domain noise data through their respective first Transformers to obtain feature-level channel embedding representations;

[0011] S4. Reconstruct the channel embedding representation of the frequency domain data based on the channel embedding representation of the time domain enhanced data, and reconstruct the channel embedding representation of the time domain data based on the channel embedding representation of the frequency domain enhanced data;

[0012] S5. Based on the channel embedding representation of the reconstructed frequency domain data and the channel embedding representation of the reconstructed time domain data, the attention between each channel and the final embedding representation of each data are obtained through the respective second Transformers;

[0013] S6. Use attention in the frequency domain to guide attention in the time domain;

[0014] S7. Generate samples of the original EEG data based on the final embedding representations of the data, determine the channel embedding representations of the enhanced data as positive samples, determine the remaining channel embedding representations in the final embedding representation and the channel embedding representations of the noise data as negative samples, and perform comparative learning on the medical data classifier to obtain a trained medical data classifier;

[0015] S8. Use the trained medical data classifier to classify EEG data in the medical field.

[0016] On the other hand, a device for classifying electroencephalogram time series data in the medical field is provided, which is applied to a method for classifying electroencephalogram time series data in the medical field. The device includes:

[0017] The first conversion module is used to obtain raw EEG data in the medical field and convert the time domain data in the raw EEG data into frequency domain data;

[0018] A second conversion module is used to obtain frequency domain enhancement data and frequency domain noise data based on the frequency domain data, and convert the frequency domain data, the frequency domain enhancement data, and the frequency domain noise data back to the time domain to obtain converted time domain data, the time domain enhancement data, and the time domain noise data;

[0019] The first feature embedding module is used to pass the frequency domain data, the frequency domain enhanced data, the frequency domain noise data, the converted time domain data, the time domain enhanced data and the time domain noise data through their respective first Transformers to obtain feature-level channel embedding representations;

[0020] A reconstruction module is used to reconstruct the channel embedding representation of the frequency domain data based on the channel embedding representation of the time domain enhanced data, and reconstruct the channel embedding representation of the time domain data based on the channel embedding representation of the frequency domain enhanced data;

[0021] The second feature embedding module is used to obtain the attention between each channel and the final embedding representation of each data through the respective second Transformers based on the channel embedding representation of the reconstructed frequency domain data and the channel embedding representation of the reconstructed time domain data;

[0022] An attention guidance module is used to use the attention in the frequency domain to guide the attention in the time domain;

[0023] A contrastive learning module is used to generate samples of the original EEG data based on the final embedding representations of each data. The channel embedding representations of the enhanced data are determined as positive samples, and the remaining channel embedding representations in the final embedding representation and the channel embedding representations of the noise data are determined as negative samples. The medical data classifier is subjected to contrastive learning to obtain a trained medical data classifier.

[0024] The classification module is used to classify EEG data in the medical field using the trained medical data classifier.

[0025] On the other hand, a device for classifying electroencephalogram time series data in the medical field is provided, which includes: a processor; a memory, on which computer-readable instructions are stored, and when the computer-readable instructions are executed by the processor, any one of the above-mentioned methods for classifying electroencephalogram time series data in the medical field is implemented.

[0026] On the other hand, a computer-readable storage medium is provided, wherein the storage medium stores at least one instruction, and the at least one instruction is loaded and executed by a processor to implement any one of the above-mentioned electroencephalogram time series data classification methods in the medical field.

[0027] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0028] Through time-frequency domain complementarity and cross-domain reconstruction, the different perspectives of the time and frequency domains are effectively integrated, overcoming the shortcomings of learning in a single domain. This enables the model to fully utilize both time and frequency domain information, enhancing noise resistance from a more comprehensive perspective and learning a more robust EEG representation. Furthermore, background noise is introduced as negative samples, constructing a signal-noise discrimination task. This forces the model to learn finer-grained discrimination boundaries, enhancing its ability to discern various types of irrelevant noise interference. Compared to traditional contrastive learning methods that only use normal samples, this invention can better adapt to complex and changing real-world scenarios. Furthermore, the dynamic channel attention alignment mechanism uses frequency domain information to guide the time domain, helping to repair channel dependencies corrupted by noise. This enables the model to adaptively resist changes in channel correlations, making it more robust at the channel level. In summary, through innovative mechanisms such as cross-domain reconstruction, heterogeneous negative sample comparison, and channel alignment, the embodiments of the present invention comprehensively enhance the ability of self-supervised learning models to resist various types of noise interference. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0030] Figure 1 This is a flow chart of a method for classifying electroencephalogram time series data in the medical field provided by an embodiment of the present invention;

[0031] Figure 2 This is a block diagram of an electroencephalogram time series data classification device in the medical field provided by an embodiment of the present invention;

[0032] Figure 3 This is a schematic structural diagram of an electroencephalogram time series data classification device in the medical field provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0033] The technical solution of the present invention is described below in conjunction with the accompanying drawings.

[0034] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as an "exemplary" in the present invention should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of the word "exemplary" is intended to present concepts in a concrete manner. Furthermore, in the embodiments of the present invention, "and / or" can mean both or either of the two.

[0035] In the embodiments of the present invention, the terms "image" and "picture" may sometimes be used interchangeably. It should be noted that, when the distinction is not emphasized, the meanings they convey are the same. The terms "of," "corresponding," and "corresponding" may sometimes be used interchangeably. It should be noted that, when the distinction is not emphasized, the meanings they convey are the same.

[0036] In the embodiments of the present invention, sometimes a subscript such as W1 may be written as a non-subscript such as W1. When the difference is not emphasized, the meanings to be expressed are the same.

[0037] In order to make the technical problems, technical solutions and advantages to be solved by the present invention clearer, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.

[0038] The embodiment of the present invention provides a method for classifying electroencephalogram time series data in the medical field. The method can be implemented by an electroencephalogram time series data classification device in the medical field. The electroencephalogram time series data classification device in the medical field can be a terminal or a server. Figure 1 The flowchart of the method for classifying EEG time series data in the medical field is shown. The method mainly includes four processes: data preprocessing, cross-domain reconstruction, channel attention alignment, and contrastive learning through additional noisy negative samples. Each process also includes at least one step. The processing flow of the method may include the following steps:

[0039] The first step, data preprocessing:

[0040] In a feasible implementation, data preprocessing can be used to obtain original samples, enhanced samples, and noise samples in the time domain and frequency domain, respectively. This process may include the following steps S1-S2:

[0041] S1. Obtaining raw EEG data in the medical field, and converting time domain data in the raw EEG data into frequency domain data.

[0042] In a feasible implementation, bandpass noise will cause serious spectrum loss problems, so it is necessary to convert time domain data into frequency domain data through Fourier transform, and perform data enhancement and noise extraction on the spectrum.

[0043] S2. Obtain frequency domain enhancement data and frequency domain noise data based on the frequency domain data, and convert the frequency domain data, the frequency domain enhancement data, and the frequency domain noise data back to the time domain to obtain converted time domain data, the time domain enhancement data, and the time domain noise data.

[0044] Optionally, the specific operations of S2 may include the following S21-S22:

[0045] S21. Filter out some frequencies of the frequency domain data through random masking to obtain enhanced data.

[0046] S22. Extract the frequency band portion from 1 Hz to 30 Hz through band-pass filtering and determine it as noise data.

[0047] The second process, cross-domain reconstruction:

[0048] In one feasible implementation, each channel in the sample is represented by a Transformer and reconstructed across domains. This process may include the following steps S3-S4:

[0049] S3. Pass the frequency domain data, frequency domain enhanced data, frequency domain noise data, converted time domain data, time domain enhanced data and time domain noise data through their respective first Transformers to obtain feature-level channel embedding representations.

[0050] In a feasible implementation, for a piece of brain wave data, the data of each channel is embedded separately.

[0051] In addition, passing the data through the first Transformer to obtain a feature-level channel embedding representation is a common technical means in the prior art, and the embodiment of the present invention will not be described in detail here.

[0052] S4. Reconstruct the channel embedding representation of the frequency domain data based on the channel embedding representation of the time domain enhanced data, and reconstruct the channel embedding representation of the time domain data based on the channel embedding representation of the frequency domain enhanced data.

[0053] Optionally, the specific operations of S4 may include S41-S42:

[0054] S41, passing the channel embedding representation of the time domain enhanced data through a fully connected layer to reconstruct the channel embedding representation of the frequency domain data;

[0055] S42. The channel embedding representation of the frequency domain enhanced data is passed through a fully connected layer to reconstruct the channel embedding representation of the time domain data.

[0056] In a feasible implementation, in this process, the embodiment of the present invention innovatively implements cross-domain reconstruction in the feature space. Specifically, the model first maps the time domain and frequency domain signals to the corresponding feature spaces respectively, and then uses the features of the enhanced samples in one domain as input to reconstruct the features of the original samples in the other domain. Traditional mask prediction learning is mostly performed in the input space, that is, directly reconstructing the original signal. This cross-domain reconstruction of the embodiment of the present invention forces the model to learn the intrinsic connection between the time and frequency domains and mine their complementary information. At the same time, the high-level semantic representation of the feature space is more robust than the original signal, so cross-domain reconstruction in the feature space can effectively improve the noise resistance of the model. Without the key technology of cross-domain reconstruction of the feature space, the present invention will find it difficult to fully utilize the time and frequency domain information, and the noise reduction capability will be greatly reduced.

[0057] The third process, channel attention alignment:

[0058] In one feasible implementation, in this process, the representations of each channel in the sample are passed through the Transformer to obtain channel attention and align. This process may include the following steps S5-S6:

[0059] S5. Based on the channel embedding representation of the reconstructed frequency domain data and the channel embedding representation of the reconstructed time domain data, the attention between each channel and the final embedding representation of each data are obtained through their respective second Transformers.

[0060] It should be noted that the second Transformer differs from the first Transformer mentioned above in terms of feature level. This is a common operation in this technical field and will not be described in detail here.

[0061] S6. Use attention in the frequency domain to guide attention in the time domain.

[0062] Optionally, the specific operation process of S6 may be as follows:

[0063] Use channel attention in the time domain to align channel attention in the frequency domain.

[0064] In one feasible implementation, the introduction of noise disrupts the existing dependencies between channels, reducing model performance. To address this issue, embodiments of the present invention cleverly utilize frequency-domain channel attention to guide time-domain channel attention. Because frequency-domain channel relationships are more stable to noise, using them as a reference can help correct channel relationships in the time domain that have been disrupted by noise. This alignment mechanism empowers the model to dynamically adapt to noise perturbations. Without this key technique, channel alignment would prevent the model from effectively responding to changes in channel correlations, severely impacting robustness.

[0065] The fourth step is contrastive learning through additional noise negative samples:

[0066] In a feasible implementation, in this process, contrastive learning is performed in the time domain and the frequency domain, treating the noise samples as additional negative samples. This process may include the following step S7:

[0067] S7. Generate samples of the original EEG data based on the final embedding representation of each data, determine the channel embedding representation of the enhanced data as a positive sample, and determine the remaining channel embedding representations in the final embedding representation and the channel embedding representation of the noise data as negative samples. Perform comparative learning on the medical data classifier to obtain a trained medical data classifier.

[0068] Optionally, the specific operation process of generating a sample of raw EEG data in S7 may be as follows:

[0069] The final embedded representation of each data is passed through the fully connected layer projection head to obtain samples of the original EEG data.

[0070] In one feasible implementation, contrastive learning can learn discriminative feature representations by bringing similar samples closer together and pushing dissimilar samples apart. However, existing contrastive learning methods limit their negative samples to normal samples, ignoring the uniqueness of background noise. To overcome this limitation, the present invention innovatively introduces background noise as a negative sample, constructing a signal-noise discrimination task. This forces the model to learn a finer-grained discrimination boundary, enhancing its ability to distinguish target signals from background noise. Without contrastive learning with heterogeneous negative samples, the model would struggle to effectively discriminate between various types of noise interference, and its generalization ability in complex environments would be limited.

[0071] S8. Use the trained medical data classifier to classify EEG data in the medical field.

[0072] In this embodiment of the present invention, through time-frequency domain complementarity and cross-domain reconstruction, the different perspectives of the time and frequency domains are effectively integrated, overcoming the shortcomings of learning in a single domain. This enables the model to fully utilize both time and frequency domain information, enhancing noise resistance from a more comprehensive perspective and learning a more robust EEG representation. Furthermore, background noise is introduced as negative samples, constructing a signal-noise discrimination task. This forces the model to learn a more fine-grained discrimination boundary, enhancing its ability to discern various types of irrelevant noise interference. Compared to traditional contrastive learning methods that only use normal samples, this invention can better adapt to complex and changing real-world scenarios. Furthermore, the dynamic channel attention alignment mechanism uses frequency domain information to guide the time domain, helping to repair channel dependencies corrupted by noise. This enables the model to adaptively resist changes in channel correlations, making it more robust at the channel level. In summary, through innovative mechanisms such as cross-domain reconstruction, heterogeneous negative sample comparison, and channel alignment, this embodiment of the present invention comprehensively enhances the ability of self-supervised learning models to resist various types of noise interference.

[0073] Figure 2 This is a block diagram of an electroencephalogram time series data classification device in the medical field provided according to an embodiment of the present invention. The device is used in a method for classifying electroencephalogram time series data in the medical field. Figure 2 , the device comprises:

[0074] The first conversion module 210 is used to obtain raw EEG data in the medical field and convert the time domain data in the raw EEG data into frequency domain data;

[0075] A second conversion module 220 is configured to obtain frequency domain enhancement data and frequency domain noise data based on the frequency domain data, and convert the frequency domain data, the frequency domain enhancement data, and the frequency domain noise data back to the time domain to obtain converted time domain data, the time domain enhancement data, and the time domain noise data;

[0076] A first feature embedding module 230 is configured to pass the frequency domain data, the frequency domain enhanced data, the frequency domain noise data, the converted time domain data, the time domain enhanced data, and the time domain noise data through their respective first Transformers to obtain feature-level channel embedding representations;

[0077] A reconstruction module 240 is configured to reconstruct the channel embedding representation of the frequency domain data based on the channel embedding representation of the time domain enhancement data, and reconstruct the channel embedding representation of the time domain data based on the channel embedding representation of the frequency domain enhancement data;

[0078] A second feature embedding module 250 is configured to obtain the attention between each channel and the final embedding representation of each data through the respective second Transformers based on the channel embedding representation of the reconstructed frequency domain data and the channel embedding representation of the reconstructed time domain data;

[0079] An attention guidance module 260 is configured to use the attention in the frequency domain to guide the attention in the time domain;

[0080] A contrastive learning module 270 is configured to generate samples of the original EEG data based on the final embedding representations of the data, determine the channel embedding representations of the enhanced data as positive samples, determine the remaining channel embedding representations in the final embedding representation and the channel embedding representations of the noise data as negative samples, and perform contrastive learning on the medical data classifier to obtain a trained medical data classifier;

[0081] The classification module 280 is used to classify the EEG data in the medical field using the trained medical data classifier.

[0082] In this embodiment of the present invention, through time-frequency domain complementarity and cross-domain reconstruction, the different perspectives of the time and frequency domains are effectively integrated, overcoming the shortcomings of learning in a single domain. This enables the model to fully utilize both time and frequency domain information, enhancing noise resistance from a more comprehensive perspective and learning a more robust EEG representation. Furthermore, background noise is introduced as negative samples, constructing a signal-noise discrimination task. This forces the model to learn a more fine-grained discrimination boundary, enhancing its ability to discern various types of irrelevant noise interference. Compared to traditional contrastive learning methods that only use normal samples, this invention can better adapt to complex and changing real-world scenarios. Furthermore, the dynamic channel attention alignment mechanism uses frequency domain information to guide the time domain, helping to repair channel dependencies corrupted by noise. This enables the model to adaptively resist changes in channel correlations, making it more robust at the channel level. In summary, through innovative mechanisms such as cross-domain reconstruction, heterogeneous negative sample comparison, and channel alignment, this embodiment of the present invention comprehensively enhances the ability of self-supervised learning models to resist various types of noise interference.

[0083] Figure 3 FIG. 1 is a schematic diagram of a device for classifying electroencephalogram time series data in the medical field provided by an embodiment of the present invention. Figure 3 As shown, the EEG time series data classification device in the medical field may include the above Figure 2 Optionally, the medical field electroencephalogram time series data classification device 310 may include a first processor 2001 .

[0084] Optionally, the electroencephalogram time series data classification device 310 in the medical field may further include a memory 2002 and a transceiver 2003 .

[0085] The first processor 2001, the memory 2002 and the transceiver 2003 may be connected via a communication bus.

[0086] The following combination Figure 3 The components of the electroencephalogram time series data classification device 310 in the medical field are specifically introduced:

[0087] The first processor 2001 is the control center of the medical EEG time series data classification device 310 and can be a single processor or a collective term for multiple processing elements. For example, the first processor 2001 can be one or more central processing units (CPUs), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention, such as one or more digital signal processors (DSPs) or one or more field programmable gate arrays (FPGAs).

[0088] Optionally, the first processor 2001 can perform various functions of the electroencephalogram time series data classification device 310 in the medical field by running or executing a software program stored in the memory 2002 and calling data stored in the memory 2002.

[0089] In a specific implementation, as an embodiment, the first processor 2001 may include one or more CPUs, such as Figure 3 CPU0 and CPU1 are shown in FIG.

[0090] In a specific implementation, as an embodiment, the EEG time series data classification device 310 in the medical field may also include multiple processors, such as Figure 3 1 and 2. The first processor 2001 and the second processor 2004 are shown in FIG. Each of these processors can be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). A processor herein can refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0091] The memory 2002 is used to store the software program for executing the solution of the present invention, and is controlled by the first processor 2001 for execution. The specific implementation method can refer to the above method embodiment and will not be repeated here.

[0092] Alternatively, the memory 2002 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, a random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, an optical disc storage (including a compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and capable of being accessed by a computer, but not limited thereto. The memory 2002 may be integrated with the first processor 2001 or may exist independently and be accessed through the interface circuit ( Figure 3 (not shown) is coupled to the first processor 2001, which is not specifically limited in this embodiment of the present invention.

[0093] The transceiver 2003 is used to communicate with a network device or a terminal device.

[0094] Optionally, the transceiver 2003 may include a receiver and a transmitter ( Figure 3 The receiver is used to implement a receiving function, and the transmitter is used to implement a sending function.

[0095] Optionally, the transceiver 2003 may be integrated with the first processor 2001 or may exist independently and be connected to the first processor 2001 through the interface circuit of the medical field electroencephalogram time series data classification device 310 ( Figure 3 (not shown) is coupled to the first processor 2001, which is not specifically limited in this embodiment of the present invention.

[0096] It should be noted that Figure 3 The structure of the EEG time series data classification device 310 in the medical field shown in the figure does not constitute a limitation on the router. The actual knowledge structure recognition device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0097] In addition, the technical effects of the electroencephalogram time series data classification device 310 in the medical field can refer to the technical effects of the electroencephalogram time series data classification method in the medical field described in the above method embodiment, and will not be repeated here.

[0098] It should be understood that the first processor 2001 in the embodiment of the present invention may be a central processing unit (CPU), or may be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, etc.

[0099] It should also be understood that the memory in the embodiments of the present invention may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory may be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0100] The above embodiments can be implemented in whole or in part via software, hardware (e.g., circuits), firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product comprises one or more computer instructions or computer programs. When loaded or executed on a computer, the processes or functions described in accordance with the embodiments of the present invention are fully or partially performed. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired means (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium accessible by a computer or a data storage device such as a server or data center that contains a collection of one or more available media. The available medium can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media. The semiconductor media can be a solid-state drive.

[0101] It should be understood that the term "and / or" as used herein simply describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A alone, A and B together, or B alone. A and B can be singular or plural. Furthermore, the character " / " as used herein generally indicates an "or" relationship between the associated objects, but it may also indicate an "and / or" relationship. For specific understanding, please refer to the context.

[0102] In this disclosure, "at least one" means one or more, and "plurality" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, "at least one of a, b, or c" can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or plural.

[0103] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0104] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.

[0105] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0106] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interface, indirect coupling or communication connection of the device or unit, which can be electrical, mechanical or other forms.

[0107] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0108] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0109] If the functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or the portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage media include various media that can store program code, such as USB flash drives, mobile hard drives, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical disks.

[0110] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.

Claims

1. A method for classifying electroencephalogram time series data in the medical field, characterized in that: The method comprises: S1. Obtaining raw EEG data in the medical field and converting the time domain data in the raw EEG data into frequency domain data; S2. Obtain frequency domain enhancement data and frequency domain noise data based on the frequency domain data, and convert the frequency domain data, the frequency domain enhancement data, and the frequency domain noise data back to the time domain to obtain converted time domain data, the time domain enhancement data, and the time domain noise data; S3, passing the frequency domain data, frequency domain enhanced data, frequency domain noise data, converted time domain data, time domain enhanced data and time domain noise data through their respective first Transformers to obtain feature-level channel embedding representations; S4. Reconstruct the channel embedding representation of the frequency domain data based on the channel embedding representation of the time domain enhanced data, and reconstruct the channel embedding representation of the time domain data based on the channel embedding representation of the frequency domain enhanced data; S5. Based on the channel embedding representation of the reconstructed frequency domain data and the channel embedding representation of the reconstructed time domain data, the attention between each channel and the final embedding representation of each data are obtained through the respective second Transformers; S6. Use attention in the frequency domain to guide attention in the time domain; S7. Generate samples of the original EEG data based on the final embedding representations of the data, determine the channel embedding representations of the enhanced data as positive samples, determine the remaining channel embedding representations in the final embedding representation and the channel embedding representations of the noise data as negative samples, and perform comparative learning on the medical data classifier to obtain a trained medical data classifier; S8. Use the trained medical data classifier to classify the EEG data in the medical field; The step S4 of reconstructing the channel embedding representation of the frequency domain data according to the channel embedding representation of the time domain enhanced data includes: S41, passing the channel embedding representation of the time domain enhanced data through a fully connected layer to reconstruct the channel embedding representation of the frequency domain data; The step S4 of reconstructing the channel embedding representation of the time domain data based on the channel embedding representation of the frequency domain enhanced data includes: S42. The channel embedding representation of the frequency domain enhanced data is passed through a fully connected layer to reconstruct the channel embedding representation of the time domain data.

2. The method for classifying electroencephalogram time series data in the medical field according to claim 1, characterized in that: The step S2 obtains frequency domain enhancement data and frequency domain noise data based on the frequency domain data, including: S21, filtering out some frequencies of the frequency domain data by random masking to obtain enhanced data; S22. Extract the frequency band portion from 1 Hz to 30 Hz through band-pass filtering and determine it as noise data.

3. The method for classifying electroencephalogram time series data in the medical field according to claim 1, characterized in that: The S6 uses the attention in the frequency domain to guide the attention in the time domain, including: Use channel attention in the time domain to align channel attention in the frequency domain.

4. The method for classifying electroencephalogram time series data in the medical field according to claim 1, characterized in that: The S7 generates samples of raw EEG data according to the final embedded representation of each data, including: The final embedded representation of each data is passed through the fully connected layer projection head to obtain samples of the original EEG data.

5. A device for classifying electroencephalogram (EEG) time series data in the medical field, wherein the device is used to implement the method for classifying EEG time series data in the medical field according to any one of claims 1 to 4, characterized in that: The device comprises: The first conversion module is used to obtain raw EEG data in the medical field and convert the time domain data in the raw EEG data into frequency domain data; A second conversion module is used to obtain frequency domain enhancement data and frequency domain noise data based on the frequency domain data, and convert the frequency domain data, the frequency domain enhancement data, and the frequency domain noise data back to the time domain to obtain converted time domain data, the time domain enhancement data, and the time domain noise data; The first feature embedding module is used to pass the frequency domain data, the frequency domain enhanced data, the frequency domain noise data, the converted time domain data, the time domain enhanced data and the time domain noise data through their respective first Transformers to obtain feature-level channel embedding representations; A reconstruction module is used to reconstruct the channel embedding representation of the frequency domain data based on the channel embedding representation of the time domain enhanced data, and reconstruct the channel embedding representation of the time domain data based on the channel embedding representation of the frequency domain enhanced data; The second feature embedding module is used to obtain the attention between each channel and the final embedding representation of each data through the respective second Transformers based on the channel embedding representation of the reconstructed frequency domain data and the channel embedding representation of the reconstructed time domain data; An attention guidance module is used to use the attention in the frequency domain to guide the attention in the time domain; A contrastive learning module is used to generate samples of the original EEG data based on the final embedding representations of each data. The channel embedding representations of the enhanced data are determined as positive samples, and the remaining channel embedding representations in the final embedding representation and the channel embedding representations of the noise data are determined as negative samples. The medical data classifier is subjected to contrastive learning to obtain a trained medical data classifier. The classification module is used to classify EEG data in the medical field using the trained medical data classifier.

6. The electroencephalogram time series data classification device in the medical field according to claim 5, characterized in that: The second conversion module is configured to: S21, filtering out some frequencies of the frequency domain data by random masking to obtain enhanced data; S22. Extract the frequency band portion from 1 Hz to 30 Hz through band-pass filtering and determine it as noise data.

7. The electroencephalogram time series data classification device in the medical field according to claim 5, characterized in that: The reconstruction module is used to: S41, passing the channel embedding representation of the time domain enhanced data through a fully connected layer to reconstruct the channel embedding representation of the frequency domain data; The step S4 of reconstructing the channel embedding representation of the time domain data based on the channel embedding representation of the frequency domain enhanced data includes: S42. The channel embedding representation of the frequency domain enhanced data is passed through a fully connected layer to reconstruct the channel embedding representation of the time domain data.

8. An electroencephalogram time series data classification device in the medical field, characterized in that: The electroencephalogram time series data classification device in the medical field includes: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the method according to any one of claims 1 to 4 is implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program code, which can be called by a processor to execute the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Electrocardio denoising method based on frequency information enhancement

    CN118733979A

  • Physiological signal self-supervision representation learning method and system based on time-frequency reconstruction

    CN119089378A