Sleep apnea detection method and system based on multi-level wavelet coding and decoding

文档序号:99061 发布日期:2021-10-15 浏览:16次 中文

阅读说明:本技术 一种基于多级小波编解码的睡眠呼吸暂停检测方法及系统 (Sleep apnea detection method and system based on multi-level wavelet coding and decoding ) 是由 魏开航 邓韩彬 蒙俊甫 张其飞 夏林 刘毅 曾东 于 2021-08-05 设计创作,主要内容包括:本发明公开了一种基于多级小波编解码的睡眠呼吸暂停检测方法及系统,方法包括以下步骤:采集睡眠BCG信号并进行标准化预处理,获得标准化信号;构建NWCNN深度神经网络,将标准化信号输入到网络中进行训练,获得NWCNN的输出;将采集的BCG信号作为样本数据并分为训练集和测试集,对网络进行预训练和微调;以1分钟时长为分段依据对训练集进行分段并根据分段数据训练HMM模型;将BCG信号输入网络中进行降噪及特征提取,并将提取出的特征输入HMM模型,获得睡眠呼吸暂停分类概率,定位出睡眠呼吸暂停事件。本发明通过基于多级小波卷积编解码网络进行特征提取及分类,基于原始的BCG信号,达到降噪及特征提取以及分类的效果。(The invention discloses a sleep apnea detection method and a system based on multi-level wavelet coding and decoding, wherein the method comprises the following steps: collecting a sleep BCG signal and carrying out standardized preprocessing to obtain a standardized signal; constructing a NWCNN deep neural network, inputting a standardized signal into the network for training, and obtaining the output of the NWCNN; dividing the acquired BCG signal as sample data into a training set and a test set, and pre-training and fine-tuning the network; segmenting the training set by taking the time length of 1 minute as a segmentation basis and training an HMM model according to the segmentation data; and inputting the BCG signal into a network for noise reduction and feature extraction, inputting the extracted features into an HMM model, obtaining the sleep apnea classification probability, and positioning the sleep apnea event. The invention extracts and classifies the characteristics based on the multilevel wavelet convolution coding and decoding network, and achieves the effects of noise reduction, characteristic extraction and classification based on the original BCG signal.)

1. A sleep apnea detection method based on multi-level wavelet coding and decoding is characterized by comprising the following steps:

the method comprises the following steps: signal standardization, namely collecting two paths of sleep BCG signals of a user, and carrying out standardization preprocessing on the collected BCG signals to obtain standardized signals;

step two: performing wavelet decomposition training, namely constructing a NWCNN deep neural network, inputting a standardized signal into the NWCNN deep neural network for performing wavelet decomposition training, and obtaining the output of the NWCNN, namely a deep neural network model;

step three: fine tuning the model, namely taking the acquired BCG signal as sample data, dividing the sample data into a training set and a testing set, and pre-training and fine tuning the deep neural network;

step four: training an HMM model, segmenting the training set in the step three by taking the time length of 1 minute as a segmentation basis, and training the HMM model based on the segmentation data;

step five: and (3) event positioning, namely inputting the original BCG signal into a deep neural network, performing noise reduction and feature extraction, inputting the extracted features into an HMM model, obtaining the final sleep apnea classification probability, and positioning the sleep apnea event.

2. The sleep apnea detection method based on multi-level wavelet coding and decoding as claimed in claim 1, wherein said step one specifically comprises the following sub-steps:

s101, collecting two paths of sleep BCG signals at a sampling frequency of 128Hz by using signal collecting equipment;

s102, carrying out z-score standardization processing on the acquired original BCG signal to obtain a standardized signal.

3. The sleep apnea detection method based on multi-level wavelet coding/decoding according to claim 2, wherein said sub-step S102 specifically includes; firstly, the arithmetic mean value x of the signal segment i in the original BCG signal is calculatediAnd standard deviation si(ii) a According to the arithmetic mean xiAnd standard deviation siSignal normalization is performed, and the processing procedure is shown as follows:

z=(x-xi)/si

wherein: z is a normalized variable value, namely a normalized signal; x is the actual variable value, i.e. the original BCG signal.

4. The sleep apnea detection method based on multi-level wavelet coding and decoding as recited in claim 1, wherein said second step specifically comprises the following sub-steps:

s201, stacking a plurality of CNNs, wavelet decomposition layers and codecs, and constructing a deep neural network NWCNN, wherein the deep neural network NWCNN comprises an input layer, a plurality of wavelet decomposition layers, convolution layers and an output layer;

s202, firstly carrying out DWT decomposition on the standardized signals to obtain a plurality of detail coefficient data, taking all the detail coefficient data as input of CNN, then obtaining corresponding parameters based on CNN training and learning, carrying out DWT conversion on the corresponding parameters to obtain converted detail coefficients, taking the converted detail coefficients as input of the CNN, carrying out IWT inverse conversion based on CNN output, then carrying out IWT inverse conversion based on CNN, and obtaining output of NWCNN through softmax.

5. The sleep apnea detection method based on the multi-level wavelet coding and decoding as recited in claim 1, wherein the third step specifically comprises: and the acquired BCG signal is used as sample data and is divided into a training set and a test set, and the training set is divided into labeled data and unlabeled data at the same time, so that the deep neural network is pre-trained and fine-tuned.

6. The sleep apnea detection method based on the multi-level wavelet coding and decoding as recited in claim 1, wherein the fourth step specifically comprises: and firstly, taking the time length of 1 minute as a segmentation basis, carrying out segmentation labeling on the labeled data in the step three, removing noise data segments in the segmentation labeling process, training an HMM (hidden Mark model) according to the labeled data after the segmentation labeling, and constructing a classification model of the sleep apnea event.

7. A sleep apnea detection system using the sleep apnea detection method based on the multi-level wavelet coding and decoding as claimed in any one of claims 1 to 6, characterized by comprising a signal acquisition unit, a signal preprocessing unit, an integrated analog front end, a data forwarding unit, a power management module, a microprocessor and an upper computer; the signal acquisition unit is connected with the signal preprocessing unit; the signal preprocessing unit is connected with the integrated analog front end; the integrated analog front end is connected with the microprocessor; the microprocessor is connected with the data forwarding unit; and the data forwarding unit establishes communication connection with the upper computer through a communication network.

8. The sleep apnea detection system based on the multi-level wavelet coding/decoding of claim 7, wherein the signal collection unit is a piezoelectric ceramic sensor, and is configured to collect BCG signals of a user during sleep.

9. The sleep apnea detection system based on multi-level wavelet coding and decoding as recited in claim 7, wherein said signal preprocessing unit is a pre-amplifier circuit, and the pre-amplifier circuit comprises an adder, an isolation amplifier, a double-T notch filter and a low-pass filter; the input end of the adder is respectively connected with the power management module and the piezoelectric ceramic sensor, and the output end of the adder is connected with the isolation amplifier; the isolation amplifier is connected with the double T-shaped notch filter; the double-T type notch filter is connected with the low-pass filter; the low pass filter is connected to the integrated analog front end.

10. The sleep apnea detection system based on multi-level wavelet coding and decoding as recited in claim 7, wherein the data forwarding unit is a bluetooth communication module or a WiFi communication module.

Technical Field

The invention relates to the field of biomedicine, in particular to a sleep apnea detection method and system based on multi-level wavelet coding and decoding.

Background

In the current biomedical engineering research, various physiological signals of human bodies are collected and processed. Among them, the electrocardiographic signal is one of physiological signals, and the information contained therein is of great significance for diagnosis of heart diseases.

At present, the conventional non-contact detection method for determining apnea based on a single signal source and subsequent differentiation does not consider the correlation of the properties of previous and subsequent breaths, has low detection accuracy, and cannot perform detection, early warning and positioning in time.

A signal detection system for determining sleep apnea is disclosed in patent application No. CN201911413560.9, the signal detection method comprising the steps of: acquiring vital sign signals of a user during sleeping; carrying out structuralization processing on the vital sign signals of the user during sleeping to remove invalid signals and obtain an effective vital sign signal set; extracting and carrying out feature training on the classifier initial model through multi-dimensional morphological features of the sleep respiration sample signal to obtain a sleep respiration detection model; and inputting the effective sign signal set into a sleep respiration detection model for signal processing to obtain probability data of apnea when the user is sleeping. Although the scheme can improve the accuracy rate of apnea occurring when a user sleeps, the apnea detection accuracy rate based on single data still needs to be improved.

Another patent application, as filed in application No. cn201610541244.x, discloses a method and system for detecting an apnea event based on BCG signal, which locate a potential occurrence interval of a respiratory event by identifying an arousal segment, divide the potential occurrence interval of the event into an apnea segment, an effort of breathing segment and an arousal segment, extract fine-grained features capable of depicting a respiratory pattern from the three segments, and finally judge whether the potential occurrence phase of the event contains the apnea event by means of a machine learning method. The system mainly comprises: the device comprises a signal acquisition module, a data processing module and a detection result output module. The method and the system can automatically and accurately locate the interval of the potential occurrence of the apnea event and automatically divide the interval into three different stages, so that the breathing mode can be conveniently depicted in a multi-aspect and fine-grained manner. Although the scheme is also used for accurately detecting the apnea events in sleep, the scheme does not consider the correlation of the front and back respiratory properties, and the accuracy of feature extraction and the positioning accuracy of the apnea events are improved.

Disclosure of Invention

The invention aims to overcome the defects of the prior art and provides a sleep apnea detection method and system based on multi-level wavelet codec, which can be used for extracting and classifying features through a network based on multi-level wavelet convolutional codec, and achieving the effects of noise reduction and feature extraction and classification based on original BCG signals.

The purpose of the invention is realized by the following technical scheme:

a sleep apnea detection method based on multi-level wavelet coding and decoding comprises the following steps:

the method comprises the following steps: signal standardization, namely collecting two paths of sleep BCG signals of a user, and carrying out standardization preprocessing on the collected BCG signals to obtain standardized signals;

step two: performing wavelet decomposition training, namely constructing a NWCNN deep neural network, inputting a standardized signal into the NWCNN deep neural network for performing wavelet decomposition training, and obtaining the output of the NWCNN, namely a deep neural network model;

step three: fine tuning the model, namely taking the acquired BCG signal as sample data, dividing the sample data into a training set and a testing set, and pre-training and fine tuning the deep neural network;

step four: training an HMM model, segmenting the training set in the step three by taking the time length of 1 minute as a segmentation basis, and training the HMM model based on the segmentation data;

step five: and (3) event positioning, namely inputting the original BCG signal into a deep neural network, performing noise reduction and feature extraction, inputting the extracted features into an HMM model, obtaining the final sleep apnea classification probability, and positioning the sleep apnea event.

Specifically, the step one specifically comprises the following substeps:

s101, collecting two paths of sleep BCG signals at a sampling frequency of 128Hz by using signal collecting equipment;

s102, carrying out z-score standardization processing on the acquired original BCG signal to obtain a standardized signal.

Specifically, the substep S102 specifically includes; firstly, the arithmetic mean value x of the original BCG signal segment is calculatediAnd standard deviation si(ii) a According to the arithmetic mean xiAnd standard deviation siSignal normalization is performed, and the processing procedure is shown as follows:

z=(x-xi)/si

wherein: z is the normalized variable value; and x is the actual variable value.

Specifically, the second step specifically includes the following substeps:

s201, stacking a plurality of CNNs, wavelet decomposition layers and codecs, and constructing a deep neural network NWCNN, wherein the deep neural network NWCNN comprises an input layer, a plurality of wavelet decomposition layers, convolution layers and an output layer;

s202, firstly carrying out DWT decomposition on the standardized signals to obtain a plurality of detail coefficient data, taking all the detail coefficient data as input of CNN, then obtaining corresponding parameters based on CNN training and learning, carrying out DWT conversion on the corresponding parameters to obtain converted detail coefficients, taking the converted detail coefficients as input of the CNN, carrying out IWT inverse conversion based on CNN output, then carrying out IWT inverse conversion based on CNN, and obtaining output of NWCNN through softmax.

Specifically, the third step specifically comprises: and the acquired BCG signal is used as sample data and is divided into a training set and a test set, and the training set is divided into labeled data and unlabeled data at the same time, so that the deep neural network is pre-trained and fine-tuned.

Specifically, the fourth step specifically includes: and firstly, taking the time length of 1 minute as a segmentation basis, carrying out segmentation labeling on the labeled data in the step three, removing noise data segments in the segmentation labeling process, training an HMM (hidden Mark model) according to the labeled data after the segmentation labeling, and constructing a classification model of the sleep apnea event.

A sleep apnea detection system based on multi-level wavelet coding and decoding comprises a signal acquisition unit, a signal preprocessing unit, an integrated analog front end, a data forwarding unit, a power management module, a microprocessor and an upper computer; the signal acquisition unit is connected with the signal preprocessing unit; the signal preprocessing unit is connected with the integrated analog front end; the integrated analog front end is connected with the microprocessor; the microprocessor is connected with the data forwarding unit; and the data forwarding unit establishes communication connection with the upper computer through a communication network.

Specifically, the signal acquisition unit is a piezoelectric ceramic sensor and is used for acquiring BCG signals when a user sleeps.

Specifically, the signal preprocessing unit is a pre-amplification circuit, and the pre-amplification circuit comprises an adder, an isolation amplifier, a double-T-shaped notch filter and a low-pass filter; the input end of the adder is respectively connected with the power management module and the piezoelectric ceramic sensor, and the output end of the adder is connected with the isolation amplifier; the isolation amplifier is connected with the double T-shaped notch filter; the double-T type notch filter is connected with the low-pass filter; the low pass filter is connected to the integrated analog front end.

Specifically, the data forwarding unit is a bluetooth communication module or a WiFi communication module.

The invention has the beneficial effects that:

1. in the pre-training stage, the original BCG signal without the label data can be input into the model for pre-training, and then fine tuning is carried out based on the label data, so that the functions of model noise reduction and feature extraction are achieved.

2. The invention extracts and classifies the characteristics based on the multi-level wavelet convolutional coding and decoding network, and directly based on the original BCG signal, thereby achieving the effects of noise reduction, characteristic extraction and classification.

3. The method is based on the original mattress type BCG acquisition system, acquires the sleep BCG signals, considers the correlation of the front and back respiratory properties, constructs the HMM model based on the sample label data, is simple and reliable, and can effectively position the sleep apnea events.

Drawings

FIG. 1 is a flow chart of the method of the present invention.

Fig. 2 is a schematic block diagram of the system apparatus of the present invention.

Detailed Description

In order to clearly understand the technical features, objects and effects of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments.

The first embodiment is as follows:

in this embodiment, as shown in fig. 1, a sleep apnea detecting method based on multi-level wavelet coding and decoding includes the following steps:

the method comprises the following steps: signal standardization, namely collecting two paths of sleep BCG signals of a user, and carrying out standardization preprocessing on the collected BCG signals to obtain standardized signals;

step two: performing wavelet decomposition training, namely constructing a NWCNN deep neural network, inputting a standardized signal into the NWCNN deep neural network for performing wavelet decomposition training, and obtaining the output of the NWCNN, namely a deep neural network model;

step three: fine tuning the model, namely taking the acquired BCG signal as sample data, dividing the sample data into a training set and a testing set, and pre-training and fine tuning the deep neural network;

step four: training an HMM model, segmenting the training set in the step three by taking the time length of 1 minute as a segmentation basis, and training the HMM model based on the segmentation data;

step five: and (3) event positioning, namely inputting the original BCG signal into a deep neural network, performing noise reduction and feature extraction, inputting the extracted features into an HMM model, obtaining the final sleep apnea classification probability, and positioning the sleep apnea event.

In this embodiment, the first step specifically includes the following substeps:

s101, collecting two paths of sleep BCG signals at a sampling frequency of 128Hz by using a signal collecting system, wherein the collecting system comprises a low-pass filter, a high-pass filter, a power frequency notch and the like.

S102, carrying out z-score standardization processing on the acquired original BCG signal to obtain a standardized signal.

In this embodiment, the substep S102 specifically includes; firstly, the arithmetic mean value x of the original BCG signal segment is calculatediAnd standard deviation si(ii) a According to the arithmetic mean xiAnd standard deviation siSignal normalization is performed, and the processing procedure is shown as follows:

z=(x-xi)/si

wherein: z is a normalized variable value, namely a normalized signal; x is the actual variable value, i.e. the original BCG signal.

In this embodiment, the second step specifically includes the following substeps:

s201, stacking a plurality of CNNs, wavelet decomposition layers and codecs, and constructing a deep neural network NWCNN, wherein the deep neural network NWCNN comprises an input layer, a plurality of wavelet decomposition layers, convolution layers and an output layer;

s202, firstly carrying out DWT decomposition on the standardized signals to obtain a plurality of detail coefficient data, taking all the detail coefficient data as input of CNN, then obtaining corresponding parameters based on CNN training and learning, carrying out DWT conversion on the corresponding parameters to obtain converted detail coefficients, taking the converted detail coefficients as input of the CNN, carrying out IWT inverse conversion based on CNN output, then carrying out IWT inverse conversion based on CNN, and obtaining output of NWCNN through softmax.

In the embodiment, unlike the conventional sleep apnea detection method, the HRV and related features are not calculated, the original BCG signal is directly processed, and the processed BCG signal is input to the model for training, so that the method is simple and reliable.

The embodiment can achieve the following technical effects:

in the embodiment, the characteristics are extracted and classified based on the multi-level wavelet convolutional encoding and decoding network, and the effects of noise reduction, characteristic extraction and classification are achieved based on the original BCG signal directly.

Example two:

in this embodiment, a sleep apnea detection method based on multi-level wavelet coding and decoding includes the following steps:

the method comprises the following steps: signal standardization, namely collecting two paths of sleep BCG signals of a user, and carrying out standardization preprocessing on the collected BCG signals to obtain standardized signals;

step two: performing wavelet decomposition training, namely constructing a NWCNN deep neural network, inputting a standardized signal into the NWCNN deep neural network for performing wavelet decomposition training, and obtaining the output of the NWCNN, namely a deep neural network model;

step three: fine tuning the model, namely taking the acquired BCG signal as sample data, dividing the sample data into a training set and a testing set, and pre-training and fine tuning the deep neural network;

step four: training an HMM model, segmenting the training set in the step three by taking the time length of 1 minute as a segmentation basis, and training the HMM model based on the segmentation data;

step five: and (3) event positioning, namely inputting the original BCG signal into a deep neural network, performing noise reduction and feature extraction, inputting the extracted features into an HMM model, obtaining the final sleep apnea classification probability, and positioning the sleep apnea event.

In this embodiment, the third step specifically includes: and the acquired BCG signal is used as sample data and is divided into a training set and a test set, and the training set is divided into labeled data and unlabeled data at the same time, so that the deep neural network is pre-trained and fine-tuned.

In this embodiment, the fourth step specifically includes: and firstly, taking the time length of 1 minute as a segmentation basis, carrying out segmentation labeling on the labeled data in the step three, removing noise data segments in the segmentation labeling process, training an HMM (hidden Mark model) according to the labeled data after the segmentation labeling, and constructing a classification model of the sleep apnea event.

In this embodiment, based on labeled case sample data, labeling of sleep apnea event labels is performed according to 1min segment data, and noise data segments such as body movement and the like need to be removed in the labeling process. And then training an HMM model based on the label data to construct a classification model of the sleep apnea event.

In this embodiment, in the pre-training stage, the original BCG signal without the tag data may be input into the model for pre-training, and then fine-tuned based on the tag data, so as to achieve the functions of noise reduction and feature extraction of the model.

In this embodiment, the fine tuning of the deep neural network model specifically includes: and inputting the data with the labels into the deep neural network model, and adjusting the weight parameters of the deep neural network model according to the output result of the model until the output result of the model meets the preset training condition.

In the sleep apnea detection method based on the NWCNN provided by the embodiment, the features are extracted and classified based on the multi-level wavelet convolutional coding and decoding network, and the effects of noise reduction, feature extraction and classification are achieved directly based on the original BCG signal. The method can acquire the sleep BCG signals based on an original mattress type BCG acquisition system, simultaneously considers the correlation of the front and back respiration properties, and constructs an HMM model based on the sample label data.

The embodiment can achieve the following technical effects:

1. in the pre-training stage, the original BCG signal without the tag data can be input into the model for pre-training, and then fine-tuning is performed based on the tag data, so that the functions of noise reduction and feature extraction of the model are achieved.

2. In the embodiment, the characteristics are extracted and classified based on the multi-level wavelet convolutional encoding and decoding network, and the effects of noise reduction, characteristic extraction and classification are achieved based on the original BCG signal directly.

3. The embodiment is based on an original mattress type BCG acquisition system, acquires the sleep BCG signals, simultaneously considers the correlation of the front and back respiratory properties, constructs an HMM model based on the sample label data, is simple and reliable, and can effectively position the sleep apnea events.

Example three:

in this embodiment, in order to implement the sleep apnea detection methods of the first and second embodiments, a sleep apnea detection system based on a multi-level wavelet codec is provided, which includes a signal acquisition unit, a signal preprocessing unit, an integrated analog front end, a data forwarding unit, a power management module, a microprocessor, and an upper computer; the signal acquisition unit is connected with the signal preprocessing unit; the signal preprocessing unit is connected with the integrated analog front end; the integrated analog front end is connected with the microprocessor; the microprocessor is connected with the data forwarding unit; and the data forwarding unit establishes communication connection with the upper computer through a communication network.

In this embodiment, the signal acquisition unit is a piezoelectric ceramic sensor and is used for acquiring BCG signals when a user sleeps.

In this embodiment, the signal preprocessing unit is a pre-amplifier circuit, and the pre-amplifier circuit includes an adder, an isolation amplifier, a double-T notch filter, and a low-pass filter; the input end of the adder is respectively connected with the power management module and the piezoelectric ceramic sensor, and the output end of the adder is connected with the isolation amplifier; the isolation amplifier is connected with the double T-shaped notch filter; the double-T type notch filter is connected with the low-pass filter; the low pass filter is connected to the integrated analog front end.

In this embodiment, the analog signal processing includes processing processes such as voltage offset (dc level raising), signal amplification (isolation amplification), power frequency notch, and low-pass filtering. The power management module of the system provides a direct current reference level, and the direct current reference level is added with the BCG signal acquired by the piezoelectric ceramic sensor through the adder circuit, so that the BCG signal acquired by the piezoelectric ceramic sensor is subjected to direct current level lifting, and a negative level part in an input signal can be processed by an operational amplifier (isolation amplifier) powered by a single polarity, the problem that the negative level output part in the BCG signal acquired by the piezoelectric ceramic sensor is not processed is solved, and front and rear stage isolation is carried out; a double-T-shaped single-following wave trap filter (a double-T-shaped wave trap filter) is designed, so that 50Hz power frequency noise can be filtered, and the interference of the power frequency noise is effectively reduced; and amplifying the analog signal without the power frequency noise, and outputting the original BCG signal which can be effectively sampled and read.

The embodiment can achieve the following technical effects:

the sleep apnea detection system constructed by the embodiment can solve the problem that a negative level output part in a BCG signal acquired by a piezoelectric ceramic sensor is not processed, and meanwhile, a double-T-shaped single-following wave trap (double-T-shaped wave trap filter) is designed, so that 50Hz power frequency noise can be filtered, and power frequency noise interference is effectively reduced; the analog signal after the power frequency noise is removed is amplified, the original BCG signal which can be effectively sampled and read is output, and the probability data of the occurrence of the sleep apnea of the user can be accurately judged, so that the sleep apnea event can be conveniently positioned.

The foregoing shows and describes the general principles, essential features, and advantages of the invention. It will be understood by those skilled in the art that the present invention is not limited to the embodiments described above, which are described in the specification and illustrated only to illustrate the principle of the present invention, but that various changes and modifications may be made therein without departing from the spirit and scope of the present invention, which fall within the scope of the invention as claimed. The scope of the invention is defined by the appended claims and equivalents thereof.

10页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种医院体检一体式处理设备及其使用方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!