EEG signal feature extraction method and system, storage medium and terminal
By using multi-scale spectral structure change scoring and Hermite function decomposition, and adaptively segmenting EEG signals, the shortcomings of existing EEG signal feature extraction technologies are addressed, achieving highly robust and sensitive feature extraction, and improving the accuracy and stability of sleep apnea detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI ADVANCED RES INST CHINESE ACADEMY OF SCI
- Filing Date
- 2026-04-07
- Publication Date
- 2026-05-08
AI Technical Summary
Existing EEG signal feature extraction methods cannot effectively and adaptively segment physiological event boundaries in sleep apnea detection, and lack a joint characterization mechanism of multi-scale spectral structure and sudden events, resulting in insufficient feature expression ability and poor robustness, making it difficult to meet the needs of clinical applications.
We employ multi-scale spectral structure change scoring and Hermite function decomposition, combined with a sudden event-driven mechanism. By constructing multi-scale reference windows and test windows, we adaptively segment the EEG signal, perform Hermite function decomposition, obtain segment-level features, and construct EEG feature vectors.
It significantly improves the robustness and event sensitivity of EEG signal feature extraction, enhances the recognition accuracy and feature stability of sleep apnea-related events, solves the problem of event truncation and information dilution caused by fixed windows, and achieves cross-subject generalization ability.
Smart Images

Figure CN121997032A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of biomedical signal processing, and relates to an EEG signal feature extraction method, system, storage medium and terminal. Background Technology
[0002] Sleep apnea is one of the most common sleep-related respiratory disorders, characterized by interrupted breathing, decreased blood oxygenation due to hypoventilation, and accompanying microarousing. Long-term lack of intervention significantly increases the risk of cardiovascular disease, metabolic syndrome, and cognitive impairment, thus necessitating convenient and effective early screening methods. Current clinical diagnosis primarily relies on polysomnography (PSG). While accurate, this method is cumbersome, requires sophisticated monitoring environments, and is costly, making it unsuitable for large-scale screening.
[0003] With the widespread adoption of wearable devices, automated sleep apnea detection based on single-channel electroencephalography (EEG) has become a research hotspot. However, the highly non-stationary nature of EEG signals and the diversity of event scales significantly limit traditional feature extraction methods. Current EEG feature extraction typically relies on fixed-window time-domain, frequency-domain, or time-frequency-domain analysis. These fixed-window methods struggle to adapt to the dynamic changes in sleep EEG, particularly in capturing common short-duration events during apnea, such as micro-arousals, sympathetic activation, and high-frequency energy surges. These events are short-lived and exhibit rapid energy changes, easily crossing the analysis window, leading to feature dilution, misaligned event boundaries, and an inability to accurately reflect the physiological process. Even with more advanced time-frequency analysis methods, such as short-time Fourier transform, wavelet transform, empirical mode decomposition (EMD), and variational mode decomposition (VMD), problems remain, including fixed decomposition scales, limited sensitivity to sudden events, and insufficient robustness in rapidly changing scenarios.
[0004] Existing segmentation strategies largely rely on single-scale spectral entropy or energy mutation detection, but EEG signals inherently possess multi-scale structures. Apnea-related events exhibit different patterns across different time scales; for example, respiratory rhythms, micro-awakening bursts, and frequency band energy changes span different time scales, and single-scale features are insufficient to comprehensively describe these multi-level spectral structural changes. Furthermore, existing methods lack a dedicated identification mechanism for sudden events (such as high-frequency bursts caused by micro-awakening), which are often crucial physiological signals for diagnosing apnea. The lack of such a dedicated mechanism weakens the sensitivity of event detection, hindering the improvement of automated screening performance.
[0005] In summary, existing technologies generally suffer from the following problems: they cannot effectively perform adaptive segmentation of EEG signals based on physiological event boundaries, lack a joint characterization mechanism of multi-scale spectral structure and sudden events, and lack a stable aggregation framework for segment-level features. Ultimately, this results in insufficient feature expression ability and poor robustness, making it difficult to meet the application needs of automatic screening for sleep apnea in clinical practice. Summary of the Invention
[0006] The purpose of this invention is to provide an EEG signal feature extraction method, system, storage medium, and terminal that can extract EEG signal features with strong event sensitivity, high adaptability, and excellent stability.
[0007] In a first aspect, the present invention provides a method for extracting features from EEG signals, the method comprising the following steps: preprocessing the EEG signal; constructing a multi-scale reference window and a test window, and calculating a multi-scale spectral structure change score for the preprocessed EEG signal; detecting candidate segment boundary points of the preprocessed EEG signal based on the multi-scale spectral structure change score; obtaining adaptive EEG segments based on the candidate segment boundary points; performing Hermite function decomposition on the EEG signal in the adaptive EEG segments to obtain EEG segment-level features; and constructing an EEG feature vector based on the EEG segment-level features and global EEG statistics.
[0008] In one implementation of the first aspect, preprocessing the EEG signal includes the following steps:
[0009] The EEG signal is high-pass filtered to remove baseline drift;
[0010] The high-pass filtered EEG signal was then subjected to low-pass filtering to suppress electromyographic artifacts and high-frequency noise.
[0011] The low-pass filtered EEG signal is subjected to power frequency notch filtering to eliminate power supply interference.
[0012] In one implementation of the first aspect, constructing a multi-scale reference window and a test window, and calculating the multi-scale spectral structure change score of the preprocessed EEG signal includes the following steps:
[0013] Based on the reference window and the test window, the power spectral density of the preprocessed EEG signal is calculated, and the power spectral density is normalized.
[0014] For the same scale *s*, the Jensen-Shannon divergence between the reference window and the test window is calculated based on the normalized power spectral density. and spectral entropy difference And normalize them respectively;
[0015] Scoring of spectral structure changes at corresponding scales is calculated based on normalized Jensen-Shannon divergence and spectral entropy difference. ,in and These represent the normalized Jensen-Shannon divergence and the normalized spectral entropy difference, respectively. and All represent weight coefficients and satisfy the following conditions: , This indicates the k-th time position;
[0016] After mapping the spectral structure change scores at each scale to a unified time grid, multi-scale fusion is performed to obtain the multi-scale spectral structure change scores. ,in This represents the score of spectral structure change mapped to a uniform time grid at scale s. Represents the multi-scale fusion weights and satisfies .
[0017] In one implementation of the first aspect, detecting candidate segment boundary points of the preprocessed EEG signal based on the multi-scale spectral structure change score includes the following steps:
[0018] Short-term monitoring of the high-frequency energy in the preset frequency band of the preprocessed EEG signal is performed to identify areas of sudden events;
[0019] The multi-scale spectral structure change score of the event area is enhanced to obtain an updated multi-scale spectral structure change score. ,in This represents a score indicating multi-scale spectral structure changes. This indicates a function that indicates an emergency. Indicates preset parameters. This indicates the k-th time position;
[0020] An adaptive threshold is constructed based on the median and absolute median difference of the updated multiscale spectral structure change score. Where med(·) represents the median, and MAD(·) represents the absolute median difference. Indicates preset parameters;
[0021] When the updated multi-scale spectral structure change score is greater than the adaptive threshold, the corresponding EEG signal is marked as a candidate segment boundary point of the EEG signal.
[0022] In one implementation of the first aspect, obtaining EEG adaptive segmentation based on the candidate segmentation boundary points includes the following steps:
[0023] Neighborhood fusion is performed on the candidate segment boundary points; wherein, when the time interval between two adjacent candidate segment boundary points is less than the minimum interval threshold, the two candidate segment boundary points are merged into a single boundary point, and the position with the larger updated multi-scale spectral structure change score is retained as the fused boundary point;
[0024] Obtain the segmentation duration of the candidate segments generated from the candidate segmentation boundary points after neighborhood fusion;
[0025] When the segment duration is less than the lower threshold, the corresponding candidate segment is merged into the adjacent segment where the adjacent boundary point with the smaller updated multi-scale spectral structure change score is located; when the updated multi-scale spectral structure change scores of the boundary points on the left and right sides are the same, the segment is merged into the adjacent segment on the side with the longer segment duration; when the duration of the merged segment is greater than the upper threshold, the merged segment is recursively segmented.
[0026] When the segment duration exceeds the upper limit threshold, the corresponding candidate segments are recursively segmented according to the peak position or midpoint position of the updated multi-scale spectral structure change score within the segment.
[0027] In one implementation of the first aspect, performing Hermite function decomposition on the EEG signal in the adaptive EEG segmentation to obtain EEG segment-level features includes the following steps:
[0028] The decomposition parameters of the Hermite function decomposition are obtained based on the intra-segment signal features of the EEG adaptive segmentation; wherein, for After rounding, the decomposition order is obtained by truncating according to the first upper and lower limits. ,right The scaling scale is obtained by truncating according to the second upper and lower limits. α, γ, β, and c are mapping coefficients. Indicates information capacity. ε represents the spectral centroid, and ε represents the minimum constant to avoid zero in the denominator;
[0029] Based on the decomposition parameters, the EEG signal is decomposed using the Hermite function to obtain the EEG segment-level features.
[0030] In one implementation of the first aspect, constructing an EEG feature vector based on the EEG segment-level features and EEG global statistics includes the following steps:
[0031] The segment length of the EEG adaptive segmentation is used as the weight;
[0032] Calculate the weighted mean and weighted standard deviation of the segment-level features;
[0033] The weighted mean, the weighted standard deviation, and the global EEG statistics are combined to form the EEG feature vector.
[0034] In a second aspect, the present invention provides an EEG signal feature extraction system, the system comprising a preprocessing module, a construction module, a detection module, an acquisition module, a decomposition module, and a construction module;
[0035] The preprocessing module is used to preprocess the EEG signal;
[0036] The construction module is used to construct multi-scale reference windows and test windows, and to calculate the multi-scale spectral structure change score of the preprocessed EEG signal;
[0037] The detection module is used to detect candidate segment boundary points of the preprocessed EEG signal based on the multi-scale spectral structure change score.
[0038] The acquisition module is used to acquire EEG adaptive segmentation based on the candidate segmentation boundary points;
[0039] The decomposition module is used to perform Hermite function decomposition on the EEG signal in the EEG adaptive segmentation to obtain EEG segment-level features;
[0040] The construction module is used to construct EEG feature vectors based on the EEG segment-level features and EEG global statistics.
[0041] Thirdly, the present invention provides a terminal, the terminal comprising: a processor and a memory;
[0042] The memory is used to store computer programs;
[0043] The processor is used to execute the computer program stored in the memory, so that the terminal performs the above-described EEG signal feature extraction method.
[0044] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a terminal, implements the above-described EEG signal feature extraction method.
[0045] As described above, the EEG signal feature extraction method, system, storage medium, and terminal of the present invention have the following beneficial effects:
[0046] (1) It solves the problems of insufficient characterization of sudden events, poor generalization of fixed parameters and unstable segment features in the existing EEG signal feature extraction technology for sleep apnea detection;
[0047] (2) Based on multi-scale spectral entropy change detection, sudden event driving mechanism and Hermite parameter adaptive mapping, feature extraction of EEG signal is realized, which significantly improves the robustness, event sensitivity and cross-subject generalization ability of EEG signal feature extraction, and can significantly improve the recognition accuracy and feature stability of sleep apnea-related events.
[0048] (3) The multi-scale reference-test spectrum structure is used to realize the synchronous detection of spectrum mutations, so that the event segmentation is closer to the physiological boundary and the event truncation and information dilution caused by the fixed window are avoided;
[0049] (4) By using the emergency event enhancement strategy, the detection sensitivity of short-term key events such as micro-awakening and high-frequency sudden events can be effectively improved, so that the physiological response of pause events can be fully characterized.
[0050] (5) By establishing an adaptive mapping model between the Hermite function order and the scaling parameters, each EEG signal segment can be decomposed under the optimal parameters, ensuring the cross-segment consistency and generalization of the features;
[0051] (6) By using a segment-level feature fixed-dimensional aggregation strategy, an indefinite number of EEG signal segments are stably mapped into a feature vector with a unified structure, which solves the problem of dimension misalignment caused by changes in the number of segments in the existing technology. Attached Figure Description
[0052] Figure 1 The flowchart shown is an embodiment of the EEG signal feature extraction method of the present invention;
[0053] Figure 2 The diagram shows a waveform structure of the EEG signal feature extraction method of the present invention in one embodiment;
[0054] Figure 3 This is a schematic diagram showing the spectral structure change scoring of the multi-scale reference window and test window of the present invention in one embodiment;
[0055] Figure 4 The diagram shown is a structural schematic of the EEG signal feature extraction system of the present invention in one embodiment.
[0056] Figure 5 The diagram shown is a structural schematic of the terminal of the present invention in one embodiment. Detailed Implementation
[0057] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that, unless otherwise specified, the following embodiments and features described therein can be combined with each other.
[0058] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Therefore, the drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0059] Furthermore, in this invention, descriptions involving "first," "second," etc., are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature. Additionally, the technical solutions of the various embodiments can be combined with each other, but only on the basis of being achievable by those skilled in the art. When the combination of technical solutions is contradictory or impossible to implement, such a combination of technical solutions should be considered non-existent and not within the scope of protection claimed by this invention.
[0060] This invention's EEG signal feature extraction method accurately captures spectral structure mutations related to apnea at different time scales by constructing a multi-scale reference window-test window spectral structure comparison mechanism. Furthermore, it enhances the identification capability of apnea-related events by assigning higher weights to key short-term events such as micro-arousals through a burst event energy enhancement mechanism. Based on EEG segment length, dominant frequency, and information content, this invention establishes a Hermite parameter adaptive mapping model, which can automatically match the optimal order and scaling scale for different segments, achieving efficient representation consistent with signal complexity. This invention constructs a unified segment-level feature system and standardized aggregation framework, converting an indefinite number of signal segments into global feature vectors with fixed dimensions and stable structure. These vectors can be directly used in classifiers or deep models, achieving efficient and scalable automatic screening capabilities. This can be applied to real-time sleep monitoring in wearable devices, home sleep screening systems, and portable sleep diagnostic devices.
[0061] like Figure 1 As shown, in one embodiment, the EEG signal feature extraction method of the present invention includes steps S1-S6.
[0062] Step S1: Preprocess the EEG signal.
[0063] Specifically, a single-channel EEG signal is selected as the input signal, and the EEG signal is preprocessed. This includes high-pass filtering to remove baseline drift; low-pass filtering to suppress electromyography artifacts and high-frequency noise; and 50Hz / 60Hz power frequency notch filtering to eliminate power supply interference, ensuring the effectiveness of the obtained EEG signal within the characteristic frequency band.
[0064] Step S2: Construct a multi-scale reference window and test window, and calculate the multi-scale spectral structure change score of the preprocessed EEG signal.
[0065] Specifically, constructing multi-scale reference and test windows and calculating the multi-scale spectral structure change score of the preprocessed EEG signal includes the following steps:
[0066] 21) Construct a multi-scale reference window and a test window; at each scale, the length of the reference window is greater than the length of the test window.
[0067] For the preprocessed EEG signal, multiple reference windows and test windows of different scales are constructed within the same 30 s analysis segment. For the same scale s, the reference window length is... Greater than the test window length The two windows slide synchronously along the time axis to capture short-term and long-term spectral structure changes. Preferably, three scale combinations of (4 s, 2 s), (2 s, 1 s), and (1 s, 0.5 s) can be used, with a sliding step size of 0.25 s.
[0068] 22) Based on the reference window and the test window, calculate the power spectral density of the preprocessed EEG signal and normalize the power spectral density.
[0069] The power spectral density of the EEG signal is calculated using either the Welch algorithm or an adaptive window function algorithm to improve the stability of spectral estimation across different scales. The normalized power spectral densities of the reference window and the test window are as follows:
[0070]
[0071]
[0072] Where f represents the frequency index. This represents the k-th time position. and Let represent the power spectral density of the reference window and the test window at scale s, respectively, and ε represent a minimal constant to avoid zero in the denominator.
[0073] 23) For the same scale s, calculate the Jensen-Shannon divergence between the reference window and the test window based on the normalized power spectral density. and spectral entropy difference They were then normalized separately.
[0074] The Jensen-Shannon divergence and spectral entropy difference are used to measure the spectral differences and structural changes between the reference window and the test window, respectively, thereby obtaining spectral structure change scores at multiple scales to measure the intensity of spectral structure changes. The sliding methods of the reference and test windows at different scales, as well as the power spectrum estimation positions, are as follows: Figure 3 As shown, it achieves synchronous capture of short-term and long-term changes.
[0075] Jensen-Shannon divergence between the reference window and the test window and spectral entropy difference as follows:
[0076]
[0077]
[0078]
[0079]
[0080] Preferably, the Jensen-Shannon divergence of the present invention and spectral entropy difference The normalization process uses an algorithm as follows: ,in, This represents the sequence to be normalized. and These represent the 1st and 99th percentiles of the sequence, respectively, and clip(·) represents the truncation function.
[0081] 24) Calculate the spectral structure change score at the corresponding scale based on normalized Jensen-Shannon divergence and spectral entropy difference. ,in and These represent the normalized Jensen-Shannon divergence and the normalized spectral entropy difference, respectively. and All represent weight coefficients and satisfy the following conditions: , This represents the k-th time position.
[0082] 25) After mapping the spectral structure change scores at each scale to a unified time grid, multi-scale fusion is performed to obtain the multi-scale spectral structure change scores. ,in This represents the score of spectral structure change mapped to a uniform time grid at scale s. Represents the multi-scale fusion weights and satisfies .
[0083] Step S3: Detect candidate segment boundary points of the preprocessed EEG signal based on the multi-scale spectral structure change score.
[0084] Specifically, detecting candidate segment boundary points of the preprocessed EEG signal based on the multi-scale spectral structure change score includes the following steps:
[0085] 31) Perform short-term monitoring of the high-frequency energy of the preset frequency band of the preprocessed EEG signal to identify areas of sudden events.
[0086] Specifically, the high-frequency energy of the EEG signal is monitored. When the increase in the high-frequency energy exceeds a preset threshold, the region where the corresponding EEG signal is located is determined to be the region of the sudden event.
[0087] In one embodiment, short-time monitoring of the high-frequency energy in the 30Hz-80Hz band of the preprocessed EEG signal is performed to identify regions of sudden events. Preferably, the short-time analysis window length is 0.2 s, and the window overlap rate is 50%. The normalized power spectral density is based on the preset frequency band. Calculate short-time spectral entropy and obtained the entropy deviation using the median as the baseline. The specific formula is as follows:
[0088]
[0089]
[0090] Where med(·) represents the median. When the time is specified, the corresponding time is marked as a candidate time for the outbreak, where , The parameter represents the preset parameter, and MAD(·) represents the absolute median difference. Successive burst candidate moments constitute the burst event region when the duration requirement is met.
[0091] 32) Enhance the multi-scale spectral structure change score of the event area to obtain an updated multi-scale spectral structure change score. ,in This represents a score indicating multi-scale spectral structure changes. This indicates a function that indicates an emergency. Indicates preset parameters. This represents the k-th time position.
[0092] Specifically, by enhancing the multi-scale spectral structure change score of the sudden event region, the impact of the sudden event on the segment boundary is amplified. Sudden event indicator function. , These are preset parameters.
[0093] 33) Construct an adaptive threshold based on the median and absolute median difference of the updated multi-scale spectral structure change score. ,in This indicates the preset parameters.
[0094] The adaptive threshold is calculated using the median and median absolute deviation (MAD) of the updated multi-scale spectral structure change score to accommodate the differences in EEG signal amplitude and noise conditions among different subjects.
[0095] 34) When the updated multi-scale spectral structure change score is greater than the adaptive threshold, the corresponding EEG signal is marked as a candidate segment boundary point of the EEG signal.
[0096] Among them, when At that time, the corresponding EEG signal is marked as a candidate segment boundary point of the EEG signal.
[0097] Step S4: Obtain EEG adaptive segmentation based on the candidate segmentation boundary points.
[0098] Specifically, obtaining EEG adaptive segmentation based on the candidate segmentation boundary points includes the following steps:
[0099] 41) Perform neighborhood fusion on the candidate segment boundary points; wherein, when the time interval between two adjacent candidate segment boundary points is less than the minimum interval threshold... When the two candidate segment boundary points are merged into a single boundary point, the position with the larger updated multi-scale spectral structure change score is retained as the fused boundary point.
[0100] In this invention, since there may be local spikes caused by artifacts in the EEG signal, the candidate segment boundary points are fused into a single boundary point to obtain a stable segment line.
[0101] 42) Obtain the segment duration of the candidate segments generated from the candidate segment boundary points after neighborhood fusion.
[0102] The segment duration of the m-th candidate segment satisfies: , where represent the time corresponding to the (m+1)th candidate segment boundary point and the mth candidate segment boundary point, respectively.
[0103] 43) When the segment duration is... Less than the lower threshold When the updated multi-scale spectral structure change scores of the boundary points on both sides are the same, the corresponding candidate segments are merged into the adjacent segments of the side with the longer segment duration; when the merged segment duration is longer than the previous segment, the corresponding candidate segments are merged into the adjacent segments of the side with the longer segment duration. Greater than the upper limit threshold At that time, the merged segments are recursively divided.
[0104] 44) When the segment duration exceeds the upper limit threshold, the corresponding candidate segments are recursively segmented according to the peak position or midpoint position of the updated multi-scale spectral structure change score within the segment.
[0105] By combining short segments and recursively segmenting long segments, structurally stable and physiologically meaningful adaptive segmented EEG signals can be obtained. Each generated EEG signal exhibits a consistent and stable spectral structure, providing standardized input for subsequent Hermite decomposition and feature extraction.
[0106] In one embodiment, the waveforms of the EEG signal, multi-scale spectral structure change score, burst event region, and EEG adaptive segmentation are as follows: Figure 2 As shown.
[0107] Step S5: Perform Hermite function decomposition on the EEG signal in the adaptive EEG segmentation to obtain EEG segment-level features.
[0108] Specifically, the Hermite function decomposition of the EEG signal in the adaptive EEG segmentation to obtain EEG segment-level features includes the following steps:
[0109] 51) Obtain the decomposition parameters of the Hermite function decomposition based on the intra-segment signal features of the EEG adaptive segmentation; the decomposition parameters include the decomposition order. and scaling Among them, for After rounding, the decomposition order is obtained by truncating according to the first upper and lower limits. ,right The scaling scale is obtained by truncating according to the second upper and lower limits. α, γ, β, and c are mapping coefficients. Indicates information capacity. ε represents the spectral centroid, and ε represents the minimal constant to avoid a denominator of zero.
[0110] Because EEG signals in different adaptive EEG segments differ in duration, frequency structure, and energy distribution, Hermite decomposition with fixed parameters struggles to achieve consistent representation. Therefore, this invention automatically determines the decomposition parameters of Hermite decomposition—specifically, the optimal decomposition order and scaling scale—based on information such as the dominant frequency, spectral concentration, energy distribution, and segment duration of each EEG signal segment. This ensures that each EEG signal is expanded in a manner best suited to its structure. Using adaptive decomposition parameters not only provides optimal representation of each EEG signal segment in Hermite space but also significantly improves the stability of data across subjects and across nights.
[0111] Preferably, , .in This represents the power spectral density of the m-th adaptive EEG segment. , , and These represent the upper and lower limits of the decomposition order and the scaling factor, respectively. Indicates the duration of each segment. (For) Rounding and truncating according to its upper and lower limits, for The data is truncated according to its upper and lower limits.
[0112] 52) Based on the decomposition parameters, perform Hermite function decomposition on the EEG signal to obtain the EEG segment-level features.
[0113] The segment-level features include Hermite coefficient energy, main contribution coefficient position, spectral entropy, frequency band energy ratio, bandwidth ratio, burst event characteristics, segment length, and reconstruction error, which comprehensively describe the dynamic information within the segment to ensure that the segment-level features can fully characterize pause-related events.
[0114] Step S6: Construct an EEG feature vector based on the EEG segment-level features and EEG global statistics.
[0115] Specifically, to address the issue of the number of segments varying with individual differences and sleep stages, this invention further proposes a segment-level feature aggregation strategy. This strategy uses the segment length of the adaptively segmented EEG data as weights, and calculates the weighted mean and weighted standard deviation of the segment-level features as global aggregation features. The weighted mean, weighted standard deviation, and global EEG statistics are then combined to form an EEG feature vector with a fixed dimension. The global EEG statistics include the number of segments, average segment length, number of sudden events, and event frequency distribution ratio. This EEG feature vector has a stable structure, contains rich physiological information, and can be directly used in machine learning or deep learning models to achieve automatic detection of sleep apnea events.
[0116] Experimental verification shows that the EEG signal feature extraction method of the present invention can achieve significantly better detection performance than traditional fixed window, single scale or fixed parameter methods when using only single-channel EEG signals. It maintains high robustness on cross-subject data and can be stably applied in actual sleep monitoring devices.
[0117] The scope of protection of the EEG signal feature extraction method described in this embodiment is not limited to the execution order of the steps listed in this embodiment. Any solution implemented by adding, subtracting, or replacing steps in the prior art based on the principle of this invention is included within the scope of protection of this invention.
[0118] This invention also provides an EEG signal feature extraction system, which can implement the EEG signal feature extraction method described in this invention. However, the implementation device of the EEG signal feature extraction system described in this invention includes, but is not limited to, the structure of the EEG signal feature extraction system listed in this embodiment. All structural modifications and substitutions of the prior art made in accordance with the principles of this invention are included within the protection scope of this invention.
[0119] like Figure 4 As shown, in one embodiment, the EEG signal feature extraction system of the present invention includes a preprocessing module 41, a construction module 42, a detection module 43, an acquisition module 44, a decomposition module 45, and a construction module 46.
[0120] The preprocessing module 41 is used to preprocess the EEG signal.
[0121] The construction module 42 is connected to the preprocessing module 41 and is used to construct a multi-scale reference window and a test window, and to calculate the multi-scale spectral structure change score of the preprocessed EEG signal.
[0122] The detection module 43 is connected to the construction module 42 and is used to detect candidate segment boundary points of the preprocessed EEG signal based on the multi-scale spectral structure change score.
[0123] The acquisition module 44 is connected to the detection module 43 and is used to acquire EEG adaptive segments based on the candidate segment boundary points.
[0124] The decomposition module 45 is connected to the acquisition module 44 and is used to perform Hermite function decomposition on the EEG signal in the EEG adaptive segmentation to obtain EEG segment-level features.
[0125] The construction module 46 is connected to the decomposition module 45 and is used to construct EEG feature vectors based on the EEG segment-level features and EEG global statistics.
[0126] The structure and principle of the preprocessing module 41, the construction module 42, the detection module 43, the acquisition module 44, the decomposition module 45, and the construction module 46 correspond one-to-one with the steps in the above-mentioned EEG signal feature extraction method, so they will not be described again here.
[0127] In the embodiments provided by this invention, it should be understood that the disclosed systems, apparatuses, or methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules / units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or units may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of apparatuses or modules or units may be electrical, mechanical, or other forms.
[0128] The modules / units described as separate components may or may not be physically separate. The components shown as modules / units may or may not be physical modules; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules / units can be selected to achieve the objectives of the embodiments of the present invention, depending on actual needs. For example, the functional modules / units in the various embodiments of the present invention may be integrated into one processing module, or each module / unit may exist physically separately, or two or more modules / units may be integrated into one module / unit.
[0129] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0130] This invention also provides a computer-readable storage medium. Those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing a processor. The program can be stored in a computer-readable storage medium, which is a non-transitory medium, such as random access memory, read-only memory, flash memory, hard disk, solid-state drive, magnetic tape, floppy disk, optical disk, and any combination thereof. The storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. This available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital video disc (DVD)), or a semiconductor medium (e.g., solid-state drive (SSD)).
[0131] This invention also provides a terminal. The terminal includes a processor and a memory.
[0132] The memory is used to store computer programs.
[0133] The memory includes various media capable of storing program code, such as ROM, RAM, magnetic disk, USB flash drive, memory card, or optical disk.
[0134] The processor is connected to the memory and is used to execute the computer program stored in the memory so that the terminal performs the above-described EEG signal feature extraction method.
[0135] Preferably, the processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0136] like Figure 5 As shown, the terminal of the present invention is presented in the form of a general-purpose computing device. The components of the terminal may include, but are not limited to: one or more processors or processing units 51, a memory 52, and a bus 53 connecting different system components (including the memory 52 and the processing unit 51).
[0137] Bus 53 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0138] Terminals typically include various computer system-readable media. These media can be any available media that can be accessed by the terminal, including volatile and non-volatile media, and removable and non-removable media.
[0139] Memory 52 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 521 and / or cache memory 522. The terminal may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 523 may be used to read and write non-removable, non-volatile magnetic media (…). Figure 5 Not shown; usually referred to as a "hard drive"). Although Figure 5As not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 53 via one or more data media interfaces. Memory 52 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.
[0140] A program / utility 524 having a set (at least one) of program modules 5241 may be stored, for example, in memory 52. Such program modules 5241 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 5241 typically perform the functions and / or methods described in the embodiments of the present invention.
[0141] The terminal can also communicate with one or more external devices (e.g., keyboard, pointing device, display, etc.), one or more devices that enable user interaction with the terminal, and / or any device that enables the terminal to communicate with one or more other computing devices (e.g., network interface card, modem, etc.). This communication can be performed through input / output (I / O) interface 54. Furthermore, the terminal can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 55. Figure 5 As shown, network adapter 55 communicates with other modules of the terminal via bus 53. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the terminal, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0142] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.
Claims
1. A method for extracting features from EEG signals, characterized in that, The method includes the following steps: Preprocess the EEG signal; Construct multi-scale reference and test windows, and calculate the multi-scale spectral structure change score of the preprocessed EEG signal; Candidate segment boundary points of the preprocessed EEG signal are detected based on the multi-scale spectral structure change score. EEG adaptive segmentation is obtained based on the candidate segmentation boundary points; Hermite function decomposition is performed on the EEG signal in the adaptive EEG segmentation to obtain EEG segment-level features; EEG feature vectors are constructed based on the aforementioned EEG segment-level features and global EEG statistics.
2. The EEG signal feature extraction method according to claim 1, characterized in that, Preprocessing of EEG signals includes the following steps: The EEG signal is high-pass filtered to remove baseline drift; The high-pass filtered EEG signal was then subjected to low-pass filtering to suppress electromyographic artifacts and high-frequency noise. The low-pass filtered EEG signal is subjected to power frequency notch filtering to eliminate power supply interference.
3. The EEG signal feature extraction method according to claim 1, characterized in that, Constructing multi-scale reference and test windows and calculating the multi-scale spectral structure change score of the preprocessed EEG signal includes the following steps: Construct a multi-scale reference window and a test window; at each scale, the length of the reference window is greater than the length of the test window; Based on the reference window and the test window, the power spectral density of the preprocessed EEG signal is calculated, and the power spectral density is normalized. For the same scale *s*, the Jensen-Shannon divergence between the reference window and the test window is calculated based on the normalized power spectral density. and spectral entropy difference And normalize them respectively; Scoring of spectral structure changes at corresponding scales is calculated based on normalized Jensen-Shannon divergence and spectral entropy difference. ,in and These represent the normalized Jensen-Shannon divergence and the normalized spectral entropy difference, respectively. and All represent weight coefficients and satisfy the following conditions: , This indicates the k-th time position; After mapping the spectral structure change scores at each scale to a unified time grid, multi-scale fusion is performed to obtain the multi-scale spectral structure change scores. ,in This represents the score of spectral structure change mapped to a uniform time grid at scale s. Represents the multi-scale fusion weights and satisfies .
4. The EEG signal feature extraction method according to claim 1, characterized in that, Detecting candidate segment boundary points of the preprocessed EEG signal based on the multi-scale spectral structure change score includes the following steps: Short-term monitoring of the high-frequency energy in the preset frequency band of the preprocessed EEG signal is performed to identify areas of sudden events; The multi-scale spectral structure change score of the event area is enhanced to obtain an updated multi-scale spectral structure change score. ,in This represents a score indicating multi-scale spectral structure changes. This indicates a function that indicates an emergency. Indicates preset parameters. This indicates the k-th time position; An adaptive threshold is constructed based on the median and absolute median difference of the updated multiscale spectral structure change score. Where med(·) represents the median, and MAD(·) represents the absolute median difference. Indicates preset parameters; When the updated multi-scale spectral structure change score is greater than the adaptive threshold, the corresponding EEG signal is marked as a candidate segment boundary point of the EEG signal.
5. The EEG signal feature extraction method according to claim 1, characterized in that, Obtaining adaptive EEG segmentation based on the candidate segmentation boundary points includes the following steps: Neighborhood fusion is performed on the candidate segment boundary points; wherein, when the time interval between two adjacent candidate segment boundary points is less than the minimum interval threshold, the two candidate segment boundary points are merged into a single boundary point, and the position with the larger updated multi-scale spectral structure change score is retained as the fused boundary point; Obtain the segmentation duration of the candidate segments generated from the candidate segmentation boundary points after neighborhood fusion; When the segment duration is less than the lower threshold, the corresponding candidate segment is merged into the adjacent segment where the adjacent boundary point with the smaller updated multi-scale spectral structure change score is located; when the updated multi-scale spectral structure change scores of the boundary points on the left and right sides are the same, the segment is merged into the adjacent segment on the side with the longer segment duration; when the duration of the merged segment is greater than the upper threshold, the merged segment is recursively segmented. When the segment duration exceeds the upper limit threshold, the corresponding candidate segments are recursively segmented according to the peak position or midpoint position of the updated multi-scale spectral structure change score within the segment.
6. The EEG signal feature extraction method according to claim 1, characterized in that, The Hermite function decomposition of the EEG signal in the adaptive EEG segmentation to obtain EEG segment-level features includes the following steps: The decomposition parameters of the Hermite function decomposition are obtained based on the intra-segment signal features of the EEG adaptive segmentation; wherein, the decomposition parameters include the decomposition order. and scaling Among them, for After rounding, the decomposition order is obtained by truncating according to the first upper and lower limits. ,right The scaling scale is obtained by truncating according to the second upper and lower limits. α, γ, β, and c are mapping coefficients. Indicates information capacity. ε represents the spectral centroid, and ε represents the minimum constant to avoid a denominator of zero; Based on the decomposition parameters, the EEG signal is decomposed using the Hermite function to obtain the EEG segment-level features.
7. The EEG signal feature extraction method according to claim 1, characterized in that, Constructing an EEG feature vector based on the aforementioned EEG segment-level features and global EEG statistics includes the following steps: The segment length of the EEG adaptive segmentation is used as the weight; Calculate the weighted mean and weighted standard deviation of the segment-level features; The weighted mean, the weighted standard deviation, and the global EEG statistics are combined to form the EEG feature vector.
8. An EEG signal feature extraction system, characterized in that, The system includes a preprocessing module, a construction module, a detection module, an acquisition module, a decomposition module, and a construction module. The preprocessing module is used to preprocess the EEG signal; The construction module is used to construct multi-scale reference windows and test windows, and to calculate the multi-scale spectral structure change score of the preprocessed EEG signal; The detection module is used to detect candidate segment boundary points of the preprocessed EEG signal based on the multi-scale spectral structure change score. The acquisition module is used to acquire EEG adaptive segmentation based on the candidate segmentation boundary points; The decomposition module is used to perform Hermite function decomposition on the EEG signal in the EEG adaptive segmentation to obtain EEG segment-level features; The construction module is used to construct EEG feature vectors based on the EEG segment-level features and EEG global statistics.
9. A terminal, characterized in that, The terminal includes: a processor and a memory; The memory is used to store computer programs; The processor is used to execute the computer program stored in the memory to cause the terminal to perform the EEG signal feature extraction method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the terminal, it implements the EEG signal feature extraction method according to any one of claims 1 to 7.
Citation Information
Patent Citations
EEG signal quality real-time evaluation method and equipment
CN120408483A
Data standardization method based on different electroencephalogram acquisition systems
CN120753672A