Plug-and-play intelligent electroencephalogram signal preprocessing device and method
By connecting to the EEG acquisition device through the communication module to obtain metadata, the controller automatically sets the sampling rate and number of channels to perform steps such as filtering, resampling, bad conduction repair and noise reduction, which solves the problem of low compatibility between different devices and improves the efficiency and quality of EEG signal preprocessing.
Patent Information
- Application Number
- CN202510993395.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-18
- Publication Date
- 2025-11-04
AI Technical Summary
In the existing technology, different models and specifications of EEG acquisition devices require users to manually configure the environment and set parameters, resulting in low efficiency of EEG signal preprocessing and adaptation.
The controller connects to the EEG acquisition device via a communication module to obtain metadata. Based on the metadata, the controller sets the sampling rate and number of channels in the preprocessing process, including steps such as filtering, resampling, bad conduction repair, and noise reduction, to achieve automated preprocessing.
It achieves plug-and-play high-efficiency adaptation, improves the efficiency and quality of EEG signal preprocessing, and simplifies the adaptation process between different devices.
Smart Images

Figure CN120884302A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of electroencephalogram signal processing, and particularly relates to a plug-and-play intelligent electroencephalogram signal preprocessing device and method. BACKGROUND
[0002] Electroencephalogram technology is widely used in various sports neuroscience, cognitive neuroscience, psychology and other scientific research laboratories, and has become an important research tool for analyzing the motor control function, cognitive processing, emotion, sleep and disorders of the human brain. The raw electroencephalogram signal needs to be preprocessed in a series of operations before being further analyzed. In the related art, the electroencephalogram signals collected by electroencephalogram acquisition devices of different models and specifications need to be preprocessed. When pre-processing the electroencephalogram signals collected by electroencephalogram acquisition devices of different models and specifications, the user needs to configure the corresponding environment, set the relevant parameters, and download the corresponding software program, so as to realize the preprocessing of the electroencephalogram signals collected by electroencephalogram acquisition devices of different models and specifications. The adaptation efficiency is low. SUMMARY
[0003] Therefore, the embodiments of the present application provide a plug-and-play intelligent electroencephalogram signal preprocessing device and method, which can set the sampling rate and the number of channels in the preprocessing flow based on the metadata of the electroencephalogram acquisition device, realize efficient adaptation, and improve the preprocessing efficiency of the electroencephalogram signal.
[0004] In a first aspect, the embodiments of the present application provide a plug-and-play intelligent electroencephalogram signal preprocessing device, comprising:
[0005] A communication module, configured to be in communication connection with an electroencephalogram acquisition device, and acquire metadata of the electroencephalogram acquisition device and electroencephalogram signals collected by the electroencephalogram acquisition device from the electroencephalogram acquisition device;
[0006] A controller connected with the communication module, configured to:
[0007] Set the sampling rate and the number of channels in a preprocessing flow based on the metadata, wherein the preprocessing flow comprises at least one processing step of filtering, resampling, bad lead repair, noise reduction and signal re-reference;
[0008] Preprocess the electroencephalogram signals based on the preprocessing flow.
[0009] In some embodiments, the controller is configured to preprocess the electroencephalogram signals based on the preprocessing flow, comprising:
[0010] In the case where the preprocessing flow comprises filtering, the electroencephalogram signals are read into a preprocessing buffer window in a preset window;
[0011] perform zero-phase band-pass filtering on the pre-processing buffer window based on a preset frequency range.
[0012] In some embodiments, the controller is configured to pre-process the electroencephalogram signals based on the pre-processing procedure, including:
[0013] In a case where the pre-processing procedure includes bad channel repair, obtaining signal variances of respective electroencephalogram acquisition channels;
[0014] In a case where a similarity between the signal variance of the target electroencephalogram acquisition channel and signal variances of other electroencephalogram acquisition channels is less than a similarity threshold, determining the target electroencephalogram acquisition channel as a bad channel;
[0015] In a case where the number of channels is greater than a channel number threshold, repairing the electroencephalogram signal of the bad channel.
[0016] In some embodiments, the controller is configured to repair the electroencephalogram signal of the bad channel, including:
[0017] obtaining electroencephalogram signals of electroencephalogram acquisition channels within a preset range from the bad channel;
[0018] calculating a mean value of the electroencephalogram signals of the electroencephalogram acquisition channels within the preset range from the bad channel;
[0019] determining the mean value as the electroencephalogram signal of the bad channel to repair the electroencephalogram signal of the bad channel.
[0020] In some embodiments, the controller is further configured to:
[0021] In a case where the number of channels is less than or equal to the channel number threshold, outputting prompt information, the prompt information being used to prompt that the electroencephalogram signal of the bad channel is abnormal.
[0022] In some embodiments, the plug-and-play intelligent electroencephalogram signal pre-processing device further includes:
[0023] a user interface module configured to provide configuration options, the configuration options being used to configure a pre-processing procedure and pre-processing parameters of the pre-processing procedure;
[0024] the controller is further configured to:
[0025] obtain a configuration operation of a user through the configuration options in the user interface;
[0026] obtain the pre-processing procedure based on the configuration operation.
[0027] In some embodiments, the controller is configured to obtain the pre-processing procedure based on the configuration operation, including:
[0028] In a case where the configuration operation comprises a noise reduction configuration, a target noise reduction network model is loaded from a noise reduction algorithm model library based on the noise reduction configuration to obtain the preprocessing procedure;
[0029] The controller is configured to preprocess the electroencephalogram signal based on the preprocessing procedure, comprising:
[0030] The electroencephalogram signal is processed based on the target noise reduction network model.
[0031] In some embodiments, in a case where the preprocessing procedure comprises filtering, resampling, bad lead repair, noise reduction, and signal re-reference, the processing order of the preprocessing procedure is filtering, resampling, bad lead repair, noise reduction, and signal re-reference in sequence.
[0032] In some embodiments, the communication module is further configured to transmit the preprocessed electroencephalogram signal to a target device.
[0033] In a second aspect, the embodiments of the present application provide a plug-and-play intelligent electroencephalogram signal preprocessing method, comprising:
[0034] Obtaining metadata of an electroencephalogram acquisition device and an electroencephalogram signal acquired by the electroencephalogram acquisition device;
[0035] Setting a sampling rate and a number of channels in a preprocessing procedure based on the metadata, the preprocessing procedure comprising at least one processing step of filtering, resampling, bad lead repair, noise reduction, and signal re-reference;
[0036] Preprocessing the electroencephalogram signal based on the preprocessing procedure.
[0037] In a third aspect, the embodiments of the present application provide an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the method described above when executing the computer program.
[0038] In a fourth aspect, the embodiments of the present application provide a plug-and-play intelligent electroencephalogram signal preprocessing device, comprising the electronic device of the third aspect.
[0039] In a fifth aspect, the embodiments of the present application provide a computer readable storage medium, the computer readable storage medium storing a computer program, and the computer program is executed by a processor to implement the method described above.
[0040] In a sixth aspect, the embodiments of the present application provide a computer program product, when the computer program product is run on a terminal device, the electronic device executes the method described above.
[0041] The beneficial effects of the embodiments of the present application compared with the prior art are:
[0042] The pre-processing device for plug-and-play intelligent electroencephalogram signals provided by the embodiments of the present application is in communication connection with an electroencephalogram acquisition device through a communication module, and acquires metadata of the electroencephalogram acquisition device and electroencephalogram signals collected by the electroencephalogram acquisition device; a controller is connected with the communication module, and the controller sets a sampling rate and a number of channels in a pre-processing procedure based on the metadata, the pre-processing procedure including at least one processing step of filtering, resampling, bad lead repair, noise reduction, and signal re-reference; the electroencephalogram signals are pre-processed based on the pre-processing procedure, the sampling rate and the number of channels in the pre-processing procedure can be set based on the metadata of the electroencephalogram acquisition device, efficient adaptation is achieved, and the pre-processing efficiency of the electroencephalogram signals is improved. BRIEF DESCRIPTION OF DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0044] Figure 1 A structure schematic diagram of the pre-processing device for plug-and-play intelligent electroencephalogram signals provided by the embodiments of the present application is shown in the figure.
[0045] Figure 2 A structure schematic diagram of another pre-processing device for plug-and-play intelligent electroencephalogram signals provided by the embodiments of the present application is shown in the figure.
[0046] Figure 3 A structure schematic diagram of still another pre-processing device for plug-and-play intelligent electroencephalogram signals provided by the embodiments of the present application is shown in the figure.
[0047] Figure 4 A software block diagram provided by the embodiments of the present application is shown in the figure.
[0048] Figure 5 An implementation flowchart of the pre-processing method for plug-and-play intelligent electroencephalogram signals provided by the embodiments of the present application is shown in the figure.
[0049] Figure 6 A structure schematic diagram of an electronic device provided by the embodiments of the present application is shown in the figure. DETAILED DESCRIPTION
[0050] In the following description, for purposes of explanation and not limitation, specific details are set forth such as particular architectures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application can be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known methods, devices, circuits, and
[0051] It is to be understood that the terminology "includes", "has", "holds", "contains" and / or "comprising", when used in this specification and in the following claims, indicates the presence of the described features, integers, steps, operations, elements, and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0052] It is also to be understood that the terminology "and / or" when used in this specification and in the following claims, refers to at least one of the items, or any combination of the items, listed after the term.
[0053] As used in this specification and in the claims, the terms "if" and "when" can be interpreted to mean "upon" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if determined" or "if detected" can be interpreted to mean "upon determining" or "in response to determining" or "upon detecting" or "in response to detecting", depending on the context.
[0054] In addition, the terms "first", "second", "third", etc. in the description of the application are used only to distinguish descriptions, and cannot be understood as indicating or implying relative importance.
[0055] Reference in the specification to "one embodiment" or "some embodiments" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the application. The appearances of the phrase "in one embodiment" or "in some embodiments" in various places in the specification are not necessarily all referring to the same embodiment, although it can. The specific features, structures, or characteristics can be combined in one or more embodiments.
[0056] Based on the problems in the related art, the embodiments of the present application provide a plug and play intelligent electroencephalogram signal preprocessing device, the plug and play intelligent electroencephalogram signal preprocessing device comprises: a communication module, configured to be in communication connection with an electroencephalogram acquisition device, and configured to acquire metadata of the electroencephalogram acquisition device and an electroencephalogram signal collected by the electroencephalogram acquisition device; and a controller, connected with the communication module, and configured to set a sampling rate and a number of channels in a preprocessing procedure based on the metadata, the preprocessing procedure comprising at least one processing step of filtering, resampling, bad lead repair, noise reduction, and signal re-reference; and configured to preprocess the electroencephalogram signal based on the preprocessing procedure.
[0057] In the embodiments of the present application, the communication module is a component responsible for data interaction with the electroencephalogram acquisition device in the electroencephalogram signal processing device. The main function of the communication module is to establish a communication connection with the electroencephalogram acquisition device, and to acquire metadata of the two electroencephalogram acquisition devices and the electroencephalogram signal collected by the electroencephalogram acquisition device in real time from the electroencephalogram acquisition device through a specific communication protocol. The metadata contains basic information of the electroencephalogram acquisition device, such as sampling rate, number of channels, device model, etc.; the electroencephalogram signal is raw data reflecting the state of brain activity. The controller is the core control unit of the electroencephalogram signal processing device, which is closely connected with the communication module. The core task of the controller has two aspects: one is to flexibly set the sampling rate and the number of channels in the preprocessing procedure based on the metadata of the electroencephalogram acquisition device acquired from the communication module. The preprocessing procedure covers multiple processing steps, including filtering, resampling, bad lead repair, noise reduction, signal re-reference, etc., and the controller can select at least one step to form the preprocessing procedure according to actual needs; the other is to perform actual preprocessing operation on the electroencephalogram signal transmitted by the communication module according to the set preprocessing procedure, so as to improve the quality of the electroencephalogram signal and provide a reliable data basis for subsequent analysis and application.
[0058] In the embodiments of the present application, the metadata includes the sampling rate, the number of channels, and the names of each channel. The sampling rate represents the number of times the electroencephalogram acquisition device collects electroencephalogram signals per second. Different sampling rates will affect the accuracy of the electroencephalogram signals and the effect of subsequent processing. The number of channels reflects the number of channels of the electroencephalogram acquisition device collecting electroencephalogram signals. Each channel corresponds to a specific area of the scalp of the brain. The number of channels will affect the monitoring range and accuracy of the brain neural activity. Electroencephalogram signals are electrical signals generated by the activity of neurons in the brain. They are collected by an electroencephalogram acquisition device. They reflect the activity of the brain in different states, such as sleep, wakefulness, thinking, etc. Because the electroencephalogram signals are very weak and easily affected by various noises and disturbances, they need to be preprocessed to improve their quality and reliability for subsequent accurate analysis and research. The preprocessing procedure is a collection of a series of processing operations on electroencephalogram signals, aiming to remove noise and interference in the electroencephalogram signals, repair possible signal defects, and improve the quality and usability of the signals. The preprocessing procedure includes at least one of filtering, resampling, bad lead repair, noise reduction, and signal re-reference. These steps can be combined and executed in a certain order to achieve the best preprocessing effect.
[0059] In the embodiments of the present application, the communication module first establishes a communication connection with the electroencephalogram acquisition device. If it is connected through Bluetooth, the communication module will search for nearby electroencephalogram acquisition devices and try to establish a paired connection with them. If it is connected through USB, the communication module will detect whether the inserted USB device is an electroencephalogram acquisition device and perform corresponding data transmission initialization. After establishing the connection, the communication module obtains the metadata and electroencephalogram signals from the electroencephalogram acquisition device according to the predetermined data transmission protocol. The metadata is usually transmitted in a specific data format, and the communication module can recognize and parse these data to extract the sampling rate, the number of channels, and other key information. The electroencephalogram signals are transmitted in the form of continuous data streams, and the communication module needs to receive these data in real time and store them in the buffer for subsequent transmission to the controller for processing. After receiving the metadata transmitted by the communication module, the controller sets the sampling rate and the number of channels in the preprocessing procedure according to these data. For example, if the metadata shows that the sampling rate of the electroencephalogram acquisition device is 1000 Hz, and the controller needs to reduce the sampling rate to 500 Hz according to the subsequent processing requirements, the controller will set the parameters of the resampling module to set the target sampling rate to 500 Hz. For the number of channels, the controller will determine the number of channels to be processed in the preprocessing procedure according to the channel number information provided in the metadata. If the metadata shows that there are 32 channels, the controller will set the number of channels to 32 and perform corresponding processing on the electroencephalogram signals of the 32 channels in the subsequent preprocessing operation.
[0060] In the embodiments of the present application, after setting the sampling rate and the number of channels in the preprocessing procedure, the electroencephalogram signal is preprocessed based on the preprocessing procedure.
[0061] The plug-and-play intelligent electroencephalogram signal preprocessing device provided by the embodiments of the present application is in communication connection with an electroencephalogram acquisition device through a communication module, and acquires metadata of the electroencephalogram acquisition device and an electroencephalogram signal collected by the electroencephalogram acquisition device. A controller is connected with the communication module, and is configured to set a sampling rate and a number of channels in a preprocessing procedure based on the metadata, wherein the preprocessing procedure includes at least one processing step of filtering, resampling, bad lead repair, noise reduction, and signal re-reference. The electroencephalogram signal is preprocessed based on the preprocessing procedure, the sampling rate and the number of channels in the preprocessing procedure can be set based on the metadata of the electroencephalogram acquisition device, efficient adaptation can be achieved, and the preprocessing efficiency of the electroencephalogram signal is improved.
[0062] In some embodiments, the controller is configured to preprocess the electroencephalogram signal based on the preprocessing procedure, which can be achieved by the following steps:
[0063] In step S1, in the case where the preprocessing procedure includes filtering, the electroencephalogram signal is read into a preprocessing buffer window in a preset window.
[0064] In the embodiments of the present application, filtering is an important step in the preprocessing procedure, and its purpose is to remove noise and interference of specific frequency components in the electroencephalogram signal. For example, low-frequency drift (such as baseline drift) and high-frequency noise (such as electromyographic interference) can seriously affect the quality of the electroencephalogram signal. Through filtering operation, useful frequency components in the electroencephalogram signal can be selectively retained, and unnecessary frequency components can be removed, thereby improving the signal-to-noise ratio of the signal. The preset window refers to a fixed length of signal extracted from continuous electroencephalogram signal stream when processing the electroencephalogram signal. The length of this window can be set according to actual needs, for example, 1 second, 2 seconds, etc. The function of the preset window is to divide the continuous electroencephalogram signal into individual data blocks for separate processing of each data block. The preprocessing buffer window is a storage area for temporarily storing the preset window data extracted from the electroencephalogram signal. In the preprocessing process, the electroencephalogram signal is first read into the preprocessing buffer window, and then various preprocessing operations are performed in this window, such as filtering, resampling, etc. The size of the preprocessing buffer window corresponds to the size of the preset window, which provides a stable data input source for subsequent preprocessing operations.
[0065] In the embodiments of the present application, the length of the preset window is determined according to actual requirements and characteristics of the electroencephalogram signal. For example, if the sampling rate of the electroencephalogram signal is 1000 Hz, in order to capture some characteristics of the electroencephalogram signal, such as electroencephalogram rhythm (for example, the frequency range of alpha rhythm is 8-13 Hz), the length of the preset window can be set to 1 second, so that each window contains 1000 sampling points. The corresponding data can be cut from the continuous electroencephalogram signal stream according to the length of the preset window. This can be achieved by setting a pointer or index, starting from the beginning of the electroencephalogram signal stream, and moving a distance of the length of the preset window each time to cut the corresponding data segment. For example, if the electroencephalogram signal stream is a time series with a starting time of t0 and a preset window length of 1 second, the data range of the first window is from t0 to t0+1 second, the data range of the second window is from t0+1 second to t0+2 second, and so on. The cut window data is stored in the preprocessing buffer window. The preprocessing buffer window can be a memory buffer or an array, and its size corresponds to the length of the preset window. When reading data into the preprocessing buffer window, a first-in-first-out method can be used, that is, when new window data is read in, if the preprocessing buffer window is full, the earliest read data is removed to ensure that the preprocessing buffer window always stores the latest window data.
[0066] In step S2, zero-phase band-pass filtering is performed on the preprocessing buffer window based on a preset frequency range.
[0067] In the embodiments of the present application, the preset frequency range refers to the frequency range of signals allowed to pass during filtering. This range can be set according to the characteristics of the electroencephalogram signal and actual requirements, for example, set to 0.5-50 Hz. Signals within this frequency range are considered useful components of the electroencephalogram signal, while signals outside this range are considered noise and interference and will be removed by the filter. Zero-phase band-pass filtering is a special filtering method that can remove unwanted frequency components while avoiding signal phase distortion. Zero-phase band-pass filtering uses a specific filtering algorithm and design to make the frequency components of the filtered signal maintain the same phase relationship as the original signal in the time domain, thereby ensuring the integrity and accuracy of the signal.
[0068] In the embodiments of the present application, the parameters of the band-pass filter can be designed according to the preset frequency range. The parameters of the band-pass filter include the cutoff frequency, the filter order, etc. The cutoff frequency determines the frequency range of the signal allowed to pass, for example, if the preset frequency range is 0.5Hz-50Hz, then the low cutoff frequency is 0.5Hz and the high cutoff frequency is 50Hz. The filter order determines the filtering effect and the calculation complexity of the filter. Generally speaking, the higher the filter order, the better the filtering effect, but the greater the calculation complexity. The appropriate filter order can be selected according to the actual demand and the calculation resource condition. The zero-phase band-pass filtering includes: first, forward filtering the electroencephalogram signal in the preprocessing buffer window, that is, filtering the signal from front to back in the time sequence. In the forward filtering process, the designed band-pass filter is used to filter the signal to obtain the forward filtered signal. Then, reverse filtering the forward filtered signal, that is, filtering the signal from back to front in the time sequence. In the reverse filtering process, the designed band-pass filter is also used to filter the signal to obtain the signal filtered twice by forward and reverse, that is, the signal filtered by zero-phase band-pass filtering. The phase delay of the zero-phase filtering to different frequency components of the signal is zero, which can effectively eliminate the phase distortion and make the filtered signal maintain the same phase relationship with the original signal in the time domain.
[0069] In the embodiments of the present application, the designed filter is applied to the electroencephalogram signal in the preprocessing buffer window, and the filtering process is performed according to the above-mentioned zero-phase filtering algorithm. In the filtering process, the stability and calculation efficiency of the filter need to be ensured to avoid numerical instability or excessive calculation time. The filtered electroencephalogram signal is output from the preprocessing buffer window for subsequent preprocessing steps or analysis applications. The output method can be to store the filtered signal directly into the memory, or to transmit the signal to other devices or modules for processing through a communication interface.
[0070] The plug-and-play intelligent electroencephalogram signal preprocessing device provided in the embodiments of the present application divides the electroencephalogram signal into a plurality of relatively independent data blocks by using a preset window, and such a data structure facilitates parallel processing. In a multi-core processor or a distributed computing system, the data of different windows can be distributed to different computing cores or nodes for simultaneous processing, thereby greatly improving the calculation efficiency and shortening the processing time. The size of the preset window can be reasonably set according to the actual demand, and by selecting an appropriate window length, the amount of data processed each time can be reduced under the premise of ensuring the signal processing quality, thereby reducing the occupation of the calculation resources (such as memory, CPU, etc.).
[0071] In some embodiments, the controller is configured to preprocess the electroencephalogram signal based on the preprocessing procedure, which can be achieved by the following steps:
[0072] Step S3, in the case that the preprocessing procedure includes bad lead repair, obtaining signal variance of each electroencephalogram acquisition channel.
[0073] In the embodiments of the present application, the electroencephalogram acquisition channel refers to each independent channel in the electroencephalogram acquisition device for acquiring electroencephalogram signals. Each electroencephalogram acquisition channel corresponds to a specific region of the scalp, and acquires the electroencephalogram signals of the region through the contact of the electrode with the scalp surface. The electroencephalogram signals acquired by different electroencephalogram acquisition channels reflect the neural activity of different parts of the brain, and the number of channels will affect the monitoring range and accuracy of the neural activity of the brain. The signal variance is an index for measuring the degree of signal fluctuation, which reflects the dispersion degree of the signal data points around the mean value. For electroencephalogram signals, the signal variance can be used to evaluate the stability and consistency of the signals. If the electroencephalogram signal variance of a certain electroencephalogram acquisition channel is relatively large compared with other channels, it indicates that the signal fluctuation of the channel is large, and there may be abnormal signal quality; on the contrary, if the signal variance is close to the variance of most channels, it indicates that the signal quality of the electroencephalogram acquisition channel is relatively stable.
[0074] In the embodiments of the present application, the controller classifies and stores the received electroencephalogram signals according to the electroencephalogram acquisition channels, and the signal data of each electroencephalogram acquisition channel is stored in an independent buffer. For the signal data of each electroencephalogram acquisition channel, the controller first calculates the mean value of the channel signal. The method of calculating the mean value is to add the values of all signal data points of the channel, and then divide by the total number of data points. For example, for an electroencephalogram acquisition channel, assuming that N signal data points are acquired, which are x1, x2,..., xN respectively, then the mean value μ of the channel signal is (x1+x2+...+xN) / N. N N After calculating the mean value of the signal of each electroencephalogram acquisition channel, the controller further calculates the variance of the channel signal. The formula for calculating the variance is σ 2 =(x1-μ) 2 +(x2-μ) 2 +...+(x N -μ) 2 ] / N, where σ 2 represents the variance, x1, x2,..., x N are the signal data points of the channel, and μ is the mean value of the channel signal. By calculating the variance, the controller can obtain the fluctuation degree of the signal of each electroencephalogram acquisition channel.
[0075] Step S4, in the case that the similarity between the signal variance of the target electroencephalogram acquisition channel and the signal variance of other electroencephalogram acquisition channels is less than the similarity threshold, determining the target electroencephalogram acquisition channel as a bad channel.
[0076] In the embodiments of the present application, the target EEG acquisition channel is the EEG acquisition channel that is focused on during the bad channel repair process. After the controller obtains the signal variance of each EEG acquisition channel, it will analyze each EEG acquisition channel. The EEG acquisition channel that needs to be judged as a bad channel is called a target EEG acquisition channel. The similarity threshold is a pre-set value used to judge the similarity between the signal variance of the target EEG acquisition channel and the signal variance of other EEG acquisition channels. If the similarity between the signal variance of the target EEG acquisition channel and the signal variance of other EEG acquisition channels is less than the threshold, it means that the signal of the target EEG acquisition channel is significantly different from other channels and may be a bad channel. The size of the similarity threshold can be set according to actual needs and experience. Different application scenarios may require different thresholds. A bad channel is a channel that may cause abnormal EEG signals to be collected due to various reasons (such as poor electrode contact, equipment failure, etc.) during EEG acquisition. These abnormal channels are called bad channels. The signal of a bad channel may exhibit excessive noise, signal loss, abnormal signal amplitude, etc. These abnormal signals can seriously affect the quality of EEG signals and the accuracy of subsequent analysis, so they need to be repaired or marked.
[0077] In the embodiments of the present application, for each target EEG acquisition channel, the controller calculates the similarity between its signal variance and the signal variance of other EEG acquisition channels. The similarity can be calculated using various methods, such as the Pearson correlation coefficient. The Pearson correlation coefficient has a value range of -1 to 1. The closer the absolute value is to 1, the stronger the linear correlation between the two variables; the closer the absolute value is to 0, the weaker the linear correlation. The Pearson correlation coefficient of the target EEG acquisition channel signal variance and the signal variance of other EEG acquisition channels can be calculated as a measure of similarity. The calculated similarity is compared with the pre-set similarity threshold. If the similarity is less than the similarity threshold, it means that the signal variance of the target EEG acquisition channel is significantly different from other channels and may be a bad channel; otherwise, if the similarity is greater than or equal to the similarity threshold, it means that the signal of the target EEG acquisition channel is similar to other channels and is not a bad channel.
[0078] Step S5, in the case where the number of channels is greater than the channel number threshold, repairing the EEG signal of the bad channel.
[0079] In this embodiment, the channel number threshold is also a preset value used to determine whether to repair the EEG signals of faulty channels. When the number of channels is greater than the threshold, it indicates that there are enough normal EEG acquisition channels in the system, and the EEG signals of faulty channels can be repaired through the signals of these normal channels; conversely, if the number of channels is less than or equal to the threshold, it may be due to insufficient number of normal channels, making effective repair of faulty channels impossible, and other measures need to be taken in this case.
[0080] In this embodiment, the controller determines whether the current number of channels in the system exceeds a preset channel number threshold. If the number of channels exceeds the threshold, it indicates that there are enough normal EEG acquisition channels in the system, allowing for the repair of faulty channels. Conversely, if the number of channels is less than or equal to the threshold, there may be insufficient normal channels, making effective repair of faulty channels impossible. In this case, the controller can output prompts through the user interface or other means, prompting the user to take appropriate measures, such as checking the equipment or replacing electrodes. When the number of channels exceeds the threshold, the controller uses an appropriate method to repair the faulty channels.
[0081] The plug-and-play intelligent EEG signal preprocessing device provided in this application calculates the signal variance of each EEG acquisition channel and compares the similarity of the target EEG acquisition channel with the signal variance of other channels. This allows for precise location of faulty channels. Once faulty channels are identified, if the number of channels exceeds a threshold, a method based on the mean of adjacent channel signals is used to repair them. Since EEG signals acquired from adjacent channels typically have high similarity, calculating the mean of adjacent channel signals to approximate the normal signal of the faulty channel can, to some extent, restore the signal characteristics of the faulty channel and reduce its impact on the overall EEG signal quality. The repaired EEG signal is more complete and accurate, providing a reliable data foundation for subsequent EEG signal analysis and applications.
[0082] In some embodiments, the controller is configured to repair the EEG signals of the damaged channel, which can be achieved through the following steps:
[0083] Step S51: Obtain the EEG signal from the EEG acquisition channel within the preset range of the bad channel.
[0084] In the embodiments of the present application, the preset range refers to a specific area drawn around the bad channel, which is used to determine which adjacent EEG acquisition channels will participate in the repair process of the bad channel. This range can be flexibly set according to actual conditions, for example, it can be several channels directly adjacent to the bad channel, or a certain number of channels close to the bad channel in spatial position. The preset range around the bad channel can be determined according to the channel layout of the EEG acquisition device and the actual application requirements. For example, if the EEG acquisition device uses an electrode cap, and the electrodes are arranged according to a certain rule, then the preset range can be the EEG acquisition channels corresponding to the electrodes directly adjacent to the bad channel on the electrode cap. Through the channel mapping relationship inside the controller, all EEG acquisition channels within the preset range are found. The controller stores the identification information of each EEG acquisition channel and their relative positional relationship, and these information can be used to quickly and accurately locate the adjacent channels. The EEG signal data of each EEG acquisition channel within the preset range is read from the data buffer area storing the EEG signal. These data are usually discrete values collected in time sequence, representing the intensity of brain electrical activity at different times.
[0085] Step S52, calculating the mean value of the EEG signals of the EEG acquisition channels within the preset range from the bad channel.
[0086] In the embodiments of the present application, since the EEG signals of different EEG acquisition channels can be collected asynchronously or have a slight time deviation, the signals need to be time-aligned before calculating the mean value. The characteristic points (such as peak value, valley value, etc.) in the signal can be found or interpolation method can be used to make the signals of each channel correspond on the time axis. The EEG signal values of all EEG acquisition channels within the preset range at the same time point are added. Assuming that there are n EEG acquisition channels within the preset range, and the EEG signal values of these n channels at a time point t are x1(t), x2(t),..., xn(t), then their sum is S(t) = x1(t) + x2(t) +... + xn(t). n n
[0087] The sum is divided by the number n of EEG acquisition channels to obtain the mean value M(t) of the EEG signal at the time point, which is S(t) / n. Repeat this process to calculate the EEG signals at all time points to obtain the mean value signal in the entire time sequence.
[0088] Step S53, determining the mean value as the EEG signal of the bad channel to repair the EEG signal of the bad channel.
[0089] In the embodiments of the present application, the calculated mean signal sequence is used to replace the original abnormal electroencephalogram signal in the bad channel point by point. In this way, the signal of the bad channel is repaired to be similar to the signal of the surrounding normal channel, thereby restoring the accurate reflection ability of the channel to the brain electrical activity to a certain extent.
[0090] In some embodiments, in order to make the repaired signal more smooth and natural, and avoid sudden changes or jumps, the replaced signal can be smoothed. Common smoothing methods include moving average method, median filtering method, etc. For example, when using the moving average method, a window of a certain length is taken, the average value of the signal in the window is calculated, and the average value is used to replace the signal value at the center point of the window. By moving the window to process the entire signal sequence, the signal is made smoother.
[0091] In some embodiments, the controller is further configured to:
[0092] In the case where the number of channels is less than or equal to the channel number threshold, output a prompt information, the prompt information is used to prompt the abnormal electroencephalogram signal of the bad channel.
[0093] In the embodiments of the present application, the prompt information is a signal or data generated by the controller to convey relevant information to the user when the number of channels is detected to be less than or equal to the channel number threshold. The prompt information can be presented in various forms, such as text prompts, sound prompts, light flashes, etc. The purpose is to inform the user that there may be a problem with the electroencephalogram acquisition device, especially the abnormal electroencephalogram signal of the bad channel.
[0094] In the embodiments of the present application, when the condition that the number of channels is less than or equal to the channel number threshold is met, the controller generates the prompt information according to the preset rules. The content of the prompt information should clearly indicate that the electroencephalogram signal of the bad channel is abnormal, and may contain some simple description, such as "channel number is abnormal, there may be a bad channel signal problem". The controller selects the corresponding output interface according to the preset output mode. Common output interfaces include display screen interface, audio output interface, network communication interface, etc. The generated prompt information is sent out through the selected output interface. For example, if the display screen output is selected, the text information is sent to the display screen for display; if the sound output is selected, the audio signal is sent to the loudspeaker for playing; if the network communication output is selected, the information is sent to the remote monitoring terminal or other devices through the network.
[0095] In some embodiments, the plug-and-play intelligent electroencephalogram signal preprocessing device further comprises:
[0096] A user interface for providing configuration options for configuring the preprocessing procedure and preprocessing parameters of the preprocessing procedure.
[0097] In the embodiments of the present application, the user interface is a window for human-computer interaction in the electroencephalogram signal processing device. It shows various information and function options to the user in a graphical and intuitive way, enabling the user to conveniently operate and configure the device. The user interface usually includes menu, button, input box, graphical display area and other elements. Through these elements, the user can input instructions, adjust parameters, view processing results, etc. Configuration options are a series of selectable setting items provided to the user in the user interface. These options allow the user to customize the configuration of certain functions or processes of the electroencephalogram signal processing device according to actual needs. In electroencephalogram signal processing, configuration options are mainly used to configure the pre-processing process and its related parameters to meet different user requirements for signal processing effect and needs. Configuration operation refers to a series of operation behaviors of the user in the configuration options of the user interface. The user sets and adjusts the pre-processing process and pre-processing parameters through clicking, inputting, selecting and other ways to achieve personalized configuration of the electroencephalogram signal processing device.
[0098] In the embodiments of the present application, specific configuration option contents are designed for the pre-processing process and pre-processing parameters. For the pre-processing process, a variety of common pre-processing steps can be provided for the user to choose, such as "filtering", "artifact rejection", "resampling", etc., and the user is allowed to determine the order of the pre-processing process by checking or dragging. For pre-processing parameters, an appropriate parameter input box or drop-down menu is designed for each pre-processing step, such as a filter cutoff frequency input box, an artifact rejection method selection drop-down menu, etc.
[0099] The controller is also configured to obtain the configuration operation of the user through the configuration options in the user interface, and obtain the pre-processing process based on the configuration operation.
[0100] In the embodiments of the present application, an event listening mechanism is set in the user interface program to monitor the operation behavior of the user on the configuration options in real time. For example, when the user clicks a certain configuration option button, inputs a value in the input box or selects a certain option in the drop-down menu, the program can timely capture these events.
[0101] After listening to the user's configuration operation event, the data related to the operation is collected. For example, the pre-processing process steps selected by the user, the pre-processing parameter values inputted, etc. are obtained, and these data are stored in the memory or a specific data structure for subsequent processing.
[0102] In the embodiments of the present application, the controller parses the configuration operation data obtained from the user interface to understand the specific settings of the user for the preprocessing procedure and preprocessing parameters. For example, according to the preprocessing step sequence and parameter values selected by the user, the specific operation and parameter configuration of each preprocessing step are determined. According to the parsed data, the preprocessing procedure is constructed. The preprocessing procedure can be represented using data structures such as flowcharts, linked lists, etc., to connect the various preprocessing steps in the order specified by the user and set the preprocessing parameters for each step. In this way, a complete preprocessing procedure that meets the user's needs is obtained for subsequent processing of the electroencephalogram signal.
[0103] In some embodiments, the controller is configured to obtain the preprocessing procedure based on the configuration operation, including: in the case that the configuration operation includes a noise reduction configuration, loading a target noise reduction network model from a noise reduction algorithm model library based on the noise reduction configuration to obtain the preprocessing procedure.
[0104] In the embodiments of the present application, the noise reduction configuration is a specific type of configuration operation, which is specifically used to set the related parameters and options for electroencephalogram signal noise reduction processing. The noise reduction configuration can include selecting a noise reduction algorithm, setting a noise reduction intensity, determining a frequency range for noise reduction, etc., and its purpose is to remove noise interference in the electroencephalogram signal and improve the quality and reliability of the signal. The noise reduction algorithm model library is a database or collection that stores a variety of noise reduction algorithm models. These algorithm models are mathematical models and program codes that have been researched and developed for suppressing and removing different types of noise. The noise reduction algorithm model library may contain algorithm models based on traditional signal processing methods, such as low-pass filtering, high-pass filtering, notch filtering, etc., and may also contain algorithm models based on machine learning and deep learning, such as autoencoders, convolutional neural networks, etc. The target noise reduction network model is a specific algorithm model loaded from the noise reduction algorithm model library according to the specific noise reduction algorithm selected by the user through the noise reduction configuration. This model has a specific network structure and parameter setting and can effectively suppress and remove noise in the electroencephalogram signal. The selection of the target noise reduction network model depends on factors such as the user's noise reduction needs, noise types, and signal characteristics. The controller accesses the noise reduction algorithm model library according to the parsed noise reduction configuration information. The noise reduction algorithm model library can be stored on a local device or accessed through a network connection to a remote server model library. In the noise reduction algorithm model library, the controller finds the target noise reduction network model that matches the noise reduction algorithm type and other related parameters selected by the user. After finding the target model, it is loaded into memory, and the loading process may include reading the model's parameter file, initializing the model's network structure, etc.
[0105] In the embodiments of the present application, the controller can integrate the loaded target denoising network model with other preprocessing steps to form a complete preprocessing procedure. During the integration process, it is necessary to ensure that the data transmission and processing order between each step are correct to ensure the accuracy and effectiveness of the preprocessing procedure. For example, after the denoising step, the processed signal is transmitted to the filtering step for further processing.
[0106] In some embodiments, the controller is configured to preprocess the electroencephalogram signal based on the preprocessing procedure, including:
[0107] Denoising the electroencephalogram signal based on the target denoising network model.
[0108] In some embodiments, in the case where the preprocessing procedure includes filtering, resampling, bad lead repair, denoising, and signal re-reference, the processing order of the preprocessing procedure is filtering, resampling, bad lead repair, denoising, and signal re-reference in turn.
[0109] In the embodiments of the present application, various noises such as power frequency interference (usually 50Hz or 60Hz and its harmonics), electromyographic noise (wide frequency range, generally above 30Hz) and the like will be mixed into the electroencephalogram signal during the acquisition process. The first step is filtering operation: filtering operation can remove these unwanted frequency components by designing appropriate filters (such as band-pass filter, notch filter, etc.), and retain the effective frequency band (generally 0.5-70Hz) of the electroencephalogram signal. After filtering, the noise in the signal is greatly reduced, so that subsequent resampling, bad lead repair and other operations can be based on a purer signal, avoiding noise interference on other processing steps and improving the accuracy of the processing result.
[0110] The second step is resampling: different electroencephalogram acquisition devices may have different sampling rates, in order to facilitate and consistency of subsequent processing, it is necessary to resample the signals of all channels to a unified sampling rate. For example, reduce the high sampling rate (such as 1000Hz) signal to a lower sampling rate (such as 250Hz) to reduce the amount of data while ensuring that the key features of the signal are not lost. Certain bad lead repair, denoising and signal re-reference algorithms have certain requirements for the sampling rate, and resampling can make the signal meet the input conditions of these algorithms to ensure that the algorithm can run normally. During the acquisition of the electroencephalogram signal, due to poor contact between the electrode and the scalp, electrode failure and other reasons, bad leads may occur, that is, the signals of some channels are abnormal (such as amplitude too large or too small, signal interruption, etc.).
[0111] The third step is bad lead repair: the bad lead repair operation can repair the signal of the bad lead by interpolation, replacement, etc., using the signals of the adjacent normal channels, so that the signals of all channels are in a normal state. If noise reduction or signal re-referencing is performed before the bad lead repair, the abnormal signals of the bad lead may have an adverse effect on these operations, resulting in inaccurate processing results. Therefore, performing bad lead repair first can ensure that subsequent processing is based on complete and normal signals. Although filtered, some noise such as electrooculogram noise and electrocardiogram noise may still remain in the signal, which is difficult to remove by simple filtering.
[0112] The fourth step is noise reduction: the noise reduction operation can use more complex algorithms such as independent component analysis (ICA), wavelet transform, and well-trained artificial neural network models to separate these residual noises from the electroencephalogram signals, further improving the quality of the signals. The signal re-referencing operation needs to be based on high-quality electroencephalogram signals, and the signals after noise reduction can better reflect the real electrical activity of the brain, so that the results of signal re-referencing are more accurate and reliable.
[0113] The fifth step is signal re-referencing: the signal re-referencing operation can convert the signal from one reference point to another reference point, such as converting from monopolar reference to average reference or mastoid reference, to better highlight the differences in electrical activity of different regions of the brain. After the previous filtering, resampling, bad lead repair, and noise reduction, the quality of the signal has been significantly improved. On this basis, signal re-referencing can make the final electroencephalogram signal more suitable for subsequent feature extraction, classification and recognition, and other analysis work, providing more valuable information for electroencephalogram research.
[0114] The plug-and-play intelligent electroencephalogram signal preprocessing device provided by the embodiments of the present application performs preprocessing in the above order, and each step can play the best effect on the basis of the previous step. For example, filtering provides clean signals for subsequent processing, so that bad lead repair, noise reduction, and other operations can more accurately identify and process abnormal signals and noise, thereby obtaining higher-quality electroencephalogram signals.
[0115] In some embodiments, the communication module is further configured to transmit the preprocessed electroencephalogram signal to a target device.
[0116] In the embodiments of the present application, the target device is intentionally a computer, a mobile device, a cloud server, etc.
[0117] In the embodiments of the present application, real-time transmission can be achieved.
[0118] In this embodiment, the communication module first attempts to establish a connection with the target device. Using the TCP / IP protocol, the communication module sends a connection request to the target device. Upon receiving the request, if the target device agrees to the connection, it returns an acknowledgment packet. The communication module then sends an acknowledgment response, thus establishing a stable connection. The communication module then sends the encapsulated, pre-processed EEG signal data packets to the target device according to the selected protocol. During transmission, the communication module rationally controls the data packet transmission rate based on network conditions and the processing capacity of the target device to avoid network congestion. For EEG signals with high real-time requirements, the communication module uses streaming transmission to continuously send the signal data to the target device, ensuring that the target device can acquire the latest EEG signals in real time.
[0119] Based on the foregoing embodiments, this application further provides a plug-and-play intelligent EEG signal preprocessing device, comprising: a housing, a circuit board, and software components. Figures 1 to 3 A schematic diagram of a plug-and-play intelligent EEG signal preprocessing device provided in this application embodiment is shown below. Figures 1 to 3 As shown, the outer casing 1 is used to install the circuit board 2 of the neural network model library and fix various input / output interfaces. These input / output interfaces include: a Type-C power / charging interface 101, a gigabit network interface for EEG input / output 102, operation buttons 103-108, a display 109, and a heat dissipation vent 110. The circuit board 2 is used to install and connect various electronic components and devices required for the plug-and-play intelligent EEG signal preprocessing device, including an edge computing core board 201, a core board connector 202, circuit board mounting holes 203, a solid-state drive connector 204, a solid-state drive 205, other chips and components supporting the operation of this device 206, 207, a battery 208, button elements 209-214, other chips and components 215-218, a display connector 219, and a display cable 220. The edge computing core board of the plug-and-play intelligent EEG signal preprocessing device supports the operation of the preprocessing program and the edge deployment of the noise reduction neural network. The edge computing core board can be the controller in the above embodiment.
[0120] Figure 4A software block diagram provided for the embodiments of the present application, software 3 runs on the aforementioned hardware system, including embedded operating system 301, display screen driver 302, key driver 303, neural network model library 304, compute unified device architecture (CUDA) library 305, deep neural network library (cuDNNk) 306, preprocessing service program 307 and TCP / IP communication program 308. Among them, the embedded operating system 301 is stored in the solid state disk 205, and is loaded and run on the edge computing core board 201 after starting, which is used to manage hardware resources and schedule software programs. The display screen driver 302, the key driver 303, the neural network model library 304, the CUDA library 305, the cuDNNk library 306, the preprocessing service program 307 and the TCP / IP communication program 308 all run on the embedded operating system 301. Among them, the preprocessing service program 307 reads the electroencephalogram and outputs the preprocessed electroencephalogram through the TCP / IP communication program 308; displays system information to the screen through the display screen driver 302; reads user operation through the key driver 303; loads a specific noise reduction network model from the neural network model library 304 through user operation; and runs the neural network model through the CUDA library 305 and the cuDNNk library 306 to infer and reduce noise. The preprocessing service program 307 includes preprocessing flow parameter configuration 307a, online preprocessing buffer window 307b, zero-phase filtering 307c, resampling 307d, bad lead repair 307e, noise reduction 307f and re-reference 307g, etc.
[0121] The operation principle of the plug and play intelligent electroencephalogram signal preprocessing device is as follows:
[0122] The user presses the "on-off switch" button on the shell to start the plug-and-play intelligent electroencephalogram signal preprocessing device. After successful start, the screen displays. After configuring the data stream input / output IP address and port, automatic preprocessing begins. The preprocessing service program can automatically identify the number of input electroencephalogram channels, electrode position, sampling rate and other information from the metadata of the Lab Stream Layer. The preprocessing service program reads the data stream into the online preprocessing buffer window with a fixed preprocessing window length, performs zero-phase band-pass filtering with a default filtering frequency range (1 Hz-80 Hz), and resamples to a default sampling rate (200 Hz). The preprocessing service program then judges bad leads in the data. If the signal variance collected and the similarity to other channels are abnormal, it is judged as a bad channel. If the input data channel is 32 or more, the preprocessing program performs online spatial repair on the bad channel in the input signal. The default repair method is to reconstruct the mean value of the channel data around the bad channel. If the input data channel is less than 32, only the bad channel is prompted in the output data metadata without interpolation repair. The data after this step is sent to the noise reduction module for default signal noise reduction operation. Finally, the signal is sent to the re-reference module for default configuration of the re-reference (average re-reference) and sent out from the configured output IP address and port. The output signal is only the latest signal after the connection is established to ensure the real-time performance of preprocessing. The user can also configure some preprocessing parameters through the keys and screen, including filtering type (low-pass, band-pass) and frequency range, resampling frequency, whether to repair bad leads, noise reduction method and model, re-reference method, etc.
[0123] The plug-and-play intelligent electroencephalogram signal preprocessing device provided by the embodiments of the present application can output real-time preprocessed data to a specified data stream port through a plug-and-play electroencephalogram signal preprocessing device based on neural network edge deployment. The plug-and-play intelligent electroencephalogram signal preprocessing device can be connected to existing electroencephalogram devices in a plug-and-play manner, improving device adaptation efficiency, and at the same time, flexible configuration parameters with high integration can be used to process incoming data based on edge deployment models.
[0124] Figure 5 The implementation flowchart of the plug-and-play intelligent electroencephalogram signal preprocessing method provided by the embodiments of the present application is shown in Figure 5 The plug-and-play intelligent electroencephalogram signal preprocessing method includes:
[0125] Step S501, obtaining metadata of an electroencephalogram acquisition device and electroencephalogram signals collected by the electroencephalogram acquisition device;
[0126] Step S502, setting a sampling rate and a number of channels in a preprocessing procedure based on the metadata, the preprocessing procedure including at least one processing step of filtering, resampling, bad lead repair, noise reduction, and signal re-reference.
[0127] In step S503, the electroencephalogram is preprocessed based on the preprocessing procedure.
[0128] The execution process and the like of the method are the same as the foregoing embodiments, and the specific functions and the technical effects brought by the foregoing embodiments can be referred to the foregoing embodiments, which will not be repeated here.
[0129] According to the foregoing embodiments, the present embodiment provides a plug-and-play intelligent electroencephalogram preprocessing device, each module included in the device and each unit included in each module can be realized by a processor in a computer device; of course, it can also be realized by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor unit (MPU), a digital signal processor (DSP), or a field programmable gate array (FPGA), etc.
[0130] The present embodiment provides a plug-and-play intelligent electroencephalogram preprocessing device, which comprises:
[0131] The acquisition module is configured to acquire metadata of an electroencephalogram acquisition device and an electroencephalogram signal collected by the electroencephalogram acquisition device.
[0132] The setting module is configured to set a sampling rate and a number of channels in the preprocessing procedure based on the metadata, the preprocessing procedure comprising at least one processing step of filtering, resampling, bad lead repair, noise reduction, and signal re-reference.
[0133] The preprocessing module is configured to preprocess the electroencephalogram based on the preprocessing procedure.
[0134] It should be noted that the information interaction, execution process and the like between the above-mentioned device / unit are the same as the foregoing embodiments, and the specific functions and the technical effects brought by the foregoing embodiments can be referred to the foregoing embodiments, which will not be repeated here.
[0135] In addition, the plug-and-play intelligent electroencephalogram preprocessing device shown above can be a software unit, a hardware unit, or a combination of software and hardware, and can be integrated into an electronic device as an independent plug-in, or can exist as an independent terminal device.
[0136] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0137] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 6 As shown, the electronic device 6 in this embodiment may include: at least one processor 60 ( Figure 6 Only one processor 60, memory 61, and computer program 62 stored in memory 61 and executable on at least one processor 60 are shown. When the processor 60 executes the computer program 62, it implements the steps in any of the above method embodiments, or the processor 60 executes the computer program 62 to implement the functions of each module / unit in the above device or system embodiments.
[0138] For example, computer program 62 may be divided into one or more modules / units, one or more of which are stored in memory 61 and executed by processor 60 to complete this application. One or more modules / units may be a series of computer program 62 instruction segments capable of performing a specific function, which describe the execution process of computer program 62 in electronic device 6.
[0139] This application also provides a computer-readable storage medium storing a computer program 62, which, when executed by a processor 60, implements the steps described in the above-described method embodiments.
[0140] This application provides a computer program product that, when run on an electronic device, enables the electronic device to perform the steps described in the various method embodiments above.
[0141] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. According to such understanding, the computer program 62 can be used to instruct the related hardware to complete all or part of the processes in the above-mentioned embodiments. The computer program 62 can be stored in a computer readable storage medium, and the computer program 62 can implement the steps of each method embodiment described above when executed by the processor 60. The computer program 62 includes computer program code, which can be in the form of source code, object code, executable files or some intermediate forms. The computer readable medium at least includes any entity or device capable of carrying the computer program code to the terminal, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunications signal and a software distribution medium. For example, a U disk, a mobile hard disk, a magnetic disk or an optical disk, etc. In some jurisdictions, according to legislation and patent practice, the computer readable medium can not be an electrical carrier signal and a telecommunications signal.
[0142] The embodiments of the present application further provide a plug-and-play intelligent electroencephalogram preprocessing device, including the electronic device in the above embodiments.
[0143] In the above embodiments, the description of each embodiment has its own focus, and the parts not described or recorded in detail in a certain embodiment can be referred to the related description of other embodiments.
[0144] Those skilled in the art can appreciate that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Professionals 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 application.
[0145] In the embodiments provided by the present application, it should be understood that the disclosed apparatus / network device and method can be implemented in other ways. For example, the above-described apparatus / network device embodiments are merely schematic, for example, the division of the modules or units is merely a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed ones can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.
[0146] The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0147] The above embodiments are only used to illustrate the technical solutions of the present application, but not limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can still be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. A plug-and-play intelligent EEG signal preprocessing device, characterized in that, include: A communication module is used to communicate with an EEG acquisition device and obtain metadata of the EEG acquisition device and EEG signals acquired by the EEG acquisition device. The controller, connected to the communication module, is configured as follows: Based on the metadata, the sampling rate and number of channels in the preprocessing process are set. The preprocessing process includes at least one of the following processing steps: filtering, resampling, bad conductor repair, noise reduction, and signal rereference. The electroencephalogram (EEG) signals are preprocessed based on the aforementioned preprocessing procedure.
2. The plug-and-play intelligent EEG signal preprocessing device according to claim 1, characterized in that, The controller is configured to preprocess the EEG signal based on the preprocessing procedure, including: If the preprocessing process includes filtering, the EEG signal is read into the preprocessing buffer window using a preset window. Zero-phase bandpass filtering is performed within a preset frequency range based on the preprocessing buffer window.
3. The plug-and-play intelligent EEG signal preprocessing device according to claim 1, characterized in that, The controller is configured to preprocess the EEG signal based on the preprocessing procedure, including: In the case that the preprocessing procedure includes bad conduction repair, the signal variance of each EEG acquisition channel is obtained; If the similarity between the signal variance of the target EEG acquisition channel and the signal variance of other EEG acquisition channels is less than a similarity threshold, the target EEG acquisition channel is identified as a bad channel. When the number of channels exceeds a channel number threshold, the EEG signals of the faulty channels are repaired.
4. The plug-and-play intelligent EEG signal preprocessing device according to claim 3, characterized in that, The controller is configured to repair the EEG signals of the damaged channel, including: Acquire EEG signals from EEG acquisition channels that are within a preset range of the bad channel; Calculate the average value of the EEG signals of the EEG acquisition channels within a preset range of the bad channel; The mean value is determined as the EEG signal of the bad channel in order to repair the EEG signal of the bad channel.
5. The plug-and-play intelligent EEG signal preprocessing device according to claim 3, characterized in that, The controller is also configured to: If the number of channels is less than or equal to the channel number threshold, a prompt message is output, which is used to indicate that the EEG signal of the bad channel is abnormal.
6. The plug-and-play intelligent EEG signal preprocessing device according to claim 1, characterized in that, The plug-and-play intelligent EEG signal preprocessing device also includes: A user interface module for providing configuration options for configuring the preprocessing flow and preprocessing parameters of the preprocessing flow; The controller is also configured to: Obtain the configuration operations performed by the user through the configuration options in the user interface; The preprocessing flow is obtained based on the configuration operation.
7. The plug-and-play intelligent EEG signal preprocessing device according to claim 6, characterized in that, The controller is configured to obtain the preprocessing flow based on the configuration operation, including: If the configuration operation includes noise reduction configuration, the target noise reduction network model is loaded from the noise reduction algorithm model library based on the noise reduction configuration to obtain the preprocessing flow; The controller is configured to preprocess the EEG signal based on the preprocessing procedure, including: The EEG signal is denoised based on the target denoising network model.
8. The plug-and-play intelligent EEG signal preprocessing device according to any one of claims 1 to 7, characterized in that, When the preprocessing process includes filtering, resampling, bad conductor repair, noise reduction, and signal rereference, the processing order of the preprocessing process is as follows: filtering, resampling, bad conductor repair, noise reduction, and signal rereference.
9. The plug-and-play intelligent EEG signal preprocessing device according to claim 8, characterized in that, The communication module is also configured to transmit preprocessed EEG signals to the target device.
10. A plug-and-play intelligent EEG signal preprocessing method, characterized in that, include: Obtain the metadata of the EEG acquisition device and the EEG signals acquired by the EEG acquisition device; Based on the metadata, the sampling rate and number of channels in the preprocessing process are set. The preprocessing process includes at least one of the following processing steps: filtering, resampling, bad conductor repair, noise reduction, and signal rereference. The electroencephalogram (EEG) signals are preprocessed based on the aforementioned preprocessing procedure.