A sleep apnea detection method and a detection device
By extracting multiple physiological signals from polysomnography and dividing them into time periods, and using multi-model fusion technology, the accuracy and cost issues of sleep apnea diagnosis in existing technologies have been solved, achieving more efficient and accurate sleep apnea detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-16
- Publication Date
- 2026-03-24
AI Technical Summary
Current technologies for diagnosing sleep apnea syndrome face challenges such as the complexity and high cost of the gold standard PSG equipment, insufficient primary healthcare resources, lack of experience among primary care physicians, and the fact that most existing algorithms can only adapt to a single physiological signal, resulting in insufficient diagnostic accuracy.
Multiple physiological signals are extracted from polysomnography, divided into multiple time segments according to preset time, and input into different types of sleep apnea detection models. The results of multiple models are combined for decision fusion to identify the proportion of patients with sleep apnea.
It improves the accuracy and efficiency of sleep apnea detection, provides more comprehensive diagnostic information, reduces missed diagnoses and misdiagnoses, and is suitable for use in primary healthcare environments.
Smart Images

Figure CN120180235B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of respiratory detection, in particular to a sleep apnea detection method and a detection device. BACKGROUND
[0002] Sleep apnea is a sleep disorder that repeatedly occurs during sleep, mainly manifested as frequent respiratory interruptions, hypoxia and sleep structure disorders at night. Patients often have severe snoring at night, wake up after apnea, and have symptoms such as daytime sleepiness, fatigue, and decreased attention. Long-term untreated sleep apnea can cause high blood pressure, heart disease, diabetes, and even cognitive decline.
[0003] The current diagnosis of sleep apnea syndrome faces multiple challenges as follows:
[0004] Diagnostic gold standard PSG limitations: requires overnight monitoring in a professional medical institution, the device is complex and the cost is high, and the lack of medical resources at the grassroots level limits accessibility;
[0005] Lack of experience among grassroots doctors: affects the accuracy of apnea diagnosis;
[0006] Limitations of existing algorithms: most can only identify apnea symptoms based on signal segments, requiring 6-8 hours of physiological signals throughout the night, which is costly. Moreover, they are often only suitable for one type of physiological signal, and there is a lack of methods that can adapt to multiple signals.
[0007] These challenges result in existing algorithms being unsuitable for sleep apnea diagnosis of physiological signals. SUMMARY
[0008] Therefore, the purpose of the present application is to provide a sleep apnea detection method and a detection device to overcome at least one of the above-mentioned defects.
[0009] In a first aspect, an embodiment of the present application provides a sleep apnea detection method, the method comprising: extracting physiological signals under each channel from a polysomnogram in a detection period, and dividing the detection period according to a preset time to obtain a plurality of time segments; determining a signal identifier corresponding to each physiological signal, and dividing each physiological signal according to the signal identifier to determine a first signal type and a second signal type; for each time segment, inputting physiological signals corresponding to the first signal type of the time segment into a first sleep apnea detection model to obtain a first set, each first element contained in the first set one-to-one corresponds to a detection result of each time segment, and the detection result of each time segment is used to represent the detection result of all physiological signals corresponding to the first signal type in the time segment; for each time segment, inputting physiological signals corresponding to the second signal type of the time segment into a second sleep apnea detection model to obtain a second set, each second element contained in the second set one-to-one corresponds to a detection result of each time segment, and the detection result of each time segment is used to represent the detection result of all physiological signals corresponding to the second signal type in the time segment; and identifying a proportion of patients with sleep apnea based on the first set and the second set.
[0010] In an optional embodiment of the present application, the physiological signals corresponding to the first signal type include electroencephalogram signals, electrooculogram signals, and electromyogram signals, and wherein the inputting, for each time segment, physiological signals corresponding to the first signal type of the time segment into a first sleep apnea detection model to obtain a first set comprises: inputting, for each time segment, electroencephalogram signals, electrooculogram signals, and electromyogram signals of the time segment into the first sleep apnea detection model to output a corresponding first element, each first element including a first detection parameter and a second detection parameter, the first detection parameter being used to represent a proportion of sleep apnea existing in the electroencephalogram signals, electrooculogram signals, and electromyogram signals of the time segment, and the second detection parameter being used to represent a proportion of sleep apnea not existing in the electroencephalogram signals, electrooculogram signals, and electromyogram signals of the time segment; and determining the first set based on the first elements of all time segments.
[0011] In an optional embodiment of the present application, the physiological signal corresponding to the second signal type includes an electrocardiogram signal and a respiration signal, and the inputting, for each time segment, the physiological signal corresponding to the second signal type of the time segment into the second sleep apnea detection model to obtain the second set includes: inputting, for each time segment, the electrocardiogram signal and the respiration signal of the time segment into the second sleep apnea detection model to output a corresponding second element, each second element including a third detection parameter and a fourth detection parameter, the third detection parameter being used to represent a proportion of the electrocardiogram signal and the respiration signal of the time segment existing sleep apnea, and the fourth detection parameter being used to represent a proportion of the electrocardiogram signal and the respiration signal of the time segment not existing sleep apnea; and determining the second set based on the second elements of all time segments.
[0012] In an optional embodiment of the present application, the first sleep apnea detection model includes a multi-head attention module, a plurality of first CNN sequences, a first data concatenation module, a residual network, and a first result determination module, wherein the input of the multi-head attention module is the electroencephalogram signal, the electrooculogram signal, and the electromyogram signal of each time segment, the output of the multi-head attention module is an attention index, the input of each first CNN sequence is the attention index, the input of each first CNN sequence is a feature corresponding to an expansion rate and a receptive field, the input of the first data concatenation module is the feature corresponding to the expansion rate and the receptive field of each first CNN sequence, the output of the first data concatenation module is a first intermediate layer signal, the input of the residual network is the first intermediate layer signal, the output of the residual network is a second intermediate layer signal, the input of the first result determination module is the second intermediate layer signal, and the output of the first result determination module is the first set of detection results used to represent the physiological signal of the first signal type of each time segment.
[0013] In an optional embodiment of the present application, the second sleep apnea detection model includes a second CNN sequence, an attention mechanism sequence, a second data concatenation module, and a second result determination module, the input of the second CNN sequence is the electroencephalogram signal, the electrooculogram signal, and the electromyogram signal of each time segment, the output of the second CNN sequence is a time domain signal, the input of the attention mechanism sequence is the electroencephalogram signal, the electrooculogram signal, and the electromyogram signal of each time segment, the output of the attention mechanism sequence is a frequency domain signal, the input of the second data concatenation module is the time domain signal and the frequency domain signal, the output of the second data concatenation module is a third intermediate layer signal, and the output of the second result determination module is the second set of detection results used to represent the physiological signal of the second signal type of each time segment.
[0014] In an optional embodiment of the present application, the identifying the proportion of the apnea patients based on the first set and the second set comprises: inputting the first set and the second set into a third sleep apnea detection model to perform decision fusion, to determine a third set, each third element in the third set corresponding to the detection result of each time segment, the third element comprising a fifth detection parameter and a sixth detection parameter, the fifth detection parameter being used to represent the proportion of the time segment in which sleep apnea exists, and the sixth detection parameter being used to represent the proportion of the time segment in which sleep apnea does not exist.
[0015] In an optional embodiment of the present application, the method further comprises: for the third set, determining the number of third elements in the third set that are used to represent the time segment in which sleep apnea exists; and determining, according to the number, the proportion of the test object being identified as an apnea patient in the polysomnogram corresponding to the detection period, for the reference of the doctor.
[0016] In a second aspect, the embodiments of the present application further provide a sleep apnea detection device, the device comprising: an extraction module configured to extract physiological signals under each channel from a polysomnogram in a detection period, and divide the detection period according to a preset time to obtain a plurality of time segments; a determination module configured to determine a signal identifier corresponding to each physiological signal, and divide each physiological signal according to the signal identifier to determine a first signal type and a second signal type; a first set obtaining module configured to, for each time segment, input the physiological signals corresponding to the first signal type of the time segment into a first sleep apnea detection model to obtain a first set, each first element in the first set corresponding to the detection result of each time segment, and the detection result of each time segment being used to represent the detection result of all physiological signals corresponding to the first signal type of the time segment; a second set obtaining module configured to, for each time segment, input the physiological signals corresponding to the second signal type of the time segment into a second sleep apnea detection model to obtain a second set, each second element in the second set corresponding to the detection result of each time segment, and the detection result of each time segment being used to represent the detection result of all physiological signals corresponding to the second signal type of the time segment; and a proportion determining module configured to identify the proportion of the apnea patients based on the first set and the second set.
[0017] In a third aspect, the embodiments of the present application further provide an electronic device, comprising: a processor, a memory and a bus, the memory storing machine readable instructions executable by the processor, when the electronic device is running, the processor and the memory communicate through the bus, and the machine readable instructions are executed by the processor to perform the steps of the above method.
[0018] In a fourth aspect, the embodiments of the present application further provide a computer readable storage medium, which stores a computer program. When the computer program is run by a processor, the steps of the method described above are executed.
[0019] The sleep apnea detection method and device provided by the embodiments of the present application extract physiological signals under each channel from the polysomnogram in a detection period, divide the detection period according to a preset time to obtain a plurality of time segments, determine a signal identifier corresponding to each physiological signal, divide each physiological signal according to the signal identifier, determine a first signal type and a second signal type, input, for each time segment, the physiological signals corresponding to the first signal type in the time segment into a first sleep apnea detection model to obtain a first set, input, for each time segment, the physiological signals corresponding to the second signal type in the time segment into a second sleep apnea detection model to obtain a second set, and identify the proportion of patients with sleep apnea based on the first set and the second set. The method comprehensively processes a plurality of physiological signals, and improves the accuracy of the sleep apnea detection result.
[0020] In order to make the above objectives, characteristics and advantages of the present application more apparent, the following will describe a preferred embodiment in detail, and the accompanying drawings will be described as follows. BRIEF DESCRIPTION OF DRAWINGS
[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can also be obtained without creative labor.
[0022] Figure 1 One of the flowcharts of the sleep apnea detection method provided by the embodiments of the present application;
[0023] Figure 2 The schematic diagram of the first sleep apnea detection model provided by the embodiments of the present application;
[0024] Figure 3 The schematic diagram of the second sleep apnea detection model provided by the embodiments of the present application;
[0025] Figure 4 The structural schematic diagram of the sleep apnea detection device provided by the embodiments of the present application;
[0026] Figure 5 The structural schematic diagram of the electronic device provided by the embodiments of the present application. DETAILED DESCRIPTION
[0027] The technical solutions and advantages of the embodiments of the present application will be more clearly understood from the following description of the embodiments of the present application with reference to the accompanying drawings. Obviously, the described embodiments are only some of the embodiments of the present application, not all. The components of the embodiments of the present application described and shown in the accompanying drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, every other embodiment obtained by a person skilled in the art without creative work falls within the scope of the present application.
[0028] Firstly, the application scenarios applicable to the present application are introduced. The present application can be applied to the field of respiratory detection.
[0029] It is found through research that sleep apnea is a sleep disorder disease that repeatedly appears in sleep apnea or hypopnea, which is manifested as night breathing interruption, hypoxia, sleep structure disorder and various symptoms, and long-term non-treatment will cause serious consequences. However, the current diagnosis of the disease faces multiple challenges, such as the gold standard for diagnosis, polysomnography (PSG), which needs to be monitored overnight in a professional institution, the device is complex, the cost is high, and the primary medical resources are insufficient; the lack of experience of primary doctors affects the accuracy of diagnosis; the existing algorithms can only identify apnea symptoms according to signal segments, and need physiological signals all night, the diagnosis cost is high, and many of them are only suitable for a single physiological signal, lacking a method suitable for multiple signals, resulting in that the existing algorithms are not suitable for sleep apnea diagnosis of physiological signals.
[0030] Based on this, the embodiments of the present application provide a sleep apnea detection method and a detection device, which extracts each channel physiological signal from the polysomnogram in the detection period, divides the detection period into multiple time segments according to the preset time, determines the physiological signal identifier and divides the signal type into first and second signal types according to the physiological signal identifier; for each time segment, the physiological signals corresponding to the first and second signal types are respectively input into the corresponding first and second sleep apnea detection models, and the first and second sets reflecting the detection results of the two types of signals are obtained; finally, the proportion of patients with respiratory arrest identified based on the two sets is increased to improve the accuracy of the detection results.
[0031] Please refer to Figure 1 , Figure 1 The flowchart of the sleep apnea detection method provided by the embodiments of the present application is shown in FIG. 1. As shown in FIG. 1, the sleep apnea detection method provided by the embodiments of the present application comprises the following steps. Figure 1
[0032] S101. Extract physiological signals in each channel from the polysomnography within the detection period, and divide the detection period according to the preset time to obtain multiple time segments;
[0033] Polysomnography (PSG) includes multiple physiological signals.
[0034] Extracting physiological signals: Polysomnography (PSG) is a medical device that records multiple physiological signals to monitor various physiological activities during sleep. This step involves extracting physiological signals from different channels (such as electroencephalography, electrooculography, electromyography, electrocardiography, respiration, etc.) from the PSG recordings.
[0035] Depending on the monitoring requirements, electrodes and sensors are placed on the subject's scalp, face, chest, abdomen, limbs, etc. The placement of electrodes and sensors should follow internationally accepted standards to ensure the accuracy and comparability of monitoring data. The electrodes and sensors are connected to the PSG monitoring equipment to ensure stable and reliable signal transmission.
[0036] Based on monitoring needs, the sampling rate, filter, and other parameters of the device are adjusted to obtain the best monitoring effect. After the subject falls asleep, the PSG monitoring device will start to continuously and synchronously record physiological signals such as electroencephalogram (EEG), electromyography (EMG), electrooculogram (EOG), electrocardiogram (ECG), and respiratory recording device. If necessary, it can also monitor physiological indicators reflecting cardiovascular function such as blood pressure and pulse at the same time. The PSG monitoring device will automatically collect physiological signal data during the entire night's sleep process, which is called polysomnography, and store it in the device's internal or external storage device.
[0037] First, a preliminary analysis is performed on each physiological signal to understand its frequency characteristics and noise distribution. Then, based on the signal analysis results, a filtering range is set for each physiological signal. The filtering range should be able to retain useful information in the signal while removing noise and interference.
[0038] Finally, select the appropriate filter type (such as low-pass filter, high-pass filter, band-pass filter, etc.) and parameters according to the filtering range.
[0039] In the specific preprocessing, it is necessary to filter the desired channel to a reasonable range.
[0040] Specifically, this includes filtering of EEG signals from 0.3 to 35 Hz, filtering of EEG signals from 0.3 to 35 Hz, filtering of ECG signals from 0.3 to 70 Hz, filtering of EMG signals from 10 to 100 Hz, and filtering of chest and abdominal respiratory signals from 0.1 to 15 Hz.
[0041] In addition, a notch filter can be applied to the relevant 50Hz channel to remove power frequency interference.
[0042] Specifically, for the physiological signals under each channel of the polysomnogram, the plurality of physiological signals under the channel are divided according to a preset time to obtain a plurality of time segments.
[0043] Each time segment includes a plurality of physiological signals under a plurality of channels within the preset time;
[0044] Here, the physiological signals under each channel are divided according to a preset time (such as 30 seconds, 1 minute, etc., which can be specifically limited according to actual conditions) to obtain a plurality of time segments, ensuring that the signals in each time segment are representative, and the plurality of physiological signals under a plurality of channels in each time segment are organized to form a unified data format.
[0045] Divide the time segments: In order to analyze the physiological changes in the sleep process more carefully, the entire detection period (usually a whole night) is divided into a plurality of time segments according to a preset time interval (such as every 30 seconds). This helps to capture subtle changes in the sleep process and improve the accuracy of detection.
[0046] Selection of detection period: The present application can diagnose different lengths of data, and the collected data can be 6-8 hours of sleep data for the whole night, or a few tens of minutes of nap, and collecting a few minutes of data in a clear state is also effective.
[0047] S102, determine the signal identifier corresponding to each physiological signal, and divide each physiological signal according to the signal identifier to determine the first signal type and the second signal type;
[0048] Here, each physiological signal has its specific identifier for distinguishing different signal types.
[0049] Signal type division: According to the signal identifier, the extracted physiological signal is divided into the first signal type and the second signal type.
[0050] S103, for each time segment, input the physiological signal corresponding to the first signal type of the time segment into the first sleep apnea detection model to obtain a first set.
[0051] Specifically, the physiological signal corresponding to the first signal type includes an electroencephalogram signal, an electrooculogram signal, and an electromyogram signal.
[0052] For each time segment, the electroencephalogram signal, the electrooculogram signal, and the electromyogram signal of the time segment are input into the first sleep apnea detection model to output a corresponding first element.
[0053] Each first element comprises a first detection parameter and a second detection parameter, the first detection parameter is used to represent the proportion of the brain electrical signal, the electro-oculogram signal and the electromyogram signal existing sleep apnea in the time segment, and the second detection parameter is used to represent the proportion of the brain electrical signal, the electro-oculogram signal and the electromyogram signal not existing sleep apnea in the time segment.
[0054] In an optional embodiment, the first signal type comprises the brain electrical signal, the electro-oculogram signal and the electromyogram signal, and the selection of the signal type should be based on the correlation with sleep apnea. Selecting the signal type sensitive to sleep apnea can improve the accuracy of detection.
[0055] Here, the first element exists in the form of (x1, y1), and the first detection parameter x1 being greater than the second detection parameter y1 indicates that the subject is healthy, and the first detection parameter x1 not being greater than the second detection parameter y1 indicates that the subject has sleep apnea.
[0056] Based on the first elements of all time segments, a first set is determined.
[0057] For example, there are ten time segments, and the first set comprises ten elements, corresponding to ten first detection parameters and ten second detection parameters. Each first element contained in the first set corresponds to the detection result of each time segment, and the detection result of each time segment is used to represent the detection result of all physiological signals corresponding to the first signal type of the time segment.
[0058] Please refer to Figure 2 , Figure 2 The first sleep apnea detection model provided by the embodiments of the present application is a schematic diagram.
[0059] The first sleep apnea detection model comprises a multi-head attention module, a plurality of first CNN sequences, a first data splicing module, a residual network and a first result determination module.
[0060] The input of the multi-head attention module is the brain electrical signal, the electro-oculogram signal and the electromyogram signal of each time segment, and the output of the multi-head attention module is an attention index. The input of each first CNN sequence is the attention index, and the input of each first CNN sequence is the feature and the receptive field corresponding to an expansion rate. The input of the first data splicing module is the feature and the receptive field corresponding to an expansion rate of each first CNN sequence, and the output of the first data splicing module is a first intermediate layer signal. The input of the residual network is the first intermediate layer signal, and the output of the residual network is a second intermediate layer signal. The input of the first result determination module is the second intermediate layer signal, and the output of the first result determination module is a first set (diagnosis result 1) used to represent the detection result of the physiological signal of the time segment corresponding to the first signal type.
[0061] Here, the EEG signal and the like is used to obtain the attention index of each channel through the first layer of Attention, and the processed data is input to four different one-dimensional CNN sequences, and the first layer of each one-dimensional CNN sequence has different dilation parameters.
[0062] The dilation parameter defines the spacing between the elements of the convolution kernel. When dilation is 1, each element in the convolution kernel is next to each other, and when dilation is 2, each element in the convolution kernel is separated by an element. By adjusting the size of the dilation, the range of feature extraction and the size of the receptive field of the convolution operation can be controlled, thereby affecting the performance and feature extraction ability of the network. The results of the four one-dimensional CNN sequences are concatenated (Concat layer) and input to a residual network (part from the Concat layer to the last ELU layer in the figure), and then through a FC layer and a SoftMax layer to obtain the final diagnostic result 1.
[0063] Each block is a module inside the first sleep apnea detection model, and the specific content is as follows:
[0064] Multi-head attention: multi-head attention mechanism, used to capture information in different subspaces of the input signal. It linearly projects the input signal into multiple subspaces, each of which performs an attention mechanism calculation, and then concatenates the results to get the final output through a linear layer.
[0065] Conv1d dilation 1 / 2 / 3 / 4: one-dimensional convolution layer, dilation rate (dilation rate) is 1, 2, 3, and 4. Dilated convolution expands the receptive field by inserting holes between the convolution kernel, which can capture more extensive context information without increasing the number of parameters.
[0066] ELU: Exponential Linear Unit (Exponential Linear Unit), an activation function, used to introduce nonlinearity to help the neural network learn complex patterns.
[0067] Concat: concatenation operation, concatenating multiple feature maps in the channel dimension to integrate the outputs of different convolution layers.
[0068] FC: Fully-Connected Layer (Fully-Connected Layer), which maps the concatenated features to the output space for classification or regression tasks.
[0069] SoftMax: SoftMax function, which converts the output of the fully connected layer into a probability distribution, used for multi-classification tasks, outputting the probability of each class.
[0070] As Figure 2 shown, the first data concatenation module Concat lower arrow indicates two branches, one branch outputs the result after concatenation of the Concat output to +, which is result one; the other branch is to output the result after concatenation of the Concat output to + through FC, ELU, FC, which is result two, and the output value of + to the result of the last ELU is the sum of result one and result two.
[0071] S104, for each time segment, input the physiological signals corresponding to the second signal type of the time segment into the second sleep apnea detection model to obtain a second set.
[0072] Each second element contained in the second set corresponds one-to-one to the detection result of each time segment, and the detection result of each time segment is used to represent the detection result of all physiological signals corresponding to the second signal type of the time segment;
[0073] For each time segment, input the electrocardiogram signal and the respiratory signal of the time segment into the second sleep apnea detection model, and output a corresponding second element, each second element including a third detection parameter and a fourth detection parameter, the third detection parameter being used to represent the proportion of the electrocardiogram signal and the respiratory signal of the time segment existing sleep apnea, and the fourth detection parameter being used to represent the proportion of the electrocardiogram signal and the respiratory signal of the time segment not existing sleep apnea;
[0074] Based on the second elements of all time segments, determine the second set.
[0075] Here, the second element exists in the form of (x2, y2), the third detection parameter x2 being greater than the fourth detection parameter y2 indicates that the subject is healthy, and the third detection parameter x2 not being greater than the fourth detection parameter y2 indicates that the subject has sleep apnea.
[0076] The ECG and the respiratory signal pass through a one-dimensional CNN sequence and an LSTM+Attention sequence to extract the frequency domain and time domain features of the signals respectively, and the two kinds of features are combined (Concat layer) and then processed, and output the second set after passing through two layers of FC.
[0077] The second CNN sequence outputs the frequency domain signal, and the attention mechanism sequence outputs the time domain signal. In deep learning, increasing the number of neurons and deepening the number of FC layers can improve the nonlinear expression ability of the model, theoretically improving the learning ability of the model. The number of neurons of the two layers of FC is different.
[0078] Specifically, please refer to Figure 3 , Figure 3 a schematic diagram of the second sleep apnea detection model provided by the embodiments of the present application.
[0079] The second sleep apnea detection model comprises a second CNN sequence, an attention mechanism sequence, a second data splicing module, and a second result determination module. The input of the second CNN sequence is the electroencephalogram signal, the electrooculogram signal, and the electromyogram signal of each time segment. The output of the second CNN sequence is a time domain signal. The input of the attention mechanism sequence is the electroencephalogram signal, the electrooculogram signal, and the electromyogram signal of each time segment. The output of the attention mechanism sequence is a frequency domain signal. The input of the second data splicing module is the time domain signal and the frequency domain signal. The output of the second data splicing module is a third intermediate layer signal. The output of the second result determination module is a second set of detection results (diagnosis result 2) of the second signal type of the physiological signal of each time segment.
[0080] Here, each block is a module inside the second sleep apnea detection model, and the specific content is as follows:
[0081] Conv1d: One-dimensional convolution layer (1-Dimensional Convolutional Layer), used for convolution operation on one-dimensional signals (such as time series signals) to extract local features.
[0082] ELU: Exponential linear unit (Exponential Linear Unit), an activation function used to introduce nonlinearity and help the neural network learn complex patterns.
[0083] Multi-head attention: Multi-head attention mechanism, used to capture the dependency between different positions in the input sequence, and through multiple attention heads parallel computing, enhance the representation ability of the model.
[0084] Bi-LSTM: Bidirectional long short-term memory network (Bidirectional Long Short-Term Memory), a variant of recurrent neural network (RNN) that can process sequence data and capture long-term dependencies. The bidirectional structure allows it to consider both past and future information.
[0085] Concat: Concatenation operation, concatenates feature maps from different paths in a specific dimension, integrating features from different sources.
[0086] FC: Fully connected layer (Fully - Connected Layer), maps the concatenated features to the output space, used for classification or regression tasks.
[0087] SoftMax: SoftMax function, converts the output of the fully connected layer to a probability distribution, used for multi-classification tasks, outputs the probability of each class.
[0088] S105, identifying the proportion of apnea patients based on the first set and the second set.
[0089] Specifically, the first set and the second set are input into the third sleep apnea detection model for decision fusion to determine the third set.
[0090] Each third element in the third set corresponds to the detection result of each time segment, and the third element includes a fifth detection parameter and a sixth detection parameter. The fifth detection parameter is used to represent the proportion of sleep apnea in the time segment, and the sixth detection parameter is used to represent the proportion of non-sleep apnea in the time segment.
[0091] The principle of decision fusion is that different detection models may have different sensitivity and specificity for different types of physiological signals or different characteristics of sleep apnea. By fusing the output results of these models, their respective advantages can be fully utilized, and their respective shortcomings can be made up, thereby improving the accuracy and reliability of the overall detection.
[0092] Input data preparation: the first set and the second set are provided as input data to the third sleep apnea detection model. The elements in each set correspond to the detection result of a time segment, and contain the proportion parameters of sleep apnea and non-sleep apnea.
[0093] After decision fusion, the third sleep apnea detection model outputs a new set, i.e. the third set. Each third element in the third set corresponds to the final detection result of a time segment, and contains the fused proportion parameters of sleep apnea and non-sleep apnea (fifth detection parameter and sixth detection parameter).
[0094] The third sleep apnea detection model receives the output results from the first sleep apnea detection model (based on the first signal type) and the second sleep apnea detection model (based on the second signal type), i.e. the first set and the second set, and then according to the preset fusion rule or algorithm, the results are comprehensively processed.
[0095] For example, the fifth detection parameter in the third set is determined according to the first detection parameter of the first set and the third detection parameter of the second set, and other parameters are the same. In this application, the decision fusion adopts the weighted average method, the weight of the first sleep apnea detection model is set to 0.4, and the weight of the second sleep apnea detection model is set to 0.6. The weight can be modified according to the actual situation.
[0096] The calculation process is: 0.4x1+0.6x2=x3.
[0097] The third set provides doctors with more comprehensive and accurate sleep apnea detection results. Doctors can assess the degree of risk of sleep apnea in each time segment according to the fifth detection parameter and the sixth detection parameter in the third set, and accordingly develop personalized treatment plans. In addition, the third set can also be used for subsequent data analysis, model optimization, etc., to continuously improve the accuracy and reliability of sleep apnea detection.
[0098] Specifically, for the third set, the number of third elements in the third set that exist to characterize the presence of sleep apnea in the time segment is determined;
[0099] Here, after obtaining the third set, the first task is to count the number of third elements in the third set that characterize the presence of sleep apnea in the time segment. The purpose of this step is to quantify how many time segments are determined by the model to have sleep apnea in the entire detection period. In specific implementation, each element in the third set can be traversed to check whether its fifth detection parameter (characterizing the proportion of sleep apnea) exceeds a preset threshold (such as 30%). If it does, the element is counted as a third element that exists sleep apnea.
[0100] In an example, the final third set includes ten elements, and the number of elements in which the fifth detection parameter x3 is greater than the sixth detection parameter y3 is determined. If there are three or more elements that satisfy the condition that the fifth detection parameter x3 is greater than the sixth detection parameter y3, it is determined that sleep apnea exists, and the probability of sleep apnea is calculated.
[0101] The selection of the threshold should be based on clinical practice and model performance. A too high threshold may lead to missed diagnosis, while a too low threshold may increase the rate of misdiagnosis. Therefore, the threshold can be determined through clinical trials and data analysis.
[0102] According to the number, the proportion of the test object being identified as an apnea patient in the polysomnogram corresponding to the detection period is determined for the doctor to refer to.
[0103] Preferably, whether the subject is a sleep apnea patient is determined according to the proportion of the set diagnosed as apnea (greater than or equal to 30%).
[0104] After determining the number of third elements that exist sleep apnea, the proportion of the test object being identified as an apnea patient in the polysomnogram corresponding to the detection period can be further calculated. This proportion can be obtained by dividing the number of third elements that exist sleep apnea by the total number of elements in the third set, reflecting the relative frequency of sleep apnea events occurring in the entire detection period.
[0105] Preferably, whether the subject is a sleep apnea patient can be determined according to the proportion of the subjects identified as sleep apnea patients in the set (e.g., greater than or equal to 30%). The purpose of this step is to provide a visual and easy-to-use diagnostic standard for doctors. If the proportion of sleep apnea of the test object in the detection period exceeds the preset proportion threshold, it can be preliminarily determined that the test object is a sleep apnea patient.
[0106] The finally determined proportion and patient identity determination result will provide important reference information for doctors. Doctors can evaluate the risk degree of sleep apnea of patients according to these information, develop individualized treatment plan, and monitor the treatment effect.
[0107] Specifically, the number of the model of the present application can be determined according to the actual situation, and each set is for different collection equipment. If the equipment only has electroencephalogram signal, the first sleep apnea detection model is used, if only respiratory signal, the second sleep apnea detection model is used, and if both, the third sleep apnea detection model is used for decision fusion to obtain the third set, and then the probability of the detection result is determined.
[0108] The present application divides the first sleep apnea detection model and the second sleep apnea detection model, which can adapt to different collection equipment conditions. Electroencephalogram and respiratory signal behave differently under different models, and different models are selected by optimization. Respiratory signal needs to extract features in time domain.
[0109] In an embodiment, the data set used by the present application contains 40 sleep apnea patients, and 40 healthy subjects total 80 whole-night PSG data, which total more than 64,000 samples after data segmentation. The model is optimized by Adam optimizer, and the learning rate is set to 1e-6. The final diagnostic accuracy rate result on a single sample (30 seconds of data) level is shown in Table 1:
[0110] Table 1:
[0111]
[0112] The sleep apnea detection method and device provided in this application extract physiological signals from polysomnography within a detection period for each channel, and divide the detection period according to a preset time to obtain multiple time segments; determine the signal identifier corresponding to each physiological signal, and classify each physiological signal according to the signal identifier to determine a first signal type and a second signal type; for each time segment, input the physiological signal corresponding to the first signal type of that time segment into a first sleep apnea detection model to obtain a first set; for each time segment, input the physiological signal corresponding to the second signal type of that time segment into a second sleep apnea detection model to obtain a second set; and based on the first set and the second set, identify the proportion of patients with sleep apnea. This application improves the accuracy of sleep apnea results by processing multiple physiological signals.
[0113] This application extracts physiological signals from multiple channels of polysomnography and processes them using detection models optimized for different signal types (a first sleep apnea detection model and a second sleep apnea detection model), enabling a more comprehensive capture of sleep apnea characteristics. This multi-model, multi-channel detection method significantly improves the accuracy of sleep apnea detection compared to single-model or single-signal detection methods.
[0114] This application not only provides the proportion of patients identified as having sleep apnea, but also offers doctors a more comprehensive diagnostic basis based on detailed detection parameters from the first and second sets (such as the proportion of patients with sleep apnea). Doctors can use these parameters to gain a deeper understanding of patients' sleep apnea status, thereby developing more personalized treatment plans.
[0115] The method and apparatus of this application can provide more accurate and timely diagnostic results, helping patients receive treatment earlier and improve sleep quality. For medical institutions, this application can improve the detection efficiency of sleep apnea, reduce the occurrence of missed diagnoses and misdiagnoses, thereby improving the overall quality of medical care and service levels.
[0116] Based on the same inventive concept, this application also provides a sleep apnea detection device corresponding to the sleep apnea detection method. Since the principle of the device in this application is similar to the sleep apnea detection method described above, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.
[0117] Please see Figure 4 , Figure 4 This is a schematic diagram of the sleep apnea detection device provided in an embodiment of this application. Figure 4 As shown, the sleep apnea detection device 200 includes:
[0118] The extraction module 201 is configured to extract physiological signals under each channel from the polysomnogram in a detection period, and divide the detection period according to a preset time to obtain a plurality of time segments.
[0119] The determination module 202 is configured to determine a signal identifier corresponding to each physiological signal, and divide each physiological signal according to the signal identifier to determine a first signal type and a second signal type.
[0120] The first set obtaining module 203 is configured to, for each time segment, input the physiological signals corresponding to the first signal type of the time segment into a first sleep apnea detection model to obtain a first set, each first element in the first set corresponding to a detection result of each time segment, and the detection result of each time segment being used to represent the detection result of all physiological signals corresponding to the first signal type of the time segment.
[0121] The second set obtaining module 204 is configured to, for each time segment, input the physiological signals corresponding to the second signal type of the time segment into a second sleep apnea detection model to obtain a second set, each second element in the second set corresponding to a detection result of each time segment, and the detection result of each time segment being used to represent the detection result of all physiological signals corresponding to the second signal type of the time segment.
[0122] The proportion determination module 205 is configured to identify a proportion of apnea patients based on the first set and the second set.
[0123] Please refer to Figure 5 , Figure 5 The electronic device provided in the embodiments of the present application is shown in a structural schematic diagram. As shown in Figure 5 , the electronic device 300 includes a processor 310, a memory 320 and a bus 330.
[0124] The memory 320 stores machine readable instructions executable by the processor 310. When the electronic device 300 is running, the processor 310 and the memory 320 communicate through the bus 330. The machine readable instructions executed by the processor 310 can perform the steps of the sleep apnea detection method in the method embodiment shown in the above Figure 1 . The specific implementation can be referred to the method embodiment, which will not be described here.
[0125] The embodiments of the present application also provide a computer readable storage medium, which stores a computer program. When the computer program is run by a processor, the computer program can execute the sleep apnea detection method in the method embodiment shown in the above Figure 1The steps of the sleep apnea detection method in the method embodiment are specifically implemented as described in the method embodiment, and will not be described here again.
[0126] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the system, device and unit described above can refer to the corresponding processes in the foregoing method embodiments, and will not be described here again.
[0127] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other manners. The described device embodiments are merely schematic, for example, the division of the units is merely a logical function division, and there can be another division manner in actual implementation, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections can be indirect couplings or communication connections through some communication interfaces, devices or units, and can be electrical, mechanical or other forms.
[0128] The units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, that is, can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0129] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit.
[0130] If the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a nonvolatile computer readable storage medium executable by a processor. Based on this understanding, the technical solutions of the present application essentially or the parts of the prior art that make contributions or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and various storage medium that can store program codes.
[0131] Finally, it should be noted that the above-described embodiments are merely specific embodiments of the present application, which are used to illustrate the technical solutions of the present application, but not to limit the same. The protection scope of the present application is not limited thereto. Although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those skilled in the art that any skilled person in the art can still modify or easily think of changes to the technical solutions recorded in the foregoing embodiments, or make equivalent replacements to some of the technical features, within the technical scope disclosed by the present application. The modifications, changes or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for detecting sleep apnea, characterized in that, include: Physiological signals in each channel are extracted from the polysomnography within the detection period, and the detection period is divided according to a preset time to obtain multiple time segments; Each physiological signal is identified by a signal identifier, and each physiological signal is divided according to the signal identifier to determine a first signal type and a second signal type. The physiological signals corresponding to the first signal type include electroencephalogram (EEG) signals, electrooculogram (EOG) signals, and electromyogram (EMG) signals. The physiological signals corresponding to the second signal type include electrocardiogram (ECG) signals and respiratory signals. For each time segment, the physiological signal corresponding to the first signal type of that time segment is input into the first sleep apnea detection model to obtain a first set. Each first element in the first set corresponds one-to-one with the detection result of each time segment. The detection result of each time segment is used to characterize the detection results of all physiological signals corresponding to the first signal type of that time segment. The first sleep apnea detection model includes a multi-head attention module, multiple first CNN sequences and a residual network. The first layer of each first CNN sequence has a different inflation rate parameter. For each time segment, the physiological signal corresponding to the second signal type of that time segment is input into the second sleep apnea detection model to obtain a second set. Each second element in the second set corresponds one-to-one with the detection result of each time segment. The detection result of each time segment is used to characterize the detection results of all physiological signals corresponding to the second signal type of that time segment. The second sleep apnea detection model includes a second CNN sequence, an attention mechanism sequence, a second data splicing module, and a second result determination module. The ECG signal and respiratory signal are processed by the second CNN sequence and the attention mechanism sequence to extract the frequency domain and time domain features of the signal, respectively. The two features are combined and spliced before processing. After passing through two fully connected layers, the second set is output. Based on the first set and the second set, the proportion of patients identified as having sleep apnea is determined, specifically including: inputting the first set and the second set into a third sleep apnea detection model, performing decision fusion, and determining the third set. Each third element in the third set corresponds one-to-one with the detection result of each time segment. The third element includes a fifth detection parameter and a sixth detection parameter. The fifth detection parameter is used to characterize the proportion of sleep apnea present in the time segment, and the sixth detection parameter is used to characterize the proportion of sleep apnea absent in the time segment. For the third set, the number of third elements in the third set that characterize the presence of sleep apnea in the time segment is determined. Based on the number of test subjects, the proportion of those identified as sleep apnea patients within the polysomnography corresponding to the testing period is determined for doctors' reference.
2. The method according to claim 1, characterized in that, in, For each time segment, the physiological signal corresponding to the first signal type of that time segment is input into the first sleep apnea detection model to obtain a first set, including: For each time segment, the EEG, EOS, and EMG signals of that time segment are input into the first sleep apnea detection model, and a corresponding first element is output. Each first element includes a first detection parameter and a second detection parameter. The first detection parameter is used to characterize the proportion of sleep apnea present in the EEG, EOS, and EMG signals of that time segment, and the second detection parameter is used to characterize the proportion of sleep apnea absent in the EEG, EOS, and EMG signals of that time segment. The first set is determined based on the first element of all time segments.
3. The method according to claim 2, characterized in that, in, For each time segment, the physiological signal corresponding to the second signal type of that time segment is input into the second sleep apnea detection model to obtain a second set, including: For each time segment, the ECG and respiratory signals of that time segment are input into the second sleep apnea detection model, and a corresponding second element is output. Each second element includes a third detection parameter and a fourth detection parameter. The third detection parameter is used to characterize the proportion of sleep apnea present in the ECG and respiratory signals of that time segment, and the fourth detection parameter is used to characterize the proportion of sleep apnea absent in the ECG and respiratory signals of that time segment. The second set is determined based on the second element of all time segments.
4. The method according to claim 2, characterized in that, The first sleep apnea detection model includes a multi-head attention module, multiple first CNN sequences, a first data splicing module, a residual network, and a first result determination module. The multi-head attention module receives EEG, EEG, and EMG signals for each time segment as input, and outputs an attention index. Each first CNN sequence receives the attention index as input, and each first CNN sequence receives features and receptive fields corresponding to a dilation rate. The first data stitching module receives features and receptive fields corresponding to a dilation rate for each first CNN sequence as input, and outputs a first intermediate layer signal. The residual network receives the first intermediate layer signal as input, and outputs a second intermediate layer signal. The first result determination module receives the second intermediate layer signal as input, and outputs a first set of detection results for physiological signals characterizing the first signal type of the time segment.
5. The method according to claim 3, characterized in that, The input to the second CNN sequence is the ECG and respiratory signals for each time segment, and the output of the second CNN sequence is a time-domain signal. The input to the attention mechanism sequence is the ECG and respiratory signals for each time segment, and the output of the attention mechanism sequence is a frequency-domain signal. The input to the second data stitching module is the time-domain signal and the frequency-domain signal, and the output of the second data stitching module is the third intermediate layer signal. The output of the second result determination module is a second set of detection results of physiological signals characterizing the second signal type of the time segment.
6. A sleep apnea detection device, characterized in that, include: The extraction module is used to extract physiological signals in each channel from the polysomnography within the detection period, and divide the detection period according to a preset time to obtain multiple time segments; The determination module is used to determine the signal identifier corresponding to each physiological signal, and classify each physiological signal according to the signal identifier to determine a first signal type and a second signal type. The physiological signals corresponding to the first signal type include electroencephalogram (EEG) signals, electrooculogram (EOG) signals, and electromyogram (EMG) signals. The physiological signals corresponding to the second signal type include electrocardiogram (ECG) signals and respiratory signals. The first set acquisition module is used to input the physiological signal corresponding to the first signal type of each time segment into the first sleep apnea detection model to obtain the first set. Each first element in the first set corresponds one-to-one with the detection result of each time segment. The detection result of each time segment is used to characterize the detection results of all physiological signals corresponding to the first signal type of the time segment. The first sleep apnea detection model includes a multi-head attention module, multiple first CNN sequences and a residual network. The first layer of each first CNN sequence has a different inflation rate parameter. The second set acquisition module is used to input the physiological signals corresponding to the second signal type of each time segment into the second sleep apnea detection model to obtain the second set. Each second element in the second set corresponds one-to-one with the detection result of each time segment. The detection result of each time segment is used to characterize the detection results of all physiological signals corresponding to the second signal type of that time segment. The second sleep apnea detection model includes a second CNN sequence, an attention mechanism sequence, a second data splicing module, and a second result determination module. The ECG signal and respiratory signal are processed by the second CNN sequence and the attention mechanism sequence to extract the frequency domain and time domain features of the signal, respectively. The two features are combined and spliced before processing. After passing through two fully connected layers, the second set is output. The proportion determination module is used to identify the proportion of patients with sleep apnea based on the first set and the second set. Specifically, it includes: inputting the first set and the second set into a third sleep apnea detection model, performing decision fusion, and determining the third set. Each third element in the third set corresponds one-to-one with the detection result of each time segment. The third element includes a fifth detection parameter and a sixth detection parameter. The fifth detection parameter is used to characterize the proportion of sleep apnea present in the time segment, and the sixth detection parameter is used to characterize the proportion of sleep apnea absent in the time segment. For the third set, the number of third elements in the third set that characterize the presence of sleep apnea in the time segment is determined. Based on the number of test subjects, the proportion of those identified as sleep apnea patients within the polysomnography corresponding to the testing period is determined for doctors' reference.
7. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is in operation, the processor communicates with the memory via the bus, and the processor executes the machine-readable instructions to perform the steps of the method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Apnea event screening model training method and device and computer equipment
CN114424934A
Sleep state detection method and electronic equipment
CN115336968A