A sleep apnea syndrome detection method based on multi-level feature fusion
By extracting time-frequency domain features and correlation features of sleep breathing signals using TF-Res2Net modules and hybrid attention modules, the problem of insufficient feature extraction capability in existing methods is solved, and more efficient sleep apnea syndrome detection is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SOUTH CHINA UNIV OF TECH
- Filing Date
- 2023-04-04
- Publication Date
- 2026-05-12
AI Technical Summary
Existing methods for detecting sleep apnea syndrome fail to effectively utilize the frequency domain characteristics of respiratory signals and the dependencies between different respiratory signals, resulting in limited detection effectiveness.
The TF-Res2Net module is used to extract the time-frequency domain features of the respiratory signals. The hybrid attention module is combined to obtain the correlation and cross features of different respiratory signals. The feature fusion is performed through the adaptive fusion module, and the final detection result is output.
It improved the detection results of sleep apnea syndrome, reduced detection costs, and enhanced the model's generalization ability and detection efficiency.
Smart Images

Figure CN116584891B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of sleep monitoring, and more specifically to a method for detecting sleep apnea syndrome based on multi-level feature fusion. Background Technology
[0002] Sleep apnea syndrome (SAS) is one of the most common sleep-related breathing disorders, characterized by periodic reductions (hypopnea) or cessation of airflow (apnea) during sleep. Currently, approximately 10% of middle-aged people worldwide are diagnosed with SAS, and the incidence rate is increasing annually. Polysomnography (PSG) is the gold standard for diagnosing SAS; however, due to its high cost, the need for long-term patient monitoring, cumbersome data recording, and difficulties in interpretation, many potential patients do not seek professional treatment or receive timely diagnosis, leading to potential threats of complications such as daytime sleepiness, cardiovascular disease, and cognitive impairment. Therefore, SAS detection is of great significance for protecting human health and preventing related complications.
[0003] To improve patient convenience and reduce costs, existing studies have used various physiological signals to replace PSG in diagnosing SAS. Among these, respiratory signals are the most directly related to dynamic changes in respiration. Current SAS detection methods based on respiratory signals are divided into traditional machine learning analysis methods and deep neural network model analysis methods. Traditional machine learning analysis methods rely on extensive manually defined feature engineering. Deep neural network models can automatically extract signal features, but existing deep neural network models are mainly based on convolutional neural networks and recurrent neural networks. They extract spatial features in the time domain through convolutional neural networks and temporal features in the time domain through recurrent neural networks, failing to effectively utilize the frequency domain features of respiratory signals and struggling to capture the frequency domain features of respiratory signals and the dependencies between different respiratory signals. This limits the detection effectiveness of sleep apnea syndrome to some extent, as illustrated below:
[0004] After simply concatenating different respiratory signals, the input is used to detect sleep apnea syndrome using a model containing six convolutional layers, three max-pooling layers, and one fully connected layer (R. Haidar, S. McCloskey, I. Koprinska and B. Jeffries, "Convolutional Neural Networks on Multiple Respiratory Channels to Detect Hypopnea and Obstructive Apnea Events," 2018 International Joint Conference on Neural Networks (IJCNN), Rio de Janeiro, Brazil, 2018, pp. 1-7, doi:10.1109 / IJCNN.2018.8489248.). The drawback of this method is that it only extracts the temporal features of the respiratory signals and does not consider the relationships between different respiratory signals, thus having significant limitations. Summary of the Invention
[0005] The purpose of this invention is to provide a method for detecting sleep apnea syndrome based on multi-level feature fusion, mainly addressing the problems of insufficient feature extraction capability and limited detection effect of existing methods. This invention can effectively extract the time-frequency domain features of different respiratory signals and the potential dependencies between different respiratory signals, assisting in the detection of sleep apnea syndrome and improving the detection effect of sleep apnea syndrome.
[0006] The present invention is achieved by at least one of the following technical solutions.
[0007] A method for detecting sleep apnea syndrome based on multi-level feature fusion includes the following steps:
[0008] S1. Acquire different respiratory signal data of the human body to be detected and preprocess them to obtain preprocessed data;
[0009] S2. Input the preprocessed data into the TF-Res2Net module to obtain the spatial features of the respiratory signal at different scales in the time and frequency domain;
[0010] S3. Input the time-frequency domain features of the respiratory signal into the Mixed-Attn-Block module to obtain the correlation features within different respiratory signals and the cross features between different respiratory signals;
[0011] S4. Connect the correlation features within different respiratory signals and the cross features between different respiratory signals, input them into the adaptive fusion module, pass through a fully connected layer with the activation function Softmax, and output the detection results of sleep apnea syndrome.
[0012] Furthermore, in step S1, the different respiratory signals of the human body include chest wall movement signals, i.e., the first respiratory signal; abdominal movement signals, i.e., the second respiratory signal; and oral and nasal breathing airflow, i.e., the third respiratory signal.
[0013] Further, in step S1, the data preprocessing step includes:
[0014] Different respiratory signals in the human body are standardized using z-score;
[0015] The standardized human respiratory signals are uniformly divided into non-overlapping segments with a length of 10 seconds or more;
[0016] The above respiratory signal segments are categorized into sleep apnea types. If a segment contains a hypopnea event, obstructive sleep apnea event, or central sleep apnea event lasting more than 10 seconds, it is categorized as hypopnea, obstructive sleep apnea, or central sleep apnea, respectively; otherwise, the segment is categorized as normal.
[0017] Furthermore, the TF-Res2Net module includes a time-domain branch and a frequency-domain branch, with the frequency-domain branch serving as the residual of the time-domain branch, as detailed below:
[0018] If the first respiratory signal segment after preprocessing is S, then:
[0019] S=(p1,p2,…,p i ,…,p w )
[0020] Where, p i is the value corresponding to time point i in the respiratory signal segment, and w is the number of time points in the respiratory signal segment;
[0021] In the time-domain branch, after inputting the first respiratory signal segment S into the one-dimensional convolutional layer, it is divided into scale segments on average. The specific value of scale can be manually set after comprehensively considering factors such as model complexity and model performance, and is denoted as S′=(s1,s2,…,s…). i ,…,s scale S′ represents the first segmented respiratory signal fragment. When i≠1, each feature subset s i After additional convolution operations, the residual is fed into the next feature subset s. i+1 Convolution operation:
[0022]
[0023] Among them, z i For feature subsets s i The output after the above additional convolution operation, Con(·), is a one-dimensional convolution operation; the outputs of all feature subsets are concatenated and input into a one-dimensional convolutional layer as the output Z of the temporal branch. T :
[0024]
[0025] in, For concatenation operations;
[0026] In the frequency domain branch, the first respiratory signal segment S is subjected to a Discrete Fourier Transform (DFT), and the real part is retained, denoted as D. The segmentation, convolution, concatenation, and convolution operations in the time domain branch are repeated to obtain the output Z of the frequency domain branch. F :
[0027] D = DFT(S).Real
[0028] D′=(d1,d2,…,d i ,…,d scale )
[0029]
[0030]
[0031] Where D′ represents the frequency domain segment of the segmented first respiratory signal, d i z′ represents the i-th feature subset in the frequency domain segment of the segmented first respiratory signal. i For the feature subset d in the frequency domain i The output after the additional convolution operation described above;
[0032] The output Z of the time-domain branch T and the output Z of the frequency domain branch F Add them together, input them into the max pooling layer (MaxPool), and obtain the output X of the TF-Res2Net module:
[0033] X = MaxPool(Z) T +Z F ).
[0034] Furthermore, in step S3, the Mixed-Attn-Block attention module includes a single-signal self-attention module and a multi-head cross-attention module between signals, wherein the single-signal self-attention module is implemented by a graph attention network:
[0035] A1. Assume the output of the first respiratory signal segment after passing through the TF-Res2Net module is X. A ={a1,a2,…,a i ,…,a l}, as the input to the single-signal self-attention module, where l is X A The number of time points in the data, a i For X A The vector representation of each time point i;
[0036] A2. Calculate X A The attention weight w of time point j to time point i ij :
[0037]
[0038] Where w T For X A The internally shared weight matrix, ψ(·) is the non-linear activation function, and ⊕ is the concatenation operation;
[0039] A3. Input a to the single-signal self-attention module i Weighted summation is used to obtain the enhanced matrix representation A′ of the internal correlation features of the fused single signal:
[0040]
[0041] A′={a′1,a′2,…,a′ i ,…,a′ l}
[0042] Where A′ is the matrix representation of the first respiratory signal, N i Let a be the neighboring node of time point i, σ be the activation function, and a′ be the neighboring node. i It is the vector representation of time point i after fusing the correlation features between time point i and its neighboring node j;
[0043] A4. Assume that the outputs of the second and third respiratory signals after passing through the TF-Res2Net module are X, respectively. B ={b1,b2,…,b i ,…,b l} and X C ={c1,c2,…,c i ,…,c lRepeat steps A1 to A3 to obtain the matrix representation B′ of the second respiratory signal and the matrix representation C′ of the third respiratory signal.
[0044] Furthermore, the multi-head cross-attention module between signals includes the following operations:
[0045] B1. Calculate the correlation matrix Z between the matrix representation A′ of the first respiratory signal and the matrix representation B′ of the second respiratory signal based on the multi-head cross-attention mechanism. ab :
[0046] Q = A', K = V = B'
[0047]
[0048] h j =Attention(QW j Q ,KW j K VW j V )
[0049]
[0050] Where Q is the matrix representation of the query signal, K is the matrix representation of the relationship between the query signal and the query signal, V is the matrix representation of the query signal, and d k W represents the dimension of the relation matrix K; j Q W j K W j V For different random initialization parameter matrices, h j Let be the j-th single-head cross-attention representation; m is the number of heads in the multi-head cross-attention mechanism;
[0051] B2. Represent the first respiratory signal in matrix form A′ and in relation matrix Z. ab Add the results, perform layer normalization, input them into the fully connected layer, and then perform layer normalization again to obtain the cross signal matrix representation. ab :
[0052] Cross ab =LayerNorm(FC(LayerNorm(A′+Z ab )))
[0053] B3. Exchange the query signal and the query signal, and calculate the correlation matrix Z between the matrix representation B′ of the second respiratory signal and the matrix representation A′ of the first respiratory signal based on the multi-head cross-attention mechanism. ba :
[0054] Q = B', K = V = A'
[0055]
[0056] h j =Attention(QW j Q ,KW j K VW j V )
[0057]
[0058] B4. Represent the second respiratory signal in matrix form B′ and in relation matrix Z. ba Add the results, perform layer normalization, input them into the fully connected layer, and then perform layer normalization again to obtain the cross signal matrix representation of the second and first respiratory signals. ba :
[0059] Cross ba =LayerNorm(FC(LayerNorm(B ′ +Z ba )))
[0060] B5. Repeat steps B1 to B4 multiple times to obtain the cross signal matrix representation of the second and third respiratory signals respectively. bc The cross signal matrix of the third and second respiratory signals represents the cross signal matrix. cb The cross signal matrix of the first and third respiratory signals represents the cross signal matrix. ac The cross signal matrix of the third respiratory signal and the first respiratory signal represents the cross signal matrix. ca .
[0061] Furthermore, in step S4, the adaptive fusion module obtains refined features F for subsequent classification by balancing the information complementarity and information redundancy between features at different levels.
[0062] F1 = W 11 ⊙A ′ +W 12 ⊙Cross ab +W 13 ⊙Cross ba +W 14 ⊙B ′
[0063] F2 = W 21⊙B ′ +W 22 ⊙Cross bc +W 23 ⊙Cross cb +W 24 ⊙C ′
[0064] F3 = W 31 ⊙A ′ +W 32 ⊙Cross ac +W 33 ⊙Cross ca +W 34 ⊙C ′
[0065]
[0066] Among them, W eg Let e be the trainable parameters, e∈{1,2,3}, g∈{1,2,3,4}, and ⊙ be the element-wise dot product.
[0067] Furthermore, in step S4, the sleep apnea syndrome detection results of the respiratory signal segments include normal, hypopnea, obstructive sleep apnea, and central sleep apnea, and the loss function used during training is cross-entropy.
[0068] Compared with existing technologies, the beneficial effects of the present invention are as follows:
[0069] (1) Using chest movement signals, abdominal movement signals and oral and nasal breathing airflow to replace PSG for sleep apnea syndrome detection eliminates the need for experts to manually select features containing domain expertise, reducing detection costs and improving convenience;
[0070] (2) The convolutional neural network is used to extract the temporal and spatial features of the respiratory signal, and Fourier transform is used to extend the signal to the frequency domain for analysis. The respiratory signal features from different angles are integrated to increase the generalization ability of the model.
[0071] (3) The internal connections of respiratory signals are extracted by the self-attention module of a single respiratory signal, and the potential dependencies between different respiratory signals are extracted by the cross-attention module between different respiratory signals. The respiratory signal features at different levels are adaptively fused, and the complementarity between multi-level features is utilized to improve the detection efficiency of sleep apnea syndrome. Attached Figure Description
[0072] Figure 1 This is a flowchart illustrating a sleep apnea syndrome detection method based on multi-level feature fusion, as shown in an embodiment of the present invention.
[0073] Figure 2 This is a schematic diagram of the TF-Res2Net module shown in an embodiment of the present invention;
[0074] Figure 3 This is a schematic diagram of a hybrid attention module as shown in an embodiment of the present invention. Detailed Implementation
[0075] The present invention will be further described in detail below with reference to the embodiments and accompanying drawings, but the embodiments of the present invention are not limited thereto.
[0076] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. The embodiments described below do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.
[0077] like Figure 1 The method for detecting sleep apnea syndrome based on multi-level feature fusion, as shown, includes the following steps:
[0078] S1. Acquire different respiratory signal data of the human body to be detected and preprocess them to obtain preprocessed data;
[0079] The data used in this embodiment comes from 1,000 polysomnography records longer than 6 hours in length from the Multi-Ethnic Study of Atherosclerosis (MESA) dataset, with the respiratory signal sampling frequency at 32 Hz.
[0080] The different respiratory signals of the human body include chest wall movement signals, i.e., the first respiratory signal; abdominal movement signals, i.e., the second respiratory signal; and airflow through the mouth and nose, i.e., the third respiratory signal.
[0081] In one embodiment, the data preprocessing step includes:
[0082] The different respiratory signals of the human body were standardized using z-score.
[0083] The standardized human respiratory signals were divided into non-overlapping segments of 30 seconds each.
[0084] The above respiratory signal segments are categorized into sleep apnea types. If a segment contains a hypopnea event, obstructive sleep apnea event, or central sleep apnea event lasting more than 10 seconds, it is categorized as hypopnea, obstructive sleep apnea, or central sleep apnea, respectively; otherwise, the segment is categorized as normal.
[0085] S2. Input the preprocessed data into the TF-Res2Net module to obtain the spatial features of the respiratory signal at different scales in the time-frequency domain;
[0086] The TF-Res2Net module is as follows Figure 2 As shown, it includes a time-domain branch and a frequency-domain branch, with the frequency-domain branch serving as the residual of the time-domain branch:
[0087] Assuming the preprocessed first respiratory signal segment is S, then:
[0088] S=(p1,p2,…,p i ,…,p 30 )
[0089] Where, p i It is the value corresponding to time point i in the respiratory signal segment;
[0090] In one embodiment, in the time-domain branch, after the above-mentioned respiratory signal segment S is input into a one-dimensional convolutional layer, it is divided into four parts on average, denoted as S′=(s1,s2,s3,s4), where S′ represents the first respiratory segment after segmentation, and each feature subset s i (i≠1) After the additional convolution operation, the residual is entered into the next feature subset s. i+1 Convolution operation:
[0091]
[0092] In one embodiment, z i For feature subsets s i The output after the above additional convolution operation, Con(·), is a one-dimensional convolution operation with a kernel size of 1*3; the outputs of all feature subsets are concatenated and input into a one-dimensional convolutional layer as the output Z of the temporal branch. T :
[0093]
[0094] in, This is a concatenation operation.
[0095] In the frequency domain branch, the respiratory signal segment S is subjected to a Discrete Fourier Transform (DFT), and the real part is retained, denoted as D. The segmentation, convolution, concatenation, and convolution operations of step S2 are repeated to obtain the output Z of the frequency domain branch. F :
[0096] D = DFT(S).Real
[0097] D′=(d1,d2,d3,d4)
[0098]
[0099]
[0100] Where D′ represents the frequency domain segment of the segmented first respiratory signal, d i z′ represents the i-th feature subset in the frequency domain segment of the segmented first respiratory signal. i For the feature subset d in the frequency domain i The output after the additional convolution operation described above;
[0101] The output Z of the above time-domain branch T and the output Z of the frequency domain branch F Adding the results, after inputting a max-pooling layer with a pooling size of 3 and a stride of 3, the output X of the above TF-Res2Net module is obtained:
[0102] X = MaxPool(Z) T +Z F )
[0103] S3. Input the time-frequency domain characteristics of the respiratory signal as follows: Figure 3 The Mixed Attention Block shown is used to obtain the correlation features within different respiratory signals and the cross features between different respiratory signals;
[0104] The Mixed-Attn-Block attention module includes a multi-head self-attention module for single signals and a multi-head cross-attention module between signals, wherein the self-attention module for single signals is implemented by a graph attention network.
[0105] A1. Assume the output of the first respiratory signal segment after passing through the above TF-Res2Net module is X. A ={a1,a2,…,a i ,…,a l}, as the input to the single-signal self-attention module, where l is X A The number of time points in the data, a i For X A The vector representation of each time point i;
[0106] A2. Calculate X A The attention weight w of time point j to time point i ij :
[0107]
[0108] Where w T For X AThe internally shared weight matrix, LeakyReLU is a non-linear activation function, and ⊕ is the concatenation operation;
[0109] A3. Input a to the above single-signal self-attention module i Weighted summation is used to obtain the enhanced matrix representation A′ of the internal correlation features of the fused single signal:
[0110]
[0111] A′={a′1,a′2,…,a′ l}
[0112] Where A′ is the matrix representation of the first respiratory signal, N i Let a be the neighboring node of time point i, σ be the activation function, and a′ be the neighboring node. i It is the vector representation of time point i after fusing the correlation features between time point i and its neighboring nodes j; in this embodiment, since the assessment criteria for sleep apnea syndrome use 10 seconds as the dividing line, the neighboring nodes N of time point i are set. i The number is 10:
[0113]
[0114] A4. Assume that the outputs of the second and third respiratory signals after passing through the TF-Res2Net module are X, respectively. B ={b1,b2,…,b i ,…,b l} and X C ={c1,c2,…,c i ,…,c l Repeat steps A1 to A3 to obtain the matrix representation B′ of the second respiratory signal and the matrix representation C′ of the third respiratory signal;
[0115] The multi-head cross-attention module between signals includes the following operations:
[0116] B1. Calculate the correlation matrix Z between the matrix representation A′ of the first respiratory signal and the matrix representation B′ of the second respiratory signal based on the multi-head cross-attention mechanism. ab :
[0117] Q = A', K = V = B'
[0118]
[0119] h j =Attention(QW j Q ,KW j KVW j V )
[0120]
[0121] Where Q is the matrix representation of the query signal, K is the matrix representation of the relationship between the query signal and the query signal, V is the matrix representation of the query signal, and d k W represents the dimension of the relation matrix K; j Q W j K W j V For different random initialization parameter matrices, h j Let be the j-th single-head cross-attention representation; m is the number of heads in the multi-head cross-attention mechanism; in one embodiment, m = 8;
[0122] B2. Represent the matrix A′ and correlation matrix Z of the first respiratory signal mentioned above. ab Add the results, perform layer normalization, input them into the fully connected layer, and then perform layer normalization again to obtain the cross signal matrix representation. ab :
[0123] Cross ab =LayerNorm(FC(LayerNorm(A′+Z ab )))
[0124] B3. Exchange the query signal and the queried signal, and calculate the matrix representation of the second respiratory signal based on the multi-head cross-attention mechanism. ′ The matrix representation of the first respiratory signal A ′ The correlation matrix Z ba :
[0125] Q = B ′ K = V = A ′
[0126]
[0127] h j =Attention(QW j Q ,KW j K VW j V )
[0128]
[0129] B4. Represent the above second respiratory signal in matrix form. ′ and the correlation matrix Zba Add the signals, perform layer normalization, input them into a fully connected layer, and then perform layer normalization again to obtain the cross signal matrix representation of the second and first respiratory signals. ba :
[0130] Cross ba =LayerNorm(FC(LayerNorm(B ′ +Z ba )))
[0131] B5. Repeat steps B1 to B4 multiple times to obtain the cross signal matrix representations of the second and third respiratory signals, respectively. bc The cross signal matrix of the third and second respiratory signals represents the cross signal. cb The cross signal matrix representing the first and third respiratory signals represents the cross signal. ac The cross signal matrix representing the third and first respiratory signals represents the cross signal. ca ;
[0132] S4. Connect the correlation features within different respiratory signals and the cross features between different respiratory signals, input them into the adaptive fusion module, pass through a fully connected layer with the activation function Softmax, and output the detection results of sleep apnea syndrome.
[0133] The adaptive fusion module obtains refined features F for subsequent classification by balancing the information complementarity and redundancy between features at different levels.
[0134] F1 = W 11 ⊙A ′ +W 12 ⊙Cross ab +W 13 ⊙Cross ba +W 14 ⊙B ′
[0135] F2 = W 21 ⊙B ′ +W 22 ⊙Cross bc +W 23 ⊙Cross cb +W 24 ⊙C ′
[0136] F3 = W 31 ⊙A ′ +W 32 ⊙Cross ac +W 33 ⊙Crossca +W 34 ⊙C ′
[0137]
[0138] Among them W eg The parameters are trainable, e∈{1,2,3}, g∈{1,2,3,4}, and ⊙ represents the element-wise product.
[0139] The sleep apnea syndrome detection results of the respiratory signal segments include normal, hypopnea, obstructive sleep apnea, and central sleep apnea. The loss function used during training is cross-entropy.
[0140] In one embodiment, a five-fold cross-validation method is used to evaluate the model, with a training set to validation set ratio of 4:1, which includes 1,085,692 normal breathing segments, 122,503 hypopnea segments, 31,252 obstructive sleep apnea segments, and 2,876 central sleep apnea segments.
[0141] To verify the effectiveness of this invention, the sleep apnea syndrome detection method proposed in this invention is compared with the following sleep apnea syndrome detection methods:
[0142] (1) The CNN detection method proposed by Rim Haidar et al. [“Convolutional Neural Networks on Multiple Respiratory Channels to Detect Hypopnea and Obstructive ApneaEvents. (International Joint Conference on Neural Networks, 2018: 1-7)”]
[0143] (2) The MLF2N detection method proposed by Xingfeng Lv et al. [“A Multi-level FeaturesFusion Network for Detecting Obstructive Sleep Apnea Hypopnea Syndrome.(ICA3PP(3),2020:509-519)]
[0144] Detection performance was evaluated using precision, recall, and F1 score. F1 is a comprehensive evaluation index of model performance; a value closer to 1 indicates better performance of the sleep apnea syndrome detection method. After five-fold cross-validation, the mean and standard deviation of the model detection results are shown in Tables 1, 2, 3, and 4.
[0145] Table 1. Performance (%) of normal breathing events detection on the MESA dataset.
[0146] Model Accuracy Recall rate F1 score CNN 93.4±0.2 97.0±0.3 95.2±0.1 MLF2N 94.4±0.0 96.7±0.1 95.5±0.1 Method of the present invention 94.6±0.2 96.6±0.1 95.7±0.0
[0147] Table 2. Detection performance (%) of hypoventilation events on the MESA dataset.
[0148]
[0149]
[0150] Table 3. Performance (%) of obstructive sleep apnea event detection results on the MESA dataset.
[0151] Model Accuracy Recall rate F1 score CNN 73.7±1.7 62.6±2.4 67.6±0.9 MLF2N 74.5±0.7 68.7±1.3 71.5±0.5 Method of the present invention 73.7±0.7 70.6±1.5 72.2±0.7
[0152] Table 4. Performance (%) of central sleep apnea event detection results on the MESA dataset.
[0153] Model Accuracy Recall rate F1 score CNN 62.4±4.5 18.0±5.1 27.3±5.7 MLF2N 63.1±3.0 30.6±3.3 41.1±3.1 Method of the present invention 52.5±9.2 41.5±13.3 43.6±5.8
[0154] As shown in Tables 1-4, the F1 score of the method of the present invention is higher than that of the existing methods for detecting different categories of sleep apnea events, indicating that the overall performance of the method of the present invention is optimal.
[0155] The embodiments of the present invention have been shown and described above. It is to be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can easily conceive of various equivalent modifications or substitutions within the scope of the technology disclosed in the present invention, and such modifications or substitutions should all be covered within the protection scope of the present invention.
Claims
1. A method for detecting sleep apnea syndrome based on multi-level feature fusion, characterized in that, Includes the following steps: S1. Acquire different respiratory signal data of the human body to be detected and preprocess them to obtain preprocessed data; The data preprocessing steps include: Different respiratory signals in the human body are standardized using z-score; The standardized human respiratory signals are uniformly divided into non-overlapping segments with a length of 10 seconds or more; The respiratory signal segments were categorized into sleep apnea types. If a segment contained a hypopnea event, obstructive sleep apnea event, or central sleep apnea event lasting more than 10 seconds, it was categorized as hypopnea, obstructive sleep apnea, or central sleep apnea, respectively. Otherwise, the segment was categorized as normal. S2. Input the preprocessed data into the TF-Res2Net module to obtain the spatial features of the respiratory signal at different scales in the time and frequency domains; the TF-Res2Net module includes a time domain branch and a frequency domain branch, with the frequency domain branch serving as the residual of the time domain branch; the preprocessed first respiratory signal segment is... Then we have: in, It is a time point in the respiratory signal segment. The corresponding value, It refers to the number of time points in a respiratory signal segment; In the time domain branch, the first respiratory signal segment After inputting into a one-dimensional convolutional layer, it is divided into equal parts. A portion, recorded as , This represents the first segment of the respiratory signal after segmentation. At that time, each feature subset After additional convolution operations, the residual is fed into the next feature subset. Convolution operation: in, For feature subset The output after the above additional convolution operation, This is a one-dimensional convolution operation; the outputs of all feature subsets are concatenated and input into a one-dimensional convolutional layer as the output of the temporal branch. : in, For concatenation operations; In the frequency domain branch, the first respiratory signal segment Perform a Discrete Fourier Transform (DFT), retain the real part, and denot it as . Repeat the split, convolution, concatenation, and convolution operations in the time-domain branch to obtain the output of the frequency-domain branch. : in, This represents the frequency domain segment of the segmented first respiratory signal. This represents the first frequency domain segment of the segmented first respiratory signal. A feature subset, Feature subset in the frequency domain The output after the additional convolution operation described above; the output of the temporal branch. and the output of the frequency domain branch The inputs are summed, and the output of the TF-Res2Net module is obtained after inputting into the max pooling layer (MaxPool). : ; S3. Input the time-frequency domain features of the respiratory signal into the Mixed-Attn-Block attention module to obtain the correlation features within different respiratory signals and the cross features between different respiratory signals. The Mixed-Attn-Block attention module includes a self-attention module for a single signal and a multi-head cross attention module between signals. The self-attention module for a single signal is implemented by a graph attention network. A1. Assume the output of the first respiratory signal segment after passing through the TF-Res2Net module is... , as the input to the single-signal self-attention module, where yes The number of time points in the data. for Each time point Vector representation of; A2. Calculation Mid-time point For time points Attention weights : in for Internally shared weight matrix It is a non-linear activation function. For concatenation operations; A3. Input to a single-signal self-attention module Weighted summation to obtain the enhanced matrix representation of the internal correlation features of fused single signals. : in, This is a matrix representation of the first respiratory signal. For time points The neighboring nodes, For activation function, It is the time point of integration. Its neighboring nodes Time points after correlation features Vector representation of; A4. Assume that the outputs of the second and third respiratory signals after passing through the TF-Res2Net module are respectively... and Repeat steps A1 to A3 to obtain the matrix representation of the second respiratory signal. Matrix representation of the third respiratory signal The multi-head cross-attention module between signals includes the following operations: B1. Calculate the matrix representation of the first respiratory signal based on the multi-head cross-attention mechanism. Matrix representation of the second respiratory signal Correlation matrix : in, To query the matrix representation of the signal, The relationship between the query signal and the query signal is represented by a matrix. The matrix representation of the queried signal. Relationship matrix The dimension; For different random initialization parameter matrices, For the first A single-headed cross-attention representation; It refers to the number of heads in a multi-head cross-attention mechanism; B2. Represent the first respiratory signal in a matrix. and the correlation matrix Add the results, perform layer normalization, input them into the fully connected layer, and then perform layer normalization again to obtain the cross signal matrix representation. : B3. Exchange the query signal and the query signal, and calculate the matrix representation of the second respiratory signal based on the multi-head cross-attention mechanism. Matrix representation of the first respiratory signal Correlation matrix : B4. Represent the second respiratory signal in a matrix. and the correlation matrix The signals are added together, layer normalized, input into a fully connected layer, and then layer normalized again to obtain the cross-signal matrix representation of the second and first respiratory signals. : B5. Repeat steps B1 to B4 multiple times to obtain the cross-signal matrix representations of the second and third respiratory signals, respectively. The cross-signal matrix representation of the third and second respiratory signals. The cross-signal matrix representation of the first and third respiratory signals The cross-signal matrix representation of the third and first respiratory signals. ; S4. Connect the correlation features within different respiratory signals and the cross features between different respiratory signals, input them into the adaptive fusion module, pass through a fully connected layer with the activation function Softmax, and output the detection results of sleep apnea syndrome.
2. The method for detecting sleep apnea syndrome based on multi-level feature fusion according to claim 1, characterized in that, In step S1, the different respiratory signals of the human body include chest wall movement signals, i.e., the first respiratory signal; abdominal movement signals, i.e., the second respiratory signal; and oral and nasal breathing airflow, i.e., the third respiratory signal.
3. In the sleep apnea syndrome detection method based on multi-level feature fusion according to claim 1, in step S4, the adaptive fusion module obtains refined features F for subsequent classification by balancing the information complementarity and information redundancy between features at different levels. in, For trainable parameters, , Dot product of elements.
4. The method for detecting sleep apnea syndrome based on multi-level feature fusion according to claim 1, characterized in that, In step S4, the sleep apnea syndrome detection results of the breathing signal segments include normal, hypopnea, obstructive sleep apnea, and central sleep apnea. The loss function used during training is cross-entropy.