A method and device for correcting bad EEG segment data by segment weighting
Through the MATLAB software segmented weighted correction method, the bad segments in the EEG data are automatically identified and corrected, solving the data loss problem caused by manual deletion of the bad segments and improving data integrity.
Patent Information
- Application Number
- CN202210434553.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-24
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2042-04-24
AI Technical Summary
When preprocessing EEG data, manually deleting bad segments will lead to data loss, and existing methods cannot effectively identify and correct bad segments, affecting data integrity.
The EEG data segment weighted correction method based on MATLAB software is used to determine the data in segments through the time point of the trigger signal, calculate the bad segment evaluation parameters, obtain the judgment parameters of the time domain and the spatial domain, and generate the correction data set after sorting. Automatically identify and correct bad segments.
The error caused by visualization is reduced, data integrity is improved, and data integrity is ensured in single-test analysis experiments.
Smart Images

Figure CN114931387B_ABST
Abstract
Description
Background Art
[0002] When studying EEG data, it is often necessary to preprocess the EEG data. When preprocessing EEG data, it is often necessary to visually detect the bad segment area of the data and then manually delete the bad segment. However, manually deleting the bad segment will cause data loss, and some single test analysis experiments require complete data segments. Relying on visually detecting the bad segment area of the data and then manually deleting the bad segment cannot solve the above problems.
[0003] Therefore, one or more methods are needed to solve the above problems.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0005] The purpose of the present disclosure is to provide a method, device, electronic device and computer-readable storage medium for segmented weighted correction of EEG bad segment data, thereby overcoming one or more problems caused by the limitations and defects of related technologies at least to a certain extent.
[0006] According to one aspect of the present disclosure, a method for segmented weighted correction of EEG bad segment data is provided, comprising:
[0007] Based on the time point of the trigger signal in the EEG data, the EEG data is segmented and determined, and based on the eeglab plug-in in the MATLAB software, the EEG data is segmented and processed according to the segmentation determination result of the EEG data;
[0008] Calculating a bad segment evaluation parameter of the EEG data in each EEG data segment after the EEG data is segmented, and if the bad segment evaluation parameter is greater than a preset threshold, determining the EEG data segment corresponding to the bad segment evaluation parameter as a bad segment;
[0009] Based on the time domain, respectively obtain a preset number of time domain EEG data of adjacent segments before and after the bad segment, which are equal to the length of the bad segment; based on the space domain, respectively obtain a preset number of channels of space domain EEG data of equal to the length of the bad segment at the same time as the bad segment;
[0010] Calculating the time domain determination parameters of the bad segment of EEG data based on the time domain EEG data; calculating the space domain determination parameters of the bad segment of EEG data based on the space domain EEG data; sorting the time domain determination parameters and the space domain determination parameters respectively according to the sort function in MATLAB software;
[0011] Based on the preset weighted values, a time domain correction data set is generated according to the sorted time domain judgment parameters, a space domain correction data set is generated according to the sorted space domain judgment parameters, and a correction data set of the bad segment is generated by calculation according to the time domain correction data set and the space domain correction data set.
[0012] In an exemplary embodiment of the present disclosure, the method further includes:
[0013] Based on the interval between two consecutive trigger signals in the EEG data, the time point timepoints = TR (m + 1) - TR (m) is determined, where m is the trigger signal and the value range of m is [1, n];
[0014] If the time point timepoints is equal to the sampling rate*time window, it is determined that the EEG data segmentation is completed, otherwise, the EEG data is segmented based on the eeglab plug-in in the MATLAB software.
[0015] In an exemplary embodiment of the present disclosure, the method further includes:
[0016] Calculate the bad segment evaluation parameter of the EEG data in each EEG data segment after the EEG data is segmented
[0017]
[0018]
[0019] Among them, x is the EEG data, n is the data point collected in this section, M is the average number of EEG data, and s 2 Evaluate parameters for bad segments;
[0020] If the bad segment assessment parameter is greater than 30, the EEG data segment corresponding to the bad segment assessment parameter is determined as a bad segment, and the bad segment position (T, P) is recorded, where T is the time when the bad segment appears, and P is the coordinates of the bad segment.
[0021] In an exemplary embodiment of the present disclosure, the method further includes:
[0022] Based on the time domain, the time domain EEG data of the two adjacent segments before and after the bad segment with the same length as the bad segment are obtained respectively; based on the space domain, the space domain EEG data of the four adjacent channels with the same length as the bad segment at the same time as the bad segment are obtained respectively.
[0023] In an exemplary embodiment of the present disclosure, the method further includes:
[0024] The time domain determination parameter of the bad segment of EEG data is calculated based on the time domain EEG data or the space domain determination parameter of the bad segment of EEG data is calculated based on the space domain EEG data:
[0025] J=σ j *σ 2
[0026] Among them, σ j is the difference value of the variable value within the group; σ 2 is the arithmetic mean difference of each group.
[0027] In an exemplary embodiment of the present disclosure, the method further includes:
[0028] The difference of variable values within groups
[0029] Among them, x is the EEG data, n j is the number of units in the jth group.
[0030] In an exemplary embodiment of the present disclosure, the method further includes:
[0031] The difference of arithmetic mean between groups
[0032] Among them, x is the EEG data, k is the number of groups, is the average value of the time domain EEG data and the spatial domain EEG data
[0033] In an exemplary embodiment of the present disclosure, the method further includes:
[0034] The preset weight values for calculating the time domain correction data set or the space domain correction data set are 40%, 30%, 25%, and 5%.
[0035] In an exemplary embodiment of the present disclosure, the method further includes:
[0036] Based on the preset weighted values, a time domain correction data set Vsn is generated according to the sorted time domain judgment parameters, a space domain correction data set Vtn is generated according to the sorted space domain judgment parameters, and a correction data set of the bad segment is generated according to the time domain correction data set and the space domain correction data set.
[0037] In one aspect of the present disclosure, a device for correcting bad EEG segment data by segment weighting is provided, comprising:
[0038] A segmentation processing module is used to perform segmentation determination on the EEG data based on the time point of the trigger signal in the EEG data, and to perform segmentation processing on the EEG data according to the segmentation determination result of the EEG data based on the eeglab plug-in in the MATLAB software;
[0039] A bad segment determination module, used for calculating a bad segment evaluation parameter of the EEG data in each EEG data segment after the EEG data is segmented, and if the bad segment evaluation parameter is greater than a preset threshold, the EEG data segment corresponding to the bad segment evaluation parameter is determined as a bad segment;
[0040] The EEG data processing module is used to respectively obtain, based on the time domain, a preset number of adjacent segments before and after the bad segment and the same length as the bad segment of time domain EEG data; based on the space domain, respectively obtain a preset number of channels of space domain EEG data at the same time as the bad segment and the same length as the bad segment;
[0041] A determination parameter sorting module is used to calculate the time domain determination parameters of the bad segment EEG data based on the time domain EEG data; calculate the space domain determination parameters of the bad segment EEG data based on the space domain EEG data; and sort the time domain determination parameters and the space domain determination parameters respectively according to the sort function in MATLAB software;
[0042] The correction data set generation module is used to generate a time domain correction data set based on preset weight values and the sorted time domain judgment parameters, generate a space domain correction data set based on the sorted space domain judgment parameters, and calculate and generate the correction data set of the bad segment based on the time domain correction data set and the space domain correction data set.
[0043] In one aspect of the present disclosure, there is provided an electronic device, comprising:
[0044] Processor; and
[0045] A memory having computer-readable instructions stored thereon, wherein the computer-readable instructions, when executed by the processor, implement the method according to any one of the above items.
[0046] In one aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method according to any one of the above items is implemented.
[0047] In an exemplary embodiment of the present disclosure, a method for correcting EEG bad segment data by segmentation and weighting is provided, wherein the method comprises: based on the time point of the trigger signal in the EEG data, segmenting and processing the EEG data; calculating the bad segment evaluation parameters of the EEG data to complete the bad segment judgment; calculating the judgment parameters of the EEG data of the bad segment based on the EEG data and sorting them; and calculating and generating a corrected data set of the bad segment based on a preset weighted value. The present disclosure automatically identifies and accurately corrects the bad segment area of the EEG signal, and performs the steps of segmenting, evaluating, and correcting the original EEG data, thereby reducing errors caused by visual inspection and improving data integrity.
[0048] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The above and other features and advantages of the present disclosure will become more apparent by describing in detail example embodiments thereof with reference to the attached drawings.
[0050] Figure 1 A flowchart of a method for segmented weighted correction of EEG bad segment data according to an exemplary embodiment of the present disclosure is shown;
[0051] Figure 2 A bad segment correction technology flow chart of a method for correcting bad segment data of EEG according to an exemplary embodiment of the present disclosure is shown;
[0052] Figure 3 A schematic diagram of a bad segment correction algorithm of a method for segmented weighted correction of EEG bad segment data according to an exemplary embodiment of the present disclosure is shown;
[0053] Figure 4 A schematic block diagram of a device for segmented weighted correction of EEG bad segment data according to an exemplary embodiment of the present disclosure is shown;
[0054] Figure 5 A block diagram schematically shows an electronic device according to an exemplary embodiment of the present disclosure; and
[0055] Figure 6 A schematic diagram of a computer-readable storage medium according to an exemplary embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0056] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be comprehensive and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.
[0057] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of the specific details, or other methods, components, materials, devices, steps, etc. may be adopted. In other cases, known structures, methods, devices, implementations, materials or operations are not shown or described in detail to avoid blurring the various aspects of the present disclosure.
[0058] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or these functional entities or parts of functional entities may be implemented in one or more software hardened modules, or these functional entities may be implemented in different networks and / or processor devices and / or microcontroller devices.
[0059] In this exemplary embodiment, a method for correcting bad EEG segment data by segment weighting is first provided; Figure 1 As shown in, the method for correcting EEG bad segment data by segment weighting may include the following steps:
[0060] Step S110, based on the time point of the trigger signal in the EEG data, the EEG data is segmented and determined, and based on the eeglab plug-in in the MATLAB software, the EEG data is segmented and processed according to the segmentation determination result of the EEG data;
[0061] Step S120, calculating a bad segment evaluation parameter of the EEG data in each EEG data segment after the EEG data is segmented, and if the bad segment evaluation parameter is greater than a preset threshold, determining the EEG data segment corresponding to the bad segment evaluation parameter as a bad segment;
[0062] Step S130, based on the time domain, respectively obtaining a preset number of segments of time domain EEG data adjacent to and before the bad segment and having the same length as the bad segment; based on the space domain, respectively obtaining a preset number of channels of space domain EEG data at the same time as the bad segment and having the same length as the bad segment;
[0063] Step S140, calculating the time domain determination parameters of the bad segment EEG data based on the time domain EEG data; calculating the space domain determination parameters of the bad segment EEG data based on the space domain EEG data; sorting the time domain determination parameters and the space domain determination parameters respectively according to the sort function in MATLAB software;
[0064] Step S150, based on preset weight values, generating a time domain correction data set according to the sorted time domain judgment parameters, generating a space domain correction data set according to the sorted space domain judgment parameters, and calculating and generating a correction data set of the bad segment according to the time domain correction data set and the space domain correction data set.
[0065] In an exemplary embodiment of the present disclosure, a method for correcting EEG bad segment data by segmentation and weighting is provided, wherein the method comprises: based on the time point of the trigger signal in the EEG data, segmenting and processing the EEG data; calculating the bad segment evaluation parameters of the EEG data to complete the bad segment judgment; calculating the judgment parameters of the EEG data of the bad segment based on the EEG data and sorting them; and calculating and generating a corrected data set of the bad segment based on a preset weighted value. The present disclosure automatically identifies and accurately corrects the bad segment area of the EEG signal, and performs the steps of segmenting, evaluating, and correcting the original EEG data, thereby reducing errors caused by visual inspection and improving data integrity.
[0066] Below, as Figure 2 , which is a flow chart of a method for segmented weighted correction of EEG bad segment data, further illustrates a method for segmented weighted correction of EEG bad segment data in this example embodiment.
[0067] In step S110, the EEG data may be segmented based on the time point of the trigger signal in the EEG data, and the EEG data may be segmented based on the segmentation determination result of the EEG data using the eeglab plug-in in the MATLAB software.
[0068] In the embodiment of this example, the method further includes:
[0069] Based on the interval between two consecutive trigger signals in the EEG data, the time point timepoints = TR (m + 1) - TR (m) is determined, where m is the trigger signal and the value range of m is [1, n];
[0070] If the time point timepoints is equal to the sampling rate*time window, it is determined that the EEG data segmentation is completed, otherwise, the EEG data is segmented based on the eeglab plug-in in the MATLAB software.
[0071] In step S120, a bad segment evaluation parameter of the EEG data in each EEG data segment after the EEG data is segmented may be calculated. If the bad segment evaluation parameter is greater than a preset threshold, the EEG data segment corresponding to the bad segment evaluation parameter is determined to be a bad segment.
[0072] In the embodiment of this example, the method further includes:
[0073] Calculate the bad segment evaluation parameter of the EEG data in each EEG data segment after the EEG data is segmented
[0074]
[0075]
[0076] Among them, x is the EEG data, n is the data point collected in this section, M is the average number of EEG data, and s 2 Evaluate parameters for bad segments;
[0077] If the bad segment assessment parameter is greater than 30, the EEG data segment corresponding to the bad segment assessment parameter is determined as a bad segment, and the bad segment position (T, P) is recorded, where T is the time when the bad segment appears, and P is the coordinates of the bad segment.
[0078] In step S130, based on the time domain, a preset number of adjacent segments before and after the bad segment and having the same length as the bad segment can be obtained respectively; based on the space domain, a preset number of channels and space domain EEG data of the same length as the bad segment can be obtained respectively at the same time as the bad segment.
[0079] In this exemplary embodiment, if Figure 3 FIG. 1 is a flow chart of a bad segment correction algorithm, wherein the method further comprises:
[0080] Based on the time domain, the time domain EEG data of the two adjacent segments before and after the bad segment with the same length as the bad segment are obtained respectively; based on the space domain, the space domain EEG data of the four adjacent channels with the same length as the bad segment at the same time as the bad segment are obtained respectively.
[0081] In the embodiment of this example, in the time domain, two adjacent equal-length data before and after the bad segment of the channel are respectively taken, for a total of four groups of data; in the space domain, the equal-length data of the four nearest channels at the same time are taken.
[0082] In step S140, the time domain judgment parameters of the bad segment's EEG data can be calculated based on the time domain EEG data; the space domain judgment parameters of the bad segment's EEG data can be calculated based on the space domain EEG data; and the time domain judgment parameters and the space domain judgment parameters can be sorted respectively according to the sort function in MATLAB software.
[0083] In the embodiment of this example, the method further includes:
[0084] The time domain determination parameter of the bad segment of EEG data is calculated based on the time domain EEG data or the space domain determination parameter of the bad segment of EEG data is calculated based on the space domain EEG data:
[0085] J=σ j *σ2
[0086] Among them, σ j is the difference value of the variable value within the group; σ 2 is the arithmetic mean difference of each group.
[0087] In the embodiment of this example, the method further includes:
[0088] The difference of variable values within groups
[0089] Among them, x is the EEG data, n j is the number of units in the jth group.
[0090] In the embodiment of this example, the method further includes:
[0091] The difference of arithmetic mean between groups
[0092] Among them, x is the EEG data, k is the number of groups, is the average value of the time domain EEG data and the spatial domain EEG data
[0093] In step S150, based on preset weighted values, a time domain correction data set can be generated according to the sorted time domain judgment parameters, a space domain correction data set can be generated according to the sorted space domain judgment parameters, and a correction data set of the bad segment can be calculated based on the time domain correction data set and the space domain correction data set.
[0094] In the embodiment of this example, the method further includes:
[0095] The preset weight values for calculating the time domain correction data set or the space domain correction data set are 40%, 30%, 25%, and 5%.
[0096] In the embodiment of this example, the method further includes:
[0097] Based on the preset weighted values, a time domain correction data set Vsn is generated according to the sorted time domain judgment parameters, a space domain correction data set Vtn is generated according to the sorted space domain judgment parameters, and a correction data set of the bad segment is generated according to the time domain correction data set and the space domain correction data set.
[0098] It should be noted that, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0099] In addition, in this exemplary embodiment, a device for correcting EEG bad segment data by segment weighting is also provided. Figure 4 As shown, the device 400 for correcting EEG bad segment data by segment weighting may include: a segment processing module 410, a bad segment determination module 420, an EEG data processing module 430, a determination parameter sorting module 440 and a correction data set generation module 450. Among them:
[0100] The segmentation processing module 410 is used to perform segmentation determination on the EEG data based on the time point of the trigger signal in the EEG data, and perform segmentation processing on the EEG data according to the segmentation determination result of the EEG data based on the eeglab plug-in in the MATLAB software;
[0101] A bad segment determination module 420 is used to calculate a bad segment evaluation parameter of the EEG data in each EEG data segment after the EEG data is segmented, and if the bad segment evaluation parameter is greater than a preset threshold, the EEG data segment corresponding to the bad segment evaluation parameter is determined as a bad segment;
[0102] The EEG data processing module 430 is used to respectively obtain, based on the time domain, a preset number of adjacent segments before and after the bad segment and the same length as the bad segment of time domain EEG data; based on the space domain, respectively obtain, at the same time as the bad segment, a preset number of channels of space domain EEG data of the same length as the bad segment of space domain;
[0103] The determination parameter sorting module 440 is used to calculate the time domain determination parameters of the bad segment EEG data based on the time domain EEG data; calculate the space domain determination parameters of the bad segment EEG data based on the space domain EEG data; and sort the time domain determination parameters and the space domain determination parameters respectively according to the sort function in the MATLAB software;
[0104] The correction data set generation module 450 is used to generate a time domain correction data set based on a preset weight value and the sorted time domain judgment parameters, generate a space domain correction data set based on the sorted space domain judgment parameters, and calculate and generate the correction data set of the bad segment based on the time domain correction data set and the space domain correction data set.
[0105] The specific details of each of the above-mentioned EEG bad segment data segment weighted correction device modules have been described in detail in the corresponding EEG bad segment data segment weighted correction method, so they will not be repeated here.
[0106] It should be noted that, although several modules or units of a device 400 for correcting EEG bad segment data segmentation weighting are mentioned in the above detailed description, such division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units for embodiment.
[0107] In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
[0108] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as systems, methods or program products. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: complete hardware embodiments, complete software embodiments (including firmware, microcode, etc.), or embodiments combining hardware and software aspects, which may be collectively referred to herein as "circuits", "modules" or "systems".
[0109] Refer to the following Figure 5 An electronic device 500 according to such an embodiment of the present invention is described. Figure 5 The electronic device 500 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0110] like Figure 5 As shown, the electronic device 500 is in the form of a general computing device. The components of the electronic device 500 may include but are not limited to: at least one processing unit 510, at least one storage unit 520, a bus 530 connecting different system components (including the storage unit 520 and the processing unit 510), and a display unit 540.
[0111] The storage unit stores program codes, which can be executed by the processing unit 510, so that the processing unit 510 performs the steps according to various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification. For example, the processing unit 510 can perform the following steps: Figure 1 Steps S110 to S150 shown in FIG.
[0112] The storage unit 520 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 5201 and / or a cache storage unit 5202 , and may further include a read-only storage unit (ROM) 5203 .
[0113] The storage unit 520 may also include a program / utility 5204 having a set (at least one) of program modules 5203, such program modules 5205 including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include the implementation of a network environment.
[0114] Bus 550 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0115] The electronic device 500 may also communicate with one or more external devices 570 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 500, and / or communicate with any device that enables the electronic device 500 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 550. Furthermore, the electronic device 500 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 560. As shown, the network adapter 560 communicates with other modules of the electronic device 500 via a bus 550. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0116] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiment of the present disclosure.
[0117] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible embodiments, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to perform the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of the present specification.
[0118] refer to Figure 6 As shown, a program product 600 for implementing the above method according to an embodiment of the present invention is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0119] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0120] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0121] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0122] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0123] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0124] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
[0125] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A segmented weighted correction method for EEG bad segment data, It is characterized in that The method comprises: Based on the time point of the trigger signal in the EEG data, the EEG data is segmented and determined, and based on the eeglab plug-in in the MATLAB software, the EEG data is segmented and processed according to the segmentation determination result of the EEG data; Calculating a bad segment evaluation parameter of the EEG data in each EEG data segment after the EEG data is segmented, and if the bad segment evaluation parameter is greater than a preset threshold, determining the EEG data segment corresponding to the bad segment evaluation parameter as a bad segment; Based on the time domain, respectively obtain a preset number of time domain EEG data of adjacent segments before and after the bad segment, which are equal to the length of the bad segment; based on the space domain, respectively obtain a preset number of channels of space domain EEG data of equal to the length of the bad segment at the same time as the bad segment; The time domain determination parameters of the bad segment of EEG data are calculated based on the time domain EEG data; the space domain determination parameters of the bad segment of EEG data are calculated based on the space domain EEG data; the time domain determination parameters and the space domain determination parameters are sorted according to the sort function in the MATLAB software; wherein the time domain determination parameters of the bad segment of EEG data calculated based on the time domain EEG data or the space domain determination parameters of the bad segment of EEG data calculated based on the space domain EEG data are: J=σ j *s 2 Among them, σ j is the difference value of the variable value within the group; σ 2 is the difference of the arithmetic mean of each group; The difference of variable values within groups Among them, x is the EEG data, n j is the number of units in the jth group; The difference of arithmetic mean between groups Among them, x is the EEG data, k is the number of groups, is the average value of the time domain EEG data and the spatial domain EEG data Among them, X i For each group of EEG data, is the average value of EEG data of each group; Based on the preset weighted values, a time domain correction data set is generated according to the sorted time domain judgment parameters, a space domain correction data set is generated according to the sorted space domain judgment parameters, and a correction data set of the bad segment is generated by calculation according to the time domain correction data set and the space domain correction data set.
2. The method according to claim 1, It is characterized in that The method further comprises: Based on the interval between two consecutive trigger signals in the EEG data, the time point timepoints = TR (m + 1) - TR (m) is determined, where m is the trigger signal and the value range of m is [1, n]; If the time point timepoints is equal to the sampling rate*time window, it is determined that the EEG data segmentation is completed, otherwise, the EEG data is segmented based on the eeglab plug-in in the MATLAB software.
3. The method according to claim 1, It is characterized in that The method further comprises: Calculate the bad segment evaluation parameter of the EEG data in each EEG data segment after the EEG data is segmented Among them, x is the EEG data, n is the data point collected in this section, M is the average number of EEG data, and s 2 Evaluate parameters for bad segments; If the bad segment assessment parameter is greater than 30, the EEG data segment corresponding to the bad segment assessment parameter is determined as a bad segment, and the bad segment position (T, P) is recorded, where T is the time when the bad segment appears, and P is the coordinates of the bad segment.
4. The method according to claim 1, It is characterized in that The method further comprises: Based on the time domain, the time domain EEG data of the two adjacent segments before and after the bad segment with the same length as the bad segment are obtained respectively; based on the space domain, the space domain EEG data of the four adjacent channels with the same length as the bad segment at the same time as the bad segment are obtained respectively.
5. The method according to claim 1, It is characterized in that The method further comprises: The preset weight values for calculating the time domain correction data set or the space domain correction data set are 40%, 30%, 25%, and 5%.
6. The method according to claim 1, It is characterized in that The method further comprises: Based on the preset weighted values, a time domain correction data set Vsn is generated according to the sorted time domain judgment parameters, a space domain correction data set Vtn is generated according to the sorted space domain judgment parameters, and a correction data set of the bad segment is generated according to the time domain correction data set and the space domain correction data set.
7. A device for correcting bad EEG data by segmentation and weighting, It is characterized in that The device comprises: A segmentation processing module is used to perform segmentation determination on the EEG data based on the time point of the trigger signal in the EEG data, and to perform segmentation processing on the EEG data according to the segmentation determination result of the EEG data based on the eeglab plug-in in the MATLAB software; A bad segment determination module, used for calculating a bad segment evaluation parameter of the EEG data in each EEG data segment after the EEG data is segmented, and if the bad segment evaluation parameter is greater than a preset threshold, the EEG data segment corresponding to the bad segment evaluation parameter is determined as a bad segment; The EEG data processing module is used to respectively obtain, based on the time domain, a preset number of adjacent segments before and after the bad segment and the same length as the bad segment of time domain EEG data; based on the space domain, respectively obtain a preset number of channels of space domain EEG data at the same time as the bad segment and the same length as the bad segment; A determination parameter sorting module is used to calculate the time domain determination parameters of the EEG data of the bad segment based on the time domain EEG data; calculate the space domain determination parameters of the EEG data of the bad segment based on the space domain EEG data; sort the time domain determination parameters and the space domain determination parameters respectively according to the sort function in the MATLAB software; wherein the time domain determination parameters of the EEG data of the bad segment calculated based on the time domain EEG data or the space domain determination parameters of the EEG data of the bad segment calculated based on the space domain EEG data are: J=σ j *s 2 Among them, σ j is the difference value of the variable value within the group; σ 2 is the difference of the arithmetic mean of each group; The difference of variable values within groups Among them, x is the EEG data, n j is the number of units in the jth group; The difference of arithmetic mean between groups Among them, x is the EEG data, k is the number of groups, is the average value of the time domain EEG data and the spatial domain EEG data Among them, X i For each group of EEG data, is the average value of EEG data of each group; The correction data set generation module is used to generate a time domain correction data set based on preset weight values and the sorted time domain judgment parameters, generate a space domain correction data set based on the sorted space domain judgment parameters, and calculate and generate the correction data set of the bad segment based on the time domain correction data set and the space domain correction data set.
8. An electronic device, It is characterized in that include Processor; and A memory having computer-readable instructions stored thereon, wherein the computer-readable instructions, when executed by the processor, implement the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the method according to any one of claims 1 to 6 when executed by a processor.
