Electroencephalogram time series data classification method and device in medical field
Through time-frequency domain complementarity and cross-domain reconstruction, the introduction of background noise negative samples and dynamic channel attention alignment mechanisms, the problem of insufficient robustness of existing self-supervised learning in EEG anti-noise characterization learning is solved, and more robust EEG characterization learning and better adaptability to complex environments is achieved.
Patent Information
- Application Number
- CN202510552497.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2045-04-29
AI Technical Summary
The existing self-supervised learning methods face challenges in EEG anti-noise characterization learning, such as noise explicit modeling, negative sample enhancement and time-frequency domain fusion, resulting in insufficient robustness of the model and difficulty in adapting to complex and changing real-world scenarios.
Through time-frequency domain complementarity and cross-domain reconstruction, the time-domain and frequency domain perspectives are integrated to reconstruct channel embedding characterization; background noise is introduced as negative samples to construct signal-noise discrimination tasks; frequency-domain attention is used to guide time-domain attention and dynamically repair channel dependencies.
The model's resistance to multiple noise interferences is enhanced, and more robust EEG representations can better adapt to complex and changeable real-life scenarios.
Smart Images

Figure CN120067823A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical image processing, and particularly to a method and device for classifying electroencephalogram time series data in the medical field. Background Art
[0002] Electroencephalography (EEG) is a non-invasive technique for monitoring brain electrical activity and is widely used in the diagnosis of neurological diseases such as epilepsy, brain injury, and sleep disorders. However, traditional supervised learning methods require a large amount of labeled data, which is often difficult to obtain in the EEG field.
[0003] Self-Supervised Learning provides a new idea for alleviating the annotation dependence by fully exploiting unlabeled data and learning the internal structure of the data. Given an input electroencephalogram X, its corresponding feature is Y, and the corresponding label is Z. We need to make the neural network learn a mapping f: X -> Y through self-supervised learning, and this mapping is also called an encoder. And in the subsequent fine-tuning stage, rely on a small number of labels to adjust the learned mapping f above, and learn a new mapping g: Y -> Z, and this mapping is also called a classification head, which is used to map the electroencephalogram feature representation output by the above encoder to its corresponding label. Taking epilepsy detection as an example, we input the preprocessed electroencephalogram into the trained encoder f to extract features, and then obtain the epilepsy label through the classification head g, forming an end-to-end diagnosis process: X → f → Y → g → Z. In short, self-supervised learning is playing an increasingly important role in the EEG field by mining the internal structure of the data and learning a feature representation with strong generalization ability without a large amount of expensive annotations.
[0004] In the current related technologies, self-supervised learning has no suitable solution for the noise in electroencephalograms. First of all, these methods generally lack a mechanism for explicitly modeling and processing noise signals, making the learned representations vulnerable to noise. Taking band noise as an example, it not only destroys the time-domain waveform, resulting in the loss of the semantics of the original signal, but also causes changes in the original inter-channel correlation of the electroencephalogram. Secondly, the existing time series contrast learning paradigms ignore the unique pattern information contained in the noise itself. Due to the lack of a suitable sampling strategy, the negative samples constructed by the existing contrast learning methods are mostly normal electroencephalogram data and do not cover various types of noise in the real environment. Finally, most of the existing methods only focus on the time-domain waveform features and ignore the important information contained in the frequency-domain perspective. The influence of band noise in the time-frequency domain varies greatly, indicating that the time domain and the frequency domain have their own advantages in noise immunity. Fully exploring and integrating the complementary time-frequency information is expected to enhance the noise resistance from a more comprehensive perspective, which has not been deeply explored by the existing methods.
[0005] In summary, existing self-supervised learning methods still face many challenges in electroencephalogram (EEG) anti-noise representation learning. 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 to cope with complex and changing real-world scenarios. Summary of the Invention
[0006] To solve the technical problems existing in the prior art, an embodiment of the present invention provides a method and device for classifying EEG time-series data in the medical field. The technical solution is as follows:
[0007] On the one hand, a method for classifying EEG time-series data in the medical field is provided. This method is implemented by an EEG time-series data classification device in the medical field. The method includes:
[0008] S1. Obtain the original EEG data in the medical field and convert the time-domain data in the original EEG data into frequency-domain data;
[0009] S2. According to the frequency-domain data, obtain frequency-domain enhanced data and frequency-domain noise data, and convert the frequency-domain data, frequency-domain enhanced data, and frequency-domain noise data back to the time domain to obtain the converted time-domain data, time-domain enhanced data, and time-domain noise data;
[0010] S3. Pass the frequency-domain data, frequency-domain enhanced data, frequency-domain noise data, the converted time-domain data, time-domain enhanced data, and time-domain noise data through their respective first Transformers to obtain channel embedding representations at the feature level;
[0011] S4. Reconstruct the channel embedding representation of the frequency-domain data according to the channel embedding representation of the time-domain enhanced data, and reconstruct the channel embedding representation of the time-domain data according to the channel embedding representation of the frequency-domain enhanced data;
[0012] S5. According to the reconstructed channel embedding representation of the frequency-domain data and the reconstructed channel embedding representation of the time-domain data, obtain the attention between each channel and the final embedding representation of each data through their respective second Transformers;
[0013] S6. Use the attention in the frequency domain to guide the attention in the time domain;
[0014] S7. Generate samples of the original EEG data according to the final embedding representation of each data, determine the channel embedding representation of the enhanced data as positive samples, and determine the remaining channel embedding representations and the channel embedding representation of the noise data in the final embedding representation as negative samples, and perform contrastive learning on the medical data classifier to obtain a trained medical data classifier;
[0015] S8. Use the trained medical data classifier to classify the EEG data in the medical field.
[0016] On the other hand, a device for classifying electroencephalogram (EEG) time-series data in the medical field is provided. This device is applied to a method for classifying EEG time-series data in the medical field and includes:
[0017] A first conversion module for obtaining the original EEG data in the medical field and converting the time-domain data in the original EEG data into frequency-domain data;
[0018] A second conversion module for obtaining frequency-domain enhanced data and frequency-domain noise data based on the frequency-domain data, converting the frequency-domain data, the frequency-domain enhanced data, and the frequency-domain noise data back to the time domain to obtain the converted time-domain data, time-domain enhanced data, and time-domain noise data;
[0019] A first feature embedding module for respectively passing 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 channel embedding representations at the feature level;
[0020] A reconstruction module for reconstructing the channel embedding representation of the frequency-domain data according to the channel embedding representation of the time-domain enhanced data, and reconstructing the channel embedding representation of the time-domain data according to the channel embedding representation of the frequency-domain enhanced data;
[0021] A second feature embedding module for obtaining the attention between each channel and the final embedding representation of each data through their respective second Transformers according to the reconstructed channel embedding representation of the frequency-domain data and the reconstructed channel embedding representation of the time-domain data;
[0022] An attention guidance module for using the attention in the frequency domain to guide the attention in the time domain;
[0023] A contrastive learning module for generating samples of the original EEG data according to the final embedding representation of each data, determining the channel embedding representation of the enhanced data as the positive sample, and determining the remaining channel embedding representations and the channel embedding representation of the noise data in the final embedding representation as the negative samples, and performing contrastive learning on the medical data classifier to obtain a trained medical data classifier;
[0024] A classification module for classifying the EEG data in the medical field using the trained medical data classifier.
[0025] On the other hand, a device for classifying EEG time-series data in the medical field is provided. The device for classifying EEG time-series data in the medical field includes: a processor; a memory, and computer-readable instructions are stored on the memory. When the computer-readable instructions are executed by the processor, any one of the methods in the above method for classifying EEG time-series data in the medical field is implemented.
[0026] On the other hand, a computer-readable storage medium is provided, in which at least one instruction is stored, 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 by the technical solutions provided in the embodiments of the present invention at least include:
[0028] Through time-frequency domain complementarity and cross-domain reconstruction, different perspectives in the time domain and frequency domain are effectively fused, making up for the deficiencies of single-domain learning. This enables the model to make full use of time-domain information and frequency-domain information, enhance the anti-noise ability from a more comprehensive perspective, and learn more robust electroencephalogram features. At the same time, background noise is introduced as negative samples to construct a signal-noise discrimination task. This forces the model to learn finer-grained discrimination boundaries and enhances the ability to distinguish various irrelevant noise interferences. Compared with the traditional contrast learning method that only uses normal samples, the present invention can better adapt to complex and changeable real-world scenarios. In addition, the dynamic channel attention alignment mechanism uses frequency-domain information to guide the time domain and helps repair the channel dependence relationship damaged by noise. This endows the model with the ability to adaptively resist changes in channel correlation and makes it more robust at the channel level. In summary, through innovative mechanisms such as cross-domain reconstruction, heterogeneous negative sample contrast, and channel alignment, the embodiments of the present invention comprehensively enhance the ability of the self-supervised learning model to resist various noise interferences. Description of the Drawings
[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0030] Figure 1 is a flowchart of a method for classifying electroencephalogram time-series data in the medical field provided by the embodiments of the present invention;
[0031] Figure 2 is a block diagram of a device for classifying electroencephalogram time-series data in the medical field provided by the embodiments of the present invention;
[0032] Figure 3 is a schematic structural diagram of a device for classifying electroencephalogram time-series data in the medical field provided by the embodiments of the present invention. Detailed Embodiments
[0033] The following describes the technical solutions in the present invention with reference to the drawings.
[0034] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to give examples, illustrations or explanations. Any embodiment or design solution described as an "example" in the present invention should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of the word "example" is intended to present concepts in a specific way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one of the two.
[0035] In the embodiments of the present invention, "image" and "picture" can sometimes be used interchangeably. It should be noted that when the difference is not emphasized, their intended meanings are the same. "of", "corresponding", and "corresponding" can sometimes be used interchangeably. It should be noted that when the difference is not emphasized, their intended meanings are the same.
[0036] In the embodiments of the present invention, sometimes a subscript such as W 1 may be written in a non-subscript form such as W1. When the difference is not emphasized, their intended meanings are the same.
[0037] To make the technical problems, technical solutions and advantages to be solved by the present invention clearer, the following will be described in detail with reference to the accompanying drawings and specific embodiments.
[0038] The embodiments of the present invention provide a method for classifying electroencephalogram (EEG) time series data in the medical field. This method can be implemented by an EEG time series data classification device in the medical field, and this EEG time series data classification device in the medical field can be a terminal or a server. As Figure 1 shown in the flowchart of the method for classifying EEG time series data in the medical field, this method mainly includes four processes, namely data preprocessing, cross-domain reconstruction, channel attention alignment, and contrast learning through additional noise negative samples. Each process also includes at least one step. The processing flow of this method can include the following steps:
[0039] The first process, data preprocessing:
[0040] In a feasible implementation, through data preprocessing, original samples, enhanced samples, and noise samples in the time domain and frequency domain can be obtained. This process can include the following steps S1 - S2:
[0041] S1. Obtain the original EEG data in the medical field and convert the time-domain data in the original EEG data into frequency-domain data.
[0042] In a feasible implementation, band-pass noise will cause serious spectral loss problems. Therefore, it is necessary to convert the 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 enhanced data and frequency-domain noise data from the frequency-domain data, and convert the frequency-domain data, the frequency-domain enhanced data, and the frequency-domain noise data back to the time domain to obtain the converted time-domain data, time-domain enhanced data, and time-domain noise data.
[0044] Optionally, the specific operations of S2 may include the following S21 - S22:
[0045] S21. Filter out some frequencies from the frequency-domain data through a random mask to obtain enhanced data.
[0046] S22. Extract the frequency band part from 1 Hz to 30 Hz through band-pass filtering and determine it as noise data.
[0047] Second process, cross-domain reconstruction:
[0048] In a feasible implementation, obtain representations for each channel in the sample through a Transformer and perform cross-domain reconstruction. This process may include the following steps S3 - S4:
[0049] S3. Respectively 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 channel embedding representations at the feature level.
[0050] In a feasible implementation, for an electroencephalogram data, embed the data of each of its channels separately.
[0051] In addition, passing the data through a first Transformer to obtain a channel embedding representation at the feature level is a commonly used technical means in the prior art, and the embodiments of the present invention will not elaborate on this here.
[0052] S4. Reconstruct the channel embedding representation of the frequency-domain data according to the channel embedding representation of the time-domain enhanced data, and reconstruct the channel embedding representation of the time-domain data according to the channel embedding representation of the frequency-domain enhanced data.
[0053] Optionally, the specific operations of S4 may include S41 - S42:
[0054] S41. Pass 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. Pass the channel embedding representation of the frequency-domain enhanced data 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 realizes cross-domain reconstruction in the feature space. Specifically, the model first maps the time domain and frequency domain signals to the corresponding feature space respectively, and then uses the features of the enhanced samples of one domain as input to reconstruct the features of the original samples of 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, it would be difficult for the present invention to fully utilize the time and frequency domain information, and the noise reduction capability would be greatly reduced.
[0057] The third process, channel attention alignment:
[0058] In a feasible implementation, in this process, the representation of each channel in the sample is passed through the Transformer to obtain channel attention and align. The process may include the following steps S5-S6:
[0059] S5. According to the channel embedding representation of the reconstructed frequency domain data and the channel embedding representation of the reconstructed time domain data, the attention between the channels and the final embedding representation of each data are obtained through the respective second Transformers.
[0060] It should be noted that the second Transformer is different from the first Transformer mentioned above in terms of feature level. This is a conventional operation in this technical field and will not be elaborated 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 the channel attention in the time domain to align the channel attention in the frequency domain.
[0064] In a feasible implementation, the introduction of noise will disrupt the original dependency between channels and reduce model performance. To address this problem, the embodiment of the present invention cleverly uses frequency domain channel attention to guide time domain channel attention. Since the frequency domain channel relationship is more stable to noise, using it as a reference can help correct the channel relationship destroyed by noise in the time domain. This alignment mechanism gives the model the ability to dynamically adapt to noise disturbances. Without the key technology of channel alignment, the model will not be able to effectively cope with changes in channel correlation, and the robustness will be seriously affected.
[0065] The fourth step is to conduct contrastive learning through additional noise negative samples:
[0066] In a feasible implementation manner, during this process, contrast learning with visual noise samples as additional negative samples is performed in the time domain and the frequency domain respectively. This process may include the following step S7:
[0067] S7. Generate samples of electroencephalogram raw data according to the final embedded representations of each data, determine the channel embedded representations of the enhanced data as positive samples, and determine the remaining channel embedded representations in the final embedded representations and the channel embedded representations of the noise data as negative samples, and perform contrast learning on the medical data classifier to obtain a trained medical data classifier.
[0068] Optionally, the specific operation process of generating samples of electroencephalogram raw data in S7 may be as follows:
[0069] Pass the final embedded representations of each data through the fully connected layer projection head to obtain samples of electroencephalogram raw data.
[0070] In a feasible implementation manner, through contrast learning by pulling similar samples closer and pushing different samples apart, discriminative feature representations can be learned. However, the negative samples of existing contrast learning methods are limited to normal samples, ignoring the uniqueness of background noise. To break through this limitation, the present invention innovatively introduces background noise as negative samples and constructs a signal-noise discrimination task. This forces the model to learn finer-grained discrimination boundaries and enhances the ability to distinguish target signals and background noise. Without contrast learning with heterogeneous negative samples, it is difficult for the model to effectively identify various noise interferences, and its generalization ability in complex environments will be restricted.
[0071] S8. Use the trained medical data classifier to classify electroencephalogram data in the medical field.
[0072] In the embodiments of the present invention, through time-frequency domain complementarity and cross-domain reconstruction, different perspectives of the time domain and the frequency domain are effectively fused, making up for the deficiencies of single-domain learning. This enables the model to make full use of time domain information and frequency domain information, enhance the noise resistance from a more comprehensive perspective, and learn more robust electroencephalogram representations. At the same time, background noise is introduced as negative samples to construct a signal-noise discrimination task. This forces the model to learn finer-grained discrimination boundaries and enhances the ability to identify various irrelevant noise interferences. Compared with traditional contrast learning methods that only use normal samples, the present invention can better adapt to complex and changeable real-world scenarios. In addition, the dynamic channel attention alignment mechanism uses frequency domain information to guide the time domain and helps repair the channel dependence relationship damaged by noise. This endows the model with the ability to adaptively resist changes in channel correlation and makes it more robust at the channel level. In summary, the embodiments of the present invention comprehensively enhance the ability of the self-supervised learning model to resist various noise interferences through innovative mechanisms such as cross-domain reconstruction, heterogeneous negative sample contrast, and channel alignment.
[0073] Figure 2 It 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. This device is used for the electroencephalogram time-series data classification method in the medical field. Refer to Figure 2 , this device includes:
[0074] The first conversion module 210 is used to obtain the original electroencephalogram data in the medical field and convert the time-domain data in the original electroencephalogram data into frequency-domain data;
[0075] The second conversion module 220 is used to obtain frequency-domain enhanced data and frequency-domain noise data according to the frequency-domain data, convert the frequency-domain data, frequency-domain enhanced data and frequency-domain noise data back to the time domain, and obtain the converted time-domain data, time-domain enhanced data and time-domain noise data;
[0076] The first feature embedding module 230 is used to respectively 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 channel embedding representations at the feature level;
[0077] The reconstruction module 240 is used to reconstruct the channel embedding representation of the frequency-domain data according to the channel embedding representation of the time-domain enhanced data, and reconstruct the channel embedding representation of the time-domain data according to the channel embedding representation of the frequency-domain enhanced data;
[0078] The second feature embedding module 250 is used to obtain the attention between each channel and the final embedding representation of each data through their respective second Transformers according to the reconstructed channel embedding representation of the frequency-domain data and the reconstructed channel embedding representation of the time-domain data;
[0079] The attention guidance module 260 is used to use the attention in the frequency domain to guide the attention in the time domain;
[0080] The contrastive learning module 270 is used to generate samples of the original electroencephalogram data according to the final embedding representation of each data, determine the channel embedding representation of the enhanced data as the positive sample, determine the remaining channel embedding representations in the final embedding representation and the channel embedding representation of the noise data as the 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 electroencephalogram data in the medical field by using the trained medical data classifier.
[0082] In the embodiments of the present invention, through time-frequency domain complementarity and cross-domain reconstruction, different perspectives in the time domain and frequency domain are effectively integrated, making up for the deficiencies of single-domain learning. This enables the model to make full use of time-domain information and frequency-domain information, enhance noise resistance from a more comprehensive perspective, and learn more robust EEG representations. At the same time, background noise is introduced as a negative sample to construct a signal-noise discrimination task. This forces the model to learn a finer-grained discrimination boundary and enhances the ability to distinguish various irrelevant noise interferences. Compared with traditional contrastive learning methods that only use normal samples, the present invention can better adapt to complex and changing real-world scenarios. In addition, the dynamic channel attention alignment mechanism uses frequency-domain information to guide the time domain and helps repair the channel dependence relationship damaged by noise. This endows the model with the ability to adaptively resist changes in channel correlation and makes it more robust at the channel level. In summary, the embodiments of the present invention comprehensively enhance the ability of the self-supervised learning model to resist various noise interferences through innovative mechanisms such as cross-domain reconstruction, heterogeneous negative sample contrast, and channel alignment.
[0083] Figure 3 is a schematic structural diagram of an EEG time-series data classification device in the medical field provided by the embodiments of the present invention, as Figure 3 shown, the EEG time-series data classification device in the medical field may include the above-mentioned Figure 2 shown EEG time-series data classification device in the medical field. Optionally, the EEG time-series data classification device 310 in the medical field may include a first processor 2001.
[0084] Optionally, the EEG time-series data classification device 310 in the medical field may further include a memory 2002 and a transceiver 2003.
[0085] Among them, the first processor 2001 is connected to the memory 2002 and the transceiver 2003, such as through a communication bus.
[0086] Next, in combination with Figure 3 each component of the EEG time-series data classification device 310 in the medical field will be specifically introduced:
[0087] Among them, the first processor 2001 is the control center of the electroencephalogram time-series data classification device 310 in the medical field, which can be a single processor or a collective term for multiple processing elements. For example, the first processor 2001 is one or more central processing units (CPUs), or can be an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. For example: one or more digital signal processors (DSPs), or one or more field programmable gate arrays (FPGAs).
[0088] Optionally, the first processor 2001 can execute various functions of the electroencephalogram time-series data classification device 310 in the medical field by running or executing software programs 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 the CPU0 and CPU1 shown in
[0090] In a specific implementation, as an embodiment, the electroencephalogram time-series data classification device 310 in the medical field may also include multiple processors, such as Figure 3 the first processor 2001 and the second processor 2004 shown in
[0091] Each of these processors can be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). Here, the processor can refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).
[0092] Optionally, the memory 2002 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or may also be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM), or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 2002 may be integrated with the first processor 2001 or may exist independently and be coupled to the first processor 2001 through an interface circuit ( Figure 3 not shown) of the electroencephalogram time series data classification device 310 in the medical field. The embodiments of the present invention do not make specific limitations on this.
[0093] The transceiver 2003 is used to communicate with a network device or communicate with a terminal device.
[0094] Optionally, the transceiver 2003 may include a receiver and a transmitter ( Figure 3 not shown separately). Among them, the receiver is used to implement the receiving function, and the transmitter is used to implement the sending function.
[0095] Optionally, the transceiver 2003 may be integrated with the first processor 2001 or may exist independently and be coupled to the first processor 2001 through an interface circuit ( Figure 3 not shown) of the electroencephalogram time series data classification device 310 in the medical field. The embodiments of the present invention do not make specific limitations on this.
[0096] It should be noted that Figure 3 the structure of the electroencephalogram time series data classification device 310 in the medical field shown does not constitute a limitation on the router. The actual knowledge structure recognition device may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0097] In addition, the technical effects of the electroencephalogram time series data classification device 310 in the medical field may refer to the technical effects of the electroencephalogram time series data classification method in the above method embodiments, which will not be elaborated here.
[0098] It should be understood that the first processor 2001 in the embodiments of the present invention may be a central processing unit (CPU), and the processor 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 the processor may also be any conventional processor, etc.
[0099] It should also be understood that the memory in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM) or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM) and direct rambus RAM (DR RAM).
[0100] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware, or any 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 includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the processes or functions described in the embodiments of the present invention are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. 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 (such as infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more collections of available media. The available media can be magnetic media (such as floppy disks, hard disks, magnetic tapes), optical media (such as DVDs), or semiconductor media. The semiconductor media can be a solid-state drive.
[0101] It should be understood that the term "and / or" in this document is merely a description of the association relationship between associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. Here, A and B can be singular or plural. Additionally, the character " / " in this document generally represents an "or" relationship between the associated objects before and after, but it may also represent an "and / or" relationship, which can be specifically understood by referring to the context.
[0102] In the present invention, "at least one" means one or more, and "a plurality" means two or more. "At least one of the following" or its similar expressions refer to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, a - b, a - c, b - c, or a - b - c, where a, b, and c can be single or multiple.
[0103] It should be understood that in various embodiments of the present invention, the magnitudes of the serial numbers of the above processes do not mean the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
[0104] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or by a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0105] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the devices, apparatuses, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0106] In 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 only a logical function division, and there can be other division methods in actual implementation. For example, 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 displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be in an electrical, mechanical, or other form.
[0107] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place, or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0108] In addition, the functional units in each embodiment of the present invention can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.
[0109] When the above-mentioned functions are implemented in the form of 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, in essence, or the part that contributes to the prior art, or a part of this 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 causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs.
[0110] The above is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should all be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope 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 according to 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, 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 a channel embedding representation at the feature level; S4, reconstructing the channel embedding representation of the frequency domain data according to the channel embedding representation of the time domain enhanced data, and reconstructing the channel embedding representation of the time domain data according to the channel embedding representation of the frequency domain enhanced data; S5, according to 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 the attention in the frequency domain to guide the attention in the time domain; S7, generating samples of the original EEG data according to the final embedding representations of each data, determining the channel embedding representations of the enhanced data as positive samples, determining the remaining channel embedding representations in the final embedding representation and the channel embedding representations of the noise data as negative samples, performing comparative learning on the medical data classifier, and obtaining a trained medical data classifier; S8. Use the trained medical data classifier to classify the EEG data in the medical field.
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 according to 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 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, reconstructing the channel embedding representation of the frequency domain data by passing the channel embedding representation of the time domain enhanced data through a fully connected layer; The step S4 reconstructs the channel embedding representation of the time domain data according to the channel embedding representation of the frequency domain enhanced data, including: 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.
4. 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 the channel attention in the time domain to align the channel attention in the frequency domain.
5. 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.
6. A device for classifying electroencephalogram time series data in the medical field, the device for classifying electroencephalogram time series data in the medical field is used to implement the method for classifying electroencephalogram time series data in the medical field as claimed in any one of claims 1 to 5, 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 according to 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; A first feature embedding module is used to obtain a channel embedding representation at a feature level by passing 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; A reconstruction module, used to reconstruct the channel embedding representation of the frequency domain data according to the channel embedding representation of the time domain enhanced data, and to reconstruct the channel embedding representation of the time domain data according to the channel embedding representation of the frequency domain enhanced data; A 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 according to 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, 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 according to the final embedding representations of each 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; The classification module is used to classify EEG data in the medical field using the trained medical data classifier.
7. The electroencephalogram time series data classification device in the medical field according to claim 6, characterized in that: The second conversion module is used 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.
8. The electroencephalogram time series data classification device in the medical field according to claim 6, characterized in that: The reconstruction module is used to: S41, reconstructing the channel embedding representation of the frequency domain data by passing the channel embedding representation of the time domain enhanced data through a fully connected layer; The step S4 reconstructs the channel embedding representation of the time domain data according to the channel embedding representation of the frequency domain enhanced data, including: 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.
9. 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 5 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program codes, which can be called by a processor to execute the method according to any one of claims 1 to 5.
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
Cross-domain unrolling-based imaging photoplethysmography systems and methods for estimating vital signs
US20250072773A1