Time sequence electroencephalogram data quality detection and restoration method and quality detection and restoration system

Through the timing EEG data quality detection and repair method, the problems of data loss, interference and artifacts during EEG data acquisition are solved, efficient data repair and storage are achieved, and the quality and storage efficiency of data are improved.

CN119127855APending Publication Date: 2024-12-13BEIJING NOSI SPACETIME TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411166054.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

During the acquisition and transmission of EEG data, data loss, signal interference, physiological artifacts and low storage efficiency are prone to problems such as data loss, signal interference, physiological artifacts and low storage efficiency, which affects the quality of the data and the accuracy of subsequent analysis.

Method used

The timing EEG data quality detection and repair method is used to collect EEG data through electrodes arranged on the scalp, completeness detection and filling, effectiveness inspection and repair are carried out, and the timing database is used for efficient storage, and the appropriate filling method is selected and the Fix algorithms to improve data integrity and quality.

Benefits of technology

Effectively detect and repair missing and artifacts in EEG data, improve data continuity and stability, optimize storage structure, improve data read and write performance, and meet the needs of real-time storage and rapid retrieval.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127855A_ABST
    Figure CN119127855A_ABST
Patent Text Reader

Abstract

The invention discloses a time sequence electroencephalogram data quality detection and restoration method and a time sequence electroencephalogram data quality detection and restoration system, and belongs to the technical field of industrial internet. According to the method, the problems that the electroencephalogram data is lost, the electroencephalogram data quality is poor and the electroencephalogram data storage efficiency is low are solved. According to the method, by calculating the integrity index of the electroencephalogram data, the hidden data value missing condition can be detected, then the data filling operation is guided according to the missing detection result, and the original electroencephalogram data characteristics can be recovered. Effectiveness indexes are established on the basis of effectiveness, change speed and acceleration of values, quantitative evaluation standards can be provided for reasonability of electroencephalogram data values so as to detect whether data points are reasonable and have sudden changes or abnormities or not, a data restoration method is further selected according to detection results, data stability is enhanced, data continuity is improved, and the accuracy of data restoration is improved. The electroencephalogram data quality is improved, and subsequent data analysis is facilitated. The method can be applied to electroencephalogram data quality detection and restoration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of industrial Internet, and specifically relates to a method for quality detection and repair of time-series electroencephalogram data and a quality detection and repair system. Background Art

[0002] In the era of industrial Internet, electroencephalogram (EEG) data is widely used in various industrial monitoring and intelligent analysis systems. The collection and analysis of EEG data helps to monitor the operator's status in real time, improve work efficiency and safety, and is also widely used in clinical diagnosis, brain-computer interface and cognitive science research.

[0003] However, many factors will affect the quality of EEG data values ​​and the accuracy of subsequent processing and analysis. Currently, the quality of EEG data mainly has the following problems:

[0004] (1) Data loss: During the collection and transmission of EEG data, data may be lost due to equipment failure, network problems, etc. The integrity and continuity of the data are important prerequisites for subsequent analysis.

[0005] (2) Signal interference: EEG signals are easily interfered by various environmental noises during the acquisition process, such as electromagnetic interference (EMI), equipment noise, etc. These interferences will cause signal quality to deteriorate and affect subsequent data analysis and application.

[0006] (3) Physiological artifacts: Due to the complex physiological activities of the human body (such as eye movements, heartbeats, muscle activities, etc.), a large number of artifacts are often mixed into the collected EEG signals. These artifacts will interfere with the authenticity and accuracy of the EEG signals.

[0007] (4) Inefficient data storage: Traditional data storage solutions are inefficient when processing high-frequency EEG data and cannot meet the needs of real-time storage and rapid retrieval.

[0008] Therefore, it is necessary to propose a method to solve the problems of EEG data loss, poor EEG data quality and low EEG data storage efficiency. Summary of the invention

[0009] The purpose of the present invention is to solve the problems of EEG data loss, poor EEG data quality and low EEG data storage efficiency, and to propose a time series EEG data quality detection and repair method and a quality detection and repair system.

[0010] The technical solution adopted by the present invention to solve the above technical problems is:

[0011] According to one aspect of the present invention, a method for detecting and repairing the quality of time series EEG data is provided, and the method specifically comprises the following steps:

[0012] Step 1: Use electrodes arranged on the surface of the scalp to collect EEG data, and use the EEG data collected by each electrode as EEG data of one channel;

[0013] Step 2: perform integrity detection and filling on the collected EEG data of each channel respectively to obtain the filled EEG data of each channel;

[0014] Step 3, respectively calculate the validity of each channel EEG data after filling, and then repair the EEG data according to the validity calculation result to obtain the repaired EEG data of each channel;

[0015] Step 4: Store the EEG data repaired in step 3 according to the set data format.

[0016] According to another aspect of the present invention, a time series EEG data quality detection and repair system includes an EEG data acquisition module, a data integrity detection and filling module, a data validity inspection and repair module, and a data storage module;

[0017] The EEG data acquisition module is used to collect EEG data of each channel;

[0018] The working process of the EEG data acquisition module is:

[0019] Step 1: Determine the placement of electrodes on the scalp surface;

[0020] Step 12: Arrange the electrodes made of metal at the positions determined in step 11, and place conductive paste between the electrodes and the scalp;

[0021] Step 13: Each electrode is connected to an EEG amplifier through a wire, and the amplified EEG data of each channel is recorded;

[0022] The data integrity detection and filling module is used to calculate the integrity of EEG data and fill the data;

[0023] The working process of the data integrity detection and filling module is:

[0024] Taking the EEG data of any channel as an example, a window with a time length of L is used to slide on the EEG data of the channel. The integrity of the EEG data in the current window is:

[0025]

[0026] Wherein, missCnt is the count of missing values ​​of EEG data in the current window, specialCnt is the count of special values ​​of EEG data in the current window, and cnt is the number of non-special values ​​in EEG data in the current window;

[0027] Similarly, the integrity of the EEG data in the window is calculated when the window slides to each position of the channel;

[0028] The specific process of filling is:

[0029] Compare the completeness of the EEG data in the current window with the threshold θ completeness Size:

[0030] If the completeness of the EEG data in the current window is less than the threshold θ completeness , then the EEG data of the current window needs to be filled;

[0031] If the completeness of the EEG data in the current window is greater than or equal to the threshold θ completeness , then there is no need to fill the EEG data of the current window;

[0032] The data validity check and repair module is used to calculate the validity of each channel's EEG data and perform data repair based on the validity calculation results;

[0033] The working process of the data validity check and repair module is as follows:

[0034] Step 1: Take the EEG data of any channel as an example. The validity of the EEG data of this channel is:

[0035]

[0036] Among them, valueCnt represents the count of unexpected data points in the channel, variationCnt represents the count of unexpected changes in the data points in the channel, speedCnt represents the count of unexpected speeds in the data points in the channel, and speedchangeCnt represents the count of unexpected accelerations in the data points in the channel.

[0037] Step 2, comparing the validity value of the EEG data of the channel with the validity threshold;

[0038] If the validity value of the EEG data of the channel is greater than or equal to the threshold, there is no need to perform data repair on the EEG data of the channel;

[0039] If the validity value of the EEG data of the channel is less than the threshold, continue to step 3;

[0040] Step 3: Compare the speedCnt value of the EEG data of the channel with the threshold Max speedCnt size;

[0041] If the speedCnt value is greater than the threshold Max speedCnt, then use the Screen method to repair the EEG data of the channel, and then continue to step 4;

[0042] If the speedCnt value is less than or equal to the threshold Max speedCnt , then directly proceed to step 4;

[0043] Step 4: Compare the speedchangeCnt value of the EEG data of the channel with the threshold Max speedchangeCnt size;

[0044] If the speedchangeCnt value is greater than the threshold Max speedchangeCnt , then the LsGreedy method is used to repair the EEG data of the channel to obtain the final repair result;

[0045] If the value of speedchangeCnt is less than or equal to the threshold Max speedchangeCnt , no further processing is required.

[0046] The beneficial effects of the present invention are:

[0047] (1) The present invention can detect hidden missing data values ​​by calculating the integrity index of EEG data, and then guide the data filling operation according to the missing detection result, so as to restore the original EEG data characteristics and facilitate subsequent data analysis; and suitable filling methods can be selected according to different data characteristics, thereby improving the flexibility and accuracy of data repair, enhancing the flexibility and selectivity of the system, and being able to adapt to the needs of different data scenarios.

[0048] (2) Establishing validity indicators based on multiple angles such as the validity of the value itself, the speed of change, and acceleration can provide a quantitative evaluation standard for the rationality of the EEG data value, avoid the limitations of a single standard, detect whether the data points are reasonable, and whether there are mutations or anomalies. Further, based on the test results, the data repair method can be selected to enhance the stability of the data and improve the continuity of the data, thereby improving the quality of the EEG data.

[0049] (3) The present invention stores the collected EEG data based on a time series database, which can not only efficiently store and retrieve a large amount of EEG data and support fast query and analysis, but also optimize the data storage structure, save storage space, and improve data reading and writing performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 It is a flow chart of a method for detecting and repairing the quality of time-series EEG data of the present invention. DETAILED DESCRIPTION

[0051] Specific implementation method 1: Combination Figure 1The present embodiment describes a method for detecting and repairing the quality of time-series EEG data, and the method specifically comprises the following steps:

[0052] Step 1: Use electrodes arranged on the surface of the scalp to collect EEG data, and use the EEG data collected by each electrode as EEG data of one channel;

[0053] Step 2: perform integrity detection and filling on the collected EEG data of each channel respectively to obtain the filled EEG data of each channel;

[0054] Step 3, respectively calculate the validity of each channel EEG data after filling, and then repair the EEG data according to the validity calculation result to obtain the repaired EEG data of each channel;

[0055] Step 4: Store the EEG data repaired in step 3 according to the set data format.

[0056] The present invention stores data based on a time series database, and the stored data format is: timestamp, experiment ID, date, channel 1 signal value, channel 2 signal value, ..., channel n signal value, initial timestamp.

[0057] Specific implementation method 2: This implementation method is different from the specific implementation method 1 in that the step 1 is specifically as follows:

[0058] Step 1: Determine the placement of electrodes on the scalp surface;

[0059] Step 12: Arrange the electrodes made of metal at the positions determined in step 11, and place conductive paste between the electrodes and the scalp to enhance signal conduction;

[0060] Step 1: Each electrode is connected to the EEG amplifier through a wire, and the amplified EEG data of each channel is recorded.

[0061] The other steps and parameters are the same as those in the first embodiment.

[0062] However, the accuracy of each channel value during EEG data collection will be affected by the following aspects:

[0063] (1) Poor electrode contact: Poor contact can lead to unstable or lost signals;

[0064] (2) Electromagnetic interference: Electromagnetic waves in the surrounding environment (such as mobile phones and Wi-Fi devices) may interfere with EEG signals;

[0065] (3) Physiological artifacts: Physiological activities such as eye movements, electromyography, and electrocardiography can be mixed into EEG signals, producing artifacts;

[0066] (4) Equipment noise: The noise of the EEG equipment itself will affect the signal quality, and there is also noise interference during data transmission.

[0067] Therefore, the collected EEG data needs to be subsequently checked for integrity and filled, validated, and repaired.

[0068] Specific implementation method three: This implementation method is different from specific implementation methods one or two in that the integrity detection is performed on the collected EEG data of each channel respectively, specifically:

[0069] Taking the EEG data of any channel as an example, a window with a time length of L is used to slide on the EEG data of the channel. When the window slides to any position, the integrity of the EEG data in the current window is:

[0070]

[0071] Among them, missCnt is the count of missing values ​​of EEG data in the current window, specialCnt is the count of special values ​​(NaN, INF) of EEG data in the current window, cn t is the number of non-special values ​​in the EEG data in the current window;

[0072] Similarly, the integrity of the EEG data in the window is calculated when the window slides to each position of the channel.

[0073] The other steps and parameters are the same as those in the first or second embodiment.

[0074] The window slides on the EEG data of the channel, and the EEG data in the window at each sliding position can be obtained respectively. For example, the EEG data in the first window processed are the EEG data in the channel with a timestamp in [t0, t0+L), the EEG data in the second window processed are the EEG data in the channel with a timestamp in [t0+L, t0+2L), and the EEG data in the third window processed are the EEG data in the channel with a timestamp in [t0+2L, t0+3L), until the EEG data processing of the channel is completed.

[0075] Since data loss may occur during data collection and transmission, this embodiment can evaluate the degree of incompleteness of the EEG data in each window by calculating the completeness of the EEG data in each window.

[0076] Specific implementation method 4: This implementation method is different from any one of specific implementation methods 1 to 3 in that the statistical method for counting the missing value of EEG data in the current window, missCnt, is:

[0077] Step 2-1: Calculate the time intervals between every two adjacent timestamps within the current window respectively, and then calculate the median of each time interval. Take the calculated median as the reference time interval base.

[0078] Step 2-2: Initialize the time interval count i = 1 within the current window; it should be noted that the i-th time interval is the time interval between the i-th timestamp and the (i + 1)-th timestamp within the window.

[0079] Step 2-3: Calculate the ratio times of the i-th time interval to the reference time interval base.

[0080] If the ratio times is less than or equal to 0.5, remove the data corresponding to the (i + 1)-th timestamp within the current window from the window (considering that the timestamps are too dense and there are redundant data points), and then continue to execute Step 2-4.

[0081] If 0.5 < times ≤ 2.0, continue to execute Step 2-4.

[0082] If 2.0 < times ≤ 9.0, it is considered that the timestamp interval is too large and there are missing or delayed data points. Then calculate the number of missing data points within the i-th time interval according to the ratio times, update the missCnt count, and then continue to execute Step 2-4.

[0083] If times > 9.0, it is considered that a shutdown exception has occurred, and end the entire statistical process.

[0084] Step 2-4: Whether all the time intervals within the current window have been processed.

[0085] If all the time intervals within the current window have been processed, end the entire statistical process.

[0086] Otherwise, let the time interval count i = i + 1 within the current window, and return to execute Step 2-3.

[0087] Other steps and parameters are the same as those in any one of the specific embodiments 1 to 3.

[0088] Specific Embodiment 5: The difference between this embodiment and any one of the specific embodiments 1 to 4 is that the specific filling process is as follows:

[0089] Compare the integrity completeness of the EEG data within the current window with the threshold θ completeness (which can be customized) in size:

[0090] If the integrity completeness of the EEG data within the current window is less than the threshold θ completeness , then it is necessary to fill the EEG data of the current window.

[0091] If the completeness of the EEG data in the current window is greater than or equal to the threshold θ completeness , then there is no need to fill the EEG data of the current window.

[0092] The other steps and parameters are the same as those in Specific Embodiments 1 to 4.

[0093] When the completeness is lower than the threshold, it means that there are too many missing data, which affects subsequent processing and analysis and requires data filling.

[0094] Specific implementation method six: This implementation method is different from any one of specific implementation methods one to five in that the EEG data of the current window is filled by mean filling, previous value filling, maximum likelihood estimation filling, autoregressive (AR) filling, moving average (MA) filling or constrained filling.

[0095] The other steps and parameters are the same as those in Specific Implementations 1 to 5.

[0096] Different filling methods can be selected according to the specific circumstances of the data.

[0097] (1) Mean filling:

[0098] The missing values ​​in the timestamp series data are filled with the mean of all other values ​​in the current window. Using mean filling can keep the overall mean of the data set unchanged without introducing too much deviation. In addition, this method has a fast calculation rate and is suitable for situations with large amounts of data.

[0099] (2) Previous value filling:

[0100] Fill missing values ​​in timestamp series data with the value corresponding to the previous timestamp. Time series data usually has continuity and autocorrelation, which means that the data at one time point is usually associated with the data at the previous time point. This filling method is suitable for cases where the data changes smoothly, but not for data shapes with strong fluctuations.

[0101] (3) Maximum likelihood estimation filling:

[0102] By maximizing the likelihood function of the filled data, the filled data is statistically closest to the original data. This method is limited in the case of large-scale continuous missing data and highly non-stationary data.

[0103] First, find the missing value location in the data and use linear interpolation for initial filling. Use the maximum likelihood estimation method to continuously optimize the filling value of the missing value through iteration until the error ratio is less than the set threshold or the maximum number of iterations is reached. In each iteration, the optimal filling value is calculated and the position of the missing value is updated until the stopping condition is met.

[0104] (4) Autoregressive (AR) filling:

[0105] Based on the theoretical foundation of the autoregressive model, the autocorrelation of time series data is utilized to predict and fill missing values ​​by fitting a first-order autoregressive model.

[0106] First, the mean and variance of the time series are calculated, the autocorrelation function value and factor of the time series are calculated, and the coefficient θ used to determine the autoregressive model is calculated. The mean of the residuals of all non-missing value pairs in the time series is calculated. Finally, the missing values ​​in the time series are filled in turn according to the calculated autoregressive coefficient θ and the residual mean.

[0107] (5) Moving average (MA) filling:

[0108] Based on the theoretical basis of the moving average method, it aims to reduce noise and fluctuations by averaging adjacent data points to provide a smoother estimate. This method is sensitive to the size of the window and requires the selection of a specific moving window based on specific data.

[0109] Initialize the moving window. For each data point, if it is not a missing value, copy it directly, otherwise fill it with the mean of the non-missing values ​​in the window.

[0110] (6) Constrained filling:

[0111] This method is a technique for time series data repair that infers and fills in missing values ​​based on the velocity of the data (i.e., rate of change) and statistical methods.

[0112] Find the continuous non-missing value segments near the missing value, calculate the median of the non-missing value segments, and calculate the repair value based on the parameters of the masking method and fill it into the position of the missing value.

[0113] Specific implementation method 7: This implementation method is different from one of the specific implementation methods 1 to 6 in that the validity of each channel EEG data after filling is calculated separately, specifically:

[0114] Taking the EEG data of any channel as an example, the validity of the EEG data of this channel is:

[0115]

[0116] Among them, valueCnt represents the count of unexpected data points in the channel, variationCnt represents the count of unexpected changes in data points in the channel, speedCnt represents the count of unexpected speeds of data points in the channel, and speedchangeCnt represents the count of unexpected accelerations of data points in the channel.

[0117] The other steps and parameters are the same as those in Specific Embodiments 1 to 6.

[0118] Due to the interference of internal and external noise of the acquisition and transmission equipment and the mixing of biological artifacts, the quality of the collected data is low, making it difficult to effectively process and analyze. Therefore, it is very important to evaluate the quality of the collected data values. By calculating the validity of the data, it is possible to evaluate whether the data is reasonable and valid, and to effectively detect unreasonable data phenomena such as mutations or anomalies. The validity of the present invention mainly measures the degree of deviation in the following aspects:

[0119] (1) Valid value of the original value: whether the data point is within the expected range;

[0120] (2) Effective value of change: whether the change of the data point is within the expected range;

[0121] (3) Speed ​​effectiveness: whether the speed of change of data points is within the expected range;

[0122] (4) Validity of acceleration: whether the acceleration of the data point is within the expected range.

[0123] Specific implementation eight: This implementation differs from one of specific implementations one to seven in that the EEG data is repaired according to the validity calculation result, specifically:

[0124] For any channel of EEG data

[0125] Step 31: Compare the validity value of the EEG data of the channel with the validity threshold;

[0126] If the validity value of the EEG data of the channel is greater than or equal to the threshold, there is no need to perform data repair on the EEG data of the channel;

[0127] If the validity value of the EEG data of the channel is less than the threshold, continue to execute step 32;

[0128] Step 3.2: Compare the speedCnt value of the EEG data of this channel with the threshold Max speedCnt size;

[0129] If the speedCnt value is greater than the threshold Max speedCnt , then use the Screen method to repair the EEG data of the channel, and then continue to step three-three;

[0130] If the speedCnt value is less than or equal to the threshold Max speedCnt , then directly execute step 33;

[0131] Step 3. Compare the speedchangeCnt value of the EEG data of this channel with the threshold MaxspeedchangeCnt size;

[0132] If the speedchangeCnt value is greater than the threshold Max speedchangeCnt , then the LsGreedy method is used to repair the EEG data of the channel to obtain the final repair result;

[0133] If the value of speedchangeCnt is less than or equal to the threshold Max speedchangeCnt , no further processing is required.

[0134] The other steps and parameters are the same as those in Specific Embodiments 1 to 7.

[0135] (1)Screen method

[0136] Identify and repair outliers in time series data by setting a velocity threshold. Velocity refers to the rate of change between adjacent data points. The goal of the Screen method is to ensure that the velocity of all data points is within a reasonable range, so that the repaired time series data is smoother and more continuous.

[0137] The Screen method calculates the speed of adjacent data points, counts the median and median absolute difference (MAD) of the speed, and then determines the maximum and minimum thresholds of the speed and the size of the sliding window based on the median and MAD of the speed. Then, the data is repaired within the sliding window: the median of the data points within the sliding window is calculated, and the values ​​of the data points within the window that do not meet the speed requirements are adjusted based on the median and speed threshold, so that their speeds meet the set speed threshold range, thereby repairing the abnormal points in the time series.

[0138] (2)LsGreedy method:

[0139] The LsGreedy method is a time series repair method based on the likelihood of speed changes. Its basic idea is to model the speed change as a Gaussian distribution and use a greedy algorithm to maximize the likelihood function to repair abnormal data points.

[0140] The parameters of the LsGreedy algorithm are initialized by calculating the median absolute difference (MAD) of the speed and speed change of adjacent data points, and a priority queue is created to store the nodes that need to be repaired. Data points with speed changes beyond the range of μ±3σ are added to the priority queue. Then, the greedy algorithm is used to extract the data points with the largest speed change from the priority queue for repair, adjust the value of the data point so that its speed change is close to the center, and update the speed change of the relevant data points until the priority queue is empty or the speed changes of all data points are within the range of μ±3σ, thereby gradually repairing the abnormal points in the time series.

[0141] Specific implementation method 9: A time series EEG data quality detection and repair system described in this implementation method includes an EEG data acquisition module, a data integrity detection and filling module, a data validity inspection and repair module, and a data storage module;

[0142] The EEG data acquisition module is used to collect EEG data of each channel;

[0143] The working process of the EEG data acquisition module is:

[0144] Step 1: Determine the placement of electrodes on the scalp surface;

[0145] Step 12: Arrange the electrodes made of metal at the positions determined in step 11, and place conductive paste between the electrodes and the scalp to enhance signal conduction;

[0146] Step 13: Each electrode is connected to an EEG amplifier through a wire, and the amplified EEG data of each channel is recorded;

[0147] The data integrity detection and filling module is used to calculate the integrity of EEG data and fill the data;

[0148] The working process of the data integrity detection and filling module is:

[0149] Taking the EEG data of any channel as an example, a window with a time length of L is used to slide on the EEG data of the channel. The integrity of the EEG data in the current window is:

[0150]

[0151] Wherein, missCnt is the count of missing values ​​of EEG data in the current window, specialCnt is the count of special values ​​of EEG data in the current window, and cnt is the number of non-special values ​​in EEG data in the current window;

[0152] Similarly, the integrity of the EEG data in the window is calculated when the window slides to each position of the channel;

[0153] The specific process of filling is:

[0154] Compare the completeness of the EEG data in the current window with the threshold θ completeness (Customizable) size:

[0155] If the completeness of the EEG data in the current window is less than the threshold θ completeness , then the EEG data of the current window needs to be filled;

[0156] If the completeness of the EEG data in the current window is greater than or equal to the threshold θ completeness , then there is no need to fill the EEG data of the current window;

[0157] The data validity check and repair module is used to calculate the validity of each channel's EEG data and perform data repair based on the validity calculation results;

[0158] The working process of the data validity check and repair module is as follows:

[0159] Step 1: Take the EEG data of any channel as an example. The validity of the EEG data of this channel is:

[0160]

[0161] Among them, valueCnt represents the count of unexpected data points in the channel, variationCnt represents the count of unexpected changes in the data points in the channel, speedCnt represents the count of unexpected speeds in the data points in the channel, and speedchangeCnt represents the count of unexpected accelerations in the data points in the channel.

[0162] Step 2, comparing the validity value of the EEG data of the channel with the validity threshold;

[0163] If the validity value of the EEG data of the channel is greater than or equal to the threshold, there is no need to perform data repair on the EEG data of the channel;

[0164] If the validity value of the EEG data of the channel is less than the threshold, continue to step 3;

[0165] Step 3: Compare the speedCnt value of the EEG data of the channel with the threshold Max speedCnt size;

[0166] If the speedCnt value is greater than the threshold Max speedCnt , then use the Screen method to repair the EEG data of the channel, and then continue to step 4;

[0167] If the speedCnt value is less than or equal to the threshold Max speedCnt , then directly proceed to step 4;

[0168] Step 4: Compare the speedchangeCnt value of the EEG data of the channel with the threshold Max speedchangeCnt size;

[0169] If the speedchangeCnt value is greater than the threshold Max speedchangeCnt, the LsGreedy method is used to repair the EEG data of this channel to obtain the final repair result;

[0170] If the value of speedchangeCnt is less than or equal to the threshold Max speedchangeCnt , no further processing is required.

[0171] Specific implementation method ten: The difference between this implementation method and the ninth specific implementation method is that the statistical method of the missing value count missCnt of the EEG data in the current window is as follows:

[0172] Step 2-1: Calculate the time intervals between every two adjacent timestamps in the current window respectively, then calculate the median of each time interval, and use the calculated median as the reference time interval base;

[0173] Step 2-2: Initialize the time interval count i = 1 in the current window; it should be noted that the i-th time interval is the time interval between the i-th timestamp and the (i + 1)-th timestamp in the window;

[0174] Step 2-3: Calculate the ratio times of the i-th time interval to the reference time interval base;

[0175] If the ratio times is less than or equal to 0.5, the data of the (i + 1)-th timestamp in the current window is removed from the window (it is considered that the timestamps are too dense and there are redundant data points), and then step 2-4 is continued;

[0176] If 0.5 < times ≤ 2.0, step 2-4 is continued;

[0177] If 2.0 < times ≤ 9.0, it is considered that the timestamp interval is too large and there are missing or delayed data points, then calculate the number of missing data points in the i-th time interval according to the ratio times, and update the missCnt count, and then continue to execute step 2-4;

[0178] If times > 9.0, it is considered that a shutdown anomaly has occurred, and the entire statistical process is ended;

[0179] Step 2-4: Whether all the time intervals in the current window have been processed;

[0180] If all the time intervals in the current window have been processed, the entire statistical process is ended;

[0181] Otherwise, let the time interval count i = i + 1 in the current window, and return to execute step 2-3.

[0182] Other steps and parameters are the same as those in the ninth specific implementation method.

[0183] The above calculation examples of the present invention are only used to explain the calculation model and calculation process of the present invention in detail, and are not intended to limit the implementation methods of the present invention. For ordinary technicians in the relevant field, other different forms of changes or modifications can be made based on the above description. It is impossible to list all the implementation methods here. All obvious changes or modifications derived from the technical solution of the present invention are still within the scope of protection of the present invention.

Claims

1. A method for detecting and repairing the quality of time-series EEG data, characterized in that, the method specifically includes the following steps: Step 1: Use each electrode arranged on the scalp surface to collect EEG data, and take the EEG data collected by each electrode as the EEG data of one channel respectively; Step 2: Perform integrity detection and filling on the EEG data of each collected channel respectively to obtain the filled EEG data of each channel; Step 3: Calculate the validity of the EEG data of each channel after filling respectively, and then repair the EEG data according to the validity calculation result to obtain the repaired EEG data of each channel; Step 4: Store the repaired EEG data in Step 3 according to the set data format.

2. A method for detecting and repairing the quality of time-series EEG data according to claim 1, characterized in that, the specific content of Step 1 is: Step 1-1: Determine the arrangement positions of the electrodes on the scalp surface; Step 1-2: Arrange each electrode made of metal at the positions determined in Step 1-1, and a conductive paste is provided between the electrode and the scalp; Step 1-3: Each electrode is connected to an EEG amplifier through a wire to record the amplified EEG data of each channel.

3. A method for detecting and repairing the quality of time-series EEG data according to claim 1, characterized in that, the specific content of performing integrity detection on the EEG data of each collected channel respectively is: Taking the EEG data of any one channel as an example, use a window with a time length of L to slide on the EEG data of this channel, then the integrity of the EEG data in the current window is: where missCnt is the count of missing values in the EEG data in the current window, specialCnt is the count of special values in the EEG data in the current window, and cnt is the number of non-special values in the EEG data in the current window; Similarly, calculate the integrity of the EEG data in the window when the window slides to each position of this channel respectively.

4. A method for detecting and repairing the quality of time-series EEG data according to claim 3, characterized in that, the statistical method of the missing value count missCnt of the EEG data in the current window is: Step 2-1: Calculate the time interval between every two adjacent timestamps in the current window respectively, and then calculate the median of each time interval, and take the calculated median as the reference time interval base; Step 2-2: Initialize the time interval count i = 1 in the current window; Step 2-3: Calculate the ratio times of the i-th time interval to the reference time interval base; If the ratio times is less than or equal to 0.5, then move the data of the (i + 1)-th timestamp in the current window out of the window, and then continue to execute Step 2-4; If 0.5 < times ≤ 2.0, then continue to execute Step 2-4; If 2.0 < times ≤ 9.0, then calculate the number of missing data points in the i-th time interval according to the ratio times, and update the missCnt count, and then continue to execute Step 2-4; If times > 9.0, it is considered that a shutdown anomaly has occurred, and the entire statistical process ends; Step 2-4: Whether all the time intervals in the current window have been processed; If all time intervals in the current window are processed, the entire statistical process ends; Otherwise, set the time interval count i in the current window to i+1, and return to execute steps 2 and 3.

5. A method for detecting and repairing time series EEG data quality according to claim 3, It is characterized in that The specific process of the filling is: Compare the completeness of the EEG data in the current window with the threshold θ completeness Size: If the completeness of the EEG data in the current window is less than the threshold θ completeness , then the EEG data of the current window needs to be filled; If the completeness of the EEG data in the current window is greater than or equal to the threshold θ completeness , then there is no need to fill the EEG data of the current window.

6. A method for detecting and repairing time series EEG data quality according to claim 5, It is characterized in that The EEG data of the current window is filled in a manner of mean filling, previous value filling, maximum likelihood estimation filling, autoregressive filling, moving average filling or constrained filling.

7. A method for detecting and repairing time series EEG data quality according to claim 1, It is characterized in that The validity of each channel EEG data after filling is calculated separately, specifically: Taking the EEG data of any channel as an example, the validity of the EEG data of this channel is: Among them, valueCnt represents the count of unexpected data points in the channel, variationCnt represents the count of unexpected changes in data points in the channel, speedCnt represents the count of unexpected speeds of data points in the channel, and speedchangeCnt represents the count of unexpected accelerations of data points in the channel.

8. A method for detecting and repairing time series EEG data quality according to claim 7, It is characterized in that The repairing of the EEG data according to the validity calculation result is specifically as follows: For any channel of EEG data Step 31: Compare the validity value of the EEG data of the channel with the validity threshold; If the validity value of the EEG data of the channel is greater than or equal to the threshold, there is no need to perform data repair on the EEG data of the channel; If the validity value of the EEG data of the channel is less than the threshold, continue to execute step 32; Step 3.2: Compare the speedCnt value of the EEG data of this channel with the threshold Max sveedCnt size; If the speedCnt value is greater than the threshold Max speedCnt , then use the Screen method to repair the EEG data of the channel, and then continue to step three-three; If the speedCnt value is less than or equal to the threshold Max speedCnt , then directly execute step 33; Step 3. Compare the speedchangeCnt value of the EEG data of this channel with the threshold Max speedchangeCnt size; If the speedchangeCnt value is greater than the threshold Max speedchangeCnt , then the LsGreedy method is used to repair the EEG data of the channel to obtain the final repair result; If the value of speedchangeCnt is less than or equal to the threshold Max speedchangeCnt , no further processing is required.

9. A time series EEG data quality detection and repair system, It is characterized in that The system includes an EEG data acquisition module, a data integrity detection and filling module, a data validity inspection and repair module, and a data storage module; The EEG data acquisition module is used to collect EEG data of each channel; The working process of the EEG data acquisition module is: Step 1: Determine the placement of electrodes on the scalp surface; Step 12: Arrange the electrodes made of metal at the positions determined in step 11, and place conductive paste between the electrodes and the scalp; Step 13: Each electrode is connected to an EEG amplifier through a wire, and the amplified EEG data of each channel is recorded; The data integrity detection and filling module is used to calculate the integrity of EEG data and fill the data; The working process of the data integrity detection and filling module is: Taking the EEG data of any channel as an example, a window with a time length of L is used to slide on the EEG data of the channel. The integrity of the EEG data in the current window is: Wherein, missCnt is the count of missing values ​​of EEG data in the current window, specialCnt is the count of special values ​​of EEG data in the current window, and cnt is the number of non-special values ​​in EEG data in the current window; Similarly, calculate the integrity of the EEG data within the window when the window slides to each position of this channel respectively; The specific filling process is as follows: Compare the completeness of the EEG data in the current window with the threshold θ completeness Size: If the completeness of the EEG data in the current window is less than the threshold θ completeness , then the EEG data of the current window needs to be filled; If the completeness of the EEG data in the current window is greater than or equal to the threshold θ completeness , then there is no need to fill the EEG data of the current window; The data validity verification and repair module is used to calculate the validity of the EEG data of each channel and perform data repair according to the calculation result of the validity; The working process of the data validity verification and repair module is as follows: Step 1: Take the EEG data of any one channel as an example. The validity of the EEG data of this channel, validity, is: Among them, valueCnt represents the count of data points outside the expectation in this channel, variationCnt represents the count of data point variations outside the expectation in this channel, speedCnt represents the count of data point speeds outside the expectation in this channel, and speedchangeCnt represents the count of data point accelerations outside the expectation in this channel; Step 2: Compare the validity value of the EEG data of this channel with the validity threshold; If the validity value of the EEG data of this channel is greater than or equal to the threshold, there is no need to perform data repair on the EEG data of this channel; If the validity value of the EEG data of this channel is less than the threshold, continue to execute Step 3; Step 3: Compare the speedCnt value of the EEG data of the channel with the threshold Max speedCnt size; If the speedCnt value is greater than the threshold Max speedCnt , then use the Screen method to repair the EEG data of the channel, and then continue to step 4; If the speedCnt value is less than or equal to the threshold Max speedCnt , then directly proceed to step 4; Step 4: Compare the speedchangeCnt value of the EEG data of the channel with the threshold Max speedchangeCnt size; If the speedchangeCnt value is greater than the threshold Max speedchangeCnt, Then the LsGreedy method is used to repair the EEG data of the channel to obtain the final repair result; If the value of speedchangeCnt is less than or equal to the threshold Max speedchangeCnt , no further processing is required.

10. A temporal EEG data quality detection and repair system according to claim 9, characterized in that The statistical method for the missing value count missCnt of the EEG data within the current window is: Step 2-1: Calculate the time intervals between every two adjacent timestamps within the current window respectively, then calculate the median of each time interval, and take the calculated median as the reference time interval base; Step 2-2: Initialize the time interval count i = 1 within the current window; Step 2-3: Calculate the ratio times of the i-th time interval to the reference time interval base; If the ratio times is less than or equal to 0.5, move the data of the (i + 1)-th timestamp within the current window out of the window, and then continue to execute Step 2-4; If 0.5 < times ≤ 2.0, continue to execute Step 2-4; If 2.0 < times ≤ 9.0, calculate the number of missing data points within the i-th time interval according to the ratio times and update the missCnt count, and then continue to execute Step 2-4; If times > 9.0, it is considered that a shutdown anomaly has occurred, and the entire statistical process ends; Step 2-4: Whether all the time intervals within the current window have been processed; If all the time intervals within the current window have been processed, the entire statistical process ends; Otherwise, let the time interval count i within the current window be i = i + 1, and return to execute Step 2-3.

Citation Information

Cited By

  • Time series data acquisition monitoring method, device and equipment and storage medium

    CN120596474A