A sleep apnea detection method based on a double-scale convolutional neural network

By using a dual-scale convolutional neural network-based method, the problems of discomfort, professional errors, and pulse oxygen saturation delay in existing sleep apnea detection are solved, enabling portable, low-cost, and accurate sleep apnea detection that is suitable for use on devices equipped with pulse oxygen saturation sensors.

CN116763253BActive Publication Date: 2026-05-05SOUTH CHINA NORMAL UNIV +2
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SOUTH CHINA NORMAL UNIV
Filing Date
2023-05-23
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Existing sleep apnea detection methods suffer from problems such as needing to be monitored in unfamiliar environments, strong equipment discomfort, high cost, large professional errors, inability to be widely adopted, and inaccurate detection, especially failing to effectively address the delayed problem of decreased pulse oxygen saturation.

Method used

A dual-scale convolutional neural network-based approach is employed, which involves data cleaning, data slicing, data equalization, and feature extraction. This approach utilizes dual-scale convolutional neural networks to extract and classify features from sleep breathing data, including a combination of short-scale and long-scale convolutional neural networks. This approach aims to alleviate the delay in pulse oxygen saturation decline and improve detection accuracy.

Benefits of technology

It enables efficient and accurate detection of sleep apnea on portable devices, reduces the influence of motion artifacts, solves the data imbalance problem, improves the accuracy and sensitivity of detection, reduces equipment costs and professional skill requirements, and facilitates widespread application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116763253B_ABST
    Figure CN116763253B_ABST
Patent Text Reader

Abstract

This invention discloses a sleep apnea detection method based on a dual-scale convolutional neural network. The method specifically includes: acquiring a raw sleep breathing dataset; preprocessing the dataset to obtain a target segment; extracting features from the target segment using a dual-scale convolutional neural network to obtain a target feature map; and inputting the target feature map into a fully connected classifier for classification to obtain the sleep apnea detection result. This invention collects SpO2 data for detection, is simple to operate, portable, and easy to popularize. By using a dual-scale convolutional neural network, it not only solves the SpO2 latency problem but also improves detection performance, making it widely applicable in the field of physiological information detection technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of physiological information detection technology, and in particular to a method for detecting sleep apnea based on a dual-scale convolutional neural network. Background Technology

[0002] Sleep apnea (SA) refers to the periodic cessation of breathing during sleep. Because of the reduced amount of air inhaled, blood oxygen levels decrease, leading to sleep hypoxemia, which can cause long-term damage to the nervous, circulatory, and respiratory systems. With the increasing prevalence of obesity and aging populations, the incidence of SA is rapidly rising.

[0003] The current method for detecting sleep apnea is mainly polysomnography (PSG), which remains the gold standard for diagnosing SA. This involves using a polysomnometer in a sleep monitoring room to continuously and synchronously collect and record multiple sleep physiological parameters, including electroencephalogram (EEG), electrooculogram (EOG), electromyogram (EMG), electrocardiogram (ECG), nasal and oral airflow, pulse oxygen saturation (SpO2), chest and abdominal respiratory movements, body position, and snoring.

[0004] Existing methods for detecting sleep apnea mainly have the following problems:

[0005] 1. Polysomnography requires patients to stay overnight in the sleep monitoring room, and the unfamiliar environment often induces the first-night effect; polysomnography requires subjects to wear multiple sensors, most of which are located on the head and face, which can cause significant discomfort and affect sleep; all of these factors can lead to inaccurate data.

[0006] 2. Polysomnography is limited by venue, equipment, beds, and manpower, and is also expensive, increasing the economic burden on patients. The process and results require monitoring and analysis by professional medical technicians, which requires a high level of clinical experience and is difficult to popularize in clinical practice. In addition, manual classification and judgment inevitably involve professional and subjective errors.

[0007] 3. Existing portable sleep monitoring devices do not take into account the delayed decline in pulse oxygen saturation, which usually occurs some time after sleep apnea, leading to inaccurate test results. Summary of the Invention

[0008] In view of this, embodiments of the present invention provide a simple and highly accurate sleep apnea detection method based on a dual-scale convolutional neural network.

[0009] On one hand, embodiments of the present invention provide a sleep apnea detection method based on a dual-scale convolutional neural network, comprising:

[0010] Obtain the raw sleep breathing dataset;

[0011] The target fragment is obtained after preprocessing the dataset;

[0012] The target feature map is obtained by extracting features from the target segment using a dual-scale convolutional neural network.

[0013] The target feature map is fed into a fully connected classifier for classification to obtain the sleep apnea detection result.

[0014] Optionally, the step of preprocessing the dataset to obtain the target data includes:

[0015] The dataset is cleaned using the first algorithm;

[0016] The cleaned dataset is sliced ​​to obtain initial fragments;

[0017] The target segment is obtained by performing data balancing on the initial segment using the second algorithm and the first formula.

[0018] Wherein, the first algorithm is a nearest neighbor linear interpolation algorithm; the initial segment includes a first-scale initial segment and a second-scale initial segment; the target segment includes a first-scale target segment and a second-scale target segment; wherein, the first scale is smaller than the second scale.

[0019] Optionally, the step of slicing the cleaned dataset to obtain initial fragments includes:

[0020] The cleaned dataset is divided into 1-minute segments.

[0021] The unit segments are marked to obtain marked segments;

[0022] The marked segment and the data of the next segment adjacent to the marked segment for the first 30 seconds are combined to obtain a first-scale initial segment of 90 seconds in length;

[0023] Using the marked segment as an intermediate segment, obtain the third and fourth segments adjacent to the marked segment, and synthesize the third segment, the marked segment, and the fourth segment to obtain the second-scale initial segment.

[0024] Optionally, the step of obtaining the target fragment by performing data balancing on the target data using the second algorithm and the first formula includes:

[0025] The second algorithm is the Borderline-SMOTE algorithm;

[0026] The expression for the first formula is:

[0027]

[0028] Where, x new For the newly generated sample, x minority For a small sample It is the nearest neighbor of a minority sample, and rand(0,1) represents a random number from 0 to 1.

[0029] Optionally, the step of obtaining a target feature map by extracting features from the target segment using a dual-scale convolutional neural network includes:

[0030] The first-scale target fragment is input into the first feature extraction layer for feature extraction to obtain the first-scale feature map;

[0031] The second-scale target fragment is input into the second feature extraction layer for feature extraction, resulting in a second-scale feature map;

[0032] The target feature map is obtained by concatenating the first-scale feature map and the second-scale feature map.

[0033] Optionally, in the step of inputting the first segment into the first feature extraction layer for feature extraction to obtain the first feature map, the first feature extraction layer has three one-dimensional convolutional layers, namely the first convolutional layer, the second convolutional layer, and the third convolutional layer.

[0034] Convolution processing is performed through a first convolutional layer, which has a kernel size of 30, a number of convolutional channels of 16, and a stride of 1.

[0035] Convolution is performed through a second convolutional layer with a kernel size of 5, a convolutional channel count of 24, and a stride of 2.

[0036] Convolution is performed through a third convolutional layer, which has a kernel size of 1, 32 convolutional channels, and a stride of 1.

[0037] Optionally, in the step of inputting the second segment into the second feature extraction layer for feature extraction to obtain the second feature map, the second feature extraction layer has three one-dimensional convolutional layers, namely the fourth convolutional layer, the fifth convolutional layer, and the sixth convolutional layer.

[0038] Convolution processing is performed through a fourth convolutional layer, which has a kernel size of 30, a number of convolutional channels of 16, and a stride of 1.

[0039] Convolution processing is performed through a fifth convolutional layer, which has a kernel size of 5, a number of convolutional channels of 24, and a stride of 2.

[0040] Convolution is performed through a sixth convolutional layer, which has a kernel size of 1, 32 convolutional channels, and a stride of 3.

[0041] Optionally, in the step of connecting the target feature map to a fully connected classifier for classification to obtain the sleep apnea detection result, the number of classification nodes in the fully connected classifier is 64, 32, and 2.

[0042] On the other hand, embodiments of the present invention also provide a sleep apnea detection device based on a dual-scale convolutional neural network, comprising:

[0043] The acquisition module is used to acquire the raw sleep breathing dataset;

[0044] The preprocessing module is used to preprocess the dataset to obtain the target fragment;

[0045] The feature extraction module is used to extract features from the target segment using a dual-scale convolutional neural network to obtain a target feature map.

[0046] The classification module is used to input the target feature map into a fully connected classifier for classification to obtain the sleep apnea detection result.

[0047] On the other hand, embodiments of the present invention also provide an electronic device, including a processor and a memory;

[0048] The memory is used to store programs;

[0049] The processor executes the program to implement the above-mentioned sleep apnea detection method based on a dual-scale convolutional neural network.

[0050] This invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the aforementioned method.

[0051] The embodiments of the present invention include at least the following beneficial results: the embodiments of the present invention preprocess the collected data, smooth out motion artifacts, and improve the accuracy of the detection results; the embodiments of the present invention also use a dual-scale convolutional neural network to extract features from the data, alleviate the delay problem of pulse oxygen saturation decline, and improve the accuracy of the detection results. Attached Figure Description

[0052] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0053] Figure 1 This is a flowchart of the sleep apnea detection method based on a dual-scale convolutional neural network provided in an embodiment of the present invention;

[0054] Figure 2 This is a schematic diagram of a data slice provided in an embodiment of the present invention;

[0055] Figure 3 This is a flowchart illustrating the steps of the sleep apnea detection method based on a dual-scale convolutional neural network provided in this embodiment of the invention.

[0056] Figure 4 This is a schematic diagram of a sleep apnea detection device based on a dual-scale convolutional neural network provided in an embodiment of the present invention. Detailed Implementation

[0057] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0058] To address the problems existing in the prior art, embodiments of the present invention provide a sleep apnea detection method based on a dual-scale convolutional neural network, such as... Figure 1 As shown, the method includes steps 101 to 104:

[0059] Step 101: Obtain the raw sleep breathing dataset.

[0060] The raw sleep breathing dataset is obtained by wearing a device with a pulse oxygen saturation sensor. The device includes, but is not limited to, wearable devices such as finger-type photoelectric sensors with pulse oxygen saturation sensors, smart bracelets / watches, etc.

[0061] One embodiment of the present invention uses a dataset composed of sleep data from three databases: Sleep Heart Health 2 (SHHS-2), Sleep Apnea ECG Database (ACD), and Sleep Center Database of the First Affiliated Hospital of Sun Yat-sen University (FAH). The SHHS-2 data is divided into a training set, a validation set, and a test set in a 6:2:2 ratio. The entire FAH and ACD databases are used as the test set. The training set contains 1,537 data records, the validation set contains 512 data records, and the test set contains 970 data records.

[0062] Step 102: The target fragment is obtained after preprocessing the dataset.

[0063] The step 102 above, which involves preprocessing the dataset to obtain the target fragment, may specifically include steps 201 to 203.

[0064] Step 201: Clean the dataset using the first algorithm.

[0065] The first algorithm is the nearest neighbor linear interpolation algorithm, which uses the coordinates of the nearest point to the desired point as the coordinates of the desired point. Because the subject's sleep posture constantly changes, the SpO2 (pulse oxygen saturation) sensor may experience poor contact during these changes, leading to motion artifacts contaminating SpO2 performance. These artifacts can cause blood oxygen levels to drop to 0 or become abnormal values. For example, in the ACD (Awake Sleep Diagnosis Database), abnormal blood oxygen values ​​are decimals around 3.1, while normal blood oxygen levels are often above 94, impacting the performance of the SA (Sleep Apnea) detector. Therefore, before further processing, the preprocessing algorithm counts the length of motion artifacts in each SpO2 record. If the motion artifact exceeds 10%, the SpO2 record is rejected. After processing the motion artifacts, the nearest neighbor linear interpolation algorithm is used to smooth them out, and all SpO2 signals are downsampled to 1Hz, completing the data cleaning process.

[0066] Step 202: Slice the cleaned dataset to obtain initial fragments.

[0067] The initial fragment includes a first-scale initial fragment and a second-scale initial fragment, with the first scale being smaller than the second scale.

[0068] Step 202 above, which involves slicing the cleaned dataset to obtain initial fragments, may specifically include steps 301 to 304.

[0069] Step 301: Divide the cleaned dataset into 1-minute segments.

[0070] First, the SpO2 signal is divided into 1-minute segments, referring to... Figure 2 The unit segment part marked in the middle.

[0071] Step 302: Mark the unit segment to obtain the marked segment.

[0072] If a unit segment contains a sleep apnea signal lasting longer than 5 seconds, the unit segment is marked as 1; otherwise, it is marked as 0, resulting in two types of labeled segments. These labeled segments are used in subsequent synthesis of 90-second and 300-second segments, and their labeling information will be reused. For example, if a segment is predicted to be labeled as 0 (normal breathing), but the actual label is 1 (sleep apnea), a discrepancy occurs between the actual and predicted labels. In this case, the loss function value will increase, penalizing the neural network and thus teaching it to predict the correct answer.

[0073] Step 303: Combine the marked segment with the data of the next segment adjacent to the marked segment for the first 30 seconds to obtain a first-scale initial segment of 90 seconds.

[0074] The marked segments are then synthesized into two new types of segments. The marked segments are then combined with the data from the preceding 30 seconds of the next segment adjacent to the marked segment to obtain a 90-second initial segment of the first scale, as referenced. Figure 2 The darker section in the image.

[0075] Step 304: Using the marked segment as an intermediate segment, obtain the third and fourth segments adjacent to the marked segment, and synthesize the third segment, the marked segment, and the fourth segment to obtain the second-scale initial segment.

[0076] Using a 1-minute marked segment as the intermediate segment, the two-minute segments preceding and following the marked segment are obtained. These three segments are then synthesized to obtain a 5-minute initial segment for the second scale. (Refer to...) Figure 2 The lighter-colored section in the image.

[0077] Step 203: Perform data balancing on the initial segment using the second algorithm and the first formula to obtain the target segment.

[0078] The initial segments include the first-scale initial segments and the second-scale initial segments.

[0079] The second algorithm is the Borderline-SMOTE algorithm, which uses only minority class samples on the boundary to synthesize new samples, thereby improving the class distribution of the samples.

[0080] The expression for the first formula is:

[0081]

[0082] Where, x new For the newly generated sample, x minority For a small sample It is the nearest neighbor of a minority sample, and rand(0,1) represents a random number from 0 to 1.

[0083] Data imbalance is common in collected data. For example, in the Sleep Heart Health 2 database, segments containing sleep apnea signals account for only about 25% of the total length, indicating a 3:1 ratio of normal to diseased samples. This can significantly impact the sensitivity of neural networks. Therefore, this embodiment of the invention first randomly selects K neighbors of a minority sample, and then uses the Borderline-SMOTE algorithm to examine the surrounding environment of the minority sample. If the minority sample is surrounded by both minority and majority samples, a new sample is generated using the first formula. This approach addresses data imbalance, enhances the boundary characteristics of the minority sample, and alleviates overfitting during neural network training.

[0084] The initial fragment is processed through data balancing to obtain the target fragment, which includes a first-scale target fragment and a second-scale target fragment.

[0085] Step 103: After extracting features from the target segment using a dual-scale convolutional neural network, a target feature map is obtained.

[0086] The step 103 above, which extracts features from the target segment using a dual-scale convolutional neural network to obtain the target feature map, may specifically include steps 301 to 303.

[0087] Step 301: Input the first scale target fragment into the first feature extraction layer for feature extraction to obtain the first scale feature map.

[0088] The first feature extraction layer comprises three one-dimensional convolutional layers: a first convolutional layer, a second convolutional layer, and a third convolutional layer. Convolution is performed through the first convolutional layer, which has a kernel size of 30, 16 convolutional channels, and a stride of 1. Convolution is performed through the second convolutional layer, which has a kernel size of 5, 24 convolutional channels, and a stride of 2. Convolution is performed through the third convolutional layer, which has a kernel size of 1, 32 convolutional channels, and a stride of 1.

[0089] Historical statistical data reveals that a decrease in pulse oxygen saturation (POS) typically occurs 5 seconds after sleep apnea begins, and this decrease often lasts for more than 20 seconds. For example, data from the Sleep Heart Health 2 database shows that the average POS decrease occurs 5.3 seconds after sleep apnea begins, with an average duration of 22.8 seconds. Therefore, extending the 1-minute marker segment by 30 seconds can effectively encompass any POS decrease caused by sleep apnea at any point within the segment. Thus, the first-scale target segment, a short-scale target segment of 90 seconds, can effectively alleviate the problem of delayed POS decrease.

[0090] Step 302: Input the second-scale target fragment into the second feature extraction layer for feature extraction to obtain the second-scale feature map.

[0091] The second feature extraction layer has three one-dimensional convolutional layers: the fourth, fifth, and sixth convolutional layers. Convolution is performed through the fourth convolutional layer, which has a kernel size of 30, 16 channels, and a stride of 1. Convolution is performed through the fifth convolutional layer, which has a kernel size of 5, 24 channels, and a stride of 2. Convolution is performed through the sixth convolutional layer, which has a kernel size of 1, 32 channels, and a stride of 3. Compared to the first feature extraction layer, the second feature extraction layer also includes a max-pooling layer.

[0092] Historical statistical data reveals that a person's breathing state, whether during sleep apnea or normal breathing, remains constant for a certain period, rather than alternating between sleep apnea and normal breathing in a short period. For example, in the sleep apnea ECG database, 88.38% of 5-minute long segments belong to the same category, meaning that 5 consecutive minutes consist of either sleep apnea or normal breathing. This phenomenon is called the quasi-periodicity of sleep apnea. This means that a 90-second segment cannot provide sufficient information to detect sleep apnea; information from adjacent segments can also provide evidence of sleep apnea and improve detection performance. Therefore, the second-scale target segment, i.e., the 5-minute long-scale segment, can better utilize information from adjacent segments to improve the detection performance of sleep apnea.

[0093] Step 303: The first scale feature map and the second scale feature map are stitched together to obtain the target feature map.

[0094] The first-scale feature map and the second-scale feature map are obtained from steps 301 and 302. Then, the two feature maps are stitched together to obtain a target feature map.

[0095] Step 104: Connect the target feature map to a fully connected classifier for classification to obtain the sleep apnea detection result.

[0096] The number of classification nodes in the fully connected classifier is 64, 32, and 2; the classification cross-entropy is used as the loss function, and ADAM with a learning rate of 1e-4 is used as the optimizer.

[0097] The target feature map is fed into a fully connected classifier to obtain segments of normal breathing and segments of sleep apnea in the dataset, thus completing the detection of sleep apnea and obtaining the detection results.

[0098] The above-mentioned sleep apnea detection method based on dual-scale convolutional neural networks is verified through the following experiments.

[0099] The pulse oxygen saturation (SpO2) data from the Sleep Heart Health 2 database (SHHS-2), the Sleep Apnea ECG database (ACD), and the Sleep Center Database of the First Affiliated Hospital of Sun Yat-sen University (FAH) were used as input datasets. The above methods were used for detection, and the detection results are shown in Table 1.

[0100] data Acc(%) Se(%) Sp(%) F1(%) SHHS-2 85.97 71.29 90.77 81.08 ACD 81.72 92.48 74.25 81.65 FAH 90.25 95.33 86.59 90.81

[0101] Table 1

[0102] In Table 1, Acc represents accuracy, Se represents sensitivity, Sp represents specificity, and the F1 score is calculated from accuracy (Prec) and sensitivity (Sens) using the following formula:

[0103]

[0104] As shown in Table 1, the sleep apnea detection method based on dual-scale convolutional neural networks proposed in this invention achieved accuracies of 85.97%, 81.72%, and 90.25% on SHHS-2, ACD, and FAH, and F1 scores of 81.08%, 81.65%, and 90.14%, respectively.

[0105] To verify the effectiveness of the method proposed in this invention, a series of ablation experiments (controlled variable method) were conducted, and the proposed model variant is as follows:

[0106] Variant A: A standard one-dimensional convolutional network, used for training and testing by taking the target fragment as input.

[0107] Variant B: A regular one-dimensional convolutional network that is trained and tested by taking an extended target segment as input; that is, a short-scale convolutional neural network.

[0108] Variant C: Based on variant B, a long-scale convolutional neural network is added, which is the dual-scale convolutional neural network proposed in this invention.

[0109] The results of the ablation experiment are shown in Table 2:

[0110]

[0111]

[0112] Table 2

[0113] A comparison between variant A and variant B shows that the extended target segment does indeed alleviate the SpO2 delay problem, helping the model to better learn the characteristics of SpO2 fluctuations caused by sleep apnea (SA). On the three datasets, variant B shows performance improvements of 1.66%, 1.1%, and 5.62% in accuracy and 0.75%, 1.35%, and 4.82% in F1 score, respectively. This means that the SpO2 delay phenomenon cannot be ignored in the SA detection algorithm at minute-level resolution, and that our proposed short-scale convolutional neural network can indeed alleviate the SpO2 delay phenomenon.

[0114] A comparison of variants B and C shows that long-scale convolutional neural networks can fully utilize information from neighboring segments and help the model learn more representations related to SA. On the three datasets, variant C demonstrates performance improvements of 13.47%, 0.17%, and 3.66% in sensitivity and 3.38%, 25.62%, and 0.67% in F1 scores. Overall, the ablation experiments demonstrate that the proposed method can indeed detect SA more effectively.

[0115] Reference Figure 3 The following describes the process of an application scenario of the above method:

[0116] 1. Obtain the raw sleep breathing dataset. Users enter sleep using a wearable device equipped with an SpO2 (pulse oxygen saturation) sensor, and the device collects the user's SpO2 data during sleep to form a dataset.

[0117] 2. The target segments are obtained after preprocessing the dataset. First, the dataset is cleaned; then, the cleaned data is sliced ​​into 1-minute segments; then, the 1-minute segments are combined into 90-second short-scale segments and 5-minute long-scale segments; finally, the data segments are balanced to obtain the target segments, namely the first-scale target segment and the second-scale target segment.

[0118] 3. After extracting features from the target segment using a dual-scale convolutional neural network, a target feature map is obtained. The first-scale target segment is processed through a first feature extraction layer to obtain a first feature map, and the second-scale target segment is processed through a second feature extraction layer to obtain a second feature map. The two feature maps are then concatenated to obtain the target feature map.

[0119] 4. The target feature map is fed into a fully connected classifier for classification to obtain the sleep apnea detection result.

[0120] In summary, the adaptive learning-based trajectory tracking control method for autonomous vehicles according to the embodiments of the present invention has the following advantages:

[0121] 1. The embodiments of the present invention can smooth out motion artifacts through data cleaning; the Borderline-SMOTE algorithm and calculation can solve the data imbalance problem and alleviate overfitting.

[0122] 2. The embodiments of the present invention employ a dual-scale convolutional neural network. The short-scale convolutional neural network can effectively alleviate the problem of delayed occurrence of decreased pulse oxygen saturation; the long-scale convolutional neural network can better utilize the information of adjacent segments to improve the detection performance of sleep apnea.

[0123] 3. SpO2 signal is closely related to respiratory status and is one of the recommended signals for interpreting respiratory events. This invention only requires SpO2 data, so it can be deployed on any device with an SpO2 sensor. It is simple to operate and highly compatible. Compared with polysomnography (PSG), the SpO2 sensor is cheaper, more portable, and not limited by location or time. It can be used simply by wearing it without causing significant discomfort to the user. No professional skills are required to use it, making it easy to popularize and apply. Moreover, it uses a dual-scale convolutional neural network, which reduces subjective errors compared to manual classification.

[0124] Reference Figure 4 This invention also provides a sleep apnea detection device based on a dual-scale convolutional neural network, comprising:

[0125] Module 401 is used to acquire the raw sleep breathing dataset;

[0126] Preprocessing module 402 is used to preprocess the dataset to obtain the target fragment;

[0127] Feature extraction module 403 is used to extract features from the target segment using a dual-scale convolutional neural network to obtain a target feature map;

[0128] The classification module 404 is used to input the target feature map into a fully connected classifier for classification to obtain the sleep apnea detection result.

[0129] This invention also provides an electronic device capable of detecting sleep apnea using a dual-scale convolutional neural network: acquiring a raw sleep breathing dataset; preprocessing the dataset to obtain target segments; extracting features from the target segments using a dual-scale convolutional neural network to obtain a target feature map; and connecting the target feature map to a fully connected classifier for classification to obtain sleep apnea detection results. This invention cleanses and smooths out motion artifacts; short-scale convolutional neural networks effectively alleviate the delay in the occurrence of decreased pulse oxygen saturation; long-scale convolutional neural networks better utilize information from adjacent segments to improve sleep apnea detection performance; and this invention only requires SpO2 data, thus it can be deployed on any device with an SpO2 sensor, is simple to operate, and highly compatible. Compared to polysomnography (PSG), SpO2 sensors are cheaper, more portable, and not limited by location or time. They can be easily worn for detection without causing significant discomfort to the user, and no professional skills are required, facilitating widespread application. Furthermore, the use of a dual-scale convolutional neural network reduces subjective errors compared to manual classification.

[0130] This invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform... Figure 1 The method shown.

[0131] In some alternative embodiments, the functions / operations mentioned in the block diagrams may not occur in the order shown in the operation diagrams. For example, depending on the functions / operations involved, two consecutively shown blocks may actually be executed substantially simultaneously, or the blocks may sometimes be executed in reverse order. Furthermore, the embodiments presented and described in the flowcharts of this invention are provided by way of example to provide a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is altered and sub-operations described as part of a larger operation are executed independently.

[0132] Furthermore, although the invention has been described in the context of functional modules, it should be understood that, unless otherwise stated, one or more of the described functions and / or features may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the invention. Rather, given the properties, functions, and internal relationships of the various functional modules in the apparatus disclosed herein, the actual implementation of the module will be understood within the scope of conventional skill of an engineer. Therefore, those skilled in the art can implement the invention as set forth in the claims using ordinary techniques without excessive experimentation. It is also understood that the specific concepts disclosed are merely illustrative and not intended to limit the scope of the invention, which is determined by the full scope of the appended claims and their equivalents.

[0133] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0134] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.

[0135] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.

[0136] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0137] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," 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 the invention. 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.

[0138] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

[0139] The above is a detailed description of the preferred embodiments of the present invention, but the present invention is not limited to the embodiments described. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention, and these equivalent modifications or substitutions are all included within the scope defined by the claims of this application.

Claims

1. A method for detecting sleep apnea based on a dual-scale convolutional neural network, characterized in that, include: The raw sleep breathing dataset is obtained by acquiring pulse oxygen saturation data through a device with a pulse oxygen saturation sensor. The target fragment is obtained after preprocessing the dataset, including: The dataset is cleaned using the first algorithm; The data-cleaned dataset is sliced ​​to obtain initial segments, including: dividing the cleaned dataset into 1-minute unit segments; marking the unit segments to obtain marked segments; merging the marked segments with the data of the first 30 seconds of the next segment adjacent to the marked segments to obtain a 90-second first-scale initial segment; using the marked segments as intermediate segments, obtaining the third and fourth segments adjacent to the marked segments, and merging the third segment, the marked segments, and the fourth segments to obtain a second-scale initial segment; The target segment is obtained by performing data balancing on the initial segment using the second algorithm and the first formula. The first algorithm is a nearest neighbor linear interpolation algorithm; the initial segment includes a first-scale initial segment and a second-scale initial segment; the target segment includes a first-scale target segment and a second-scale target segment; wherein the first scale is smaller than the second scale. The target feature map is obtained by extracting features from the target segment using a dual-scale convolutional neural network. The target feature map is fed into a fully connected classifier for classification to obtain the sleep apnea detection result.

2. The sleep apnea detection method based on a dual-scale convolutional neural network according to claim 1, characterized in that, The step of obtaining the target segment by performing data balancing on the initial segment using the second algorithm and the first formula includes: The second algorithm is the Borderline-SMOTE algorithm; The expression for the first formula is: in, For the newly generated samples, For a small sample It is the nearest neighbor of a minority of samples. This represents a random number between 0 and 1.

3. The sleep apnea detection method based on a dual-scale convolutional neural network according to claim 2, characterized in that, The step of extracting features from the target segment using a dual-scale convolutional neural network to obtain the target feature map includes: The first-scale target fragment is input into the first feature extraction layer for feature extraction to obtain the first-scale feature map; The second-scale target fragment is input into the second feature extraction layer for feature extraction, resulting in a second-scale feature map; The target feature map is obtained by concatenating the first-scale feature map and the second-scale feature map.

4. The sleep apnea detection method based on a dual-scale convolutional neural network according to claim 3, characterized in that, In the step of inputting the first-scale target fragment into the first feature extraction layer for feature extraction to obtain the first-scale feature map, the first feature extraction layer has three one-dimensional convolutional layers, namely the first convolutional layer, the second convolutional layer, and the third convolutional layer. Convolution processing is performed through a first convolutional layer, which has a kernel size of 30, a number of convolutional channels of 16, and a stride of 1. Convolution is performed through a second convolutional layer with a kernel size of 5, a convolutional channel count of 24, and a stride of 2. Convolution is performed through a third convolutional layer, which has a kernel size of 1, 32 convolutional channels, and a stride of 1.

5. The sleep apnea detection method based on a dual-scale convolutional neural network according to claim 3, characterized in that, In the step of inputting the second-scale target fragment into the second feature extraction layer for feature extraction to obtain the second-scale feature map, the second feature extraction layer has three one-dimensional convolutional layers, namely the fourth convolutional layer, the fifth convolutional layer, and the sixth convolutional layer. Convolution processing is performed through a fourth convolutional layer, which has a kernel size of 30, a number of convolutional channels of 16, and a stride of 1. Convolution processing is performed through a fifth convolutional layer, which has a kernel size of 5, a number of convolutional channels of 24, and a stride of 2. Convolution is performed through a sixth convolutional layer, which has a kernel size of 1, 32 convolutional channels, and a stride of 3.

6. The sleep apnea detection method based on a dual-scale convolutional neural network according to claim 2, characterized in that, In the step of connecting the target feature map to a fully connected classifier for classification to obtain the sleep apnea detection result, the number of classification nodes in the fully connected classifier is 64, 32, and 2.

7. A sleep apnea detection device based on a dual-scale convolutional neural network, characterized in that, include: An acquisition module is used to acquire a dataset of raw sleep breathing data; specifically, the acquisition module is used to: acquire pulse oxygen saturation data to form a dataset of raw sleep breathing data by wearing a device with a pulse oxygen saturation sensor; The preprocessing module is used to preprocess the dataset to obtain the target fragment; The preprocessing module is specifically used for: The dataset is cleaned using the first algorithm; The data-cleaned dataset is sliced ​​to obtain initial segments, including: dividing the cleaned dataset into 1-minute unit segments; marking the unit segments to obtain marked segments; merging the marked segments with the data of the first 30 seconds of the next segment adjacent to the marked segments to obtain a 90-second first-scale initial segment; using the marked segments as intermediate segments, obtaining the third and fourth segments adjacent to the marked segments, and merging the third segment, the marked segments, and the fourth segments to obtain a second-scale initial segment; The target segment is obtained by performing data balancing on the initial segment using the second algorithm and the first formula. The first algorithm is a nearest neighbor linear interpolation algorithm; the initial segment includes a first-scale initial segment and a second-scale initial segment; the target segment includes a first-scale target segment and a second-scale target segment; wherein the first scale is smaller than the second scale. The feature extraction module is used to extract features from the target segment using a dual-scale convolutional neural network to obtain a target feature map. The classification module is used to input the target feature map into a fully connected classifier for classification to obtain the sleep apnea detection result.

8. An electronic device, characterized in that, Including the processor and memory; The memory is used to store programs; The processor executes the program to implement the method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Sleep apnea segment detection method and device based on convolutional neural network

    CN110151138A