Respiratory event identification and classification and model training method thereof

Through the respiratory event recognition and classification model training method, support vector machine and anti-interference filtering technology are used to solve the problem of low efficiency in dyspnea type recognition, and efficient and accurate automatic identification and classification of respiratory events are achieved.

CN120531370APending Publication Date: 2025-08-26SHENZHEN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510619917.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-14
Publication Date
2025-08-26

AI Technical Summary

Technical Problem

The identification and classification of dyspnea types in the prior art is inefficient, making it difficult to achieve efficient and accurate automated analysis.

Method used

The respiratory event recognition and classification model training method is adopted, including collecting respiratory signal waveforms, labeling information, calculating feature vectors, and using the support vector machine (SVM) model for training and classification, combining anti-interference filtering and feature selection algorithm ReliefF, to optimize model parameters and strategies.

Benefits of technology

It improves the recognition and classification efficiency of respiratory events, enhances the generalization adaptability of the model, reduces the probability of misidentification, adapts to the identification and classification of multiple respiratory events, and improves the accuracy of identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120531370A_ABST
    Figure CN120531370A_ABST
Patent Text Reader

Abstract

The invention discloses a respiratory event identification and classification and model training method, which comprises the following steps of: marking a respiratory signal waveform of a collected respiratory event to obtain marking information including a respiratory event type; inputting the respiratory signal waveform, the feature vector and the annotation information of the respiratory event into a respiratory event identification and classification model for training; after training, obtaining a respiratory event identification and classification model or a respiratory event identification and classification feature data set; recognition and classification of respiratory events based on the method comprises the following steps: A1, filtering an original respiratory signal to obtain a digital sequence signal K1; then respiratory event identification is carried out, and respiratory signal segments corresponding to respiratory events are obtained; calculating feature vectors of the respiratory signal segments corresponding to the respiratory events, and inputting the feature vectors into a respiratory event identification and classification model to complete respiratory event identification and classification; or inputting the respiratory signal segments into a respiratory event identification and classification feature data set and a corresponding model to complete respiratory event identification and classification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of physiological signal, especially respiratory signal analysis technology, and specifically relates to a respiratory event recognition and classification method and a model training method thereof. Background Art

[0002] Analyzing abnormal segments in respiratory signals is crucial for early diagnosis, health monitoring, and medical decision-making in respiratory diseases such as sleep apnea (OSA) and chronic obstructive pulmonary disease (COPD). These segments often correspond to dyspnea. However, dyspnea can have various causes, and different abnormal segments in respiratory signals often correspond to different types of dyspnea.

[0003] In the existing technology, the identification and classification of dyspnea types are based on manual analysis, identification and classification by doctors, which is very inefficient.

[0004] How to improve the efficiency and accuracy of identifying and classifying types of dyspnea urgently requires research on more efficient classification and identification methods. Summary of the Invention

[0005] In this application, the inventors propose a respiratory event recognition and classification method and a model training method thereof, which greatly improve the recognition and classification efficiency of respiratory events.

[0006] The technical solution to the technical problem solved in the present application is a method for training a respiratory event recognition and classification model, including step B1: collecting the respiratory signal waveform of the respiratory event; step B5: labeling the respiratory signal waveform of the respiratory event to obtain labeling information; the labeling information includes the type of respiratory event; step B6: calculating the feature vector of the respiratory signal waveform of the respiratory event; step B7: inputting the respiratory signal waveform, feature vector and labeling information of the respiratory event into the respiratory event recognition and classification model for training; step B8: obtaining the respiratory event recognition and classification model or the respiratory event recognition and classification feature data set after training.

[0007] It may include step B2: filtering the respiratory signal waveform of the respiratory event; identifying and labeling occasional large noise signals; the respiratory signal waveform of the respiratory event is a time segment of the respiratory signal; the respiratory event type includes any one or more of apnea events and hypopnea events; the occasional large noise signal identification and the respiratory signal waveform, feature vector and annotation information of the respiratory event are jointly input into the respiratory event recognition and classification model for training.

[0008] The eigenvalues ​​of the eigenvector may include any one or more of: standard deviation, approximate entropy, sample entropy, permutation entropy, Shannon entropy, fluctuation index, energy entropy, low-frequency / high-frequency energy ratio, multi-scale sample entropy, fractal dimension, recursion rate, and Hurst exponent;

[0009] It can be that ReliefF is used to select the eigenvalues ​​of the eigenvector, and the top 10 eigenvalues ​​are selected; the respiratory signal waveform of the respiratory event, the top 10 selected eigenvectors and annotation information are input into the respiratory event recognition and classification model for training, and after training, the respiratory event recognition and classification model or the respiratory event recognition and classification feature dataset is obtained.

[0010] It may be that the respiratory event recognition and classification model is an SVM classification model; and further includes a verification step B9: dividing the respiratory signal waveform, feature vector and annotation information of the respiratory event according to the case, and inputting them into the support vector machine (SVM) model for five-fold cross-validation training to obtain the predicted recognition and classification results, performing a performance evaluation on the respiratory event recognition and classification model based on the predicted recognition and classification results, and optimizing the model parameters and classification strategy of the respiratory event recognition and classification model based on the evaluation results.

[0011] The technical solution to the technical problem solved in the present application can also be a method for respiratory event recognition and classification, based on the respiratory event recognition and classification model or respiratory event recognition and classification feature data set obtained by the above method, including step A1: filtering the original respiratory signal to obtain a digital sequence signal K1; step A3: performing respiratory event recognition on the digital sequence signal K1 to obtain a respiratory signal segment corresponding to the respiratory event; step A4: calculating a feature vector for the respiratory signal segment corresponding to the respiratory event; step A5: inputting the respiratory signal segment and the feature vector into the respiratory event recognition and classification model to complete respiratory event recognition and classification; or inputting the respiratory signal segment into the respiratory event recognition and classification feature data set and the corresponding model to complete respiratory event recognition and classification.

[0012] The respiratory event type may include any one or more of an apnea event and a hypopnea event; step A2 is also included between step A1 and step A3; step A2: the digital sequence signal K1 corresponding to the original respiratory signal is normalized, and peaks and troughs are extracted to obtain a maximum sequence signal MX and a minimum sequence signal MN; in step A3, respiratory events are identified based on the maximum sequence signal MX and the minimum sequence signal MN.

[0013] It may be, including step A4: the eigenvalues ​​of the eigenvector include: any one or more of standard deviation, approximate entropy, sample entropy, permutation entropy, Shannon entropy, fluctuation index, energy entropy, low-frequency / high-frequency energy ratio, multi-scale sample entropy, fractal dimension, recursion rate and Hurst exponent; step A4: including step A41: using ReliefF to select the eigenvalues ​​of the eigenvector, and selecting the top 10 eigenvalues.

[0014] It may be, including, step A3 also includes any one or more of step A32 or step A33; step A32: based on the maximum sequence signal MX and the minimum sequence signal MN, detecting the time interval between two consecutive peaks; the time interval is greater than the set threshold, judging that the area between the pair of peaks is an abnormal breathing event; step A33: based on the maximum sequence signal MX and the minimum sequence signal MN, the current peak amplitude decreases by more than the set threshold value compared with the left peak amplitude, and the time interval from the current peak point where the decrease begins to the right peak point returning to the normal level is greater than 15 seconds, then it is judged as an abnormal breathing event.

[0015] It may also include step A33: judging respiratory events based on oxygen depletion events; before each oxygen depletion event begins, judging whether there is a respiratory event within a time window of a set length; if there is a respiratory event within the time window of the set length, confirming the respiratory event.

[0016] It may be that step A1 also includes the step of identifying and labeling occasional large noise signals; the respiratory event recognition and classification model is an SVM classification model; and also includes a verification step A9: dividing the respiratory signal waveform, feature vector and labeling information of the respiratory event according to the case, and inputting them into the support vector machine (SVM) model for five-fold cross-validation training to obtain the predicted recognition and classification results, performing a performance evaluation on the respiratory event recognition and classification model based on the predicted recognition and classification results, and optimizing the model parameters and classification strategy of the respiratory event recognition and classification model based on the evaluation results.

[0017] One of the technical effects of the above technical solution is that the respiratory event recognition and classification model or the respiratory event recognition and classification feature data set provides conditions and basis for the machine to automatically recognize respiratory events, greatly improving the efficiency of respiratory event recognition and allowing the machine to complete manual recognition.

[0018] One of the technical effects of the above technical solution is that the respiratory signal waveform, feature vector and annotation information of the respiratory event are input into the respiratory event recognition and classification model for training; the addition of the feature vector makes the model training more efficient and enhances the model's generalization and adaptability.

[0019] One of the technical effects of the above technical solution is: filtering the respiratory signal waveform of respiratory events; identifying and marking occasional large noise signals, and adding them during training, thereby increasing the model's adaptability to occasional large noise signals. In the presence of occasional large noise signals, respiratory events can be accurately identified, reducing the probability of misidentification.

[0020] One of the technical effects of the above technical solution is that: the eigenvalues ​​of the eigenvector include multiple types, and screening is performed among the multiple types, which improves the pertinence of the eigenvalues ​​and enhances the focus recognition ability of the model.

[0021] One of the technical effects of the above technical solution is: to evaluate the performance of the respiratory event recognition and classification model based on the predicted recognition and classification results, optimize the model parameters and classification strategy of the respiratory event recognition and classification model based on the evaluation results, and perform iterative optimization of the model to improve the evolution efficiency of the model.

[0022] One of the technical effects of the above technical solution is that respiratory event recognition and classification is performed based on a respiratory event recognition and classification model or a respiratory event recognition and classification feature data set, thereby greatly improving recognition efficiency.

[0023] One of the technical effects of the above technical solution is that the respiratory event type includes any one or more of apnea events and hypopnea events, has good adaptability, and can simultaneously identify multiple respiratory events.

[0024] One of the technical effects of the above technical solution is: respiratory event recognition is performed based on the maximum value sequence signal MX and the minimum value sequence signal MN, thereby improving the recognition accuracy.

[0025] One of the technical effects of the above technical solution is that the recognition of abnormal breathing events is based on multiple rounds of calculations, which improves the accuracy of abnormal breathing event recognition and reduces the probability of false positives.

[0026] One of the technical effects of the above technical solution is that respiratory events are judged based on oxygen depletion events, which further improves the accuracy of abnormal respiratory event recognition and reduces the probability of false positives.

[0027] One of the technical effects of the above technical solution is that the steps of identifying and labeling occasional large noise signals further improve the accuracy of identifying abnormal respiratory events and reduce the probability of false positives.

[0028] One of the technical effects of the above technical solution is that: during identification and classification, the model performance can be evaluated, and the model parameters and classification strategy of the model can be optimized according to the evaluation results, which facilitates iterative updates. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 It is a flowchart of the respiratory event recognition and classification model training method;

[0030] Figure 2 It is a flowchart of the respiratory event recognition and classification model training method;

[0031] Figure 3 It is a flowchart of the respiratory event recognition and classification model training method;

[0032] Figure 4 It is a schematic diagram of the classification of respiratory events;

[0033] Figure 5 It is a flowchart of the respiratory event identification and classification method;

[0034] Figure 6 It is a flowchart of the respiratory event identification and classification method;

[0035] Figure 7 It is a partial flowchart of the respiratory event identification and classification method;

[0036] Figure 8 It is a schematic diagram of the peaks and valleys in a detection window before and after processing;

[0037] Figure 9 It is a schematic diagram of the peaks and troughs detected in a respiratory waveform signal;

[0038] Figure 10 It is a partial flowchart of the respiratory event identification and classification method;

[0039] Figure 11 It is a partial flowchart of the respiratory event identification and classification method;

[0040] Figure 12 It is a schematic diagram comparing the evaluation parameters of respiratory event recognition and classification model training methods;

[0041] Figure 13 It is a flowchart of the respiratory event identification and classification method;

[0042] Figure 14 This is a schematic diagram of a respiratory waveform signal before and after filtering;

[0043] Figure 15 This is a schematic diagram of a respiratory waveform signal with occasional large noise signals;

[0044] Figure 16 This is a schematic diagram of another respiratory waveform signal with occasional large noise signals. DETAILED DESCRIPTION

[0045] The contents of this application are further described in detail below in conjunction with the accompanying drawings. It should be noted that the following is a description of the preferred embodiments of the present invention and does not constitute any limitation to the present invention. The description of the preferred embodiments of the present invention is only an illustration of the general principles of the present invention. The numbers such as "first", "second" and "A" and "B" involved in the present invention are only for the convenience of explanation and do not represent the order relationship in time or space. The combination of letters and numbers "TA", "TB" and "H" involved in the present invention are only for the convenience of explanation, and the specific meaning is determined by the specific words referred to.

[0046] With the continuous development of respiratory monitoring technology, portable devices have become an effective tool for real-time monitoring of respiratory signals, especially in the diagnosis of diseases such as sleep apnea (OSA). However, the quality of respiratory signals can be affected by factors such as environmental noise, electrical interference, and equipment problems, which leads to a decrease in signal accuracy and reliability. In addition, traditional respiratory abnormality recognition methods mostly rely on manual labeling and fixed classification models, which suffer from problems such as inaccurate feature extraction and poor model adaptability, making it difficult to handle large-scale and diverse respiratory data.

[0047] Existing technologies use machine learning-based methods and systems to analyze respiratory signals, but their shortcomings are mainly reflected in the following aspects: noise interference causes signal baseline drift, or excessive filtering processing causes signal deformation; threshold method peak detection error problem; feature dimension explosion leads to model overfitting; and poor cross-case generalization ability.

[0048] In response to the problems of weak anti-interference ability, high feature extraction redundancy, and poor generalization of classification models in existing respiratory event recognition algorithms, the present invention proposes a respiratory abnormality recognition and classification algorithm based on multi-level signal processing and feature optimization, which is particularly suitable for the early diagnosis, health monitoring and medical decision-making assistance of respiratory diseases such as sleep apnea syndrome (OSA) and chronic obstructive pulmonary disease (COPD).

[0049] like Figure 1 A respiratory event recognition and classification model training method includes step B1: collecting respiratory signal waveforms of respiratory events; step B5: annotating the respiratory signal waveforms of the respiratory events to obtain annotation information; the annotation information includes the respiratory event type; step B6: calculating a feature vector for the respiratory signal waveform of the respiratory event; step B7: inputting the respiratory signal waveform, feature vector and annotation information of the respiratory event into a respiratory event recognition and classification model for training; step B8: obtaining a respiratory event recognition and classification model or a respiratory event recognition and classification feature dataset after training.

[0050] like Figure 2A respiratory event recognition and classification model training method further includes step B2: filtering the respiratory signal waveform of the respiratory event. Step B2 only needs to be before step B6.

[0051] like Figure 14 , the respiratory signal waveform of a respiratory event is a time segment of a respiratory signal. Figure 4 The respiratory event type includes any one or more of an apnea event and a hypopnea event.

[0052] In an embodiment, a method for training a respiratory event recognition and classification model includes calculating a feature vector for a respiratory signal waveform of a respiratory event; the feature vector's eigenvalues ​​include any one or more of standard deviation, approximate entropy, sample entropy, permutation entropy, Shannon entropy, fluctuation index, energy entropy, low-frequency / high-frequency energy ratio, multi-scale sample entropy, fractal dimension, recursion rate, and Hurst exponent; the feature vector and annotation information are input into a respiratory event recognition and classification model, and after training, a respiratory event recognition and classification model or a respiratory event recognition and classification feature dataset is obtained. ReliefF is used to select eigenvalues ​​of the feature vector, and the top 10 eigenvalues ​​are selected.

[0053] In some embodiments, the respiratory event recognition and classification model is an SVM classification model. The characteristic parameters of the respiratory abnormality event extraction algorithm and the SVM training and classification algorithm include 15 parameters: standard deviation, approximate entropy, sample entropy, permutation entropy, Shannon entropy, fluctuation index, energy entropy, low-frequency / high-frequency energy ratio, multi-scale sample entropy, fractal dimension, recursion rate, and Hurst exponent. The feature selection algorithm, ReliefF, extracts the top ten key features based on the characteristic parameters of the respiratory abnormality event extraction algorithm and the SVM training and classification algorithm.

[0054] In the respiratory event recognition and classification method of this application, an adaptive anti-interference filtering algorithm is designed; a correction strategy is introduced to dynamically adjust peaks and troughs; and the ReliefF algorithm is used to screen the top 10 key features.

[0055] The adaptive anti-interference filtering algorithm specifically addresses respiratory signal waveform distortion in complex environmental noise. A correction strategy dynamically adjusts peaks and troughs to address the high false positive rate of traditional threshold methods in peak and trough detection. The ReliefF algorithm, which effectively selects the top 10 key features based on multi-dimensional features, improves the generalization capability of the classification model.

[0056] like Figure 3In an embodiment of a respiratory event recognition and classification model training method, a verification step B9 is also included: dividing the respiratory signal waveform, feature vector and annotation information of the respiratory event according to the case, and inputting them into a support vector machine (SVM) model for five-fold cross-validation training to obtain a prediction recognition and classification result, performing a performance evaluation on the respiratory event recognition and classification model based on the prediction recognition and classification result, and optimizing the model parameters and classification strategy of the respiratory event recognition and classification model based on the evaluation result. In the SVM classification model training and evaluation, the feature vectors and labels (1: apnea, 2: hypopnea) in the database are divided according to the case, and inputted into the support vector machine (SVM) model for five-fold cross-validation training to obtain a prediction result. By evaluating the performance of the prediction result, the optimal model parameters and classification strategy are selected.

[0057] The respiratory event recognition and classification model training method in this application is a machine learning prediction and classification method. First, according to the respiratory event labels provided by the physician, apnea event fragments (label = 1) and respiratory hypopnea event fragments (label = 2) are extracted; the feature vectors of the extracted fragments are calculated. The eigenvalues ​​include: standard deviation, approximate entropy, sample entropy, permutation entropy, Shannon entropy, fluctuation index, energy entropy, low-frequency / high-frequency energy ratio, multi-scale sample entropy, fractal dimension, recursion rate and Hurst index. ReliefF is used for feature selection to select the top 10 important eigenvalues. The eigenvectors and labels (1: apnea, 2: hypopnea) in the database are divided according to the cases and input into the support vector machine (SVM) model for five-fold cross-validation training to obtain the prediction results. The optimal model parameters and classification strategy are selected by evaluating the performance of the prediction results.

[0058] like Figure 12 The result data of the five-fold cross-validation training is shown, where K is the number of eigenvalues. Figure 12 The figure shows three sets of data, each using 16 and 32.51 training cases, respectively. The figure shows an average accuracy of over 85%.

[0059] like Figure 5 In an embodiment of a respiratory event recognition and classification method, the method includes step A1: filtering an original respiratory signal to obtain a digital sequence signal K1; step A3: performing respiratory event recognition on the digital sequence signal K1 to obtain a respiratory signal segment corresponding to the respiratory event; step A4: calculating a feature vector for the respiratory signal segment corresponding to the respiratory event; step A5: inputting the respiratory signal segment and the feature vector into a respiratory event recognition and classification model to complete respiratory event recognition and classification; or inputting the respiratory signal segment into a respiratory event recognition and classification feature dataset and a corresponding model to complete respiratory event recognition and classification.

[0060] like Figure 6 In an embodiment of a respiratory event recognition and classification method, step A2 is further included between step A1 and step A3; in step A2, the digital sequence signal K1 corresponding to the original respiratory signal is normalized and peak and valley extraction is performed to obtain a maximum sequence signal MX and a minimum sequence signal MN; in step A3, respiratory events are recognized based on the maximum sequence signal MX and the minimum sequence signal MN.

[0061] Step A3 also includes any one or more of step A32 or step A33; step A32: based on the maximum sequence signal MX and the minimum sequence signal MN, the time interval between two consecutive peaks is detected; if the time interval is greater than the set threshold, it is judged that the area between the pair of peaks is an abnormal breathing event; step A33: based on the maximum sequence signal MX and the minimum sequence signal MN, if the current peak amplitude decreases by more than the set threshold value compared with the left peak amplitude, and the time interval from the current peak point where the decrease begins to the right peak point returning to the normal level is greater than 15 seconds, it is judged to be an abnormal breathing event.

[0062] like Figure 11 In an embodiment of a respiratory event identification and classification method, step A33 is also included: judging respiratory events based on oxygen depletion events; taking into account the hysteresis problem, judging whether there is a respiratory event in the time window of 60s before the start of each oxygen depletion event. If so, the respiratory event is a correct respiratory event. Blood oxygen verification is performed on the abnormal respiratory events extracted by the algorithm. According to the AASM definition, a decrease in blood oxygen saturation occurs after hypopnea / apnea occurs. Because the decrease in blood oxygen has a hysteresis, the time interval between the oxygen depletion event and the respiratory time is set to 60s, and the set time can be adjusted according to different groups of people. An oxygen depletion event refers to a decrease in blood oxygen saturation value that is greater than a set threshold value, such as a decrease in blood oxygen saturation value of 3 or 4 within a 60-second period.

[0063] Step A1 and step B2 also include the step of identifying occasional large noise signals; that is, performing respiratory abnormality identification, such as Figure 15 and Figure 16 Figure 2 shows some respiratory signals with occasional large noise signals. Identifying and labeling these occasional large noise signals can improve the accuracy of respiratory event recognition and reduce the probability of false positives. Identifying and labeling these occasional large noise signals can be performed manually or by a machine.

[0064] like Figure 13A respiratory event recognition and classification method is presented, using an SVM classification model. The method also includes a validation step A9: dividing the respiratory event signal waveform, feature vector, and annotation information by case, inputting them into a support vector machine (SVM) model for five-fold cross-validation training to obtain predicted recognition and classification results. The performance of the respiratory event recognition and classification model is evaluated based on the predicted recognition and classification results, and the model parameters and classification strategy of the respiratory event recognition and classification model are optimized based on the evaluation results. While the respiratory event recognition and classification method is being performed in real time, the model is also updated and iterated.

[0065] The method of this application combines a multi-step algorithm of anti-interference filtering, feature selection, and support vector machine (SVM) classification to achieve efficient and accurate respiratory event recognition and classification, thereby improving the accuracy of respiratory signal anomaly detection.

[0066] In a specific embodiment, the following steps are included:

[0067] Step A1: Anti-interference filtering of respiratory signal waveform: An anti-interference filtering algorithm is used to remove noise from the respiratory signal and normalize the processed signal to a preset amplitude range to ensure signal stability and accuracy.

[0068] Step A2: Respiratory signal waveform peak and trough correction algorithm: Peaks and troughs are extracted from the normalized signal, and correction factors are introduced to eliminate extreme errors caused by noise or artifacts to ensure that the extracted peaks and troughs accurately reflect the actual respiratory cycle.

[0069] Step A3: Respiratory event identification: Abnormal events such as apnea or hypopnea are identified by monitoring the amplitude drop region of the respiratory signal. Specifically, by detecting the region with significant amplitude change in the signal and combining it with a set threshold, abnormal respiratory events can be accurately determined.

[0070] Step A3 also includes any one or more of step A32 or step A33;

[0071] Step A32: Detecting the time interval between two consecutive peaks based on the maximum value sequence signal MX and the minimum value sequence signal MN; if the time interval is greater than a set threshold, determining that the area between the pair of peaks is a respiratory abnormality event;

[0072] Step A33: Based on the maximum sequence signal MX and the minimum sequence signal MN, if the current peak amplitude drops by more than the set threshold value compared to the left peak amplitude, and the time interval from the current peak point where the decline begins to the right peak point where the normal level is returned is greater than 15 seconds, it is determined to be an abnormal breathing event.

[0073] By monitoring the amplitude drop area and the interval between the peaks in the respiratory signal, it can identify abnormal respiratory events such as apnea or hypopnea. By detecting the area with significant amplitude changes in the signal and combining it with the set threshold, it can accurately determine abnormal respiratory events.

[0074] Step A4: Feature extraction: Extract feature vectors related to respiratory events. These features are used for subsequent model classification and recognition.

[0075] Step A41: ReliefF feature selection: Use the ReliefF algorithm to perform feature selection on the extracted feature vectors, and select the top 10 important features most relevant to abnormal respiratory events to reduce redundant features and improve the classification performance of the model.

[0076] Step A5: Respiratory abnormality classification prediction: The extracted respiratory event features are input into the trained SVM model to perform respiratory event classification and identification to determine whether the respiratory event is apnea or hypopnea.

[0077] In the above method, the breathing signal waveform is filtered by first low-pass filtering the original signal to remove the high-frequency components. Then, the amplitude range of the filtered signal is adjusted to a fixed range through normalization operation to ensure the processing effect of the subsequent algorithm on the signal. Figure 14 , showing the difference between the respiratory waveform before and after filtering.

[0078] Formula: Assume that the original signal is S(t) and the signal after low-pass filtering is S filtered (t), the low-pass filtering operation can be expressed as:

[0079]

[0080] Where h(t) is the impulse response of the low-pass filter and τ is the time variable.

[0081] The normalization operation is to adjust the signal amplitude to a set range such as [0,30] through linear transformation;

[0082]

[0083] like Figures 7 to 9 In the above method, peak and trough extraction, i.e. obtaining the maximum sequence signal MX and the minimum sequence signal MN, adopts a detection method based on local extreme values ​​and eliminates the error peaks caused by noise or artifacts through a correction strategy to ensure the accuracy of the peak and trough sequence.

[0084] The specific steps are as follows: First, by detecting the maximum and minimum values ​​of the normalized respiratory signal, the peak (maximum) and trough (minimum) sequences in the signal are extracted.

[0085] Formula: Let S normalized (t) is the normalized signal sequence, and the peak is found by local extreme value detection. i Valley i , where Peak i is the i-th peak, Valley i is the i-th trough.

[0086] Traverse the trough sequence and determine the amplitude difference between the peak and the adjacent trough.

[0087] After extracting the peak-valley sequence, the peak-valley relationship in the window is detected by traversing each valley. Figure 8 , in each window, it contains the left trough, the middle peak and the right trough. Window definition: Each window contains the current peak and its left and right troughs. Figure 8 In the upper middle graph, peaks with small amplitude differences are removed: If the amplitude difference between a peak and the adjacent trough is small, it means that the peak may be caused by noise or artifacts. In this case, the peak is deleted. After deletion, the value is obtained. Figure 8 Waveform data in the lower middle graph. At the same time, troughs with smaller amplitude differences are also removed.

[0088] Assume that the current trough is Valley i , its left and right adjacent valleys are Valley i-1 and Valley i+1 , the peak in the middle is Peak i , if the following conditions are met: |Peak i -Valley i |<θ, where θ is a set threshold determined by the normalized amplitude range, then the peak is considered an error peak and should be removed. In addition, the corresponding troughs with the smallest amplitude difference on both sides are deleted.

[0089] Peak Correction: After completing the peak and trough removal operations described above, the next step is peak correction. This involves traversing the updated trough sequence and finding the maximum value between each two troughs in the signal segment, which is then used as the peak of that segment.

[0090] Formula: For adjacent Valley i and Valley i+1 , the maximum value in the signal segment between them is:

[0091] Peak i =max[S normalized (t i ),S normalized (t i+1 )], where Snormalized (t i ) represents the original signal moment corresponding to the i-th trough, and max[S(t1),S(t2)] represents the segment from t1 to t2 in the S signal and the maximum value is determined. In this way, the previously removed error peaks can be corrected to ensure that the final peak sequence is consistent with the actual respiratory signal fluctuations. Figure 9 , which is the display of the identified peaks and troughs.

[0092] like Figure 10 Respiratory event recognition: This application extracts continuous abnormal respiratory event segments by analyzing and processing the peak intervals of the respiratory signal. This algorithm uses two rounds of screening to detect the start and end of abnormal events, and determines the event boundaries based on the interval between peaks and the amplitude difference.

[0093] Round 1: Coarse Screening—Find intervals where the intervals between three consecutive peaks are excessively long. Based on the peak-valley extraction algorithm, we can infer that there must be a maximum between every two minima. The goal of this first round of screening is to quickly identify abnormal respiratory events by detecting the intervals between consecutive peaks.

[0094] Operation steps: traverse the peak interval, peak identification: traverse the peak interval, starting from the second peak. Set the current peak as Peak centre , the peak on its left is Peak left , the peak on the right is Peak right ; Time interval judgment: calculate Peak left and Peak right If the time interval is greater than the set threshold (e.g. 20 seconds, converted to the number of sampling points 20×fs, where fs is the sampling rate), the area between the pair of peaks is considered to be a possible respiratory abnormality event. Formula:

[0095] Interval(Peak left ,Peak right )=t(Peak left )-t(Peak right ),like:

[0096] Interval(Peak left ,Peak right )>20*fs, it is determined to be a possible respiratory event.

[0097] Update the event buffer. When the time interval condition is met, record the left and right peak amplitudes and store them in a cache array event_buff. Set the flag bit flag to 1 to indicate that the start and end peaks of the event have been stored. Continue to move down the peaks to find the next peak. Each time, check whether the time interval condition is met.

[0098] Move down the peak and check the condition. If the next peak still meets the time interval condition (i.e. Interval(Peak left ,Peak right )>20*fs), and flag is 1, then update the peak value on the right side stored in event_buff and update the end point of the event; continue to move the peak down until the time interval condition is no longer met.

[0099] End the event and store it. Once the time interval condition is not met and flag = 1, that is, the time difference between the current peak and the previously recorded peak no longer meets the event condition, the start and end peak amplitudes stored in event_buff are transferred to the coarse screening event start array and coarse screening event end array respectively; set flag to zero, and clear the event_buff array to prepare for processing the next event.

[0100] Second Round: Fine Screening—Looking for intervals where the amplitude decreases and the duration meets the requirements. This second round of screening determines whether a valid abnormal event is present based on changes in peak amplitude (decline and return) and the time interval. Unlike the first round of coarse screening, this second round further confirms the start and end of an event by examining changes in amplitude and duration requirements.

[0101] Operation steps: Initial setting, initialize flag to 0, used to identify whether there is previously stored event information. Left_buff is used to cache the peak information when the event starts: the first value stores the index of the peak, and the second value stores the amplitude of the peak; traverse the entire peak interval, starting from the second peak, set the current peak as Peak centre , the amplitude is Peak centreamp , the crest on the right is Peak right , the amplitude is Peak rightamp ;Logical judgment, judgment status, if flag == 1, it means that there is a pre-stored value in left_buff, and it has been judged before: pass the corresponding value of left_buff to Peak left and Peak leftamp If flag == 0, it means there is no pre-stored value in left_buff: Peak left Get the peak index to the left of the current peak.

[0102] Peak leftampGet the peak amplitude to the left of the current peak.

[0103] Determine whether the peak amplitude decreases by reaching a threshold. If the current peak amplitude decreases by more than 2.5 (normalized threshold) compared to the left peak amplitude, and the time interval from the peak point where the decrease begins to the point where the amplitude returns to the normal level (i.e., the peak point where the amplitude difference is less than 2.5) is greater than 15 seconds, it is determined to be an abnormal breathing event.

[0104] like Figure 11 The third round, overlap correction, is shown. This process combines oxygen depletion events with respiratory abnormality event identification. Within the 60-second window before each oxygen depletion event, a determination is made as to whether a respiratory event occurred. If so, the event is considered a correct respiratory event.

[0105] In this application, support vector machine (SVM) is a commonly used machine learning classification algorithm, mainly used for binary classification problems. Its core idea is to find an optimal hyperplane to separate data points of different categories as much as possible. If the data cannot be perfectly separated by a straight line (such as there is overlap or nonlinear distribution), SVM maps the data to a higher dimension through a kernel function (Kernel Trick), so that a linearly separable hyperplane can be found in the high-dimensional space. For example, two-dimensional data may not be separated by a straight line, but a suitable hyperplane can be found in three-dimensional space. Therefore, as long as a suitable mapping is found, low-dimensional linearly inseparable data can be made high-dimensional linearly separable.

[0106] By distributing data points of different categories on both sides of the hyperplane and maximizing the minimum distance between the two categories of data points and the hyperplane (i.e., margin); linearly separable hyperplane: black solid and white solid represent points of different categories; the black solid line is the classification boundary found by SVM; the two dotted lines represent the minimum distance to the hyperplane; the points with borders are support vectors, that is, those sample points closest to the hyperplane, which determine the position of the hyperplane.

[0107] The SVM classification process in this application: Input data: Provide a training data set (x i ,y i ), where x i is a feature, y i is the category label; in this application, it is a binary classification model; select the kernel function to solve the optimal hyperplane: use the Lagrange multiplier method and the SMO (Sequential Minimal Optimization) algorithm to optimize the objective function: So that each data point satisfies: i (ω·x i+b)≥1; get the support vector: only retain the data points that affect the hyperplane, that is, the support vector.

[0108] Classify new data: Substitute the new sample x into the decision function:

[0109] f(x)=sign(ω·x+b)

[0110] If f(x)>0, the classification is 1, otherwise it is 2.

[0111] The Relief feature selection algorithm evaluates feature importance through "nearest neighbor comparison." If a feature has "little difference between samples of the same type, but large difference between samples of different types," it is considered a good feature. It can handle noisy and incomplete data to a certain extent.

[0112] The Relief algorithm, originally proposed, primarily targets binary classification problems. This method employs a "correlation statistic" to measure feature importance. This statistic is a vector whose components represent an evaluation of one of the initial features. The importance of a subset of features is the sum of the correlation statistics corresponding to each feature in the subset. This "correlation statistic" can also be considered the "weight" of each feature. A threshold can be specified, and the feature values ​​corresponding to the correlation statistic greater than the threshold are selected. Alternatively, the desired number of features, k, is specified, and the k features with the largest correlation statistic components are selected.

[0113] In this application, the RelieF feature selection algorithm algorithm process includes: the algorithm randomly selects a sample R from the training set D, and then searches for the nearest neighbor sample H from the same class as R, called NearHit, and searches for the nearest neighbor sample M from the different class from R, called NearMiss, and then updates the weight of each feature according to the following rules: if the distance between R and NearHit on a certain feature is less than the distance between R and NearMiss, it means that the feature is beneficial for distinguishing the nearest neighbors of the same class and different classes, and the weight of the feature is increased; conversely, if the distance between R and NearHit on a certain feature is greater than the distance between R and NearMiss, it means that the feature has a negative effect on distinguishing the nearest neighbors of the same class and different classes, and the weight of the feature is reduced. The above process is repeated m times, and finally the average weight of each feature is obtained. The larger the weight of the feature, the stronger the classification ability of the feature, and vice versa, the weaker the classification ability of the feature. The running time of the Relief algorithm increases linearly with the increase of the number of sample sampling m and the number of original features N, so the running efficiency is very high.

[0114] In this application, the five-fold cross-validation method is used to evaluate the model, which is used to test the performance of the model on unseen data, that is, its generalization ability. Divide the data into 5 parts, and train and test them in turn. Each part is used as a test set, and the remaining 4 parts are used as training sets. Finally, the average of the 5 evaluation results is taken as the final performance. For example, the data set is scored as D1 D2 D3 D4D5; a model is trained in each round, and then the performance is evaluated with the test set. Record the accuracy or other indicators of these 5 times and take the average at the end. Avoid overfitting (in the case of small samples); evaluate model performance more stably; and ensure that the test results are more consistent with the sample distribution.

[0115] In this application, the respiratory abnormality event extraction algorithm is combined with the SVM training and classification algorithm to achieve stronger anti-interference capabilities: using point physiological signals, low-pass filtering, and threshold setting can effectively remove most environmental noise and interference. It also has stronger individual adaptability: through dynamically adjusted thresholds, it can adapt to individual physiological signal differences, improving recognition accuracy. Improved generalization: Based on case classification, the model has stronger performance and is more suitable for application in the field of OSA.

[0116] Although the present invention is illustrated and described based on the preferred embodiment and several alternatives, the invention is not limited by the specific description in this specification. Other additional replacement or equivalent components can also be used to practice the present invention.

Claims

1. A respiratory event recognition and classification model training method, characterized in that: include Step B1: collecting respiratory signal waveforms of respiratory events; Step B5: annotating the respiratory signal waveform of the respiratory event to obtain annotation information; The annotation information includes respiratory event type; Step B6: Calculating a characteristic vector for the respiratory signal waveform of the respiratory event; Step B7: The respiratory signal waveform, feature vector and annotation information of the respiratory event are input into the respiratory event recognition and classification model for training; Step B8: After training, a respiratory event recognition and classification model or a respiratory event recognition and classification feature dataset is obtained.

2. The respiratory event recognition and classification model training method according to claim 1, characterized in that: The method comprises step B2: filtering the respiratory signal waveform of the respiratory event; and identifying and marking occasional large noise signals. The respiratory signal waveform of a respiratory event is a time segment of a respiratory signal; Respiratory event types include any one or more of apnea events and hypopnea events; The occasional large noise signal identifier and the respiratory signal waveform, feature vector and annotation information of the respiratory event are jointly input into the respiratory event recognition and classification model for training.

3. The respiratory event recognition and classification model training method according to claim 1, characterized in that: The eigenvalues ​​of the eigenvector include: any one or more of the following: standard deviation, approximate entropy, sample entropy, permutation entropy, Shannon entropy, fluctuation index, energy entropy, low-frequency / high-frequency energy ratio, multi-scale sample entropy, fractal dimension, recursion rate, and Hurst exponent; ReliefF is used to select the eigenvalues ​​of the eigenvector, and the first 10 eigenvalues ​​are selected; The respiratory signal waveform of the respiratory event, the first 10 selected feature vectors and annotation information are input into the respiratory event recognition and classification model for training. After training, the respiratory event recognition and classification model or the respiratory event recognition and classification feature data set is obtained.

4. The respiratory event recognition and classification model training method according to claim 1, wherein The respiratory event recognition and classification model is an SVM classification model; It also includes a verification step B9: dividing the respiratory signal waveform, feature vector and annotation information of the respiratory event according to the case, and inputting them into the support vector machine (SVM) model for five-fold cross-validation training to obtain prediction recognition and classification results, performing performance evaluation on the respiratory event recognition and classification model based on the prediction recognition and classification results, and optimizing the model parameters and classification strategy of the respiratory event recognition and classification model based on the evaluation results.

5. A respiratory event recognition and classification method, characterized in that: A respiratory event recognition and classification model or a respiratory event recognition and classification feature dataset obtained based on the method according to any one of claims 1 to 4, The method comprises the steps A1: filtering the original respiratory signal to obtain a digital sequence signal K1; Step A3: performing respiratory event recognition on the digital sequence signal K1 to obtain respiratory signal segments corresponding to the respiratory events; Step A4: calculating a feature vector for the respiratory signal segment corresponding to the respiratory event; Step A5: Input the respiratory signal segment and feature vector into the respiratory event recognition and classification model to complete respiratory event recognition and classification; or input the respiratory signal segment into the respiratory event recognition and classification feature dataset and the corresponding model to complete respiratory event recognition and classification.

6. The respiratory event recognition and classification method according to claim 1, characterized in that: include Respiratory event types include any one or more of apnea events and hypopnea events; Step A2 is also included between step A1 and step A3; Step A2: The digital sequence signal K1 corresponding to the original respiratory signal is normalized and peak and valley extraction is performed to obtain the maximum sequence signal MX and the minimum sequence signal MN; In step A3, respiratory events are identified based on the maximum value sequence signal MX and the minimum value sequence signal MN.

7. The respiratory event recognition and classification method according to claim 1, characterized in that: include In step A4: the eigenvalues ​​of the eigenvector include: any one or more of: standard deviation, approximate entropy, sample entropy, permutation entropy, Shannon entropy, fluctuation index, energy entropy, low-frequency / high-frequency energy ratio, multi-scale sample entropy, fractal dimension, recursion rate, and Hurst exponent; Step A4 includes step A41: using ReliefF to select eigenvalues ​​of the eigenvector, and selecting the first 10 eigenvalues.

8. The respiratory event recognition and classification method according to claim 5, characterized in that: Step A3 also includes any one or more of step A32 or step A33; Step A32: Detecting the time interval between two consecutive peaks based on the maximum value sequence signal MX and the minimum value sequence signal MN; if the time interval is greater than a set threshold, determining that the area between the pair of peaks is a respiratory abnormality event; Step A33: Based on the maximum sequence signal MX and the minimum sequence signal MN, if the current peak amplitude drops by more than the set threshold value compared to the left peak amplitude, and the time interval from the current peak point where the decline begins to the right peak point where the normal level is returned is greater than 15 seconds, it is determined to be an abnormal breathing event.

9. The respiratory event recognition and classification method according to claim 8, characterized in that: The method further includes step A33: determining a respiratory event based on an oxygen depletion event; determining whether there is a respiratory event within a time window of a set length before each oxygen depletion event begins; and if there is a respiratory event within the time window of the set length, confirming the respiratory event.

10. The respiratory event recognition and classification method according to claim 1, characterized in that: Step A1 also includes the steps of identifying and marking occasional large noise signals; The respiratory event recognition and classification model is an SVM classification model; It also includes a verification step A9: dividing the respiratory signal waveform, feature vector and annotation information of the respiratory event according to the case, and inputting them into the support vector machine (SVM) model for five-fold cross-validation training to obtain prediction recognition and classification results, performing a performance evaluation of the respiratory event recognition and classification model based on the prediction recognition and classification results, and optimizing the model parameters and classification strategy of the respiratory event recognition and classification model based on the evaluation results.