Training method for electroencephalogram abnormal wave AI recognition
By adding event characteristic indicators and building multi -dimensional lead data through the training method of Energy Electrical abnormal wave AI recognition, it solves the problem of pseudo -poor differences caused by the limited capacity of existing technologies and the single pseudo -pseudo -pseudo -poor problem, which significantly improves the identification results Accuracy and reliability.
Patent Information
- Application Number
- CN202411445104.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-01-21
AI Technical Summary
The existing brain wave model training methods lack the ability to consider characteristic events such as sleep state and open-eye closed state, resulting in limited model generalization ability and affecting the accuracy of identification results. In addition, relying on a single lead template leads to a single data, which cannot fully reflect the various characteristics and changes of EEG signals, resulting in artifacts.
By adding event characteristic indicators of eye opening and closing events, seizure events, flash stimulation events, deep breathing states, and sleep states in the data processing stage, the dimensionality of the EEG data is expanded. At the same time, multi-dimensional lead data, including multiple lead modes, are constructed to more comprehensively reflect the characteristics of EEG signals.
Effectively enhance the generalization ability of the model, enable the model to deeply learn the changes of the brain signal under different events state, greatly improve the accuracy and reliability of abnormal wave recognition, and reduce the pseudo -poor difference due question.
Smart Images

Figure CN119337235A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a training method for AI recognition of abnormal EEG waves. Background Art
[0002] Abnormal waves in EEG signals are usually related to various brain diseases or abnormal conditions, so diseases can be diagnosed by identifying abnormal brain discharges. Using AI model algorithms to identify abnormal EEG waves is an advanced medical technology. AI model algorithms can quickly process large amounts of EEG data and extract valuable feature information from them. AI model algorithms need to be trained with large numbers of sample data, but existing AI model algorithm training methods have the following disadvantages:
[0003] 1. In the current EEG model training, the focus is on the patient's basic information, time domain features and frequency domain features, such as age and gender, time domain features such as amplitude, mean, standard deviation, kurtosis and skewness, and frequency domain features such as frequency and wave type, but characteristic events such as sleep state and eye opening and closing state are not considered, which leads to the limited generalization ability of the EEG model and the lack of recognition of specific states, thus affecting the accuracy of the recognition results. For example, when a normal child is sleeping or in a state of tension, a short-lasting spike wave will appear at the top, but this is normal EEG;
[0004] 2. In the training process of many EEG models, they are often based on the specific lead templates used when collecting data, or fixed lead templates. This leads to the singleness of the data. Because it only relies on specific lead settings, it is impossible to fully reflect the various characteristics and changes of EEG signals. When identifying abnormal EEG waves, artifacts may occur due to different lead processing methods. For example, when ear movement occurs during the detection process, in the case of binaural leads, the characteristics of abnormal waves such as spike waves will be displayed, but when the lead mode is changed to average lead, the spike waves disappear. Summary of the invention
[0005] The purpose of the present invention is to provide a training method for AI recognition of abnormal EEG waves to solve the problems raised in the above-mentioned background technology.
[0006] To achieve the above object, the present invention provides the following technical solution: a training method for AI recognition of abnormal EEG waves, comprising the following steps: step 1, data processing; step 2, labeling processing; step 3, data training;
[0007] In the above step 1, the collected EEG raw data is processed as follows:
[0008] 1.1 Filter, normalize and scale the raw EEG data;
[0009] 1.2 Expand the dimension of EEG data by constructing multi-dimensional lead data;
[0010] 1.3 Expand the dimensionality of EEG data by quantifying patient information;
[0011] 1.4 Expand the dimension of EEG data by adding event feature indicators;
[0012] 1.5 Expand the dimension of EEG data by adding time domain features;
[0013] 1.6 Expand the dimension of EEG data by adding frequency domain features;
[0014] In the above step 2, the original EEG data processed in step 1 is annotated with abnormal waves by second. The annotated processing mainly includes the following steps:
[0015] 2.1 According to the current processing page number, take out the mark corresponding to the page number;
[0016] 2.2 Convert the marked coordinates into array coordinate column indices;
[0017] In the above step three, the data set obtained after annotation in step two is divided into a training set and a test set. The training set is used to train the convolutional neural network, and the test set is used to evaluate the performance and generalization ability of the model.
[0018] Preferably, in step 1.1, the filtering processing includes notch processing and bandpass filter processing, and an IIR 8-level filter is used; the normalization processing uses the Min-Max algorithm to convert the data into a value between 0 and 10,000; the data scaling processing reads the data by seconds when reading the data, and scales it according to a sampling rate of 500 according to different sampling rates. The data scaling processing specifically includes data compression and data expansion. For a sampling rate exceeding 500, data compression processing is performed, and the compression algorithm uses an average value algorithm; for a sampling rate lower than 500, data expansion processing is performed, and the expansion algorithm uses a data interpolation algorithm.
[0019] Preferably, in step 1.2, specifically: constructing multi-dimensional lead data with a variety of lead modes, the lead modes including bipolar leads, unipolar leads, average leads, ring leads and longitudinal leads.
[0020] Preferably, in step 1.3, the patient information that needs to be quantified specifically includes: age, gender and handedness; the quantification method is: converting the age into values expressed in months and days, rounding up the age if it is greater than 10 years old; gender is represented by 0 for female and 1 for male; handedness is represented by 0 for right hand, 1 for left hand, and 2 for both hands.
[0021] Preferably, in step 1.4, the event characteristic indicators specifically include: eyes opening and closing events, seizure events, flash stimulation events, deep breathing state and sleep state; in the eyes opening and closing events, the recorded information includes the start time to the end time of the event, 0 is used to represent the eyes opening event, and 1 is used to represent the eyes closing event; in the deep breathing state, 1 is used to represent deep inhalation, 2 is used to represent deep exhalation, and 0 is used to represent normal; in the sleep state, 0 is used to represent wakefulness, 1 is used to represent sleep stage I, 2 is used to represent sleep stage II, and 3 is used to represent sleep stage III.
[0022] Preferably, in step 1.5, the time domain features include phase, amplitude, offset, kurtosis, peakedness and skewness.
[0023] Preferably, the phase is determined based on the convexity of the waveform, with an upward convexity being a negative phase wave, recorded as 1, and a downward convexity being a positive phase wave, recorded as 0; the amplitude is calculated as follows: for a negative phase wave, the difference between the peak and the average value of the two troughs is used, and the formula is as follows:
[0024] S 波峰 -(S1 波谷 +S2 波谷 )2
[0025] For positive phase waves, the difference between the trough and the average value of the two peaks is used. The formula is as follows:
[0026] S 波谷 -(S1 波峰 +S2 波峰 )2
[0027] The offset is calculated as follows: In a page of EEG data, a fitting line is first formed through a univariate linear regression algorithm, and then the offset value between each data point in the waveform and the fitting line is calculated. The univariate linear regression algorithm equation is as follows:
[0028] Y=kx+b
[0029] in, After calculating the slope k, the intercept b can be found using the method of undetermined coefficients;
[0030] Kurtosis is a statistical indicator that measures the sharpness of the probability distribution shape. Its formula is:
[0031]
[0032] Among them, μ is the mean and σ is the standard deviation;
[0033] Kurtosis is a measure of the sharpness of the data distribution, and the calculation formula is:
[0034]
[0035] Where n is the sample size, x i is the ith observation value, is the sample mean, s is the sample standard deviation;
[0036] The skewness calculation formula is:
[0037]
[0038] Among them, μ is the mean and σ is the standard deviation.
[0039] Preferably, in step 1.6, the frequency domain features specifically include: frequency, waveform and spectrum, the frequency is calculated by the time difference between two wave peaks; the waveform is divided into α wave, β wave, γ wave, δ wave and θ wave according to the frequency, and are identified as 1, 2, 3, 4, 5 in sequence; the spectrum records the proportion of α wave, β wave, γ wave, δ wave and θ wave per second.
[0040] Preferably, in step 2.1, when reading the annotation, a time range is used, and the start time is:
[0041] Y s =(n-1)*10
[0042] Y e =n*10
[0043] Among them, Y s is the start time, Y e is the end time; n is the current page number.
[0044] Preferably, in step 2.2, specifically: first calculate the page where the annotation is located and the start coordinate index according to the start time of the annotation, and then calculate the position of the annotation coordinates in the array in combination with the scaling rule; the calculation formula is as follows:
[0045] S=(N s -Y s )*R
[0046] Among them, S is the index, N s is the start time of the annotation, and R is the scaling ratio, which is obtained by dividing 500 by the actual sampling rate.
[0047] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention effectively improves the generalization ability of the model by adding event feature indicators of eye opening and closing events, seizure events, flash stimulation events, deep breathing states and sleep states, so that the model can deeply learn the changing laws of EEG signals under different event states, thereby greatly improving the accuracy and reliability of abnormal wave recognition; the present invention expands the data dimension by constructing multi-dimensional lead data, thereby solving the problems caused by the single EEG lead template data, avoiding the limitations brought by relying on a single lead template, allowing the model to learn more comprehensive EEG signal features, thereby reducing the artifact problem caused by the single lead, and laying a foundation for the accurate recognition of abnormal EEG waves. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 is a flow chart of the method of the present invention;
[0049] Figure 2 is a flow chart of the steps of the present invention;
[0050] Figure 3 It is the EEG waveform diagram;
[0051] Figure 4 This is a screenshot of the collected raw EEG data;
[0052] Figure 5 This is a screenshot of the raw EEG data after data processing. DETAILED DESCRIPTION
[0053] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0054] Please refer to the attached Figure 1 -Attached Figure 5 , an embodiment provided by the present invention: a training method for AI recognition of abnormal EEG waves, comprising the following steps: step one, data processing; step two, labeling processing; step three, data training;
[0055] In the above step 1, the collected EEG raw data is processed as follows:
[0056] 1.1 The raw EEG data is filtered, normalized and stretched; the filtering includes notch processing and bandpass filter processing, and an 8-level filter of IIR (Infinite Impulse Response) is used; the normalization is to use the Min-Max algorithm to convert the data to between 0 and 10000; the data stretching is to read the data by seconds when reading the data, and to stretch it according to the sampling rate of 500 according to the sampling rate. The data stretching specifically includes data compression and data stretching. For the case where the sampling rate exceeds 500, data compression is performed, and the compression algorithm adopts the average value algorithm. For example, if the sampling rate is 1000 and needs to be compressed to a sampling rate of 500, then two points are combined into one point and the average value of the two points is taken; for the case where the sampling rate is lower than 500, data stretching is performed, and the stretching algorithm adopts the data interpolation algorithm;
[0057] 1.2 Expand the dimension of EEG data by constructing multi-dimensional lead data, specifically: construct multi-dimensional lead data with multiple lead modes, including bipolar leads, unipolar leads, average leads, ring leads and longitudinal leads;
[0058] 1.3 Expand the dimension of EEG data by quantifying patient information. The patient information that needs to be quantified includes: age, gender and handedness. The quantification method is: convert age into values expressed in months and days. If the age is greater than 10 years old, round it up to the nearest year. For example, 2 years, 6 months and 15 days should be converted to 30.5, and 20 years and 4 months should be converted to 240. Gender is 0 for female and 1 for male. Handedness is 0 for right hand, 1 for left hand, and 2 for both hands.
[0059] 1.4 Expand the dimension of EEG data by adding event feature indicators. The event feature indicators specifically include: eye opening and closing events, seizure events, flash stimulation events, deep breathing state and sleep state; in the eye opening and closing events, the recorded information includes the start time to the end time of the event, 0 represents the eye opening event, and 1 represents the eye closing event; in the deep breathing state, 1 represents deep inhalation, 2 represents deep exhalation, and 0 represents normal; in the sleep state, 0 represents wakefulness, 1 represents sleep stage I, 2 represents sleep stage II, and 3 represents sleep stage III;
[0060] 1.5 The dimension of EEG data is expanded by adding time domain features, including phase, amplitude, offset, kurtosis, peaks and skewness; the bit is judged according to the convexity of the waveform, the upper convexity is a negative phase wave, recorded as 1, and the lower convexity is a positive phase wave, recorded as 0; the amplitude is calculated as follows: for negative phase waves, the difference between the peak and the average value of the two troughs is used, and the formula is as follows:
[0061] S 波峰 -(S1波谷 +S2 波谷 )2
[0062] For positive phase waves, the difference between the trough and the average value of the two peaks is used. The formula is as follows:
[0063] S 波谷 -(S1 波峰 +S2 波峰 )2
[0064] The offset is calculated as follows: In a page of EEG data, a fitting line is first formed through a univariate linear regression algorithm, and then the offset value between each data point in the waveform and the fitting line is calculated. The univariate linear regression algorithm equation is as follows:
[0065] Y=kx+b
[0066] in, After calculating the slope k, the intercept b can be found using the method of undetermined coefficients;
[0067] Kurtosis is a statistical indicator that measures the sharpness of the probability distribution shape. Its formula is:
[0068]
[0069] Among them, μ is the mean and σ is the standard deviation;
[0070] Kurtosis is a measure of the sharpness of the data distribution, and the calculation formula is:
[0071]
[0072] Where n is the sample size, x i is the ith observation value, is the sample mean, s is the sample standard deviation;
[0073] The skewness calculation formula is:
[0074]
[0075] Among them, μ is the mean and σ is the standard deviation;
[0076] 1.6 Expand the dimension of EEG data by adding frequency domain features. Frequency domain features include frequency, waveform and spectrum. The frequency is calculated by the time difference between two wave peaks. The waveform is divided into α wave, β wave, γ wave, δ wave and θ wave according to the frequency, and marked as 1, 2, 3, 4 and 5 respectively. The spectrum records the proportion of α wave, β wave, γ wave, δ wave and θ wave per second.
[0077] In the above step 2, the original EEG data processed in step 1 is annotated with abnormal waves by second. The processing of the annotation mainly includes the following steps:
[0078] 2.1 According to the current processing page number, take out the annotation corresponding to the page number. When reading the annotation, use the time range method, and the starting time is:
[0079] Y s =(n-1)*10
[0080] Y e =n*10
[0081] Among them, Y s is the start time, Y e is the end time; n is the current page number;
[0082] 2.2 Convert the annotation coordinates into array coordinate column indexes. Specifically, calculate the page where the annotation is located and the start coordinate index based on the start time of the annotation, and then calculate the position of the annotation coordinates in the array based on the scaling rules. The calculation formula is as follows:
[0083] S=(N s -Y s )*R
[0084] Among them, S is the index, N s is the start time of the annotation, R is the expansion ratio, which is obtained by dividing 500 by the actual sampling rate;
[0085] In the above step three, the data set obtained after annotation in step two is divided into a training set and a test set. The training set is used to train the convolutional neural network, and the test set is used to evaluate the performance and generalization ability of the model.
[0086] Based on the above, the advantage of the present invention is that when the present invention is used, in the data processing stage, the present invention expands the dimension of EEG data by constructing multi-dimensional lead data, quantifying patient information, adding event feature indicators, adding time domain features and adding frequency domain features, so as to optimize the training data, thereby improving the generalization ability of the trained model, enabling the model to deeply learn the changing laws of EEG signals under different event states, and learn more comprehensive EEG signal features, thereby greatly improving the accuracy and reliability of the model in identifying abnormal waves.
[0087] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.
Claims
1. A training method for AI recognition of abnormal EEG waves, comprising the following steps: step 1, data processing; step 2, labeling processing; step 3, data training; characterized in that: In the above step 1, the collected EEG raw data is processed as follows: 1.1 Filter, normalize and scale the raw EEG data; 1.2 Expand the dimension of EEG data by constructing multi-dimensional lead data; 1.3 Expand the dimensionality of EEG data by quantifying patient information; 1.4 Expand the dimension of EEG data by adding event feature indicators; 1.5 Expand the dimension of EEG data by adding time domain features; 1.6 Expand the dimension of EEG data by adding frequency domain features; In the above step 2, the original EEG data processed in step 1 is annotated with abnormal waves by second. The processing of the annotation mainly includes the following steps: 2.1 According to the current processing page number, take out the mark corresponding to the page number; 2.2 Convert the marked coordinates into array coordinate column indices; In the above step three, the data set obtained after annotation in step two is divided into a training set and a test set. The training set is used to train the convolutional neural network, and the test set is used to evaluate the performance and generalization ability of the model.
2. The training method for AI recognition of abnormal EEG waves according to claim 1, characterized in that: In the step 1.1, the filtering process includes notch processing and bandpass filter processing, and an 8-level IIR filter is used; Normalization processing uses the Min-Max algorithm to convert data into a range between 0 and 10,000; data scaling processing reads data by seconds when reading data, and scales it according to 500 sampling rates according to different sampling rates. Data scaling processing specifically includes data compression and data expansion. When the sampling rate exceeds 500, data compression processing is performed, and the compression algorithm uses the average value algorithm; when the sampling rate is lower than 500, data expansion processing is performed, and the expansion algorithm uses the data interpolation algorithm.
3. The training method for AI recognition of abnormal EEG waves according to claim 1, characterized in that: In the step 1.2, specifically: constructing multi-dimensional lead data with a variety of lead modes, the lead modes include bipolar leads, unipolar leads, average leads, ring leads and longitudinal leads.
4. The training method for AI recognition of abnormal EEG waves according to claim 1, characterized in that: In step 1.3, the patient information that needs to be quantified specifically includes: age, gender and handedness; the quantification method is: convert the age into values expressed in months and days, and round up the age if it is greater than 10 years old; gender is represented by 0 for female and 1 for male; handedness is represented by 0 for right hand, 1 for left hand, and 2 for both hands.
5. The training method for AI recognition of abnormal EEG waves according to claim 1, characterized in that: In the step 1.4, the event characteristic indicators specifically include: eyes opening and closing events, seizure events, flash stimulation events, deep breathing state and sleep state; in the eyes opening and closing events, the recorded information includes the start time to the end time of the event, 0 is used to represent the eyes opening event, and 1 is used to represent the eyes closing event; in the deep breathing state, 1 is used to represent deep inhalation, 2 is used to represent deep exhalation, and 0 is used to represent normal; in the sleep state, 0 is used to represent wakefulness, 1 is used to represent sleep stage I, 2 is used to represent sleep stage II, and 3 is used to represent sleep stage III.
6. The training method for AI recognition of abnormal EEG waves according to claim 1, characterized in that: In step 1.5, the time domain features include phase, amplitude, offset, kurtosis, peakedness and skewness.
7. The training method for AI recognition of abnormal EEG waves according to claim 6, characterized in that: The phase is determined based on the convexity of the waveform. The convexity is a negative phase wave, recorded as 1, and the convexity is a positive phase wave, recorded as 0. The amplitude is calculated as follows: for a negative phase wave, the difference between the peak and the average value of the two troughs is used, and the formula is as follows: S 波峰 -(S1 波谷 +S2 波谷 ) / 2 For positive phase waves, the difference between the trough and the average value of the two peaks is used. The formula is as follows: S 波谷 -(S1 波峰 +S2 波峰 ) / 2 The offset is calculated as follows: In a page of EEG data, a fitting line is first formed through a univariate linear regression algorithm, and then the offset value between each data point in the waveform and the fitting line is calculated. The univariate linear regression algorithm equation is as follows: Y=kx+b in, After calculating the slope k, the intercept b can be found using the method of undetermined coefficients; Kurtosis is a statistical indicator that measures the sharpness of the probability distribution shape. Its formula is: Among them, μ is the mean and σ is the standard deviation; Kurtosis is a measure of the sharpness of the data distribution, and the calculation formula is: Where n is the sample size, x i is the i-th observation, x is the sample mean, and s is the sample standard deviation; The skewness calculation formula is: Among them, μ is the mean and σ is the standard deviation.
8. The training method for AI recognition of abnormal EEG waves according to claim 1, characterized in that: In step 1.6, the frequency domain features specifically include: frequency, waveform and spectrum. The frequency is calculated by the time difference between two wave peaks; the waveform is divided into α wave, β wave, γ wave, δ wave and θ wave according to the frequency, and are marked as 1, 2, 3, 4 and 5 respectively; the spectrum records the proportion of α wave, β wave, γ wave, δ wave and θ wave per second.
9. The training method for AI recognition of abnormal EEG waves according to claim 1, characterized in that: In step 2.1, when reading the annotation, a time range is used, and the start time is: AND s (n-1)*10 AND e =n*10 Among them, Y s is the start time, Y e is the end time; n is the current page number.
10. The training method for AI recognition of abnormal EEG waves according to claim 1, characterized in that: In step 2.2, specifically, the page where the annotation is located and the start coordinate index are first calculated according to the start time of the annotation, and then the position of the annotation coordinates in the array is calculated in combination with the scaling rule; the calculation formula is as follows: S=(N s -Y s )*R Among them, S is the index, N s is the start time of the annotation, and R is the scaling ratio, which is obtained by dividing 500 by the actual sampling rate.
Citation Information
Cited By
Cerebral hemorrhage prevention intervention and risk feedback closed-loop control method and system
CN121601227A
A method and system for prevention, intervention, and closed-loop risk feedback control of cerebral hemorrhage
CN121601227B