Ear-neck electrical stimulation electroencephalogram feedback decision method based on machine learning

CN122490481BActive Publication Date: 2026-09-15FOURTH MILITARY MEDICAL UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610931169.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-26
Publication Date
2026-09-15
Estimated Expiration
2046-06-26

AI Technical Summary

Technical Problem

该方法存在结构性问题:一方面,绝对差值极易受到患者自身脑电基础波动的影响,若患者处于波动较大的状态,即便刺激未引起神经响应,差值也可能较大,反之在波动较小时真实响应可能被掩盖;另一方面,耳部和颈部两个位点的响应各自单独处理然后拼接分析,响应特征中未明确标记响应来源,导致后续机器学习模型无法感知两类位点响应在结构上的差异,一旦某个位点出现耐受或失效,模型难以主动将推荐偏向另一位点

Benefits of technology

[0014]This invention has the following beneficial effects: It acquires multi-channel EEG signals, hardware impedance handshake points, and stimulation event sequences. Channel validity is screened based on the hardware impedance handshake points to obtain channel validity identifiers, thus eliminating electrode contact problems and artifact data contamination. Frequency band decomposition is performed on each channel to obtain instantaneous power estimates for each band. The length of the first window is adaptively determined based on the patient's historical stimulation intervals. Within each window, the sliding median and sliding absolute median difference of the instantaneous power estimates for each channel and frequency band are calculated, constructing an individualized robust reference system and eliminating the interference of individual baseline EEG fluctuations on response assessment. For each sampling moment, a whole-brain average nonstationarity metric index is calculated to achieve continuous tracking of data link quality, providing a data reliability basis for confidence assessment. For each stimulation event, the sliding median and sliding absolute median difference at the stimulation trigger moment are used as anchor points to calculate the conditional EEG response intensity that preserves power enhancement and inhibition polarity, overcoming the limitations of traditional absolute differences on baseline waveforms. To address the issue of motion distortion, a differential scalar was calculated based on the adaptively determined backtracking history lengths for ear and neck sites. This enabled the model to perceive the superiority or inferiority of responses at two points and proactively recommend better sites. The differential scalar, non-stationarity metric, historical whole-brain response representative value sequence, and historical stimulus parameter sequence were concatenated into a feature vector and input into the ensemble regression model to obtain recommended stimulus parameter triplets. Simultaneously, the base learner was used to predict divergence and calculate the ensemble prediction dispersion, which, together with the non-stationarity metric, constituted a two-factor confidence assessment system. The maximum value of the empirical cumulative distribution function was taken, and then subtracted by 1 to obtain the confidence-related label. A safety boundary limit was used to ensure that the output parameters did not exceed the clinical safety threshold. Finally, the recommended stimulus parameter triplets, confidence-related labels, and differential scalar were encapsulated and output to provide relevant personnel with complete decision-making information in three dimensions: parameter suggestions, confidence level, and site optimization. This achieved a fully personalized closed loop from signal acquisition to decision output.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122490481B_ABST
    Figure CN122490481B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of healthcare informatics, in particular to a kind of ear neck electrostimulation electroencephalogram feedback decision-making method based on machine learning.The present application collects multi-channel electroencephalogram signal, hardware impedance handshake position and stimulation event sequence;According to the effectiveness screening of impedance handshake position and the frequency band decomposition of effective channel, the sliding window is adaptively determined based on patient historical stimulation interval, the sliding median value and sliding absolute median difference of each channel and each frequency band are calculated as individualized robust reference system;Non-stationary metric index is calculated for each sampling time, conditional electroencephalogram response intensity is calculated for each stimulation event, and the difference scalar of ear and neck response contrast is calculated based on adaptive backtracking length;The above index is spliced with historical response and parameter sequence to input integrated regression model to obtain recommended parameter, and confidence label is calculated after combining data link reliability and model consensus reliability, and then packaged output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of healthcare informatics technology, specifically to a machine learning-based method for decision-making using electroencephalography (EEG) feedback for ear and neck electrical stimulation. Background Technology

[0002] In current clinical neuromodulation, parameter iteration for ear and neck electrical stimulation primarily relies on fixed templates combined with periodic manual evaluation. Existing decision support systems generally suffer from problems such as coarse response feature extraction, difficulty in cross-site effect comparison, and disconnect between model updates and clinical interpretation when faced with complex situations including individualized differences in EEG responses, collaborative selection of multiple stimulation sites, and signal non-stationarity. Specifically, existing methods assess responses with fixed data thresholds, process ear and neck dual-site features separately, and lack confidence levels in the output, making the recommendations unreliable under highly individualized and non-stationary EEG conditions.

[0003] Furthermore, existing methods for measuring EEG response commonly use the energy difference within a small window before and after the stimulus as the intensity of the EEG response. This method has structural problems: on the one hand, the absolute difference is highly susceptible to fluctuations in the patient's baseline EEG. If the patient is in a state of high fluctuation, the difference may be large even if the stimulus does not elicit a neural response; conversely, the true response may be masked when the fluctuation is low. On the other hand, the responses from the ear and neck sites are processed separately and then spliced ​​together for analysis. The response features do not explicitly label the source of the response, making it impossible for subsequent machine learning models to perceive the structural differences between the responses of the two sites. Once tolerance or failure occurs at one site, the model is unlikely to proactively bias recommendations towards the other site. Summary of the Invention

[0004] To address the aforementioned technical problems, the present invention aims to provide a machine learning-based method for decision-making regarding electroencephalographic (EEG) feedback for ear and neck electrical stimulation. The specific technical solution is as follows: A machine learning-based method for decision-making regarding EEG feedback for ear and neck electrical stimulation, comprising: acquiring multi-channel EEG signals, hardware impedance handshake positions, and stimulation event sequences; performing validity screening on the multi-channel EEG signals channel by channel based on the hardware impedance handshake positions to obtain channel validity identifiers; performing frequency band decomposition on each channel to obtain the instantaneous power estimate for each channel at each sampling time within a preset number of frequency bands; obtaining a first window length based on the quartiles of the differences in trigger times of historical stimulation events for the patient; calculating the sliding median and sliding absolute median difference of the instantaneous power estimates for each channel at each frequency band within the first window; for each sampling time, calculating a non-stationarity measure index by averaging the channel and frequency band values ​​after normalization of the absolute deviation between the instantaneous power estimate and the sliding median value at that sampling time, and then averaging the values ​​after normalization by the sliding absolute median difference; and for each stimulation event... For each stimulus event in the stimulus event sequence, a post-response observation window is divided based on the aligned trigger time. The conditional EEG response intensity is calculated based on the deviation of the instantaneous power estimate at each sampling time within the post-response observation window from the sliding median value at the trigger time of the stimulus event, and normalized by the sliding absolute median difference at the trigger time of the stimulus event. A differential scalar for comparing ear and neck stimulus responses is calculated based on the representative values ​​of whole-brain responses over the historical length of each ear and neck site. The differential scalar, the non-stationarity metric index at the current stimulus event trigger time, the historical whole-brain response representative value sequences within the historical backtracking windows of each ear and neck site, and the historical stimulus parameter sequences are concatenated into a feature vector and input into a pre-trained ensemble regression model to obtain recommended stimulus parameter triples. The confidence-adjoint label is calculated based on the non-stationarity metric index and the ensemble prediction dispersion of the ensemble regression model. The recommended stimulus parameter triples, confidence-adjoint labels, and differential scalar are encapsulated and output.

[0005] Furthermore, each stimulus event in the stimulus event sequence includes a trigger time, a site label, and a stimulus parameter triplet. The site label is either ear or neck, and the stimulus parameter triplet includes the stimulus current intensity, the stimulus pulse frequency, and the stimulus duration.

[0006] Furthermore, the method for obtaining the length of the first window includes: obtaining the length of the first window according to a first window length calculation formula, the first window length calculation formula being as follows: In the formula, Indicates the length of the first window; This represents the lower quartile of the difference between the trigger times of all adjacent stimulus events in the patient's historical data. This represents the upper quartile of the difference sequence; when there is no historical data for the patient, Use the default values.

[0007] Furthermore, the sliding median value Calculate using the following formula: The sliding absolute median Calculate using the following formula: In the formula, Indicates the channel index; Represented as frequency band number; Indicates the sampling time index; This indicates the length of the first window; Represented as a channel Frequency band at sampling time The instantaneous power estimate; Represented as a channel At sampling time Channel validity identifier; This indicates taking the median; This represents the floor function.

[0008] Furthermore, the method for obtaining the nonstationarity measure index includes: obtaining the nonstationarity measure index according to the nonstationarity measure index calculation formula, the nonstationarity measure index calculation formula is as follows: In the formula, Indicates the sampling time Nonstationarity measure index; Indicates the sampling time The set of valid channels, consisting of those satisfying The entire channel index is constituted; This is represented as the number of valid channels; Indicates the total number of frequency bands. Indicates channel frequency band At sampling time The instantaneous power estimate; The sliding median value; This is expressed as the sliding absolute median difference; This indicates a preset minimum positive value.

[0009] Furthermore, the method for obtaining the conditioned EEG response intensity includes: obtaining the conditioned EEG response intensity according to the conditioned EEG response intensity calculation formula, the conditioned EEG response intensity calculation formula being as follows: In the formula, Indicates the sequence number of the stimulus event; Indicates the first The site label of the secondary stimulus event and ; Indicates the first The trigger time of the secondary stimulus event is the sampling index in the sampling index space; This represents the starting offset of the post-response observation window, which is the median time delay from the triggering time to the starting point of the response for all stimulus events in the patient's historical data. The length of the post-response observation window is taken as the upper quartile of the time required for the response to start and fall back to the baseline level in the patient's historical data. This represents the index of the sampling time sequence number within the post-response observation window; This represents the instantaneous power estimate; Indicates channel validity; Indicates the sampling index The sliding median value at that location; Indicates the sampling index The absolute median of the sliding distance; This indicates a preset minimum positive value.

[0010] Furthermore, the method for obtaining the differential scalar includes: calculating the ear location and neck location at the 1st... Representative value of whole-brain response at the secondary stimulus event : In the formula, , Sampling index indicating the trigger time The set of effective channels at the location Indicates the total number of frequency bands. The intensity of the conditionalized EEG response is represented; different hysteresis steps are calculated for the complete historical response sequence of the ear location. Autocorrelation coefficient ,Will First drop to The number of lag steps corresponding to the time is used as the length of the ear backtracking history. And determine the length of the neck retrospective history in the same way. ; calculate the differentiated scalar using the following formula : ; ; In the formula, This indicates taking the median. This indicates the event sequence number index within the backtracking window; This represents a scalar quantity representing the ear's response to stimulation. This represents the scalar response to neck stimulation.

[0011] Furthermore, the method for obtaining the ensemble prediction dispersion includes: the ensemble regression model is a multi-output gradient boosting tree ensemble regression model; ensemble prediction dispersion Calculate using the following formula: In the formula, This indicates the number of base learners in the ensemble regression model. Indicates the first The base learners in the th... Predicted values ​​for each of the recommended parameter components These correspond to the stimulation current intensity, stimulation pulse frequency, and stimulation duration, respectively. This indicates taking the absolute median difference. This indicates taking the median. This indicates a preset minimum positive value.

[0012] Furthermore, the method for obtaining the confidence level accompanied by the label includes: In the formula, Indicates the first Sampling index at the moment of triggering the secondary stimulus event Nonstationarity measures index at a given location This indicates the discreteness of the integrated prediction; The individualized empirical cumulative distribution function, which is a measure of nonstationarity, is calculated as follows: ; The formula for calculating the individualized empirical cumulative distribution function for integrating the predicted dispersion is as follows: In the formula, This represents the total number of samples for the corresponding indicator in historical data. Indicates the index of the historical data sample. Indicates an indicator function.

[0013] Furthermore, the method also includes: using the EEG system sampling clock as the master clock, mapping the trigger time of each stimulus event to a sampling index space that is unified with the multi-channel EEG signal.

[0014] This invention has the following beneficial effects: It acquires multi-channel EEG signals, hardware impedance handshake points, and stimulation event sequences. Channel validity is screened based on the hardware impedance handshake points to obtain channel validity identifiers, thus eliminating electrode contact problems and artifact data contamination. Frequency band decomposition is performed on each channel to obtain instantaneous power estimates for each band. The length of the first window is adaptively determined based on the patient's historical stimulation intervals. Within each window, the sliding median and sliding absolute median difference of the instantaneous power estimates for each channel and frequency band are calculated, constructing an individualized robust reference system and eliminating the interference of individual baseline EEG fluctuations on response assessment. For each sampling moment, a whole-brain average nonstationarity metric index is calculated to achieve continuous tracking of data link quality, providing a data reliability basis for confidence assessment. For each stimulation event, the sliding median and sliding absolute median difference at the stimulation trigger moment are used as anchor points to calculate the conditional EEG response intensity that preserves power enhancement and inhibition polarity, overcoming the limitations of traditional absolute differences on baseline waveforms. To address the issue of motion distortion, a differential scalar was calculated based on the adaptively determined backtracking history lengths for ear and neck sites. This enabled the model to perceive the superiority or inferiority of responses at two points and proactively recommend better sites. The differential scalar, non-stationarity metric, historical whole-brain response representative value sequence, and historical stimulus parameter sequence were concatenated into a feature vector and input into the ensemble regression model to obtain recommended stimulus parameter triplets. Simultaneously, the base learner was used to predict divergence and calculate the ensemble prediction dispersion, which, together with the non-stationarity metric, constituted a two-factor confidence assessment system. The maximum value of the empirical cumulative distribution function was taken, and then subtracted by 1 to obtain the confidence-related label. A safety boundary limit was used to ensure that the output parameters did not exceed the clinical safety threshold. Finally, the recommended stimulus parameter triplets, confidence-related labels, and differential scalar were encapsulated and output to provide relevant personnel with complete decision-making information in three dimensions: parameter suggestions, confidence level, and site optimization. This achieved a fully personalized closed loop from signal acquisition to decision output. Attached Figure Description

[0015] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 The flowchart illustrates a machine learning-based electroencephalogram (EEG) feedback decision-making method for ear and neck electrical stimulation, as provided in one embodiment of the present invention. Detailed Implementation

[0017] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a machine learning-based ear and neck electroencephalography feedback decision-making method proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.

[0018] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0019] The following description, in conjunction with the accompanying drawings, details a specific scheme for a machine learning-based ear and neck electrical stimulation EEG feedback decision-making method provided by the present invention.

[0020] Please see Figure 1 This illustrates a machine learning-based electroencephalogram (EEG) feedback decision-making method for ear and neck electrical stimulation provided by an embodiment of the present invention. The method includes: step S1: acquiring multi-channel EEG signals, hardware impedance handshake positions, and stimulation event sequences.

[0021] In reality, neuromodulation decisions rely on three types of heterogeneous data: multichannel EEG signals reflecting brain functional states, stimulus event sequences recording stimulus application, and hardware impedance handshakes indicating signal acquisition quality. These three types of data originate from different hardware devices, each with its own independent sampling clock. To ensure accurate timing for all subsequent cross-data source operations, alignment must be performed using one clock as a reference.

[0022] In this embodiment of the invention, multi-channel electroencephalogram (EEG) signals are acquired. , indicating the first The channel is in The scalp potential value at each sampling time is measured in microvolts and stored with floating-point precision. Hardware impedance handshake bit acquisition. , indicating the first The channel is in Quantified values ​​of electrode-skin contact impedance measured at the sampling time. Acquisition of stimulus event sequence. ,in These are event numbers, incremented sequentially according to the actual time of the stimuli's occurrence. Each stimulus event... It contains three subfields: trigger time, site label, and stimulus parameter triplet. The site label is set to ear or neck, and the stimulus parameter triplet expands to... ,in To stimulate current intensity, For the stimulation pulse frequency, To determine the duration of stimulation, all three components are logged by the stimulation device at the event trigger. Using the EEG system sampling clock as the master clock, the trigger times of each stimulation event are mapped to a sampling index space unified with the multi-channel EEG signals, achieving clock alignment so that the trigger time can be located as a sampling index within this sampling index space. .

[0023] Step S2: Based on the hardware impedance handshake position, perform validity screening on the multi-channel EEG signal channel by channel to obtain channel validity identifiers; perform frequency band decomposition on each channel to obtain the instantaneous power estimate of each channel at each sampling time within a preset number of frequency bands; obtain the first window length based on the quartile of the difference between the trigger times of the patient's historical stimulus events, and calculate the sliding median and sliding absolute median difference of the instantaneous power estimate of each channel at each frequency band within the first window.

[0024] During the acquisition process, EEG signals are inevitably affected by factors such as poor electrode contact, motion artifacts, and electromagnetic interference. If used directly without screening, false data will contaminate subsequent steps. Therefore, validity filtering must be performed before the data enters the analysis process. Furthermore, since the rhythmic information of EEG is distributed across different frequency bands, and each band has different response patterns to stimuli, the broadband signal needs to be decomposed into multiple sub-bands for separate quantification.

[0025] In one embodiment of the present invention, the validity of multi-channel EEG signals is screened channel by channel based on the hardware impedance handshake position. A binary determination is performed on each data block of each channel: based on the electrode contact state indicated by the hardware impedance handshake position, the empirical cumulative distribution of the sampled value amplitude within the current block and the morphological offset scalar of the patient's forward historical distribution are calculated simultaneously. When the impedance handshake fails or the morphological offset scalar falls into the tail end of the historical empirical distribution, the entire data block is marked as invalid, and the channel validity is indicated. Set as Otherwise set to The tail boundary is determined by the patient's own historical data. Quantiles are determined dynamically. This is because... Two-tailed under the normal distribution assumption Common clinical thresholds for significance levels, and the ability to effectively exclude extreme artifacts without excessively removing valid variants. A set of valid channels is defined based on channel validity identifiers. The set consists of those that satisfy The entire channel index is constituted, and the effective channel count is denoted as . .

[0026] Frequency band decomposition is performed on each channel, dividing the signal of each channel into four frequency bands: theta, alpha, beta, and gamma. The total number of frequency bands is [number missing]. The theta band is... alpha band is beta band is The gamma band is greater than This division is based on a commonly used EEG frequency band division scheme, covering the main rhythm ranges of interest in clinical neuromodulation. After decomposition, the instantaneous power estimates for each channel and frequency band at each sampling time are obtained. The unit is microvolt squared, representing the channel. frequency band At sampling time Instantaneous power.

[0027] The length of the first window is obtained based on the quartiles of the differences in the trigger times of the patient's historical stimulus events. Within the first window, the sliding median and sliding absolute median difference of the instantaneous power estimates for each channel and frequency band are calculated.

[0028] Preferably, in one embodiment of the present invention, the method for obtaining the length of the first window includes: obtaining the length of the first window according to a first window length calculation formula, wherein the first window length calculation formula is as follows: In the formula, Indicates the length of the first window; This represents the lower quartile of the difference between the trigger times of all adjacent stimulus events in the patient's historical data. This represents the upper quartile of the difference sequence; when there is no historical data for the patient, A preset default value is used. In one embodiment of the present invention, the preset default value is set to 128 sampling points, corresponding to 0.5 seconds at a sampling rate of 256Hz, to ensure that the algorithm can still start during a cold start.

[0029] In the formula, because the geometric mean is more robust to extreme interval values, interference from single excessively long or short intervals can be effectively mitigated. This allows the window length to adaptively match the rhythm of the stimulation actually received by the patient. Specifically, when stimuli are dense, the first window length is set shorter to capture rapid changes; when stimuli are sparse, the first window length is set longer to ensure sufficient samples within the window. When there is no historical data for the patient... Take samples from other patient groups whose age is closest to that of the patient. The median value is used to address the cold start problem.

[0030] Preferably, in one embodiment of the present invention, the sliding median value Calculate using the following formula: The sliding absolute median Calculate using the following formula: In the formula, Indicates the channel index. Represented as frequency band number, Indicates the sampling time index. This indicates the length of the first window. Represented as a channel Frequency band at sampling time The instantaneous power estimate, Represented as a channel At sampling time Channel validity identifier, This indicates taking the median; This represents the floor function.

[0031] In the formulas for calculating the sliding median and sliding absolute median, the distribution of instantaneous EEG power is influenced by both individual and time-series differences, exhibiting a significant heavy-tailed characteristic and not conforming to a normal distribution. Under a heavy-tailed distribution, a few high-power abnormal samples can significantly bias the mean and standard deviation. In this case, the mean is skewed by extreme values, leading to inaccurate baseline estimation, and the standard deviation is amplified by extreme values, resulting in an overestimation of volatility. In contrast, the collapse point for the median and absolute median is as high as... This means that more than half of the samples need to be anomalous for the estimation to be inaccurate. Even if there is a certain proportion of anomalous fluctuations, they can still accurately reflect the typical baseline level and fluctuation range of the data.

[0032] In this embodiment of the invention, the sliding median value An individualized reference center was established for this patient in this channel and frequency band, and the sliding absolute median was determined. An individualized normalized scale for the patient in this channel and frequency band was established. Together, these two scales constitute an individualized reference system for each channel and frequency band, providing a unified benchmark for all subsequent deviation measurements.

[0033] Step S3: For each sampling time, calculate the non-stationarity metric index based on the absolute deviation between the instantaneous power estimate at that sampling time and the sliding median value, and after normalization by the sliding absolute median difference, by taking the channel and frequency band average; for each stimulus event in the stimulus event sequence, divide the post-response observation window based on the aligned trigger time, and calculate the conditional EEG response intensity based on the deviation of the instantaneous power estimate at each sampling time within the post-response observation window from the sliding median value at the trigger time of the stimulus event, and after normalization by the sliding absolute median difference at the trigger time of the stimulus event; calculate the differential scalar of the ear and neck stimulus responses based on the representative values ​​of the whole-brain responses over the respective historical lengths of the ear and neck sites.

[0034] To assess the degree to which the whole-brain spectrum deviates from an individual's normal range at each sampling time, serving as a basis for data quality judgment in subsequent decisions, and to quantify the intensity of the neural response induced by the stimulus in each channel and frequency band after each stimulus event, this intensity must be aligned with the patient's typical fluctuation level, so that responses induced by different sites can be compared on the same scale; at the same time, cross-site comparisons are performed between the ear and neck to generate a differential index that directly reflects which site has a better recent response, providing an interpretable quantitative basis for the site bias recommended by the model, so that it can be jointly input into the machine learning model to generate parameter recommendations for the next round of stimulation.

[0035] Preferably, in one embodiment of the present invention, the method for obtaining the nonstationarity measure index includes: obtaining the nonstationarity measure index according to the nonstationarity measure index calculation formula, wherein the nonstationarity measure index calculation formula is as follows: In the formula, Indicates the sampling time Nonstationarity measure index; Indicates the sampling time The set of valid channels, consisting of those satisfying The entire channel index is constituted; This is represented as the number of valid channels; Indicates the total number of frequency bands. Indicates channel frequency band At sampling time The instantaneous power estimate; The sliding median value; This is expressed as the sliding absolute median difference; This represents a preset minimum positive value, which in this embodiment of the invention is set to... .

[0036] In the formula, Calculate the instantaneous deviation between the current instantaneous power and the individualized median reference value for this patient. Using the patient's own dispersion as a scale, absolute deviations are converted into dimensionless multiples. Finally, an arithmetic mean is taken for all effective channels and all frequency bands to obtain a single value of nonstationary intensity at the whole-brain level. Since both the numerator and denominator are power-dimensional, the result after division is dimensionless, so this index can be directly compared between different patients and at different time periods. The nonstationarity measurement index is used to quantify the degree of deviation of the whole-brain spectral power at the current sampling time from the patient's own individualized baseline. Its value is dimensionless, and the larger the value, the more severe the fluctuation of the EEG signal relative to the patient's normal state.

[0037] Preferably, in one embodiment of the present invention, the method for obtaining the intensity of a conditional EEG response includes: for each stimulus event in a stimulus event sequence, based on the sampling index of the triggering time of that stimulus event. Divide the post-response observation window. The starting point of this window is... The destination is .in, This is the window start offset, calculated as the median time delay from the trigger moment to the start of the response for all stimulus events in the patient's historical data. The reason for setting this offset is that the neural response does not appear immediately after the stimulus occurs but requires a conduction delay, and the stimulus itself may introduce artifacts. Therefore, it is not directly offset from the start of the window. Instead of starting to observe, leave empty. The duration is until the interference passes and the actual brain response begins. The length of the post-response observation window is determined by the upper quartile of the time required for the response to return to baseline levels from the patient's historical data. The upper quartile is used to avoid excessively long windows caused by occasional excessively long response tails. Conditioned EEG response intensity. Calculate using the following formula: Among them, if and only if When the above formula is true, it will output a valid value; when... When equal to 0, Data marked as invalid and output with a pre-defined missing value identifier is not included in the subsequent calculation of the representative value of the whole brain response.

[0038] In the formula, Indicates the first Following the secondary stimulus event, in the passage frequency band The conditioned EEG response intensity values ​​obtained from the above measurements; Indicates the sequence number of the stimulus event; Indicates the first The site label of the secondary stimulus event and ; Indicates the first The trigger time of the secondary stimulus event is the sampling index in the sampling index space; This represents the starting offset of the post-response observation window, calculated as the median time delay from the triggering moment to the starting point of the response for all stimulus events in the patient's historical data. If the patient has no historical data, The typical time delay experience value in the field is taken for the stimulation site. In one embodiment of the present invention, the ear stimulation is set to 50ms and the neck stimulation is set to 80ms. This represents the length of the post-response observation window, taken as the upper quartile of the time required for the response to return to the baseline level from the patient's historical data. If the patient has no historical data, In a preferred embodiment of the present invention, 256 sampling points are taken, based on the typical empirical value of the response time at the stimulation site in the art. This represents the index of the sampling time sequence number within the post-response observation window; This represents the instantaneous power estimate; Indicates channel validity; Indicates the sampling index The sliding median value at that location; Indicates the sampling index The absolute median of the sliding distance; This represents a preset minimum positive value, which in this embodiment of the invention is set to... .

[0039] In the innermost layer of the formula construction, for each sampling point within the response window, the instantaneous power estimate at that point is subtracted from the sliding median value at the stimulus trigger time. This yields the single-point power deviation. The sign of this deviation corresponds to the power enhancement and inhibition induced by the stimulus, respectively. This is because in neuroelectrophysiology, stimulation may cause power enhancement or inhibition in certain frequency bands, and the direction itself carries clinical information. For example, the degree of inhibition of the alpha band under neck stimulation is an important indicator for assessing vagal afferent pathway activation; if the absolute value is taken, enhancement and inhibition will be confused as the same response. Channel effectiveness is used as an indicator. As a multiplicative mask, invalid samples are identified as... Automatic zeroing only involves the accumulation of valid samples. The accumulated sum divided by the valid sample count of that channel within the window yields the window average deviation, which is then divided by the sliding absolute median at the trigger time. With numerical stability term The sum of these values ​​yields the conditioned EEG response intensity. It is important to note that... and Both have the same underlying computational structure, with the core being dividing by the individual dispersion after subtracting the individual baseline value. However, there are clear differences in their construction details: NSDI takes the absolute value and outputs a non-negative volatility index. The sign-preserving output has a polarized response amplitude; NSDI is a single scalar. It contains a complete channel × frequency band matrix structure, which serves as the multidimensional input feature component for subsequent machine learning models.

[0040] Preferably, in one embodiment of the present invention, the method for obtaining the differential scalar includes: calculating the ear location and the neck location at the 1st... Representative value of whole-brain response at the secondary stimulus event : In the formula, , Sampling index indicating the trigger time The set of effective channels at the location Indicates the total number of frequency bands. This indicates the intensity of the conditionalized EEG response.

[0041] In the formula, the conditional response intensity that preserves sign polarity is first calculated for each frequency band of each effective channel. Then, by dividing by the product of the effective channel count and the total number of frequency bands, the ear location and neck location are obtained at the 1st... Representative value of whole-brain response at the secondary stimulus event This formula unifies samples of different data quality to a comparable scale, avoiding magnitude shifts in representative values ​​due to differences in the number of effective channels in a particular record. Finally, it summarizes the representative values ​​for the whole-brain response of the ear and the whole-brain response of the neck separately.

[0042] Calculation of different hysteresis steps for complete historical response sequences at ear locations Autocorrelation coefficient ,Will First drop to The number of lag steps corresponding to the time is used as the length of the ear backtracking history. And determine the length of the neck retrospective history in the same way. Among them, due to The corresponding autocorrelation function decays to approximately the initial value. , is a commonly used natural decay benchmark in time series analysis to measure the length of relevant memory. It can retain statistically significant association information while truncating historical influences that have decayed to noise levels.

[0043] The differential scalar is calculated using the following formula. : ; ; In the formula, This indicates taking the median. This indicates the event sequence number index within the backtracking window; This represents a scalar quantity representing the ear's response to stimulation. This represents the scalar response to neck stimulation.

[0044] in, This indicates that the overall response to recent ear stimulation was better than that to neck stimulation. This indicates that neck stimulation is better than ear stimulation in the near term. This indicates that the two points have the same effect.

[0045] Step S4: Concatenate the differential scalar, the non-stationarity metric index at the current stimulus event trigger time, the historical whole-brain response representative value sequences within the backtracking windows of the ear and neck sites, and the historical stimulus parameter sequences into a feature vector, input it into the pre-trained ensemble regression model, and obtain the recommended stimulus parameter triplet; calculate the confidence-adjoint label based on the non-stationarity metric index and the ensemble prediction dispersion of the ensemble regression model; encapsulate and output the recommended stimulus parameter triplet, the confidence-adjoint label, and the differential scalar.

[0046] Differentiated scalar The non-stationarity measure index at the current triggering moment of the stimulus event The historical whole-brain response representative value sequences within the respective retrospective windows of the ear and neck sites, along with the historical stimulus parameter triplet sequences, are concatenated into a feature vector. The feature vector is input into a pre-trained multi-output gradient boosting tree ensemble regression model. To obtain the recommended stimulus parameter triplet for the next round of stimulation. The reason for using a multi-output gradient boosting tree is that the model can simultaneously output the predicted values ​​of the three parameter components and capture the dependencies between the components. The ensemble structure provides the characteristic that multiple base learners produce different predictions for the same input, which is the structural basis for subsequent calculation of the model consensus.

[0047] Preferably, in one embodiment of the present invention, the method for obtaining the ear stimulus response scalar includes: the ensemble regression model is a multi-output gradient boosting tree ensemble regression model; and the ensemble prediction dispersion is integrated. Calculate using the following formula: In the formula, This indicates the number of base learners in the ensemble regression model. Indicates the first The base learners in the th... Predicted values ​​for each of the recommended parameter components These correspond to the stimulation current intensity, stimulation pulse frequency, and stimulation duration, respectively. This indicates taking the absolute median difference. This indicates taking the median. This indicates the preset minimum positive value, set to... .

[0048] In the formula, the normalized absolute median difference of the base learner predictions is calculated for each of the three recommendation parameter components, and then the arithmetic mean is taken. Within each component, the median of the base learner predictions is used as the consensus prediction center for that component, and the absolute median difference measures the dispersion of the base learners around this center. Normalization is achieved by dividing by the median, so that the dispersion of the three parameter components with different dimensions and magnitudes can be compared and summarized on the same scale. A larger value indicates a greater discrepancy in the predictions of the current input among the base learners, and a lower degree of consensus within the model.

[0049] Preferably, in one embodiment of the present invention, the method for obtaining confidence level accompanying labels includes: In the formula, Indicates the first Sampling index at the moment of triggering the secondary stimulus event Nonstationarity measures index at a given location This indicates the discreteness of the integrated prediction; The individualized empirical cumulative distribution function, which is a measure of nonstationarity, is calculated as follows: ; The formula for calculating the individualized empirical cumulative distribution function for integrating the predicted dispersion is as follows: In the formula, This represents the total number of samples for the corresponding indicator in historical data. Indicates the index of the historical data sample. Indicates an indicator function.

[0050] The confidence level is constructed using a two-factor approach, taking the weakest link and then reversing it. This reflects the relative position of the current EEG nonstationarity intensity within the patient's own history. If this value is... This indicates that the current non-stationarity exceeds historical levels. In such cases, the data link quality is poor. This reflects the relative position of the current model's prediction dispersion in history. If this value is... This indicates that the current model has a higher degree of divergence than historical models. In such cases, the model has low consensus on the current situation. Taking the maximum of the two factors—that is, the worse one of the two confidence factors—as the upper limit of confidence reflects data instability or model divergence; a poorer result for either factor lowers the overall confidence level. Subtract the maximum value to reflect the degree of credibility. The closer This indicates that the higher the credibility of the recommendation, the closer it is to the target audience. The lower the credibility, the greater the credibility.

[0051] Recommended stimulus parameter triplet Confidence level accompanied by labels and differentiated scalar The data is encapsulated into a recommendation structure and pushed to the clinician's workstation via a network interface. Clinicians can simultaneously view the recommendation parameter values, confidence score labels reflecting the reliability of the recommendation, and differential scalar values ​​reflecting the comparison of recent responses from two points. These three elements together constitute the complete decision information set for this recommendation.

[0052] In summary, the process involves acquiring multi-channel EEG signals, hardware impedance handshake positions, and stimulus event sequences. Based on the hardware impedance handshake positions, the multi-channel EEG signals are screened for validity channel by channel to obtain channel validity indicators. Frequency band decomposition is performed on each channel to obtain the instantaneous power estimate for each sampling time within a preset number of frequency bands. The length of the first window is obtained based on the quartiles of the differences in trigger times of the patient's historical stimulus events. Within the first window, the sliding median and sliding absolute median difference of the instantaneous power estimates for each channel and frequency band are calculated. For each sampling time, the absolute deviation between the instantaneous power estimate and the sliding median, normalized by the sliding absolute median difference, is averaged by the channel and frequency band to calculate the non-stationarity metric index. For each stimulus event in the stimulus event sequence, a post-response observation window is divided based on the aligned trigger times. The conditional EEG response intensity is calculated by normalizing the deviation of the instantaneous power estimate at each sampling time within the observation window from the sliding median value at the trigger time of the stimulus event, and by normalizing the sliding absolute median difference at the trigger time of the stimulus event. Based on the representative values ​​of whole-brain responses over the historical length of each ear and neck site, a differential scalar for comparing ear and neck stimulus responses is calculated. The differential scalar, the non-stationarity metric index at the current stimulus event trigger time, the historical whole-brain response representative value sequences within the historical regression windows of each ear and neck site, and the historical stimulus parameter sequences are concatenated into a feature vector, which is then input into a pre-trained ensemble regression model to obtain recommended stimulus parameter triplets. Based on the non-stationarity metric index and the ensemble prediction dispersion of the ensemble regression model, a confidence-associated label is calculated. The recommended stimulus parameter triplets, the confidence-associated label, and the differential scalar are then encapsulated and output.

[0053] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0054] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.

Claims

1. A machine learning-based ear and neck electrical stimulation EEG feedback decision-making method, characterized in that, The method includes: acquiring multi-channel EEG signals, hardware impedance handshake positions, and stimulation event sequences; the hardware impedance handshake positions represent the quantified values ​​of electrode-skin contact impedance measured at each sampling time for each channel; based on the hardware impedance handshake positions, the multi-channel EEG signals are screened for validity channel by channel; based on the electrode contact state indicated by the hardware impedance handshake positions, the empirical cumulative distribution of the sampling value amplitude within the current block and the morphological offset scalar of the patient's forward historical distribution are calculated for each data block of each channel; when the impedance handshake fails or the morphological offset scalar falls into the tail of the historical empirical distribution, the entire data block is marked as invalid, thus obtaining a channel validity identifier; the channel validity is then determined. Channels identified as valid constitute a valid channel set; frequency band decomposition is performed on each channel to obtain the instantaneous power estimate of each channel at each sampling time within a preset number of frequency bands; the length of the first window is obtained based on the quartiles of the differences between the trigger times of the patient's historical stimulus events, and the sliding median and sliding absolute median difference of the instantaneous power estimates of each channel at each frequency band are calculated within the first window; for each sampling time, the non-stationarity measure index is calculated by averaging the channel and frequency band values ​​based on the absolute deviation between the instantaneous power estimate at that sampling time and the sliding median value, after normalization by the sliding absolute median difference; for each stimulus event in the stimulus event sequence, based on A post-response observation window is defined at the aligned trigger time. Based on the deviation of the instantaneous power estimate at each sampling time within the post-response observation window from the sliding median value at the trigger time of the stimulus event, and normalized by the sliding absolute median difference at the trigger time of the stimulus event, the conditional EEG response intensity is calculated. A differential scalar is calculated comparing the ear and neck stimulus responses based on the representative values ​​of the whole-brain responses over the respective historical lengths of the ear and neck sites. The differential scalar, the non-stationarity metric index at the current trigger time, the historical whole-brain response representative value sequences within the respective backtracking windows of the ear and neck sites, and the historical stimulus parameter sequences are then concatenated. As a feature vector, input to a pre-trained ensemble regression model to obtain recommended stimulus parameter triples; based on the non-stationarity metric index and the ensemble prediction dispersion of the ensemble regression model, calculate the confidence-associated label; encapsulate and output the recommended stimulus parameter triples, the confidence-associated label, and the differential scalar; each stimulus event in the stimulus event sequence includes a trigger time, a site label, and a stimulus parameter triple, where the site label is either ear or neck, and the stimulus parameter triple includes the stimulus current intensity, stimulus pulse frequency, and stimulus duration; the method for obtaining the differential scalar includes: calculating the ear site and neck site at the th... Representative value of whole-brain response at the secondary stimulus event : In the formula, , Sampling index indicating the trigger time The set of effective channels at the location Indicates the total number of frequency bands. The intensity of the conditionalized EEG response is represented; different hysteresis steps are calculated for the complete historical response sequence of the ear location. Autocorrelation coefficient ,Will First drop to The corresponding number of lag steps is used as the length of the ear backtracking history. Among them, the length of the neck retrospective history was determined in the same way. ; calculate the differentiated scalar using the following formula : ; ; In the formula, This indicates taking the median; This indicates the event sequence number index within the backtracking window; This represents a scalar quantity representing the ear's response to stimulation. The scalar represents the neck stimulus response; the method for obtaining the ensemble prediction dispersion includes: the ensemble regression model is a multi-output gradient boosting tree ensemble regression model; ensemble prediction dispersion Calculate using the following formula: In the formula, This indicates the number of base learners in the ensemble regression model. Indicates the first The base learners at the th Predicted values ​​for each of the recommended parameter components These correspond to the stimulation current intensity, stimulation pulse frequency, and stimulation duration, respectively. This indicates taking the absolute median difference. This indicates taking the median. This indicates a preset minimum positive value; the method for obtaining the confidence level accompanied by the label includes: In the formula, Indicates the first Sampling index at the moment of triggering the secondary stimulus event Nonstationarity measures index at a location, This indicates the discreteness of the integrated prediction; The individualized empirical cumulative distribution function, which is a measure of nonstationarity, is calculated as follows: ; The formula for calculating the individualized empirical cumulative distribution function for integrating the predicted dispersion is as follows: In the formula, This represents the total number of samples for the corresponding indicator in historical data. Indicates the index of the historical data sample. Indicates an indicator function.

2. The ear and neck electrical stimulation EEG feedback decision-making method based on machine learning according to claim 1, characterized in that, The method for obtaining the length of the first window includes: obtaining the length of the first window according to the formula for calculating the length of the first window, which is shown below: In the formula, Indicates the length of the first window; The lower quartile represents the sequence of differences formed by the differences in the trigger times of all adjacent stimulus events in a patient's historical data. This represents the upper quartile of the difference sequence; when there is no historical data for the patient, Use the default values.

3. The ear and neck electrical stimulation EEG feedback decision-making method based on machine learning according to claim 1, characterized in that, The sliding median Calculate using the following formula: The sliding absolute median difference Calculate using the following formula: In the formula, Indicates the channel index; Represented as frequency band number; Indicates the sampling time index; This indicates the length of the first window; Represented as a channel Frequency band at sampling time The instantaneous power estimate; Represented as a channel At sampling time Channel validity identifier; This indicates taking the median; This represents the floor function.

4. The ear and neck electrical stimulation EEG feedback decision-making method based on machine learning according to claim 1, characterized in that, The method for obtaining the nonstationarity measure index includes: obtaining the nonstationarity measure index according to the nonstationarity measure index calculation formula, which is shown below: In the formula, Indicates the sampling time Nonstationarity measure index; Indicates the sampling time The set of valid channels, consisting of those satisfying The entire channel index is constituted; This is represented as the number of valid channels; Indicates the total number of frequency bands. Indicates channel frequency band At sampling time The instantaneous power estimate; The sliding median value; This is expressed as the sliding absolute median difference; This indicates a preset minimum positive value.

5. The ear and neck electrical stimulation EEG feedback decision-making method based on machine learning according to claim 1, characterized in that, The method for obtaining the conditioned EEG response intensity includes: obtaining the conditioned EEG response intensity according to the conditioned EEG response intensity calculation formula, which is shown below: In the formula, Indicates the sequence number of the stimulus event; Indicates the first The site label of the secondary stimulus event and ; Indicates the first The triggering time of the secondary stimulus event is the sampling index in the sampling index space; This represents the starting offset of the post-response observation window, which is the median time delay from the triggering time to the starting point of the response for all stimulus events in the patient's historical data. The length of the post-response observation window is taken as the upper quartile of the time required for the response to start and fall back to the baseline level in the patient's historical data. This represents the index of the sampling time sequence number within the post-response observation window; This represents the instantaneous power estimate; Indicates channel validity; Indicates the sampling index The sliding median value at that location; Indicates the sampling index The absolute median of the sliding distance; This indicates a preset minimum positive value.

6. The ear and neck electrical stimulation EEG feedback decision-making method based on machine learning according to claim 1, characterized in that, The method further includes: using the EEG system sampling clock as the master clock, mapping the trigger time of each stimulus event to a sampling index space that is consistent with the multi-channel EEG signal.

Citation Information

Patent Citations

  • Ear and neck percutaneous vagus nerve stimulation device based on internal perception signal

    CN119499544A

  • Cloud AI model training method and cloud AI system

    CN120911552A