Method, system and terminal device for calculating ventilation load based on polysomnogram

CN122997618APending Publication Date: 2026-10-30GENERAL HOSPITAL OF NUCLEAR IND
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611251665.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-18
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

虽然上述方法将评估视角从“事件计数”转向“通气受限的时间占比”,在一定程度上弥补了AHI的缺陷,但其仅从气流信号维度统计通气受限的时间占比,忽视了睡眠状态对通气受限事件神经生理后果的动态调节效应,相同程度的通气受限若发生在深睡眠期,可能被大脑“容忍”而不触发觉醒;若发生在浅睡眠期,则极易引发觉醒,导致严重的睡眠碎片化;由于现有VB在计算时对所有通气受限事件赋予相同权重,导致其输出的负荷值与患者日间嗜睡、认知损害等临床后果之间的相关性不足

Benefits of technology

1.本发明通过将基于脑电信号计算的连续睡眠深度指数转化为逐呼吸的权重因子,使得发生在浅睡眠期的通气受限事件被赋予更高的负荷权重,而深睡眠期事件的权重趋近于基准值,从而在指标计算层面反映了睡眠状态对通气受限事件后果的动态调节效应,使输出的加权通气负荷能够更真实地反映患者夜间通气异常所实际造成的生理负担,从而提升了指标与日间嗜睡、认知功能损害等临床症状之间的关联强度;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122997618A_ABST
    Figure CN122997618A_ABST
Patent Text Reader

Abstract

The application discloses a ventilation load calculation method and system based on a polysomnogram and a terminal device, and relates to the technical field of sleep and respiration monitoring. The application acquires a nasal airflow signal and an electroencephalogram signal, divides a respiratory cycle based on the nasal airflow signal, extracts a mid-inhalation airflow amplitude, determines a normalized amplitude and a ventilation limitation depth in combination with a local reference amplitude, performs time-frequency analysis on the electroencephalogram signal, determines a continuous sleep depth index and a basic sleep depth according to a Delta frequency band power and a Beta frequency band power, identifies a ventilation limitation event that is isolated and does not trigger cortical arousal within a preset calibration period, determines an individualized weight adjustment coefficient according to sleep depth changes before and after the event, and determines a weight factor in combination with the basic sleep depth. The ventilation limitation depth of an effective respiratory cycle and the weight factor are weighted, accumulated and normalized to obtain a weighted ventilation load value. The application improves the representation accuracy and stability of ventilation load on sleep state and individual tolerance differences.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of sleep breathing monitoring technology, specifically to a method, system, and terminal device for calculating ventilation load based on polysomnography. Background Technology

[0002] The core features of obstructive sleep apnea (OSA) are repeated upper airway collapse during sleep leading to ventilation interruption, intermittent hypoxemia, and fragmented sleep structure. Currently, clinical diagnosis and severity grading mainly rely on the apnea-hypopnea index (AHI). However, AHI only reflects the frequency of respiratory events and has limitations in distinguishing the type and duration of respiratory events, and in reflecting the severity of individual ventilatory disturbances and their cumulative physiological consequences.

[0003] To overcome the above-mentioned deficiencies, existing research has proposed a method for quantifying ventilatory burden (VB). This method takes the average airflow during the middle third of each inspiratory period in the nasal cannula airflow signal of polysomnography (PSG) as the respiratory amplitude, calculates the normalized value of the single respiratory amplitude relative to the normal respiratory amplitude, and counts the proportion of respiratory counts with a normalized amplitude of less than 50% throughout the night as VB. This indicator shifts the evaluation perspective from "event count" to "proportion of time with ventilatory limitation". While the above methods shift the assessment perspective from "event count" to "percentage of time with ventilatory limitation," thus mitigating some of the shortcomings of AHI, they only count the percentage of time with ventilatory limitation from the perspective of airflow signals, neglecting the dynamic regulatory effect of sleep state on the neurophysiological consequences of ventilatory limitation events. The same degree of ventilatory limitation may be "tolerated" by the brain without triggering awakening if it occurs during deep sleep, but is very likely to trigger awakening if it occurs during light sleep, leading to severe sleep fragmentation. Because existing VB assigns the same weight to all ventilatory limitation events in its calculation, the correlation between its output load value and clinical consequences such as daytime sleepiness and cognitive impairment is insufficient.

[0004] Therefore, this invention proposes a method, system, and terminal device for calculating ventilation load based on polysomnography. Summary of the Invention

[0005] The purpose of this invention is to provide a method, system, and terminal device for calculating ventilation load based on polysomnography, so as to solve the problems mentioned in the background art.

[0006] According to a first aspect of the present invention, in order to achieve the above-mentioned objective, the present invention provides the following technical solution: a method for calculating ventilation load based on polysomnography, comprising the following steps: Nasal airflow signals and electroencephalogram (EEG) signals are acquired. Respiratory cycles are divided based on nasal airflow signals. For each respiratory cycle, the airflow amplitude in the middle of the respiratory cycle is extracted. The corresponding local reference amplitude is determined based on the stable respiratory cycles within the local time window of the current respiratory cycle. The normalized amplitude is calculated based on the ratio of the airflow amplitude of the current respiratory cycle to the local reference amplitude. The depth of ventilation restriction is calculated based on the degree of deviation of the normalized amplitude from the preset ventilation restriction judgment threshold. Time-frequency analysis of EEG signals is performed to extract Delta and Beta band power. The continuous sleep depth index is calculated based on the Delta and Beta band power. The basal sleep depth of each respiratory cycle is calculated based on the continuous sleep depth index of each respiratory cycle corresponding to the time period. Within a preset calibration period, calibration events are selected, and the sleep depth before and after each calibration event is determined. The change in sleep depth corresponding to each calibration event is calculated based on the difference between the two, and the change in sleep depth corresponding to each calibration event is statistically analyzed to obtain an individualized weight adjustment coefficient. Among them, ventilation restriction events that meet the preset event interval conditions and do not have cortical arousal during the event duration and within the preset period after the event end are used as calibration events. The weighting factor for each respiratory cycle is calculated based on the individualized weighting adjustment coefficient and the baseline sleep depth for each respiratory cycle. The smaller the baseline sleep depth, the larger the corresponding weighting factor. The ventilatory limitation depth of each respiratory cycle is multiplied by the corresponding weighting factor to obtain the individual load contribution value of each respiratory cycle. The individual load contribution values ​​of each effective respiratory cycle are accumulated, and the accumulated result is normalized according to the total number of effective respiratory cycles to obtain the weighted ventilatory load value.

[0007] Further, the nasal airflow signal and the electroencephalogram (EEG) signal are acquired, and the nasal airflow signal and the EEG signal are preprocessed respectively to obtain preprocessed nasal airflow signal and preprocessed EEG signal, as follows: A polysomnography system was used to simultaneously acquire at least 6 hours of the nasal airflow signal and the electroencephalogram (EEG) signal at a sampling rate of at least 100 Hz. The nasal airflow signal is acquired using a nasal cannula pressure sensor and filtered using a fourth-order Butterworth bandpass filter with a passband range of 0.1Hz to 5Hz. The EEG signals were acquired using leads C3-M2 or C4-M1, and filtered using a bandpass filter with a passband range of 0.5Hz to 30Hz and a 50Hz notch filter.

[0008] Furthermore, based on the preprocessed nasal airflow signal, respiratory cycles are divided. For each respiratory cycle, the airflow amplitude during the mid-inspiratory phase is extracted. A normalized amplitude is determined based on this airflow amplitude and the corresponding local reference amplitude. The depth of ventilation limitation for that respiratory cycle is then determined based on the normalized amplitude and a preset ventilation limitation threshold, as detailed below: Extract the airflow amplitude during the mid-inspiratory phase of this respiratory cycle: The positive zero-crossing point of the preprocessed nasal airflow signal crossing the baseline from a negative value to a positive value is detected, and the positive zero-crossing point is determined as the inhalation start time. The negative zero-crossing point detected between two adjacent positive zero-crossing points is determined as the inhalation end time. The inspiratory period is determined based on the inspiratory start time and the inspiratory end time, and the respiratory cycle division result is verified by using the local extreme points within the inspiratory period. Extract the middle third of the inhalation period and calculate the first one-third according to the following formula. The original amplitude of each respiratory cycle: in, Indicates the first The original amplitude of each respiratory cycle Indicates the first The total number of sampling points included in the middle third of a respiratory cycle. Indicates the first one-third of the time period Airflow amplitude at each sampling point; Determining the corresponding local reference amplitude based on the airflow amplitude includes: Construct a sliding time window with a length of 3 to 10 minutes centered on the current respiratory cycle; Remove the respiratory cycles contained in the apnea event, the respiratory cycles contained in the hypoventilation event, and the first recovery respiratory cycle after the end of each apnea event or hypoventilation event from the sliding time window. Calculate the 90th percentile of the original amplitude corresponding to the remaining steady respiratory cycle after removal, and determine the 90th percentile as the local reference amplitude of the current respiratory cycle. ; When the number of remaining stable respiratory cycles within the sliding time window is less than the preset number, the local reference amplitude corresponding to the most recent effective sliding time window before the current respiratory cycle is used, or the fixed reference amplitude determined based on the nasal airflow signal throughout the night is used as the local reference amplitude of the current respiratory cycle. The normalized amplitude is determined by the airflow amplitude and the corresponding local reference amplitude, and the ventilation restriction depth is determined based on the normalized amplitude and the preset ventilation restriction determination threshold, including: Calculate the first according to the following formula. Normalized amplitude per respiratory cycle: Calculate the first according to the following formula. Depth of ventilatory limitation per respiratory cycle: in, Indicates the first Normalized amplitude per respiratory cycle Indicates the first Depth of ventilatory limitation per respiratory cycle The preset ventilation restriction threshold is expressed as a percentage, and the preset ventilation restriction threshold is 40% to 60%, while the ventilation restriction depth ranges from 0 to 1.

[0009] Furthermore, time-frequency analysis is performed on the preprocessed EEG signals to extract Delta and Beta band power. A continuous sleep depth index is determined based on the Delta and Beta band power, and the baseline sleep depth for each respiratory cycle is determined based on the continuous sleep depth index within the corresponding time period of each respiratory cycle, as detailed below: Determining the continuous sleep depth index includes: A short-time Fourier transform was performed on the preprocessed EEG signal using a sliding time window with a window length of 0.5 to 2 seconds and a step size of 0.25 to 1 second to obtain the Delta band power. and Beta band power The Delta band is 0.5Hz to 4Hz, and the Beta band is 16Hz to 30Hz. The continuous sleep depth index is calculated using the following formula: in, Indicates time Continuous sleep depth index, This indicates a positive number used to prevent the denominator from being zero, and the value range of the continuous sleep depth index is 0 to 1; Determine the baseline sleep depth for each respiratory cycle, including: The continuous sleep depth index is subjected to temporal smoothing using a median filter with a window length of 3 to 10 seconds; For the For each respiratory cycle, the time average of the continuous sleep depth index during the middle third of the inspiratory phase of that respiratory cycle is calculated, and the time average is determined as the baseline sleep depth for that respiratory cycle. .

[0010] Furthermore, within a preset calibration period, isolated ventilatory limitation events that do not trigger cortical arousal are identified as calibration events based on the normalized amplitude, as follows: Identifying the calibration event within the preset calibration period includes: The first hour after the start of the overnight polysomnography recording, or the first complete sleep cycle from the subject's fall asleep to the end of the first REM sleep phase, is defined as the preset calibration period. Within the preset calibration period, respiratory cycle sequences with normalized amplitude continuously below 50% are identified as candidate ventilation-limiting events, and the moment when the normalized amplitude first falls below 50% is determined as the start time of the candidate ventilation-limiting event, and the moment when the normalized amplitude recovers to above 50% is determined as the end time of the candidate ventilation-limiting event. The following events are selected from the candidate ventilation-limited events as the calibration events: The event lasted from 10 to 30 seconds; There were no other ventilation-restricting events within 30 seconds prior to the start of the event; There was no cortical arousal during the duration of the event and within 15 seconds after the event ended; Cortical arousal is determined by detecting a sudden shift in the frequency of brain electrical signals toward higher frequencies that lasts for at least 3 seconds, with the frequency shift occurring after at least 10 seconds of stable sleep.

[0011] Furthermore, the change in sleep depth corresponding to each calibration event is determined based on the difference between the two, and the changes in sleep depth corresponding to each calibration event are statistically analyzed to obtain the individualized weighting adjustment coefficient, as follows: The change in sleep depth for each calibration event was determined based on sleep depth before and after the start of each calibration event, including: Calculate the first The average value of the continuous sleep depth index within 5 seconds prior to the start time of each calibrated event is used to obtain the initial sleep depth. ; Calculate the first The average value of the continuous sleep depth index within 5 seconds after the end of each calibrated event is used to obtain the final sleep depth. ; Calculate the first according to the following formula. Changes in sleep depth corresponding to each calibrated event: in, Indicates the first Changes in sleep depth corresponding to each calibrated event; The individualized weighted adjustment coefficients are obtained by statistically analyzing the changes in sleep depth corresponding to each calibration event, including: The individualized weight adjustment coefficient is calculated according to the following formula: in, This represents the individualized weight adjustment coefficient. This indicates the preset default weight adjustment coefficient. This represents the total number of calibration events identified within the preset calibration period. Indicates the first Changes in sleep depth corresponding to each calibrated event; When the total number of calibrated events is less than 3, the individualized weight adjustment coefficient is set to the preset default weight adjustment coefficient; The calculated individualized weight adjustment coefficient is limited to a preset range of 0.5 to 2.0, and the preset default weight adjustment coefficient is 1.0.

[0012] Furthermore, the determined weighting factors are as follows: Determine the first Weighting factors per respiratory cycle: in, Indicates the first Weighting factor for each respiratory cycle This represents the individualized weight adjustment coefficient, and the value range of the weight factor is [value range missing]. .

[0013] Further, the ventilation limitation depth of each respiratory cycle is multiplied by the corresponding weighting factor to obtain the individual load contribution value of each respiratory cycle. The individual load contribution values ​​of each effective respiratory cycle are accumulated, and the accumulated result is normalized according to the total number of effective respiratory cycles to obtain the weighted ventilation load value, as follows: Obtain the sleep staging results corresponding to the polysomnography, wherein the sleep staging results include N1 sleep stage, N2 sleep stage, N3 sleep stage and REM sleep stage; For a respiratory cycle that crosses the boundary of two adjacent sleep periods, the sleep period to which the midpoint of the inspiratory phase of that respiratory cycle belongs is determined as the sleep period to which that respiratory cycle belongs. For each sleep stage, the corresponding sleep stage weighted ventilation load sub-index is calculated according to the following formula: in, This represents the weighted ventilation load sub-index corresponding to the sleep period. This represents the set of serial numbers of effective respiratory cycles belonging to this sleep period. This indicates the total number of effective respiratory cycles during this sleep period; The waveform regularity, the ratio of inspiratory duration to expiratory duration, and the amplitude variation coefficient were detected for each respiratory cycle. When the waveform regularity of any respiratory cycle is lower than the preset regularity threshold, the ratio of inspiratory duration to expiratory duration is outside the range of 0.3 to 3.0, or the amplitude variation coefficient is greater than the preset variation coefficient threshold, the respiratory cycle is marked as a low confidence respiratory cycle and the low confidence respiratory cycle is removed from the effective respiratory cycles. The weighted ventilation load value is calculated according to the following formula: in, This represents the weighted ventilation load value. A set of numbers representing effective respiratory cycles. Indicates the total number of effective respiratory cycles. Indicates the first Depth of ventilatory limitation per effective respiratory cycle Indicates the first Weighting factor for each effective respiratory cycle.

[0014] According to a second aspect of the present invention, the present invention provides a ventilation load calculation system based on polysomnography, for implementing the ventilation load calculation method based on polysomnography described in the first aspect, comprising: The signal acquisition and preprocessing module is used to acquire nasal airflow signals and electroencephalogram (EEG) signals from polysomnography, and preprocess the nasal airflow signals and EEG signals respectively to obtain preprocessed nasal airflow signals and preprocessed EEG signals. The ventilation limitation depth determination module is used to divide the respiratory cycle based on the nasal airflow signal. For each respiratory cycle, it extracts the airflow amplitude in the middle of the respiratory cycle, determines the corresponding local reference amplitude based on the stable respiratory cycle in the local time window of the current respiratory cycle, calculates the normalized amplitude based on the ratio of the airflow amplitude of the current respiratory cycle to the local reference amplitude, and calculates the ventilation limitation depth based on the deviation of the normalized amplitude from the preset ventilation limitation determination threshold. The sleep depth determination module is used to perform time-frequency analysis on EEG signals, extract Delta band power and Beta band power, calculate the continuous sleep depth index based on the Delta band power and the Beta band power, and calculate the basic sleep depth of each respiratory cycle based on the continuous sleep depth index of each respiratory cycle corresponding time period. The individualized calibration module is used to filter calibration events within a preset calibration period, determine the sleep depth before and after each calibration event, calculate the change in sleep depth corresponding to each calibration event based on the difference between the two, and statistically analyze the change in sleep depth corresponding to each calibration event to obtain the individualized weight adjustment coefficient. Among them, ventilation restriction events that meet the preset event interval conditions and do not have cortical arousal during the event duration and within the preset period after the event end are used as calibration events. The weighting factor determination module is used to calculate the weighting factor for each respiratory cycle based on the individualized weighting adjustment coefficient and the baseline sleep depth of each respiratory cycle, wherein the smaller the baseline sleep depth, the larger the corresponding weighting factor. The weighted ventilation load calculation module is used to multiply the ventilation limitation depth of each respiratory cycle by the corresponding weighting factor to obtain the individual load contribution value of each respiratory cycle. The individual load contribution values ​​of each effective respiratory cycle are accumulated, and the accumulated result is normalized according to the total number of effective respiratory cycles to obtain the weighted ventilation load value.

[0015] According to a third aspect of the present invention, a terminal device is provided, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor. The memory stores the computer program capable of running on the processor, and when the processor loads and executes the computer program, it employs the ventilation load calculation method based on polysomnography described in the first aspect.

[0016] This invention has at least the following beneficial effects: 1. This invention transforms the continuous sleep depth index calculated based on electroencephalogram (EEG) signals into a weighting factor for each breath, giving higher load weights to ventilation-limiting events occurring during light sleep, while the weights of events during deep sleep approach the baseline value. This reflects the dynamic regulatory effect of sleep state on the consequences of ventilation-limiting events at the index calculation level, enabling the output weighted ventilation load to more realistically reflect the actual physiological burden caused by the patient's nocturnal ventilation abnormalities, thereby improving the correlation strength between the index and clinical symptoms such as daytime sleepiness and cognitive impairment. 2. This invention utilizes isolated, non-cortical arousal-inducing ventilatory limitation events from patients' own polysomnography records as calibration events. By analyzing changes in the sleep depth index before and after each calibration event, it adaptively determines individualized weighting adjustment coefficients. For patients whose sleep depth tends to be stable during the event, the weighting amplitude is automatically reduced; for patients whose sleep depth tends to be decreased during the event, the weighting amplitude is automatically increased. This effectively solves the problem of inaccurate assessment results when using uniform weighting parameters for patients with different arousal threshold phenotypes. It makes the weighted ventilatory load values ​​more comparable and accurate among different patients. At the same time, the calibration process is equipped with a backoff mechanism and a safety interval constraint to ensure stable and reliable output of indicators.

[0017] Of course, any product implementing this invention does not necessarily need to achieve all of the advantages described above at the same time. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a schematic diagram of the overall process of the method described in this invention. Detailed Implementation

[0020] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0021] Example 1: This embodiment is mainly used to address the problem that the existing ventilation limitation time percentage (VB) does not take into account the dynamic adjustment of sleep state on event consequences and assigns equal weight to all events, resulting in insufficient correlation between it and clinical consequences such as daytime sleepiness and cognitive impairment.

[0022] Please see Figure 1 This invention provides a technical solution: a method for calculating ventilation load based on polysomnography, comprising the following steps: S1. Acquire nasal airflow signals and EEG signals, and preprocess the nasal airflow signals and EEG signals respectively to obtain preprocessed nasal airflow signals and preprocessed EEG signals; Specifically, a standard polysomnography system was used to simultaneously acquire nasal airflow signals and electroencephalogram (EEG) signals throughout the night (no less than 6 hours) at a sampling rate of no less than 100 Hz. The respiratory flow rate is acquired through a nasal cannula pressure sensor to reflect changes in respiratory flow. The sampling rate can be set to 100Hz, 128Hz, 200Hz or 256Hz to ensure complete preservation of respiratory waveform details. The acquired nasal airflow signal is preprocessed using a 4th-order Butterworth bandpass filter with a passband range of 0.1Hz to 5Hz and a stopband attenuation of not less than -20dB to effectively remove low-frequency baseline drift and high-frequency electromyographic noise. It is understandable that the baseline drift in the nasal airflow signal mainly comes from sensor temperature drift and changes in patient position. After filtering, a clean and stable nasal airflow signal is obtained, which lays the data foundation for accurate segmentation of the subsequent respiratory cycle. EEG signals are acquired in leads C3-M2 or C4-M1 for sleep depth assessment; the sampling rate is preferably consistent with the nasal airflow signal or a sampling rate of not less than 100Hz to meet the frequency resolution requirements of subsequent band power analysis. To enhance system robustness, EEG signals can be simultaneously acquired through at least one backup lead among C4-M1, O1-M2, and O2-M1. Automatic switching or fusion processing can be performed when the quality of the primary lead signal deteriorates. For the acquired EEG signals, a bandpass filter of 0.5Hz–30Hz is used to retain effective information in the Delta (0.5Hz–4Hz) and Beta (16Hz–30Hz) bands, while a 50Hz notch filter is used to eliminate power frequency interference. To further improve signal quality, independent component analysis or regression methods can be used to remove eye movement artifacts and electromyography (EMG) interference. It is understandable that power frequency interference in EEG signals, if not eliminated, will severely contaminate the power estimation of the Beta band. Preprocessing yields clean and stable EEG signals, providing a data foundation for the reliable calculation of the sleep depth index. S2. Based on the preprocessed nasal airflow signal, the respiratory cycle is divided. For each respiratory cycle, the airflow amplitude during the mid-inspiratory phase is extracted. The normalized amplitude is determined based on this airflow amplitude and the corresponding local reference amplitude. The depth of ventilation limitation for that respiratory cycle is determined based on the normalized amplitude and a preset ventilation limitation threshold, as follows: Zero-crossing detection is performed on the preprocessed nasal airflow signal. The positive zero-crossing point where the nasal airflow signal crosses the baseline from a negative value to a positive value is determined as the inspiratory start time. The negative zero-crossing point between two adjacent positive zero-crossing points is determined as the inspiratory end time. The signal interval between the current positive zero-crossing point and the next positive zero-crossing point is divided into a respiratory cycle. The respiratory cycle segmentation results are verified by using local extreme points during the inspiratory phase. A positive peak value corresponds to a normal inspiratory phase. When two or more local extreme points are detected during the inspiratory phase, or when the amplitude of the maximum local extreme value during the inspiratory phase is less than 30% to 50% (preferably 40%) of the absolute value of the maximum negative amplitude during the expiratory phase of the respiratory cycle, or less than 20% to 30% (preferably 25%) of the average inspiratory peak amplitude of the stable respiratory cycle within the current sliding time window, the respiratory cycle is marked as a suspected artifact respiratory cycle and sent to the subsequent effective respiratory cycle screening process. For each respiratory cycle, the duration of inhalation is calculated based on the start and end times of inhalation. The duration of inhalation is determined according to the following relationship: in, Indicates the moment of inhalation onset. Indicates the moment when inhalation ends. Indicates the duration of inhalation; The middle third of the inhalation period is selected as the calculation interval for airflow amplitude. The selection interval is determined according to the following relationship. Using the middle third of the inhalation period can reduce the impact of changes in the airflow rise rate at the beginning of inhalation and the transition from inhalation to exhalation at the end of inhalation on the calculation results of airflow amplitude. For example, when the inhalation duration of a certain respiratory cycle is 1.5 seconds, the airflow signal between 0.5 seconds and 1.0 seconds after the start of inhalation is extracted for calculation. No. The original amplitude of each respiratory cycle is calculated according to the following formula: in, Indicates the first The original amplitude of each respiratory cycle Indicates the first The total number of sampling points included in the middle third of the inspiratory phase of a respiratory cycle. Indicates the number of times within that time period The formula obtains the original amplitude by calculating the root mean square value of the airflow amplitude at each sampling point during the middle third of the inhalation period. A sliding time window of 3 to 10 minutes is constructed with the current respiratory cycle as the center. It is preferred to set the sliding time window to 5 minutes. When the window length is 5 minutes, the respiratory cycles within 2.5 minutes before and after the current respiratory cycle are selected to form a local respiratory sequence. Preferably, an apnea event is defined as a nasal airflow signal peak amplitude decrease of ≥90% from the pre-event baseline and a duration of ≥10 seconds; a hypoventilation event is defined as a nasal airflow signal peak amplitude decrease of ≥30% (or ≥50%) from the pre-event baseline and a duration of ≥10 seconds, accompanied by a decrease in blood oxygen saturation of ≥3% (or ≥4%) or cortical arousal; the system generates event timing markers based on the above criteria; this system defaults to using the criterion of airflow decrease of ≥30% accompanied by a decrease in blood oxygen of ≥3%, and users can choose to switch to the alternative criterion of ≥50% accompanied by ≥4%; subsequently, the respiratory cycles included in apnea events, the respiratory cycles included in hypoventilation events, and the first recovery respiratory cycle after the end of each apnea event or hypoventilation event are removed from the sliding time window. The recovery respiratory cycle is usually accompanied by a compensatory increase in amplitude, and removing the recovery respiratory cycle can reduce the possibility of missed ventilatory limitation caused by abnormally increased local baseline amplitude; Calculate the 90th percentile of the original amplitude corresponding to the remaining stable respiratory cycles after removal, and determine this 90th percentile as the local reference amplitude for the current respiratory cycle. Using the 90th percentile can reduce the downward pull on the local reference amplitude caused by residual mild restricted breathing in the sliding time window; When the number of remaining stable respiratory cycles after removing events within the sliding time window is less than the preset number, the local reference amplitude corresponding to the current window is marked as low confidence. Preferably, the preset number is set to 5, and the local reference amplitude corresponding to the most recent effective sliding time window before the current respiratory cycle is used, or a fixed reference amplitude determined based on the nasal airflow signal throughout the night is used as the local reference amplitude of the current respiratory cycle. No. The normalized amplitude per respiratory cycle is calculated using the following formula. in, Indicates the first Normalized amplitude per respiratory cycle Indicates the first The original amplitude of each respiratory cycle Indicates the first The local baseline amplitude for each respiratory cycle, with normalized amplitude used to characterize the proportion of the current respiratory cycle's airflow amplitude relative to recent normal ventilation levels; No. The depth of ventilatory limitation per respiratory cycle is calculated using the following formula. in, Indicates the first Depth of ventilatory limitation per respiratory cycle The preset ventilation limitation threshold is expressed as a percentage, and is set to 40% to 60%. The ventilation limitation depth ranges from 0 to 1. In this embodiment... Take a 50% threshold; Preferably, the preset ventilation limitation threshold is set to 50%. When the normalized amplitude is 50%, the ventilation limitation depth is 0. When the normalized amplitude is 25%, the ventilation limitation depth is 0.5. When the normalized amplitude is 0, the ventilation limitation depth is 1. Within the range of 0 to 50% of the normalized amplitude, the ventilation limitation depth increases linearly as the normalized amplitude decreases. Thus, the degree of ventilation limitation in each respiratory cycle is converted into a continuous value between 0 and 1. S3. Perform time-frequency analysis on the preprocessed EEG signals, extract Delta and Beta band power, determine the continuous sleep depth index based on the Delta and Beta band power, and determine the baseline sleep depth for each respiratory cycle based on the continuous sleep depth index for the corresponding time period of each respiratory cycle, as follows: Short-time Fourier transform of preprocessed EEG signals is performed using a sliding time window with a window length of 0.5 to 2 seconds and a step size of 0.25 to 1 second. A 1-second window length and a 0.5-second step size are preferred. The short-time Fourier transform can use a Hamming window or a Hanning window to window the EEG signals within each sliding time window to reduce spectral leakage. The Delta band power and Beta band power are extracted based on the power spectrum of each sliding time window. The Delta band is set to 0.5Hz to 4Hz, and the Beta band is set to 16Hz to 30Hz. In a further embodiment, the Delta band can be divided into a slow Delta band of 0.5Hz to 2Hz and a fast Delta band of 2Hz to 4Hz, and the Beta band can be divided into a low Beta band of 16Hz to 20Hz and a high Beta band of 20Hz to 30Hz. The continuous sleep depth index is calculated using the following formula: in, Indicates time Continuous sleep depth index, Indicates time The corresponding Delta band power within the sliding time window, Indicates time The corresponding Beta band power within the sliding time window, This indicates a positive number used to prevent the denominator from being zero; preferably, it should be... Set as The range of the continuous sleep depth index is 0 to 1; Delta band power is used to reflect the intensity of slow-wave activity in the cortex, while Beta band power is used to reflect the intensity of fast-wave activity in the cortex. A larger continuous sleep depth index indicates a higher relative proportion of Delta band power and a deeper sleep state, while a smaller continuous sleep depth index indicates a higher relative proportion of Beta band power and a shallower sleep state. Median filtering was applied to the continuous sleep depth index sequence to reduce the impact of transient EEG fluctuations on the sleep depth calculation results. The median filtering window length was set to 3 to 10 seconds, preferably 5 seconds. After median filtering, the continuous sleep depth index curve corresponding to the overnight recording time axis was obtained. Regarding the first For each respiratory cycle, based on the inspiratory start and end times of that cycle, the continuous sleep depth index corresponding to the middle third of the inspiratory period is extracted from the continuous sleep depth index curve. The time average of the continuous sleep depth index within this period is then calculated, and this time average is determined as the [number]th respiratory cycle. Basic sleep depth per breathing cycle This establishes a time correspondence between the nasal airflow signal processing results and the EEG signal processing results on the respiratory cycle scale. S4. Within a preset calibration period, isolated ventilatory limitation events that do not trigger cortical arousal are identified as calibration events based on normalized amplitude. The sleep depth before and after each calibration event is determined, and the change in sleep depth corresponding to each calibration event is determined based on the difference between the two. The changes in sleep depth corresponding to each calibration event are statistically analyzed to obtain individualized weighted adjustment coefficients, as follows: During the individualized calibration process, the first hour after the start of the overnight polysomnography recording, or the first complete sleep cycle from the subject's fall asleep to the end of the first REM sleep phase, is determined as the preset calibration period. The first complete sleep cycle is preferred as the preset calibration period. Within a preset calibration period, respiratory cycle sequences with normalized amplitude continuously below 50% are identified as candidate ventilation-limited events. The moment when the normalized amplitude first falls below 50% is determined as the start time of the candidate ventilation-limited event, and the moment when the normalized amplitude recovers to above 50% is determined as the end time of the candidate ventilation-limited event. The time interval between the start time and the end time is taken as the duration of the candidate ventilation-limited event. Candidate ventilatory restriction events are selected from those with a duration of 10 to 30 seconds, no other ventilatory restriction events within 30 seconds before the start of the event, and no cortical arousal during the duration of the event and within 15 seconds after the end of the event. Candidate ventilatory restriction events that meet all the selection criteria are identified as calibration events. Cortical arousal is determined by a sudden shift in EEG signal frequency toward a higher frequency for at least 3 seconds, and this frequency shift must occur after at least 10 seconds of stable sleep. If an EEG frequency change that meets the above conditions is detected during or within 15 seconds after a candidate ventilatory restriction event, the candidate ventilatory restriction event is excluded from the calibrated events. Regarding the first For each calibrated event, the average of the consecutive sleep depth indices within 5 seconds prior to the start of the event is calculated to obtain the initial sleep depth. Calculate the average of the consecutive sleep depth indices within 5 seconds after the end of the event to obtain the final sleep depth. The corresponding change in sleep depth is calculated using the following formula: in, Indicates the first The change in sleep depth corresponding to each calibrated event, when A value greater than or equal to 0 indicates that the sleep depth remained stable or deepened before and after the calibration event. A value less than 0 indicates a trend towards lighter sleep during the calibration event; The changes in sleep depth corresponding to all calibrated events within the preset calibration period were statistically analyzed, and the individualized weighting adjustment coefficient was calculated according to the following formula. in, This represents the individualized weighting adjustment coefficient. This indicates the preset default weight adjustment coefficient. This indicates the total number of calibration events identified within the preset calibration period. Indicates the first Changes in sleep depth corresponding to each calibrated event; When the change in average sleep depth for all calibrated events is positive, the individualized weight adjustment coefficient decreases relative to the preset default weight adjustment coefficient; when the change in average sleep depth is negative, the individualized weight adjustment coefficient increases relative to the preset default weight adjustment coefficient; when the change in average sleep depth is 0, the individualized weight adjustment coefficient is equal to the preset default weight adjustment coefficient. Preferably, the preset default weight adjustment coefficient is set to 1.0. When the total number of calibration events identified within the preset calibration period is less than 3, the individualized weight adjustment coefficient is reverted to the preset default weight adjustment coefficient, and the calculated individualized weight adjustment coefficient is limited to the preset range of 0.5 to 2.0. When the calculation result is less than 0.5, it is taken as 0.5, and when the calculation result is greater than 2.0, it is taken as 2.0. S5. Based on the individualized weighting adjustment coefficient and the baseline sleep depth of each respiratory cycle, determine the weighting factor for each respiratory cycle. The smaller the baseline sleep depth, the larger the corresponding weighting factor, as detailed below: No. The weighting factor for each respiratory cycle is calculated according to the following formula. in, Indicates the first Weighting factor for each respiratory cycle This represents the individualized weighting adjustment coefficient. Indicates the first The baseline sleep depth per respiratory cycle, with the weighting factor ranging from [value range missing]. ; When the basal sleep depth approaches 1, the weighting factor approaches 1. When the basal sleep depth approaches 0, the weighting factor approaches the sum of 1 and the individualized weighting adjustment coefficient. For example, when the individualized weighting adjustment coefficient is 0.5, the maximum weight corresponding to the light sleep state is 1.5. When the individualized weighting adjustment coefficient is 2.0, the maximum weight corresponding to the light sleep state is 3.0. The weights corresponding to the deep sleep state all approach 1. S6. Multiply the ventilatory limitation depth of each respiratory cycle by the corresponding weighting factor to obtain the individual load contribution value for each respiratory cycle. Accumulate the individual load contribution values ​​for each effective respiratory cycle, and normalize the accumulated result based on the total number of effective respiratory cycles to obtain the weighted ventilatory load value, as follows: When determining the effective respiratory cycle, the waveform regularity, the ratio of inspiratory duration to expiratory duration, and the amplitude variation coefficient of each respiratory cycle were tested. The preferred method for calculating waveform regularity is as follows: Take five consecutive (preferably three to five) respiratory cycles before the current respiratory cycle that have not been eliminated by events and have not been marked as suspected artifacts, and calculate the average amplitude of the waveform during the inspiratory phase of each cycle to construct a standard template waveform; After normalizing the amplitude of the waveform during the inspiratory phase of the current respiratory cycle and the template waveform respectively, calculate the Pearson correlation coefficient between the two as the waveform regularity. When the coefficient is lower than a preset threshold (preferably 0.75) in the range of 0.70 to 0.80, it is judged as irregular.

[0023] The amplitude variation coefficient is calculated as follows: taking the current respiratory cycle as the center, take 5 respiratory cycles before and after (preferably 5 to 10) to form a local window, and calculate the ratio of the standard deviation to the mean of the original amplitude of all respiratory cycles within the window (CV=σ / μ). When the ratio is greater than the preset threshold (preferably 0.40) in the range of 0.30 to 0.50, it is determined that the amplitude variation is too large.

[0024] When the waveform regularity is lower than the preset threshold, the ratio of inspiratory duration to expiratory duration exceeds the range of 0.3 to 3.0, or the amplitude variation coefficient is greater than the preset threshold, the respiratory cycle is marked as a low-confidence respiratory cycle and removed from the effective respiratory cycles. The weighted ventilation load value is calculated according to the following formula: in, This represents the weighted ventilation load value. A set of numbers representing effective respiratory cycles. Indicates the total number of effective respiratory cycles. Indicates the first Depth of ventilatory limitation per effective respiratory cycle Indicates the first Weighting factor for each effective respiratory cycle; For example, when a subject has a total of 8000 effective respiratory cycles throughout the night, and the sum of the individual load contributions of each effective respiratory cycle is 3200, the weighted ventilation load value is, The calculation results characterize the normalized ventilation load formed by the effective respiratory cycle throughout the night under the combined effect of ventilation limitation depth and sleep state weighting. In a further embodiment, the sleep staging results corresponding to the polysomnography are obtained. The sleep staging results include N1 sleep stage, N2 sleep stage, N3 sleep stage and REM sleep stage. For a respiratory cycle that crosses the boundary of two adjacent sleep stages, the sleep stage to which the midpoint of the inspiratory phase of the respiratory cycle belongs is determined as the sleep stage to which the respiratory cycle belongs. The sleep staging results can be manually labeled results generated by a sleep technician based on the sleep staging standards. For each sleep stage, the ventilatory limitation depth of each effective respiratory cycle belonging to that sleep stage is multiplied by a weighting factor and summed. This summation is then normalized using the total number of effective respiratory cycles within that sleep stage to obtain the sleep stage-weighted ventilatory load sub-index. The calculation formula is as follows: in, This represents the weighted ventilation load sub-index corresponding to the sleep period. This represents the set of valid respiratory cycle numbers belonging to this sleep period. This indicates the total number of effective respiratory cycles during this sleep period; The weighted ventilation load sub-indices corresponding to N1 sleep stage, N2 sleep stage, N3 sleep stage and REM sleep stage are output respectively. The weighted ventilation load sub-indices of each sleep stage are used to reflect the distribution of the nighttime ventilation load in different sleep stages. In one output implementation, the weighted ventilation load value, individualized weight adjustment coefficient, and sleep phase weighted ventilation load sub-indicators are stored as structured data. The structured data can be in JSON, XML, or CSV format to facilitate data exchange with electronic medical record systems or sleep analysis software. It can also generate overnight normalized amplitude curves, ventilation limitation depth curves, continuous sleep depth index curves, weighting factor curves, and individual load contribution value curves based on the intermediate processing results. Each curve uses the overnight recording time as the horizontal time reference to show the relationship between the degree of ventilation limitation, sleep depth, and weighting factor changes over time.

[0025] Example 2: This invention provides a ventilation load calculation system based on polysomnography, used to implement the ventilation load calculation method based on polysomnography described in Embodiment 1, comprising: The signal acquisition and preprocessing module is used to acquire nasal airflow signals and EEG signals from polysomnography, preprocess the nasal airflow signals and EEG signals respectively to obtain preprocessed nasal airflow signals and preprocessed EEG signals, and send the preprocessed nasal airflow signals to the ventilation limitation depth determination module and the preprocessed EEG signals to the sleep depth determination module. The ventilation limitation depth determination module is used to divide respiratory cycles based on preprocessed nasal airflow signals to obtain time period information corresponding to each respiratory cycle. For each respiratory cycle, the airflow amplitude in the mid-inspiratory phase of the respiratory cycle is extracted, and the normalized amplitude is determined based on the airflow amplitude and the corresponding local reference amplitude. The ventilation limitation depth of the respiratory cycle is determined based on the normalized amplitude and the preset ventilation limitation judgment threshold, resulting in a normalized amplitude sequence and a ventilation limitation depth sequence. The time period information corresponding to each respiratory cycle is sent to the sleep depth determination module, the normalized amplitude sequence is sent to the individualized calibration module, and the ventilation limitation depth sequence is sent to the weighted ventilation load calculation module. The sleep depth determination module performs time-frequency analysis on the preprocessed EEG signals, extracts Delta and Beta band power, and determines the continuous sleep depth index based on the Delta and Beta band power. It then determines the baseline sleep depth for each respiratory cycle from the continuous sleep depth index based on the time period information corresponding to each respiratory cycle, thus obtaining a baseline sleep depth sequence. Finally, it sends the continuous sleep depth index to the individualized calibration module and the baseline sleep depth sequence to the weighting factor determination module. The individualized calibration module is used to identify ventilatory limitation events based on normalized amplitude sequences within a preset calibration period, and to identify isolated ventilatory limitation events that do not induce cortical arousal as calibration events based on preprocessed EEG signals from the identified ventilatory limitation events; to determine the sleep depth before and after the start of each calibration event based on the continuous sleep depth index, to determine the corresponding change in sleep depth based on the difference between the start and end of each calibration event, and to statistically analyze the change in sleep depth corresponding to each calibration event to obtain the individualized weight adjustment coefficient; and to send the individualized weight adjustment coefficient to the weight factor determination module. The weighting factor determination module is used to determine the weighting factor for each respiratory cycle based on the individualized weighting adjustment coefficient and the baseline sleep depth sequence, thereby obtaining the weighting factor sequence. The smaller the baseline sleep depth, the larger the corresponding weighting factor. The weighting factor sequence is then sent to the weighted ventilation load calculation module. The weighted ventilation load calculation module is used to map the ventilation limitation depth sequence to the weight factor sequence according to the respiratory cycle, multiply the ventilation limitation depth of each respiratory cycle by the corresponding weight factor to obtain the individual load contribution value of that respiratory cycle, accumulate the individual load contribution values ​​of each effective respiratory cycle, and normalize the accumulated result according to the total number of effective respiratory cycles to obtain the weighted ventilation load value.

[0026] Example 3: The present invention provides a terminal device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor. The memory stores the computer program capable of running on the processor. When the processor loads and executes the computer program, it uses the ventilation load calculation method based on polysomnography described in Embodiment 1.

[0027] It should be noted that the terminal device can be a computer device such as a desktop computer, a laptop computer, or a cloud server, and the terminal device includes, but is not limited to, a processor and a memory. For example, the terminal device may also include input / output devices, network access devices, and buses.

[0028] Furthermore, the processor can be a central processing unit (CPU). Of course, depending on the actual use, other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. can also be used. The general-purpose processor can be a microprocessor or any conventional processor, etc., and this application does not limit it in this regard.

[0029] Example 4: The present invention provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the ventilation load calculation method based on polysomnography described in Embodiment 1.

[0030] The computer program can be stored in a computer-readable medium. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or certain middleware. The computer-readable medium includes any entity or device capable of carrying computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the computer-readable medium includes, but is not limited to, the above-mentioned components.

[0031] In the description of this specification, the references to terms such as "an embodiment," "example," "specific example," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0032] The foregoing has shown and described the basic principles, main features, and advantages of this application. Those skilled in the art should understand that this application is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of this application. Various changes and modifications can be made to this application without departing from the spirit and scope thereof, and all such changes and modifications fall within the scope of the claims of this application.

Claims

1. A method for calculating ventilation load based on polysomnography, characterized in that, Includes the following steps: Nasal airflow signals and electroencephalogram (EEG) signals are acquired. Respiratory cycles are divided based on nasal airflow signals. For each respiratory cycle, the airflow amplitude in the middle of the respiratory cycle is extracted. The corresponding local reference amplitude is determined based on the stable respiratory cycles within the local time window of the current respiratory cycle. The normalized amplitude is calculated based on the ratio of the airflow amplitude of the current respiratory cycle to the local reference amplitude. The depth of ventilation restriction is calculated based on the degree of deviation of the normalized amplitude from the preset ventilation restriction judgment threshold. Time-frequency analysis of EEG signals is performed to extract Delta and Beta band power. The continuous sleep depth index is calculated based on the Delta and Beta band power. The basal sleep depth of each respiratory cycle is calculated based on the continuous sleep depth index of each respiratory cycle corresponding to the time period. Within a preset calibration period, calibration events are selected, and the sleep depth before and after each calibration event is determined. The change in sleep depth corresponding to each calibration event is calculated based on the difference between the two, and the change in sleep depth corresponding to each calibration event is statistically analyzed to obtain an individualized weight adjustment coefficient. Among them, ventilation restriction events that meet the preset event interval conditions and do not have cortical arousal during the event duration and within the preset period after the event end are used as calibration events. The weighting factor for each respiratory cycle is calculated based on the individualized weighting adjustment coefficient and the baseline sleep depth for each respiratory cycle. The smaller the baseline sleep depth, the larger the corresponding weighting factor. The ventilatory limitation depth of each respiratory cycle is multiplied by the corresponding weighting factor to obtain the individual load contribution value of each respiratory cycle. The individual load contribution values ​​of each effective respiratory cycle are accumulated, and the accumulated result is normalized according to the total number of effective respiratory cycles to obtain the weighted ventilatory load value.

2. The method for calculating ventilation load based on polysomnography according to claim 1, characterized in that: After acquiring the nasal airflow signal and the electroencephalogram (EEG) signal, the method further includes preprocessing the nasal airflow signal and the EEG signal to obtain preprocessed nasal airflow signal and preprocessed EEG signal, as follows: A polysomnography system was used to simultaneously acquire at least 6 hours of the nasal airflow signal and the electroencephalogram (EEG) signal at a sampling rate of at least 100 Hz. The nasal airflow signal is acquired using a nasal cannula pressure sensor and filtered using a fourth-order Butterworth bandpass filter with a passband range of 0.1Hz to 5Hz. The EEG signals were acquired using leads C3-M2 or C4-M1, and filtered using a bandpass filter with a passband range of 0.5Hz to 30Hz and a 50Hz notch filter.

3. The method for calculating ventilation load based on polysomnography according to claim 2, characterized in that: Respiratory cycles are divided based on preprocessed nasal airflow signals. For each respiratory cycle, the airflow amplitude in the middle of the cycle is extracted. A local reference amplitude is determined based on the stable respiratory cycles within the local time window of the current respiratory cycle. A normalized amplitude is calculated based on the ratio of the airflow amplitude of the current respiratory cycle to the local reference amplitude. The depth of ventilation limitation is calculated based on the deviation of the normalized amplitude from a preset ventilation limitation threshold. The details are as follows: Extract the airflow amplitude during the mid-inspiratory phase of this respiratory cycle: The positive zero-crossing point of the preprocessed nasal airflow signal crossing the baseline from a negative value to a positive value is detected, and the positive zero-crossing point is determined as the inhalation start time. The negative zero-crossing point detected between two adjacent positive zero-crossing points is determined as the inhalation end time. The inspiratory period is determined based on the inspiratory start time and the inspiratory end time, and the respiratory cycle division result is verified by using the local extreme points within the inspiratory period. Extract the middle third of the inhalation period and calculate the first one-third according to the following formula. The original amplitude of each respiratory cycle: in, Indicates the first The original amplitude of each respiratory cycle Indicates the first The total number of sampling points included in the middle third of a respiratory cycle. Indicates the first one-third of the time period Airflow amplitude at each sampling point; Determining the corresponding local reference amplitude based on the airflow amplitude includes: Construct a sliding time window with a length of 3 to 10 minutes centered on the current respiratory cycle; Remove the respiratory cycles contained in the apnea event, the respiratory cycles contained in the hypoventilation event, and the first recovery respiratory cycle after the end of each apnea event or hypoventilation event from the sliding time window. Calculate the 90th percentile of the original amplitude corresponding to the remaining steady respiratory cycle after removal, and determine the 90th percentile as the local reference amplitude of the current respiratory cycle. ; When the number of remaining stable respiratory cycles within the sliding time window is less than the preset number, the local reference amplitude corresponding to the most recent effective sliding time window before the current respiratory cycle is used, or the fixed reference amplitude determined based on the nasal airflow signal throughout the night is used as the local reference amplitude of the current respiratory cycle. The normalized amplitude is determined by the airflow amplitude and the corresponding local reference amplitude, and the ventilation restriction depth is determined based on the normalized amplitude and the preset ventilation restriction determination threshold, including: Calculate the first according to the following formula. Normalized amplitude per respiratory cycle: Calculate the first according to the following formula. Depth of ventilatory limitation per respiratory cycle: in, Indicates the first Normalized amplitude per respiratory cycle Indicates the first Depth of ventilatory limitation per respiratory cycle The preset ventilation restriction threshold is expressed as a percentage, and the preset ventilation restriction threshold is 40% to 60%, while the ventilation restriction depth ranges from 0 to 1.

4. The method for calculating ventilation load based on polysomnography according to claim 2, characterized in that: Time-frequency analysis was performed on the preprocessed EEG signals to extract Delta and Beta band power. A continuous sleep depth index was determined based on the Delta and Beta band power, and the baseline sleep depth for each respiratory cycle was determined based on the continuous sleep depth index for the corresponding time period of each respiratory cycle, as detailed below: Determining the continuous sleep depth index includes: A short-time Fourier transform was performed on the preprocessed EEG signal using a sliding time window with a window length of 0.5 to 2 seconds and a step size of 0.25 to 1 second to obtain the Delta band power. and Beta band power The Delta band is 0.5Hz to 4Hz, and the Beta band is 16Hz to 30Hz. The continuous sleep depth index is calculated using the following formula: in, Indicates time Continuous sleep depth index, This indicates a positive number used to prevent the denominator from being zero, and the value range of the continuous sleep depth index is 0 to 1; Determine the baseline sleep depth for each respiratory cycle, including: The continuous sleep depth index is subjected to temporal smoothing using a median filter with a window length of 3 to 10 seconds; For the For each respiratory cycle, the time average of the continuous sleep depth index during the middle third of the inspiratory phase of that respiratory cycle is calculated, and the time average is determined as the baseline sleep depth for that respiratory cycle. .

5. The method for calculating ventilation load based on polysomnography according to claim 1, characterized in that: Within a preset calibration period, isolated ventilatory restriction events that do not trigger cortical arousal are identified as calibration events based on the normalized amplitude, as follows: Identifying the calibration event within the preset calibration period includes: The first hour after the start of the overnight polysomnography recording, or the first complete sleep cycle from the subject's fall asleep to the end of the first REM sleep phase, is defined as the preset calibration period. Within the preset calibration period, respiratory cycle sequences with normalized amplitude continuously below 50% are identified as candidate ventilation-limiting events, and the moment when the normalized amplitude first falls below 50% is determined as the start time of the candidate ventilation-limiting event, and the moment when the normalized amplitude recovers to above 50% is determined as the end time of the candidate ventilation-limiting event. The following events are selected from the candidate ventilation-limited events as the calibration events: The event lasted from 10 to 30 seconds; There were no other ventilation-restricting events within 30 seconds prior to the start of the event; There was no cortical arousal during the duration of the event and within 15 seconds after the event ended; Cortical arousal is determined by detecting a sudden shift in the frequency of brain electrical signals toward higher frequencies that lasts for at least 3 seconds, with the frequency shift occurring after at least 10 seconds of stable sleep.

6. The method for calculating ventilation load based on polysomnography according to claim 5, characterized in that: The change in sleep depth for each calibration event is determined based on the difference between the two values. The changes in sleep depth for each calibration event are then statistically analyzed to obtain individualized weighting adjustment coefficients, as detailed below: The change in sleep depth for each calibration event was determined based on sleep depth before and after the start of each calibration event, including: Calculate the first The average value of the continuous sleep depth index within 5 seconds prior to the start time of each calibrated event is used to obtain the initial sleep depth. ; Calculate the first The average value of the continuous sleep depth index within 5 seconds after the end of each calibrated event is used to obtain the final sleep depth. ; Calculate the first according to the following formula. Changes in sleep depth corresponding to each calibrated event: in, Indicates the first Changes in sleep depth corresponding to each calibrated event; The individualized weighted adjustment coefficients are obtained by statistically analyzing the changes in sleep depth corresponding to each calibration event, including: The individualized weight adjustment coefficient is calculated according to the following formula: in, This represents the individualized weight adjustment coefficient. This indicates the preset default weight adjustment coefficient. This represents the total number of calibration events identified within the preset calibration period. Indicates the first Changes in sleep depth corresponding to each calibrated event; When the total number of calibrated events is less than 3, the individualized weight adjustment coefficient is set to the preset default weight adjustment coefficient; The calculated individualized weight adjustment coefficient is limited to a preset range of 0.5 to 2.0, and the preset default weight adjustment coefficient is 1.

0.

7. The method for calculating ventilation load based on polysomnography according to claim 6, characterized in that: The determined weighting factors are as follows: Determine the first Weighting factors per respiratory cycle: in, Indicates the first Weighting factor for each respiratory cycle This represents the individualized weight adjustment coefficient, and the value range of the weight factor is [value range missing]. .

8. The method for calculating ventilation load based on polysomnography according to claim 1, characterized in that: The ventilatory limitation depth of each respiratory cycle is multiplied by the corresponding weighting factor to obtain the individual load contribution value of each respiratory cycle. The individual load contribution values ​​of each effective respiratory cycle are accumulated, and the accumulated result is normalized according to the total number of effective respiratory cycles to obtain the weighted ventilatory load value, as follows: Obtain the sleep staging results corresponding to the polysomnography, wherein the sleep staging results include N1 sleep stage, N2 sleep stage, N3 sleep stage and REM sleep stage; For a respiratory cycle that crosses the boundary of two adjacent sleep periods, the sleep period to which the midpoint of the inspiratory phase of that respiratory cycle belongs is determined as the sleep period to which that respiratory cycle belongs. For each sleep stage, the corresponding sleep stage weighted ventilation load sub-index is calculated according to the following formula: in, This represents the weighted ventilation load sub-index corresponding to the sleep period. This represents the set of serial numbers of effective respiratory cycles belonging to this sleep period. This indicates the total number of effective respiratory cycles during this sleep period; The waveform regularity, the ratio of inspiratory duration to expiratory duration, and the amplitude variation coefficient were detected for each respiratory cycle. When the waveform regularity of any respiratory cycle is lower than the preset regularity threshold, the ratio of inspiratory duration to expiratory duration is outside the range of 0.3 to 3.0, or the amplitude variation coefficient is greater than the preset variation coefficient threshold, the respiratory cycle is marked as a low confidence respiratory cycle and the low confidence respiratory cycle is removed from the effective respiratory cycles. The weighted ventilation load value is calculated according to the following formula: in, This represents the weighted ventilation load value. A set of numbers representing effective respiratory cycles. Indicates the total number of effective respiratory cycles. Indicates the first Depth of ventilatory limitation per effective respiratory cycle Indicates the first Weighting factor for each effective respiratory cycle.

9. A ventilation load calculation system based on polysomnography, used to implement the ventilation load calculation method based on polysomnography as described in any one of claims 1 to 8, characterized in that, include: The signal acquisition and preprocessing module is used to acquire nasal airflow signals and electroencephalogram (EEG) signals from polysomnography, and preprocess the nasal airflow signals and EEG signals respectively to obtain preprocessed nasal airflow signals and preprocessed EEG signals. The ventilation limitation depth determination module is used to divide the respiratory cycle based on the nasal airflow signal. For each respiratory cycle, it extracts the airflow amplitude in the middle of the respiratory cycle, determines the corresponding local reference amplitude based on the stable respiratory cycle in the local time window of the current respiratory cycle, calculates the normalized amplitude based on the ratio of the airflow amplitude of the current respiratory cycle to the local reference amplitude, and calculates the ventilation limitation depth based on the deviation of the normalized amplitude from the preset ventilation limitation determination threshold. The sleep depth determination module is used to perform time-frequency analysis on EEG signals, extract Delta band power and Beta band power, calculate the continuous sleep depth index based on the Delta band power and the Beta band power, and calculate the basic sleep depth of each respiratory cycle based on the continuous sleep depth index of each respiratory cycle corresponding time period. The individualized calibration module is used to filter calibration events within a preset calibration period, determine the sleep depth before and after each calibration event, calculate the change in sleep depth corresponding to each calibration event based on the difference between the two, and statistically analyze the change in sleep depth corresponding to each calibration event to obtain the individualized weight adjustment coefficient. Among them, ventilation restriction events that meet the preset event interval conditions and do not have cortical arousal during the event duration and within the preset period after the event end are used as calibration events. The weighting factor determination module is used to calculate the weighting factor for each respiratory cycle based on the individualized weighting adjustment coefficient and the baseline sleep depth of each respiratory cycle, wherein the smaller the baseline sleep depth, the larger the corresponding weighting factor. The weighted ventilation load calculation module is used to multiply the ventilation limitation depth of each respiratory cycle by the corresponding weighting factor to obtain the individual load contribution value of each respiratory cycle. The individual load contribution values ​​of each effective respiratory cycle are accumulated, and the accumulated result is normalized according to the total number of effective respiratory cycles to obtain the weighted ventilation load value.

10. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that, The memory stores a computer program that can run on a processor. When the processor loads and executes the computer program, it employs the ventilation load calculation method based on polysomnography as described in any one of claims 1 to 8.