A spindle wave extraction method, system, computer device, storage medium and program product
Through adaptive time spectrum enhancement and correlation analysis methods, the robustness and signal-to-noise ratio problems of spindle wave monitoring on single-lead EEG signals are solved, and efficient spindle wave monitoring and separation is achieved. It is suitable for various sleep waveforms and adapted to real-time monitoring needs.
Patent Information
- Application Number
- CN202210189978.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-28
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2042-02-28
AI Technical Summary
The prior art methods for monitoring spindle waves on single-lead EEG signals are insufficient in performance, especially in real-time monitoring, which is difficult to effectively separate and monitor spindle waves.
Adaptive time spectrum enhancement method is adopted to obtain specific regions through synchronous compression transformation and edge extraction algorithms, combine correlation analysis, adaptively reconstruct the time domain signal, set thresholds to divide the spindle interval, and use joint decision-making methods to determine the final spindle interval.
High robustness and real-time spindle wave monitoring is achieved on single-lead low signal-to-noise ratio EEG signals, which improves the signal-to-noise ratio, is suitable for different sleep waveforms, reduces threshold parameters, and improves the accuracy and robustness of decisions.
Smart Images

Figure CN114569140B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of sleep waveform detection, and in particular to a spindle wave extraction method, system, computer equipment, storage medium and program product. Background Art
[0002] Electroencephalography (EEG) is a fundamental tool in daily clinical practice and plays a crucial role in sleep health analysis. Currently, research on signal processing, sleep staging, and sleep health based on multi-lead EEG data from PSG (polysomnography) is relatively mature. However, research on single-lead EEG data for daily health monitoring, sleep staging, and proactive health interventions for consumers is still gaining momentum.
[0003] In the existing technology, the monitoring and separation of key sleep event waveforms (such as spindle waves) are all explored on PSG data, and there are few solutions that can be studied on EEG data.
[0004] Currently, there is a solution that uses purely data-driven methods (such as deep learning) to monitor key event waveforms. However, this solution is limited in the events it monitors and is still based on PSG signals, resulting in limited algorithm performance.
[0005] While classic algorithms based on Fourier transforms, wavelet decomposition, and time-series correlation can be directly applied to single-lead signal waveform monitoring, they suffer from significant drawbacks. These methods require numerous parameters, making it difficult to determine thresholds and wavelet functions. This makes parameter adjustment difficult for single-lead EEG signals, which exhibit significant individual variability and low signal-to-noise ratios. Real-time monitoring requires setting a priori information, as signal parameters vary over time. Fixed information is less robust to these parameters, resulting in performance far below expectations. Even with combined approaches designed to mitigate the decision errors introduced by individual algorithm judgment intervals, the excessive number of threshold parameters introduced remains suboptimal for real-time monitoring. The algorithms in these combined approaches are all based on the high signal-to-noise ratio of PSG data, resulting in poor performance on the low signal-to-noise ratio of single-lead signals.
[0006] Therefore, there is an urgent need for a solution that can effectively monitor and separate spindles based on EEG data to solve the above problems. Summary of the Invention
[0007] In view of this, the present invention proposes a spindle wave extraction method, system, computer device, storage medium and program product, the specific scheme of which is as follows:
[0008] A spindle wave extraction method comprising the following steps:
[0009] Real-time collection of single-channel EEG data of preset duration;
[0010] Performing filtering on the single-channel EEG data to obtain a filtered signal;
[0011] Performing time-frequency spectrum enhancement on the filtered signal using synchronous compression transform, executing a preset edge extraction algorithm to adaptively obtain a specific region, and obtaining time-frequency coefficients near the specific region;
[0012] Integrating the time-frequency coefficient to obtain a spindle spectrum, and setting a first threshold to divide the spindle spectrum into spindle intervals;
[0013] Reconstructing a time domain signal using the specific region and the time-frequency coefficients;
[0014] performing correlation analysis on the reconstructed time domain signal and the filtered signal to obtain a correlation coefficient spectrum, and setting a second threshold to divide the correlation coefficient spectrum into correlation coefficient intervals;
[0015] The correlation coefficient interval and the spindle interval are jointly determined to determine the final spindle interval.
[0016] In a specific embodiment, the filtering process includes:
[0017] Band-pass filtering was used to remove baseline drift and retain sleep-related frequency bands;
[0018] The power frequency interference is removed by notch filtering.
[0019] In a specific embodiment, “performing time-frequency spectrum enhancement on the filtered signal using synchronous compression transform” specifically includes:
[0020] Selecting Gabor wavelet to perform wavelet transform on the filtered signal to obtain a first signal;
[0021] A synchronous compression transformation is applied to the first signal to obtain a two-dimensional instantaneous frequency estimate, and energy in a time-frequency spectrum of the first signal is compressed to align with the two-dimensional instantaneous frequency estimate to achieve time-frequency spectrum enhancement.
[0022] In a specific embodiment, “executing a preset edge extraction algorithm to adaptively obtain a specific region, and obtaining time-frequency coefficients near the specific region” specifically includes:
[0023] Adaptively obtaining the specific region through an edge extraction algorithm under a preset optimization iterative framework, and obtaining a minimum optimization target of the optimization iterative framework;
[0024] The minimum optimization target includes the instantaneous frequency of each energy distribution in the time-frequency energy spectrum, calculates the average frequency of each instantaneous frequency, and selects the average frequency between 11 and 16 Hz;
[0025] According to the instantaneous frequency corresponding to the average frequency after screening, the area where the spindle wave may appear is obtained, and energy compression and redistribution are performed to obtain the time-frequency coefficient near the specific area.
[0026] In a specific embodiment, the filtered signal after time-frequency spectrum enhancement is used as the first filtered signal;
[0027] The specific region is the region with the largest energy in the time-frequency energy spectrum of the first filtered signal.
[0028] In a specific embodiment, “reconstructing the time domain signal using the specific region and the time-frequency coefficient” specifically includes:
[0029] The time domain coefficients are combined with the time domain reconstruction of the specific region to obtain the time domain component of the spindle wave characteristic extracted from the single-channel EEG data, and the time domain component is used as the reconstructed time domain signal.
[0030] In a specific embodiment, “performing a correlation analysis on the reconstructed time domain signal and the filtered signal to obtain a correlation coefficient spectrum, and setting a second threshold to divide the correlation coefficient spectrum into correlation coefficient intervals” specifically includes:
[0031] Set the window length of the rectangular window so that it changes with a preset step size;
[0032] Sliding the filtered signal and the time domain component through the rectangular window, calculating the correlation coefficient for each window, and obtaining a correlation coefficient sequence that changes with the window length;
[0033] interpolating the correlation coefficient sequence to obtain a correlation coefficient spectrum that varies with time;
[0034] A second threshold is set, and the correlation coefficient spectrum is divided to obtain correlation coefficient intervals.
[0035] In a specific embodiment, “combining the correlation coefficient interval and the spindle interval to determine the final spindle interval” specifically includes:
[0036] Binarizing the correlation coefficient interval and the spindle wave interval, and adding the binarized correlation coefficient interval and spindle wave interval to obtain a spindle wave function;
[0037] Setting a window length of a preset window function, and convolving the spindle wave function with the window length of the window function to obtain a spindle wave region;
[0038] A third threshold is set to divide the spindle wave region to obtain a final spindle wave interval.
[0039] In a specific embodiment, the first threshold is 0.8;
[0040] and / or, the second threshold is 0.03;
[0041] And / or, the third threshold is 2.
[0042] A spindle wave extraction system comprising:
[0043] An acquisition unit, used to collect single-channel EEG data of a preset duration in real time;
[0044] A filtering unit, configured to filter the single-channel EEG data to obtain a filtered signal;
[0045] a synchronous compression unit, configured to perform time-frequency spectrum enhancement on the filtered signal using synchronous compression transformation, execute a preset edge extraction algorithm to adaptively obtain a specific region, and obtain time-frequency coefficients near the specific region;
[0046] a first interval unit, configured to integrate the time-frequency coefficient to obtain a spindle spectrum, and set a first threshold to divide the spindle spectrum into spindle intervals;
[0047] a reconstruction unit, configured to reconstruct a time domain signal using the specific region and the time-frequency coefficients;
[0048] a second interval unit, configured to perform correlation analysis on the reconstructed time domain signal and the filtered signal, obtain a correlation coefficient spectrum, and set a second threshold to divide the correlation coefficient spectrum into correlation coefficient intervals;
[0049] The third interval unit is configured to make a joint decision based on the correlation coefficient interval and the spindle interval to determine a final spindle interval.
[0050] In a specific embodiment, the synchronous compression unit specifically includes:
[0051] Selecting Gabor wavelet to perform wavelet transform on the filtered signal to obtain a first signal;
[0052] Applying synchronous compression transformation to the first signal to obtain a two-dimensional instantaneous frequency estimate, and compressing energy in the time-frequency spectrum of the first signal to align with the two-dimensional instantaneous frequency estimate to achieve time-frequency spectrum enhancement;
[0053] Adaptively obtaining the specific region through an edge extraction algorithm under a preset optimization iterative framework, and obtaining a minimum optimization target of the optimization iterative framework;
[0054] The minimum optimization target includes the instantaneous frequency of each energy distribution in the time-frequency energy spectrum, calculates the average frequency of each instantaneous frequency, and selects the average frequency between 11 and 16 Hz;
[0055] According to the instantaneous frequency corresponding to the average frequency after screening, the area where the spindle wave may appear is obtained, and energy compression and redistribution are performed to obtain the time-frequency coefficient near the specific area.
[0056] In a specific embodiment, the second interval specifically includes:
[0057] Set the window length of the rectangular window so that it changes with a preset step size;
[0058] Sliding the filtered signal and the time domain component through the rectangular window, calculating the correlation coefficient for each window, and obtaining a correlation coefficient sequence that changes with the window length;
[0059] interpolating the correlation coefficient sequence to obtain a correlation coefficient spectrum that varies with time;
[0060] A second threshold is set, and the correlation coefficient spectrum is divided to obtain correlation coefficient intervals.
[0061] In a specific embodiment, the third interval specifically includes:
[0062] Binarizing the correlation coefficient interval and the spindle wave interval, and adding the binarized correlation coefficient interval and spindle wave interval to obtain a spindle wave function;
[0063] Setting a window length of a preset window function, and convolving the spindle wave function with the window length of the window function to obtain a spindle wave region;
[0064] A third threshold is set to divide the spindle wave region to obtain a final spindle wave interval.
[0065] A computer device, comprising:
[0066] one or more processors;
[0067] a memory for storing one or more programs;
[0068] When the one or more programs are executed by the one or more processors, the one or more processors implement any one of the spindle wave extraction methods described above.
[0069] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements any of the above-mentioned spindle wave extraction methods.
[0070] A computer program product includes executable instructions for implementing any of the above spindle wave extraction methods when executed by a processor.
[0071] Beneficial effects: The present invention proposes a spindle wave extraction method, system, computer equipment, storage medium and program product. Based on adaptive time-domain spectrum enhancement, it can maintain ideal spindle wave monitoring performance on a single-lead low signal-to-noise ratio EEG signal. The scheme has strong robustness and high real-time performance. By matching the correlation between the spindle wave-specific time sequence and the original filtered signal, and analyzing the signal itself, the spindle wave-specific spectrum can be accurately extracted. Synchronous compression transformation is used for frequency enhancement, and the edge extraction algorithm adaptively extracts specific areas, screens specific areas, and reconstructs them back into the time domain sequence. The idea of this scheme is not only applicable to synchronous compression transformation, but also to more effective time-frequency transformations. There is no need to design filters. It also adapts to different sleep waveforms and improves the signal-to-noise ratio of these waveform sequences. A joint decision-making method is used to determine the spindle wave interval, that is, a joint spectrum algorithm and a correlation coefficient algorithm. On the basis of introducing fewer threshold parameters, it can make up for the decision error caused by the interval determination of a single algorithm and improve the robustness of the overall scheme. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] Figure 1 Schematic diagram of the detection method flow in an embodiment of the present invention;
[0073] Figure 2 Schematic diagram of the detection method according to an embodiment of the present invention;
[0074] Figure 3 Schematic diagram of an EEG signal waveform according to an embodiment of the present invention;
[0075] Figure 4 Schematic diagram of separated spindle time-frequency coefficients according to an embodiment of the present invention;
[0076] Figure 5 Schematic diagram of the time domain waveform of the separated spindle waves according to an embodiment of the present invention;
[0077] Figure 6 Schematic diagram of the detection system module according to an embodiment of the present invention.
[0078] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.
[0079] Figure numerals: 1 - acquisition unit; 2 - filtering unit; 3 - synchronization compression unit; 4 - first interval unit; 5 - reconstruction unit; 6 - second interval unit; 7 - third interval unit. DETAILED DESCRIPTION
[0080] Hereinafter, various embodiments of the present disclosure will be described more fully. The present disclosure may have various embodiments, and modifications and variations may be made therein. However, it should be understood that there is no intention to limit the various embodiments of the present disclosure to the specific embodiments disclosed herein, but rather that the present disclosure should be construed to encompass all modifications, equivalents, and / or alternatives falling within the spirit and scope of the various embodiments of the present disclosure.
[0081] It should be noted that the solution provided by this invention innovatively proposes a method for extracting spindle-specific sequences. This method utilizes synchronous compression transform for frequency enhancement, an edge extraction algorithm to adaptively extract specific regions, and then screens these regions for reconstruction back into a time-domain sequence. This solution is applicable not only to synchronous compression transform but also to more effective time-frequency transforms, eliminating the need for filter design. It also adapts to different sleep waveforms, improving the signal-to-noise ratio of these waveform sequences.
[0082] The terms used in the various embodiments disclosed in the present invention are only used to describe the purpose of specific embodiments and are not intended to limit the various embodiments disclosed in the present invention. As used herein, the singular form is intended to also include the plural form, unless the context clearly indicates otherwise. Unless otherwise specified, all terms used herein (including technical terms and scientific terms) have the same meaning as those generally understood by those skilled in the art of the various embodiments disclosed in the present invention. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meaning as the contextual meaning in the relevant technical field and will not be interpreted as having an idealized meaning or an overly formal meaning, unless clearly specified in the various embodiments disclosed in the present invention.
[0083] Example 1
[0084] Example 1 of the present invention discloses a spindle wave extraction method. Based on the signal collected from the single-channel EEG of the frontal lobe Fp1-Fp2, the energy difference and duration of the Theta and Alpha bands are calculated in real time using a sliding window. The sleep onset point is determined by combining the universal optimal energy threshold parameter and duration parameter. Figure 1 The specific plan is as follows:
[0085] A spindle wave extraction method comprises the following steps:
[0086] 101. Real-time collection of single-channel EEG data of preset duration;
[0087] 102. Filter the single-channel EEG data to obtain a filtered signal;
[0088] 103. Perform time-frequency spectrum enhancement on the filtered signal using synchronous compression transform, execute a preset edge extraction algorithm to adaptively obtain a specific region, and obtain time-frequency coefficients near the specific region;
[0089] 104. Integrate the time-frequency coefficient to obtain a spindle spectrum, and set a first threshold to divide the spindle spectrum into spindle intervals;
[0090] 105. Reconstruct time domain signals using specific regions and time-frequency coefficients;
[0091] 106. Perform correlation analysis on the reconstructed time domain signal and the filtered signal to obtain a correlation coefficient spectrum, and set a second threshold to divide the correlation coefficient spectrum into correlation coefficient intervals;
[0092] 107. Combine the correlation coefficient interval and the spindle wave interval to determine the final spindle wave interval.
[0093] The complete process of the method of this embodiment is as shown in the attached specification. Figure 2 As shown. It is necessary to sequentially perform 30s EEG data acquisition, 50hz notch filtering, 0.5-30hz bandpass filtering, synchronous compression transformation, edge extraction, and screening of spindle-specific areas. Then, it is divided into two paths. One path constructs the spindle spectrum, sets the first threshold or separates the spindle occurrence interval, and the other path reconstructs the spindle-specific time domain sequence and obtains the correlation coefficient sequence. Then, a joint decision is made on the spindle occurrence interval and the correlation coefficient sequence to obtain the spindle interval and realize continuous monitoring of spindles. Instructions attached Figure 3 Provides the collected EEG data. Figure 4 Provides a schematic diagram of the separated spindle time-frequency coefficients; Figure 5 A schematic diagram of the isolated spindle wave time domain waveform is provided.
[0094] Step 101: Collect 30 seconds of single-channel EEG data in real time to obtain its sampling frequency information and timing information. It should be noted that the spindle wave extraction method of this embodiment requires continuous collection of multiple 30 seconds of EEG data to monitor the spindle wave data of the user's sleep waveform.
[0095] Step 102: For the collected single-channel EEG time, baseline drift is removed by bandpass filtering, and power frequency interference is removed by notch filtering. The steps are as follows:
[0096] 10201. Select Infinite Impulse Response (IIR) to design a 50 Hz notch filter, which is applied to the single-channel EEG data to eliminate power frequency interference. Preferably, the order of the filter is 3.
[0097] 10202. Design a finite impulse response (FIR) bandpass filter using a window function method and apply it to the signal filtered in step 10201 to remove baseline drift and retain sleep-related frequency bands. Preferably, the filter has a frequency band range of 0.5-30 Hz, an order of 79, and a Hanning window function.
[0098] Step 103 requires extracting the region with the largest energy. Figure 3 After processing, the time-frequency coefficients are obtained as shown in the attached Figure 4 The corresponding spindle wave time domain waveform is shown in the attached Figure 5 Step 103 specifically includes:
[0099] 10301. Select Gabor wavelet to perform wavelet transform on the filtered signal to obtain a first signal;
[0100] 10302. Apply synchronous compression transformation to the first signal to obtain a two-dimensional instantaneous frequency estimate, and compress energy in the time-frequency spectrum of the first signal to align with the two-dimensional instantaneous frequency estimate to achieve time-frequency spectrum enhancement.
[0101] 10303. Adaptively obtain a specific region through an edge extraction algorithm under a preset optimization iterative framework, and obtain the minimum optimization target of the optimization iterative framework;
[0102] 10304. The minimum optimization target includes the instantaneous frequency of each energy distribution in the time-frequency energy spectrum, calculates the average frequency of each instantaneous frequency, and selects the average frequency between 11 and 16 Hz;
[0103] 10305. Based on the instantaneous frequency corresponding to the average frequency after screening, the area where spindle waves may appear is obtained, and energy compression and redistribution are performed to obtain the time-frequency coefficient near the specific area.
[0104] The method of this embodiment innovatively proposes a method for extracting spindle-specific sequences, which successively uses synchronous compression transformation for frequency enhancement, an edge extraction algorithm to adaptively extract specific regions, screens specific regions, and reconstructs the time domain sequence. The idea of this method is not only applicable to synchronous compression transformation, but also to more effective time-frequency transformation schemes. It does not require filter design and is also adaptable to different sleep waveforms, thereby improving the signal-to-noise ratio of the extracted waveform sequences.
[0105] In this embodiment, if the filtered signal after time-frequency spectrum enhancement is used as the first filtered signal, the specific region is the region with the maximum energy in the time-frequency energy spectrum of the first filtered signal.
[0106] Assume that the filtered signal is x(t), select Gabor wavelet for wavelet transform, and the first signal obtained is:
[0107]
[0108] Among them, a represents the scale parameter, b represents the time shift parameter, and W x (a,b) represents the first signal, represents Gabor wavelet transform, and x represents the signal.
[0109] Apply the synchrosqueezed transform to find the two-dimensional instantaneous frequency estimate ω x (a, b), the energy in the compressed spectrum is aligned to the instantaneous frequency estimate; the expression of the two-dimensional instantaneous frequency estimate is:
[0110]
[0111] Among them, ω x (a, b) represent two-dimensional instantaneous frequency estimation;
[0112] The time-frequency expression of the synchronous compression transform of signal x is as follows:
[0113]
[0114] Where ω represents frequency, δ(·) represents impulse function, A(b)={a,W x (a,b)≠0}, T x represents the time-frequency representation of the synchronous compression transform of the signal x;
[0115] The ridge detection algorithm under the optimization iterative framework adaptively obtains the area with the maximum energy. The expression of the minimum optimization target is:
[0116]
[0117] Among them, E f represents the energy estimate of the optimization objective, represents the instantaneous frequency of each energy distribution, K represents the total number of energy distributions, and λ and β represent the first-order and second-order optimization coefficients, respectively. Preferably, in the actual process, λ is fixed to 0.8 and β is fixed to 0.05.
[0118] Adaptive time-frequency analysis based on the Synchrosqueezing Transform achieves time-frequency adaptation. Based on time-domain spectrum enhancement, this adaptive approach concentrates time-frequency energy, improving the robustness of the scheme and ensuring it maintains ideal spindle detection performance on single-lead, low-signal-to-noise ratio EEG signals.
[0119] Calculate the average frequency of each instantaneous frequency. The expression of the average frequency is:
[0120]
[0121] in, represents the average frequency, and N represents the total number of b.
[0122] Since spindle waves are mainly concentrated in 11-16hz, if If it is in this area, the instantaneous frequency corresponding to the average frequency is retained, thus obtaining This completes the screening of instantaneous frequency.
[0123] According to the instantaneous frequency after screening, the area where spindle waves may appear is determined, and energy compression and redistribution are performed to obtain the time domain coefficient near the specific area. The expression of the time domain coefficient is:
[0124]
[0125] Among them, T m (b) represents the time domain coefficient, is the instantaneous frequency after screening, T x Represents the synchronous compressed transform time-frequency representation of the signal x.
[0126] Step 104 specifically includes: combining the time domain coefficients and performing time domain reconstruction on the specific region, obtaining the time domain component of the spindle wave characteristic extracted from the single-channel EEG data, and using the time domain component as the reconstructed time domain signal.
[0127] Integrate the time-frequency coefficients obtained in step 103 to obtain the spindle wave spectrum:
[0128]
[0129] Where P represents the cubic interpolation function, T m (b) represents the time-frequency coefficient, T SP (t) is the time domain expression of t, T SP (b) is the time domain expression of b.
[0130] The first threshold is set to divide the spindle spectrum and obtain the spindle interval. The expression of the spindle interval is as follows:
[0131]
[0132] Among them, t 1 SP represents the spindle interval, T SP (t) represents the spindle wave spectrum, γ 1 Indicates the first threshold.
[0133] Preferably, the first threshold γ 1 Set to 0.8.
[0134] Step 105, combined with T in step 103 m (b) and T x (ω, b) The spindle-specific region is reconstructed in the time domain to obtain the time domain component of the spindle-specificity extracted from the original EEG data. The expression of the time domain component c(t) is:
[0135]
[0136] Among them, c m represents the mth time domain component, P represents the cubic interpolation function, c(t) represents the time series with the most obvious spindle wave characteristics, ε represents the energy coefficient, and the energy coefficient is preferably 0.8.
[0137] Step 106 specifically includes:
[0138] 10601. Set the window length of the rectangular window so that it changes with a preset step size;
[0139] 10601. Slide a rectangular window across the filtered signal and the time domain component, calculate the correlation coefficient for each window, and obtain a correlation coefficient sequence that varies with the window length;
[0140] 10601. Interpolate the correlation coefficient sequence to obtain a correlation coefficient spectrum that changes over time;
[0141] 10601. Set a second threshold, divide the correlation coefficient spectrum, and obtain the correlation coefficient interval.
[0142] To obtain the correlation coefficient sequence, this embodiment's extraction method uses correlation matching between the spindle-specific timing sequence and the original filtered signal. Compared to existing methods that rely solely on bandpass filtering to obtain the specific sequence, this solution analyzes the signal itself, resulting in more accurate extraction of the spindle-specific spectrum.
[0143] Set the rectangular window length to 1s and the step size to 0.2s. Slide the window between the filtered signal x(t) and the time-frequency coefficient c(t), calculate the correlation coefficient for each window, and obtain the correlation coefficient sequence that changes with the window length. Use cubic interpolation to obtain the correlation coefficient spectrum that changes with time t. The expression is as follows:
[0144]
[0145] Among them, r(t) represents the correlation coefficient spectrum, r(t win ) represents the correlation coefficient sequence, step represents the step size of the rectangular window, t win It is the ratio of t to step rounded up.
[0146] Set the second threshold γ 2 is 0.03, divide the correlation coefficient spectrum, and obtain the spindle interval:
[0147]
[0148] Among them, t 2 SP represents the spindle interval, and r(t) represents the correlation coefficient spectrum.
[0149] Step 107 specifically includes:
[0150] 10701. Binarize the correlation coefficient interval and the spindle wave interval, and add the binarized correlation coefficient interval and the spindle wave interval to obtain a spindle wave function;
[0151] 10702. Setting a window length of a preset window function, and convolving the spindle wave function with the window length of the window function to obtain a spindle wave region;
[0152] 10703. Set a third threshold, divide the spindle wave area, and obtain a final spindle wave interval.
[0153] This embodiment uses a joint decision-making approach to determine spindle intervals, combining a spectrum algorithm and a correlation coefficient algorithm. This approach can compensate for the decision-making errors caused by using a single algorithm to determine intervals, thereby improving the robustness of the overall solution. Prior art joint decision-making approaches for determining spindle intervals introduce excessive threshold parameters, resulting in less than ideal results in real-time monitoring. This embodiment, however, builds on the aforementioned approach by incorporating joint decision-making, introducing only a few threshold parameters, which does not affect computational complexity and improves the overall robustness of the solution.
[0154] The correlation coefficient interval obtained in step 106 and the spindle interval obtained in step 4 are binarized to obtain
[0155]
[0156] will p 1 (t) and p 2 (t) and the spindle wave function p(t) = p 1 (t)+p 2 (t)
[0157] Set the convolution rectangular normalized window function, with the preferred window length being 0.1s. The function expression is:
[0158]
[0159] Among them, L win represents the window length, Θ win Represents the domain of the window function, w(t) represents the convolution rectangular normalized window function.
[0160] Convolve the spindle wave function p(t) with the window length to obtain
[0161] Preferably, the second threshold is set to 2 to obtain the final spindle interval, which is expressed as follows:
[0162]
[0163] Among them, t SP Indicates the final spindle interval.
[0164] The spindle wave extraction method of this embodiment does not require offline training. Because the adaptive approach improves the robustness of the overall solution, the threshold parameters are essentially fixed, allowing for real-time monitoring with high real-time performance, fully meeting the real-time requirements of user sleep monitoring. Applying this method to specific sleep-aiding programs can achieve closed-loop control of nighttime sleep, providing data support for real-time medical treatment.
[0165] This embodiment provides a spindle wave extraction method based on adaptive time-domain spectrum enhancement. It can maintain ideal spindle wave monitoring performance on a single-lead low signal-to-noise ratio EEG signal. The scheme has strong robustness and high real-time performance. By matching the correlation between the spindle wave-specific time sequence and the original filtered signal, and analyzing the signal itself, the spindle wave-specific spectrum can be accurately extracted. Synchronous compression transformation is used for frequency enhancement, and the edge extraction algorithm adaptively extracts specific areas, screens specific areas, and reconstructs them back into the time domain sequence. This scheme is not only applicable to synchronous compression transformation, but also to more effective time-frequency transformations. There is no need to design filters. It also adapts to different sleep waveforms and improves the signal-to-noise ratio of these waveform sequences. A joint decision-making method is used to determine the spindle wave interval, that is, a joint spectrum algorithm and a correlation coefficient algorithm. On the basis of introducing fewer threshold parameters, it can compensate for the decision error caused by the interval determination of a single algorithm and improve the robustness of the overall scheme.
[0166] Example 2
[0167] Example 2 of the present invention discloses a spindle wave extraction system, which is a systematized method for detecting the falling asleep point in Example 1. The specific structure of the system is shown in the attached manual. Figure 6 The specific plan is as follows:
[0168] A spindle wave extraction system comprising:
[0169] Acquisition unit 1, used for real-time acquisition of single-channel EEG data of a preset duration;
[0170] Filtering unit 2, used to filter the single-channel EEG data to obtain a filtered signal;
[0171] Synchronous compression unit 3, used to perform time-frequency spectrum enhancement on the filtered signal using synchronous compression transformation, execute a preset edge extraction algorithm to adaptively obtain a specific area, and obtain time-frequency coefficients near the specific area;
[0172] A first interval unit 4 is used to integrate the time-frequency coefficient to obtain a spindle spectrum, and set a first threshold to divide the spindle spectrum into spindle intervals;
[0173] A reconstruction unit 5, configured to reconstruct a time domain signal using the specific region and the time-frequency coefficients;
[0174] The second interval unit 6 is used to perform correlation analysis on the reconstructed time domain signal and the filtered signal, obtain a correlation coefficient spectrum, and set a second threshold to divide the correlation coefficient spectrum into correlation coefficient intervals;
[0175] The third interval unit 7 is used to make a joint decision based on the correlation coefficient interval and the spindle interval to determine the final spindle interval.
[0176] Among them, the synchronous compression unit 3 specifically includes: selecting Gabor wavelet to perform wavelet transform on the filtered signal to obtain a first signal; applying synchronous compression changes to the first signal to obtain a two-dimensional instantaneous frequency estimate, and compressing the energy in the time-frequency spectrum of the first signal to align with the two-dimensional instantaneous frequency estimate to achieve time-frequency spectrum enhancement; adaptively obtaining a specific area through an edge extraction algorithm under a preset optimization iterative framework, and obtaining the minimum optimization target of the optimization iterative framework; the minimum optimization target contains the instantaneous frequency of each energy distribution in the time-frequency energy spectrum, calculating the average frequency of each instantaneous frequency, and screening the average frequency between 11-16 Hz; according to the instantaneous frequency corresponding to the screened average frequency, obtaining the area where spindle waves may appear, and redistributing the energy compression to obtain the time-frequency coefficient near the specific area.
[0177] Among them, the second interval unit 6 specifically includes: setting the window length of the rectangular window so that it changes with a preset step size; sliding the rectangular window on the filtered signal and the time domain component, calculating the correlation coefficient for each window, and obtaining a correlation coefficient sequence that changes with the window length; interpolating the correlation coefficient sequence to obtain a correlation coefficient spectrum that changes with time; setting a second threshold, dividing the correlation coefficient spectrum, and obtaining a correlation coefficient interval.
[0178] Among them, the third interval unit 7 specifically includes: binarizing the correlation coefficient interval and the spindle wave interval, and adding the binarized correlation coefficient interval and spindle wave interval to obtain a spindle wave function; setting a window length of a preset window function, convolving the spindle wave function with the window length of the window function to obtain a spindle wave area; setting a third threshold, dividing the spindle wave area, and obtaining a final spindle wave interval.
[0179] This embodiment discloses a spindle wave extraction system, which systematizes the sleep onset point method of Example 1 to make it more practical.
[0180] Example 3
[0181] This embodiment provides a computer device.
[0182] A computer device is implemented as a general-purpose computing device. Components of a computer device may include, but are not limited to, one or more processors or processing units, system memory, and a bus connecting various system components (including the system memory and the processing unit). A computer device typically includes a variety of computer-readable media. These media can be any available media that can be accessed by the device computer, including volatile and non-volatile media, removable and non-removable media. The system memory may include computer-readable media in the form of volatile memory.
[0183] The computer device may also communicate with one or more external devices (e.g., a keyboard, a pointing device, a display, etc.), one or more devices that enable a user to interact with the computer device, and / or any device that enables the computer device to communicate with one or more other computing devices.
[0184] The processing unit executes various functional applications and data processing by running programs stored in the system memory, for example, implementing a spindle wave extraction method provided in Example 1 of the present invention, which includes:
[0185] 101. Real-time collection of single-channel EEG data of preset duration;
[0186] 102. Filter the single-channel EEG data to obtain a filtered signal;
[0187] 103. Perform time-frequency spectrum enhancement on the filtered signal using synchronous compression transform, execute a preset edge extraction algorithm to adaptively obtain a specific region, and obtain time-frequency coefficients near the specific region;
[0188] 104. Integrate the time-frequency coefficient to obtain a spindle spectrum, and set a first threshold to divide the spindle spectrum into spindle intervals;
[0189] 105. Reconstruct time domain signals using specific regions and time-frequency coefficients;
[0190] 106. Perform correlation analysis on the reconstructed time domain signal and the filtered signal to obtain a correlation coefficient spectrum, and set a second threshold to divide the correlation coefficient spectrum into correlation coefficient intervals;
[0191] 107. Combine the correlation coefficient interval and the spindle wave interval to determine the final spindle wave interval.
[0192] This embodiment applies a spindle wave extraction method to a specific computer device and stores the method in a memory. When the actuator executes the memory, the method is run to clean the power output of the device. The method is quick and convenient to use and has a wide range of applications.
[0193] Of course, those skilled in the art will appreciate that the processor may also implement the technical solution of a spindle wave extraction method provided by any embodiment of the present invention.
[0194] Example 4
[0195] This embodiment 4 provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the steps of a spindle wave extraction method provided in any embodiment of the present invention are implemented. The method includes:
[0196] 101. Real-time collection of single-channel EEG data of preset duration;
[0197] 102. Filter the single-channel EEG data to obtain a filtered signal;
[0198] 103. Perform time-frequency spectrum enhancement on the filtered signal using synchronous compression transform, execute a preset edge extraction algorithm to adaptively obtain a specific region, and obtain time-frequency coefficients near the specific region;
[0199] 104. Integrate the time-frequency coefficient to obtain a spindle spectrum, and set a first threshold to divide the spindle spectrum into spindle intervals;
[0200] 105. Reconstruct time domain signals using specific regions and time-frequency coefficients;
[0201] 106. Perform correlation analysis on the reconstructed time domain signal and the filtered signal to obtain a correlation coefficient spectrum, and set a second threshold to divide the correlation coefficient spectrum into correlation coefficient intervals;
[0202] 107. Combine the correlation coefficient interval and the spindle wave interval to determine the final spindle wave interval.
[0203] The computer storage medium of the present embodiment can adopt any combination of one or more computer-readable media.Computer-readable media can be computer-readable signal media or computer-readable storage media.Computer-readable storage media can be, for example, but not limited to: electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or components, or any combination of the above.More specific examples (non-exhaustive list) of computer-readable storage media include: electrical connections with one or more wires, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the above.In this document, computer-readable storage media can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0204] This embodiment applies a spindle wave extraction method to a computer-readable storage medium, which stores a computer program. When the program is executed by a processor, the driving method steps provided by the present invention are implemented. The method is simple, fast, easy to store, and not easily lost.
[0205] Example 5
[0206] The present invention provides a computer program product comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps of a spindle wave extraction method according to Example 1 of the present invention, comprising:
[0207] 101. Real-time collection of single-channel EEG data of preset duration;
[0208] 102. Filter the single-channel EEG data to obtain a filtered signal;
[0209] 103. Perform time-frequency spectrum enhancement on the filtered signal using synchronous compression transform, execute a preset edge extraction algorithm to adaptively obtain a specific region, and obtain time-frequency coefficients near the specific region;
[0210] 104. Integrate the time-frequency coefficient to obtain a spindle spectrum, and set a first threshold to divide the spindle spectrum into spindle intervals;
[0211] 105. Reconstruct time domain signals using specific regions and time-frequency coefficients;
[0212] 106. Perform correlation analysis on the reconstructed time domain signal and the filtered signal to obtain a correlation coefficient spectrum, and set a second threshold to divide the correlation coefficient spectrum into correlation coefficient intervals;
[0213] 107. Combine the correlation coefficient interval and the spindle wave interval to determine the final spindle wave interval.
[0214] This embodiment applies a spindle wave extraction method to a computer program product for easy execution.
[0215] The present invention proposes a spindle extraction method, system, computer device, storage medium, and program product. Based on adaptive time-domain spectrum enhancement, this method can maintain ideal spindle monitoring performance on single-lead EEG signals with low signal-to-noise ratios. The scheme is highly robust and real-time. By matching the correlation between the spindle-specific timing sequence and the original filtered signal and analyzing the signal itself, the spindle-specific spectrum can be accurately extracted. Frequency enhancement is performed using a synchronous compression transform, and an edge extraction algorithm adaptively extracts specific regions, filters these regions, and reconstructs them back into a time-domain sequence. This approach is applicable not only to synchronous compression transforms but also to more effective time-frequency transforms, eliminating the need for filter design. It also adapts to different sleep waveforms, improving the signal-to-noise ratio of these waveform sequences. A joint decision-making approach is used to determine the spindle interval, combining a spectrum algorithm and a correlation coefficient algorithm. This approach, while introducing fewer threshold parameters, can compensate for the decision errors introduced by a single algorithm in determining the interval, improving the robustness of the overall scheme.
[0216] Those skilled in the art will understand that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily necessary for the implementation of the present invention. Those skilled in the art will understand that the modules in the devices in the implementation scenario can be distributed in the devices of the implementation scenario according to the description of the implementation scenario, or can be changed accordingly and located in one or more devices different from the present implementation scenario. The modules of the above-mentioned implementation scenarios can be combined into one module, or can be further split into multiple sub-modules. The above-mentioned serial numbers of the present invention are only for description and do not represent the advantages and disadvantages of the implementation scenarios. Disclosed above are only a few specific implementation scenarios of the present invention, but the present invention is not limited thereto, and any changes that can be thought of by those skilled in the art should fall within the scope of protection of the present invention.
Claims
1. A spindle wave extraction method, characterized in that: These include: Real-time collection of single-channel EEG data of preset duration; Performing filtering on the single-channel EEG data to obtain a filtered signal; Performing time-frequency spectrum enhancement on the filtered signal using synchronous compression transform, executing a preset edge extraction algorithm to adaptively obtain a specific region, and obtaining time-frequency coefficients near the specific region; Integrating the time-frequency coefficient to obtain a spindle spectrum, and setting a first threshold to divide the spindle spectrum into spindle intervals; Reconstructing a time domain signal using the specific region and the time-frequency coefficients; performing correlation analysis on the reconstructed time domain signal and the filtered signal to obtain a correlation coefficient spectrum, and setting a second threshold to divide the correlation coefficient spectrum into correlation coefficient intervals; The correlation coefficient interval and the spindle interval are jointly determined to determine the final spindle interval.
2. The spindle wave extraction method according to claim 1, wherein The filtering process includes: Band-pass filtering was used to remove baseline drift and retain sleep-related frequency bands; The power frequency interference is removed by notch filtering.
3. The spindle wave extraction method according to claim 1, wherein “Using synchronous compression transform to enhance the time-frequency spectrum of the filtered signal” specifically includes: Selecting Gabor wavelet to perform wavelet transform on the filtered signal to obtain a first signal; A synchronous compression transformation is applied to the first signal to obtain a two-dimensional instantaneous frequency estimate, and energy in a time-frequency spectrum of the first signal is compressed to align with the two-dimensional instantaneous frequency estimate to achieve time-frequency spectrum enhancement.
4. The spindle wave extraction method according to claim 3, wherein “Executing a preset edge extraction algorithm to adaptively obtain a specific region, and obtaining time-frequency coefficients near the specific region” specifically includes: Adaptively obtaining the specific region through an edge extraction algorithm under a preset optimization iterative framework, and obtaining a minimum optimization target of the optimization iterative framework; The minimum optimization target includes the instantaneous frequency of each energy distribution in the time-frequency energy spectrum, calculates the average frequency of each instantaneous frequency, and selects the average frequency between 11 and 16 Hz; According to the instantaneous frequency corresponding to the average frequency after screening, the area where the spindle wave may appear is obtained, and energy compression and redistribution are performed to obtain the time-frequency coefficient near the specific area.
5. The spindle wave extraction method according to claim 4, characterized in that: Using the filtered signal after time-frequency spectrum enhancement as the first filtered signal; The specific region is the region with the largest energy in the time-frequency energy spectrum of the first filtered signal.
6. The spindle wave extraction method according to claim 1, characterized in that: “Reconstructing the time domain signal using the specific region and the time-frequency coefficient” specifically includes: The specific region is reconstructed in the time domain in combination with the time-frequency coefficients to obtain a time domain component of the spindle wave characteristic extracted from the single-channel EEG data, and the time domain component is used as a reconstructed time domain signal.
7. The spindle wave extraction method according to claim 1, characterized in that “Performing a correlation analysis on the reconstructed time domain signal and the filtered signal to obtain a correlation coefficient spectrum, and setting a second threshold to divide the correlation coefficient spectrum into correlation coefficient intervals” specifically includes: Set the window length of the rectangular window so that it changes with a preset step size; Sliding the filtered signal and the reconstructed time domain signal through the rectangular window, calculating the correlation coefficient for each window, and obtaining a correlation coefficient sequence that changes with the window length; interpolating the correlation coefficient sequence to obtain a correlation coefficient spectrum that varies with time; A second threshold is set, and the correlation coefficient spectrum is divided to obtain correlation coefficient intervals.
8. The spindle wave extraction method according to claim 1, wherein “Combining the correlation coefficient interval and the spindle interval to determine the final spindle interval” specifically includes: Binarizing the correlation coefficient interval and the spindle wave interval, and adding the binarized correlation coefficient interval and spindle wave interval to obtain a spindle wave function; Setting a window length of a preset window function, and convolving the spindle wave function with the window length of the window function to obtain a spindle wave region; A third threshold is set to divide the spindle wave region to obtain a final spindle wave interval.
9. The spindle wave extraction method according to claim 8, characterized in that: The first threshold is 0.8; and / or, the second threshold is 0.03; And / or, the third threshold is 2.
10. A spindle wave extraction system, characterized in that: include: An acquisition unit, used to collect single-channel EEG data of a preset duration in real time; A filtering unit, configured to filter the single-channel EEG data to obtain a filtered signal; a synchronous compression unit, configured to perform time-frequency spectrum enhancement on the filtered signal using synchronous compression transformation, execute a preset edge extraction algorithm to adaptively obtain a specific region, and obtain time-frequency coefficients near the specific region; a first interval unit, configured to integrate the time-frequency coefficient to obtain a spindle spectrum, and set a first threshold to divide the spindle spectrum into spindle intervals; a reconstruction unit, configured to reconstruct a time domain signal using the specific region and the time-frequency coefficients; a second interval unit, configured to perform correlation analysis on the reconstructed time domain signal and the filtered signal, obtain a correlation coefficient spectrum, and set a second threshold to divide the correlation coefficient spectrum into correlation coefficient intervals; The third interval unit is configured to make a joint decision based on the correlation coefficient interval and the spindle interval to determine a final spindle interval.
11. The spindle wave extraction system according to claim 10, characterized in that: The synchronous compression unit specifically includes: Selecting Gabor wavelet to perform wavelet transform on the filtered signal to obtain a first signal; Applying synchronous compression transformation to the first signal to obtain a two-dimensional instantaneous frequency estimate, and compressing energy in the time-frequency spectrum of the first signal to align with the two-dimensional instantaneous frequency estimate to achieve time-frequency spectrum enhancement; Adaptively obtaining the specific region through an edge extraction algorithm under a preset optimization iterative framework, and obtaining a minimum optimization target of the optimization iterative framework; The minimum optimization target includes the instantaneous frequency of each energy distribution in the time-frequency energy spectrum, calculates the average frequency of each instantaneous frequency, and selects the average frequency between 11 and 16 Hz; According to the instantaneous frequency corresponding to the average frequency after screening, the area where the spindle wave may appear is obtained, and energy compression and redistribution are performed to obtain the time-frequency coefficient near the specific area.
12. The spindle wave extraction system according to claim 10, characterized in that: The second interval unit specifically includes: Set the window length of the rectangular window so that it changes with a preset step size; Sliding the filtered signal and the reconstructed time domain signal through the rectangular window, calculating the correlation coefficient for each window, and obtaining a correlation coefficient sequence that changes with the window length; interpolating the correlation coefficient sequence to obtain a correlation coefficient spectrum that varies with time; A second threshold is set, and the correlation coefficient spectrum is divided to obtain correlation coefficient intervals.
13. The spindle wave extraction system according to claim 10, characterized in that: The third interval unit specifically includes: Binarizing the correlation coefficient interval and the spindle wave interval, and adding the binarized correlation coefficient interval and spindle wave interval to obtain a spindle wave function; Setting a window length of a preset window function, and convolving the spindle wave function with the window length of the window function to obtain a spindle wave region; A third threshold is set to divide the spindle wave region to obtain a final spindle wave interval.
14. A computer device, characterized in that: The computer device comprises: one or more processors; a memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the spindle wave extraction method according to any one of claims 1 to 9.
15. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, a spindle wave extraction method according to any one of claims 1 to 9 is implemented.
16. A computer program product, characterized in that The method comprises executable instructions for implementing a spindle wave extraction method as claimed in any one of claims 1 to 9 when executed by a processor.
Citation Information
Patent Citations
Method for automatically identifying and extracting spindle wave in sleep electroencephalogram
CN106175673A
Laser radar echo signal denoising method based on synchronous compression conversion
CN107894586A