CN114041780B - Method for monitoring respiration based on data acquired by inertial sensor - Google Patents

Method for monitoring respiration based on data acquired by inertial sensor Download PDF

Info

Publication number
CN114041780B
CN114041780B CN202111489019.3A CN202111489019A CN114041780B CN 114041780 B CN114041780 B CN 114041780B CN 202111489019 A CN202111489019 A CN 202111489019A CN 114041780 B CN114041780 B CN 114041780B
Authority
CN
China
Prior art keywords
convolution
data
processing
filtering
convolution network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111489019.3A
Other languages
Chinese (zh)
Other versions
CN114041780A (en
Inventor
陈益强
吴清宇
�谷洋
沈建飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Institute of Computing Technology of CAS
Original Assignee
Institute of Computing Technology of CAS
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Institute of Computing Technology of CAS filed Critical Institute of Computing Technology of CAS
Priority to CN202111489019.3A priority Critical patent/CN114041780B/en
Publication of CN114041780A publication Critical patent/CN114041780A/en
Application granted granted Critical
Publication of CN114041780B publication Critical patent/CN114041780B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/08Measuring devices for evaluating the respiratory organs
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7235Details of waveform analysis
    • A61B5/725Details of waveform analysis using specific filters therefor, e.g. Kalman or adaptive filters
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7235Details of waveform analysis
    • A61B5/7264Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems
    • A61B5/7267Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems involving training the classification device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B2562/00Details of sensors; Constructional details of sensor housings or probes; Accessories for sensors
    • A61B2562/02Details of sensors specially adapted for in-vivo measurements
    • A61B2562/0219Inertial sensors, e.g. accelerometers, gyroscopes, tilt switches

Landscapes

  • Health & Medical Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Theoretical Computer Science (AREA)
  • Public Health (AREA)
  • Pathology (AREA)
  • Evolutionary Computation (AREA)
  • Animal Behavior & Ethology (AREA)
  • Surgery (AREA)
  • Mathematical Physics (AREA)
  • Medical Informatics (AREA)
  • Veterinary Medicine (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Physiology (AREA)
  • Data Mining & Analysis (AREA)
  • Signal Processing (AREA)
  • Psychiatry (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Pulmonology (AREA)
  • Fuzzy Systems (AREA)
  • Measurement Of The Respiration, Hearing Ability, Form, And Blood Characteristics Of Living Organisms (AREA)

Abstract

The invention provides a respiration monitoring model, which comprises a processing main road and a plurality of processing branches, wherein each processing branch and the main road comprise convolution filters, each convolution filter comprises a plurality of convolution networks for filtering input data and a multi-head self-attention mechanism layer arranged between the corresponding convolution networks for enhancing the global receptive field, and the respiration monitoring model is configured to: respectively inputting each modal data in the multi-modal data obtained based on the inertial sensor data into a corresponding processing branch circuit for convolution filtering to obtain a filtering result of each modal data; and inputting multi-modal respiration characteristics obtained by superposing filtering results of the modal data into a processing main path for convolution filtering to obtain correlation respiration characteristics, and generating a respiration waveform based on the correlation respiration characteristics. The invention generates the respiration waveform through the model, thereby monitoring the human respiration condition.

Description

一种基于惯性传感器采集的数据进行呼吸监测的方法A method for breathing monitoring based on data collected by inertial sensors

技术领域technical field

本发明涉及数字信号处理和深度学习领域,具体地说,涉及一种基于惯性传感器采集的数据进行呼吸监测的方法。The invention relates to the fields of digital signal processing and deep learning, and in particular, to a method for breathing monitoring based on data collected by an inertial sensor.

背景技术Background technique

呼吸监测在生理健康和心理健康中具有不言而喻的重要性,以及重大的临床医学和社会意义。但呼吸监测仪作为一种传统意义上的医疗器械价格昂贵并且具有专业性,其采用侵入式的气流检测方法不利于长时间的佩戴。随着传感器技术的发展,发展出了一些民用化的呼吸监测产品。例如胸腹部缠绕式呼吸监测产品,利用压敏传感器或者磁通量传感器监测呼吸引发的胸腹腔运动来生成呼吸波形。还有呼吸面罩式的呼吸监测产品,通过佩戴覆盖在口鼻腔利用气体流量计感知呼吸产生的气体交换来监测呼吸。这些方法虽然相比医疗器械降低了部分的价格,但是依然成本较高,损失了部分的精度,并且可穿戴性差。导致人们根本无法在日常生活中持续性的佩戴,也无法将其作为一种便携式可穿戴设备,使用基于它们提供的健康服务。Respiratory monitoring is of self-evident importance in physical and mental health, as well as of great clinical medical and social significance. However, as a traditional medical device, the respiratory monitor is expensive and professional, and its use of an invasive airflow detection method is not conducive to long-term wearing. With the development of sensor technology, some civilian respiratory monitoring products have been developed. For example, the thoracic and abdominal winding respiration monitoring products use pressure-sensitive sensors or magnetic flux sensors to monitor the movement of the thoracic and abdominal cavity caused by respiration to generate respiratory waveforms. There are also breathing mask-type breathing monitoring products, which monitor breathing by wearing a cover in the mouth and nose and using a gas flow meter to sense the gas exchange generated by breathing. Although these methods reduce the price of medical devices, they are still expensive, lose some precision, and have poor wearability. As a result, people cannot wear them continuously in their daily life, nor can they use them as a portable wearable device to use the health services they provide.

因此,实现普适性和泛用性的呼吸监测一直是该领域的目标,早在20世纪30年代斯塔尔(Starr)等人提出了心冲击描记术(Ballistocardiography)。同理,人体进行的呼吸运动同样会反映在人的肢体上,在肢体上产生微弱的呼吸运动信号。可以使用惯性测量单元(Inertial Measurement Unit,IMU)中的加速度计、陀螺仪等传感器进行运动信号的采集,对其进行滤波获得呼吸波形。Therefore, the realization of universal and universal respiratory monitoring has always been the goal of this field, as early as the 1930s, Starr et al proposed Ballistocardiography. In the same way, the breathing movement performed by the human body will also be reflected on the human limbs, producing weak breathing movement signals on the limbs. Sensors such as an accelerometer and a gyroscope in an inertial measurement unit (Inertial Measurement Unit, IMU) can be used to collect motion signals, and filter them to obtain a breathing waveform.

但是人的肢体伴随着日常行为活动,使得IMU数据中产生大量运动伪影,微弱的呼吸信号被运动伪影大量混叠。导致传统滤波算法首先无法针对运动产生的具有复杂干扰情况的IMU数据进行统筹分析处理,即未从多模态数据的多角度进行滤波,缺乏泛化性和精确度低,其次,未利用多个卷积网络提供更好的滤波能力。最后,现有的一种自适应滤波算法,依赖于期望呼吸信号的部分已知性进行参数调整,但由于呼吸的幅值、曲率、频率本身就是反应生理状态的重要指标,无法提前预知,且不断在进行微弱的变化,并且未利用多头注意力机制以弥补滤波过程中过于关注局部特征,导致该自适应滤波算法提取的呼吸波形存在精度低以及不具有全局感受野的问题。However, the human limbs are accompanied by daily behaviors, resulting in a large number of motion artifacts in the IMU data, and the weak breathing signal is aliased by the motion artifacts. As a result, the traditional filtering algorithm cannot firstly analyze and process the IMU data with complex interference generated by motion, that is, it does not filter from multiple perspectives of multimodal data, lacking generalization and low accuracy, and secondly, it does not use multiple Convolutional networks provide better filtering capabilities. Finally, an existing adaptive filtering algorithm relies on the partial knownness of the expected breathing signal to adjust parameters. However, because the amplitude, curvature and frequency of breathing are important indicators for reflecting the physiological state, they cannot be predicted in advance, and are constantly changing. Weak changes are carried out, and the multi-head attention mechanism is not used to make up for the excessive attention to local features in the filtering process, resulting in the problems of low precision and no global receptive field in the respiratory waveform extracted by the adaptive filtering algorithm.

因此,亟需一种基于IMU采集的数据进行滤波的呼吸监测系统,用于克服微弱特征的不易提取以及人体运动产生的复杂干扰情况等问题,以获得高精度呼吸波形。Therefore, there is an urgent need for a respiration monitoring system based on the data collected by the IMU for filtering, which can overcome the problems of difficult extraction of weak features and complex interference caused by human motion, so as to obtain high-precision respiration waveforms.

发明内容SUMMARY OF THE INVENTION

因此,本发明的目的在于克服上述现有技术的缺陷,提供一种基于惯性传感器采集的数据进行呼吸监测的方法。Therefore, the purpose of the present invention is to overcome the above-mentioned defects of the prior art, and to provide a method for breathing monitoring based on data collected by an inertial sensor.

本发明的目的是通过以下技术方案实现的:The purpose of this invention is to realize through the following technical solutions:

根据本发明的第一方面,一种呼吸监测模型,包括处理总路和多个处理支路,每个处理支路和处理总路均包括卷积滤波器,每个卷积滤波器中包括用于对输入的数据进行滤波的多个卷积网络以及设置在相应卷积网络间的用于增强全局感受野的多头自注意力机制层,其中,所述呼吸监测模型被配置为:将基于惯性传感器的数据得到的多模态数据中的各模态数据分别输入到对应的处理支路进行卷积滤波,得到各模态数据的滤波结果;以及将对各模态数据的滤波结果进行叠加得到的多模态呼吸特征输入到处理总路进行卷积滤波,得到关联性呼吸特征,基于关联性呼吸特征生成呼吸波形。According to a first aspect of the present invention, a breathing monitoring model includes a processing general circuit and a plurality of processing branches, each processing branch and processing general circuit includes a convolution filter, and each convolution filter includes a For a plurality of convolutional networks for filtering input data and a multi-head self-attention mechanism layer arranged between the corresponding convolutional networks for enhancing the global receptive field, wherein the breathing monitoring model is configured to: based on inertial Each modal data in the multimodal data obtained from the sensor data is input to the corresponding processing branch for convolution filtering to obtain the filtering result of each modal data; and the filtering results of each modal data are superimposed to obtain The multimodal respiration features are input to the processing circuit for convolution filtering to obtain relevant respiration features, and a respiration waveform is generated based on the relevant respiration features.

在本发明的一些实施例中,所述卷积滤波器还包括设置在相应卷积网络间的下采样层和上采样层;下采样层用于对相应卷积网络对输入的数据进行滤波获得的结果进行下采样,获得低维特征;上采样层用于对相应卷积网络对输入的相应低维特征进行滤波获得的结果进行上采样,获得高维特征;其中,低维特征和高维特征分别利用多头自注意力机制层增强各自的全局感受野。In some embodiments of the present invention, the convolution filter further includes a downsampling layer and an upsampling layer arranged between the corresponding convolutional networks; the downsampling layer is used to filter the input data of the corresponding convolutional network to obtain The result is downsampled to obtain low-dimensional features; the upsampling layer is used to upsample the results obtained by filtering the corresponding low-dimensional features input by the corresponding convolutional network to obtain high-dimensional features; among them, low-dimensional features and high-dimensional features The features use multi-head self-attention mechanism layers to enhance their respective global receptive fields.

在本发明的一些实施例中,所述卷积滤波器包括均为一维卷积网络的第一卷积网络、第二卷积网络、第三卷积网络和第四卷积网络,第一卷积网络的输入端为卷积滤波器的输入端,第四卷积网络的输出端为卷积滤波器的输出端;第一卷积网络与第四卷积网络间设有多头自注意力机制层,与第二卷积网络间设有下采样层,以及与第三卷积网络间设有下采样层;第二卷积网络与第四卷积网络间设有上采样层,与第三卷积网络间设有多头自注意力机制层;第三卷积网络与第四卷积网络间设有上采样层。In some embodiments of the present invention, the convolutional filter includes a first convolutional network, a second convolutional network, a third convolutional network and a fourth convolutional network, all of which are one-dimensional convolutional networks, the first convolutional network The input end of the convolution network is the input end of the convolution filter, and the output end of the fourth convolution network is the output end of the convolution filter; there is a multi-head self-attention between the first convolution network and the fourth convolution network The mechanism layer has a downsampling layer between the second convolutional network and the third convolutional network, and a downsampling layer between the second convolutional network and the fourth convolutional network. There is a multi-head self-attention mechanism layer between the three convolutional networks; an upsampling layer is arranged between the third convolutional network and the fourth convolutional network.

在本发明的一些实施例中,所述卷积滤波器被配置为:将输入的数据依次通过第一卷积网络和多头自注意力机制层的处理,得到第一高维特征;将输入的数据依次通过第一卷积网络、下采样层、第二卷积网络和上采样层的处理,得到第二高维特征;将输入的数据依次通过第一卷积网络和下采样层的处理,得到第一低维特征;将输入的数据依次通过第一卷积网络、下采样层、第二卷积网络、多头自注意力机制层的处理,得到第二低维特征;将对第一低维特征和第二低维特征进行叠加后依次通过第三卷积网络和上采样层的处理,得到第三高维特征;将第一高维特征、第二高维特征和第三高维特征进行叠加后通过第四卷积网络的处理,得到滤波结果。In some embodiments of the present invention, the convolution filter is configured to: process the input data sequentially through the first convolution network and the multi-head self-attention mechanism layer to obtain the first high-dimensional feature; The data is sequentially processed by the first convolutional network, the downsampling layer, the second convolutional network and the upsampling layer to obtain the second high-dimensional feature; the input data is sequentially processed by the first convolutional network and the downsampling layer, Obtain the first low-dimensional feature; pass the input data through the first convolutional network, the downsampling layer, the second convolutional network, and the multi-head self-attention mechanism layer in turn to obtain the second low-dimensional feature; After superimposing the dimensional feature and the second low-dimensional feature, the third convolutional network and the upsampling layer are processed in turn to obtain the third high-dimensional feature; the first high-dimensional feature, the second high-dimensional feature and the third high-dimensional feature are combined. After superposition, the filtering result is obtained by processing the fourth convolutional network.

在本发明的一些实施例中,所述处理支路或者处理总路包括一个或者多个卷积滤波器;在所述处理支路或者处理总路中包括多个卷积滤波器时,其中多个卷积滤波器中的任意两个卷积滤波器按照纵向堆叠连接或者横向堆叠连接的方式连接,其中,纵向堆叠连接的第一卷积滤波器和第二卷积滤波器的连接方式为第一卷积滤波器的第二卷积网络的输出端与第二卷积滤波器的输入端连接,第二卷积滤波器的输出端与第一卷积滤波器的第三卷积网络的输入端连接;横向堆叠连接的第一卷积滤波器和第二卷积滤波器的连接方式为第一卷积滤波器的输出端与第二卷积滤波器的输入端相互连接。In some embodiments of the present invention, the processing branch or the processing general circuit includes one or more convolution filters; when the processing branch or the processing general circuit includes a plurality of convolution filters, many of them are Any two convolution filters in the convolution filters are connected in the manner of vertical stacking connection or horizontal stacking connection, wherein the connection mode of the first convolution filter and the second convolution filter of the vertical stack connection is The output end of the second convolution network of a convolution filter is connected to the input end of the second convolution filter, and the output end of the second convolution filter is connected to the input end of the third convolution network of the first convolution filter. The first convolution filter and the second convolution filter connected in a horizontal stack are connected in such a way that the output end of the first convolution filter and the input end of the second convolution filter are connected to each other.

根据本发明的第二方面,提供一种用于本发明的第一方面所述的呼吸监测模型的训练方法,包括按照以下方式对呼吸监测模型进行多次迭代训练:获取训练集,其中,所述训练集中的样本的输入数据为相应时间窗口对应的基于惯性传感器的数据得到的多模态数据中的各模态数据,样本的标签为相应时间窗口对应的标准呼吸波形;利用训练集训练呼吸监测模型,对输入数据进行卷积滤波,生成呼吸波形;基于生成的呼吸波形和标准呼吸波形的差异,计算总损失值;基于总损失值更新呼吸监测模型参数,获得经训练的呼吸监测模型。According to a second aspect of the present invention, there is provided a training method for the respiration monitoring model described in the first aspect of the present invention, comprising performing multiple iterative training on the respiration monitoring model in the following manner: acquiring a training set, wherein all The input data of the samples in the training set is each modal data in the multi-modal data obtained based on the inertial sensor data corresponding to the corresponding time window, and the label of the sample is the standard breathing waveform corresponding to the corresponding time window; use the training set to train breathing The monitoring model performs convolution filtering on the input data to generate a respiratory waveform; based on the difference between the generated respiratory waveform and the standard respiratory waveform, the total loss value is calculated; based on the total loss value, the parameters of the respiratory monitoring model are updated to obtain a trained respiratory monitoring model.

在本发明的一些实施例中,所述总损失值为基于生成的呼吸波形和标准呼吸波形计算的胡伯损失和L2正则化项计算获得,计算方式如下:In some embodiments of the present invention, the total loss value is calculated based on the Huber loss and the L2 regularization term calculated based on the generated respiratory waveform and the standard respiratory waveform, and the calculation method is as follows:

Figure BDA0003398443000000041
Figure BDA0003398443000000041

其中,n为样本总量,zi为第i个样本的胡伯损失,等于

Figure BDA0003398443000000042
xi是基于第i个样本生成的呼吸波形,yi是第i个样本的标签,||xi||2表示xi的2范数,||yi||2表示yi的2范数,max(||xi||2·||yi||2,∈)表示取||xi||2·||yi||2和∈中的最大值作为分母,∈为标量值,α是L2正则化项的参数,Ω是L2正则化项。Among them, n is the total number of samples, zi is the Huber loss of the ith sample, equal to
Figure BDA0003398443000000042
xi is the respiratory waveform generated based on the ith sample, yi is the label of the ith sample, || xi || 2 represents the 2 norm of xi , ||y i || 2 represents the 2 of yi Norm, max(||x i || 2 ·||y i || 2 , ∈) means taking the maximum value of ||x i || 2 ·||y i || 2 and ∈ as the denominator, ∈ is a scalar value, α is the parameter of the L2 regularization term, and Ω is the L2 regularization term.

根据本发明的第三方面,提供一种基于惯性传感器采集的数据进行呼吸监测的系统,包括:数据处理模块,用于基于可穿戴设备中惯性传感器采集的数据,得到加速度模态数据、角速度模态数据以及欧拉角模态数据;利用本发明第二方面所述方法训练的呼吸监测模型对所述加速度模态数据、角速度模态数据以及欧拉角模态数据进行处理,生成呼吸波形。According to a third aspect of the present invention, a system for respiratory monitoring based on data collected by an inertial sensor is provided, comprising: a data processing module for obtaining acceleration modal data, angular velocity model data based on data collected by an inertial sensor in a wearable device modal data and Euler angle modal data; the respiration monitoring model trained by the method in the second aspect of the present invention processes the acceleration modal data, angular velocity modal data and Euler angle modal data to generate a breathing waveform.

根据本发明的第四方面,提供一种基于惯性传感器采集的数据进行呼吸监测的方法,包括:基于可穿戴设备中惯性传感器采集的数据,得到加速度模态数据、角速度模态数据以及欧拉角模态数据;利用本发明第二方面所述方法训练的呼吸监测模型对所述加速度模态数据、角速度模态数据以及欧拉角模态数据进行处理,生成呼吸波形。According to a fourth aspect of the present invention, there is provided a method for breathing monitoring based on data collected by an inertial sensor, comprising: obtaining acceleration modal data, angular velocity modal data and Euler angles based on data collected by an inertial sensor in a wearable device Modal data; the respiration monitoring model trained by the method in the second aspect of the present invention processes the acceleration modal data, angular velocity modal data and Euler angle modal data to generate a respiration waveform.

根据本发明的第五方面,提供一种电子设备,包括:一个或多个处理器;以及存储器,其中存储器用于存储可执行指令;所述一个或多个处理器被配置为经由执行所述可执行指令以实现本发明第二方面和第四方面任一项所述方法的步骤。According to a fifth aspect of the present invention, there is provided an electronic device comprising: one or more processors; and a memory, wherein the memory is used to store executable instructions; the one or more processors are configured to execute the The instructions are executable to implement the steps of the method of any one of the second and fourth aspects of the present invention.

与现有技术相比,本发明的优点在于:Compared with the prior art, the advantages of the present invention are:

1、本发明的呼吸监测模型,首先,其各处理支路的卷积滤波器,分别对各模态数据进行卷积滤波,其中,各模态数据是基于对惯性传感器数据进行处理获得,增强微弱的惯性传感器数据的多模态数据的特征,同时从增强的多模态数据的各角度进行卷积滤波,避免过拟合和缺乏泛化性;其次,处理总路的卷积滤波器对各模态数据的滤波结果进行叠加得到的多模态呼吸特征进行卷积滤波,融合了多模态数据的滤波结果进行呼吸波形的生成,提高模型精确度,最后,各处理支路和处理总路的卷积滤波器以卷积网络为基础进行卷积滤波,增强滤波能力,利用多头自注意力机制增强呼吸波形的全局感受野。1. In the breathing monitoring model of the present invention, first, the convolution filters of each processing branch respectively carry out convolution filtering on each modal data, wherein each modal data is obtained based on the processing of inertial sensor data, enhanced The weak inertial sensor data features multimodal data, while convolution filtering is performed from all angles of the enhanced multimodal data to avoid overfitting and lack of generalization; secondly, the convolution filter of the processing general The multi-modal respiratory features obtained by superimposing the filtering results of each modal data are subjected to convolution filtering, and the filtering results of the multi-modal data are combined to generate the respiratory waveform to improve the accuracy of the model. The convolution filter of the road performs convolution filtering based on the convolution network to enhance the filtering ability, and uses the multi-head self-attention mechanism to enhance the global receptive field of the breathing waveform.

2、本发明模型中的卷积滤波器,在对输入的数据进行卷积滤波时,通过使用极少量的卷积网络,以及结合多头自注意力机制层、下采样层和上采样层,实现对输入的数据的多重编解码,再次避免模型过拟合和缺乏泛化性,实现更好的滤波能力。另外,卷积滤波器具有较好的模块化特性和可扩展性能,多个卷积滤波器可以根据任务需要进行纵向堆叠连接和横向堆叠连接。纵向堆叠连接可增加下采样层数量和上采样层数量,可以实现更深度的编解码,增强滤波能力。横向堆叠连接可增加对特征的拟合次数,实现对特征更好的拟合。2. The convolution filter in the model of the present invention, when performing convolution filtering on the input data, uses a very small amount of convolution network, and combines the multi-head self-attention mechanism layer, down-sampling layer and up-sampling layer to achieve Multiple encoding and decoding of the input data, again to avoid model overfitting and lack of generalization, to achieve better filtering capabilities. In addition, the convolutional filter has good modularity and scalability, and multiple convolutional filters can be connected vertically and horizontally according to the needs of the task. Vertical stacking connections can increase the number of down-sampling layers and up-sampling layers, enabling deeper encoding and decoding and enhancing filtering capabilities. Horizontal stacking connections can increase the number of fittings to the features and achieve better fitting of the features.

3、本发明的呼吸监测方法中结合低通滤波、姿态解算互补滤波算法将加速度模态数据和角速度模态数据进行融合,增强惯性传感器数据的多模态数据的特征,使呼吸监测模型更好地进行特征提取,利用均值平滑模块对涵盖幅值、曲率、频率变化的呼吸波形进行连续推断优化,使波形更加平滑。3. In the breathing monitoring method of the present invention, the acceleration modal data and the angular velocity modal data are fused together with low-pass filtering and attitude calculation complementary filtering algorithm, so as to enhance the characteristics of the multi-modal data of the inertial sensor data, and make the breathing monitoring model more accurate. Perform feature extraction well, and use the mean smoothing module to continuously infer and optimize the respiratory waveform covering amplitude, curvature, and frequency changes to make the waveform smoother.

附图说明Description of drawings

以下参照附图对本发明实施例作进一步说明,其中:The embodiments of the present invention will be further described below with reference to the accompanying drawings, wherein:

图1为根据本发明一个实施例的进行呼吸监测的系统示意图;1 is a schematic diagram of a system for performing respiratory monitoring according to an embodiment of the present invention;

图2为根据本发明一个实施例的呼吸监测模型的结构示意图;2 is a schematic structural diagram of a breathing monitoring model according to an embodiment of the present invention;

图3为根据本发明一个实施例的一个卷积滤波器的结构示意图;3 is a schematic structural diagram of a convolution filter according to an embodiment of the present invention;

图4为根据本发明一个实施例的卷积滤波器中的一维卷积网络的结构示意图;4 is a schematic structural diagram of a one-dimensional convolution network in a convolution filter according to an embodiment of the present invention;

图5为根据本发明一个实施例的多头自注意力机制层的结构示意图;FIG. 5 is a schematic structural diagram of a multi-head self-attention mechanism layer according to an embodiment of the present invention;

图6为根据本发明另一个实施例的呼吸监测模型的结构示意图;6 is a schematic structural diagram of a breathing monitoring model according to another embodiment of the present invention;

图7为根据本发明一个实施例的多个卷积滤波器纵向堆叠连接的结构示意图;7 is a schematic structural diagram of vertical stacking and connection of multiple convolution filters according to an embodiment of the present invention;

图8为根据本发明一个实施例的多个卷积滤波器横向堆叠连接的结构示意图;8 is a schematic structural diagram of a horizontal stacking connection of multiple convolution filters according to an embodiment of the present invention;

图9为根据本发明一个实施例的呼吸监测模型输出的呼吸波形和真实呼吸波形的示意图。FIG. 9 is a schematic diagram of a breathing waveform and a real breathing waveform output by a breathing monitoring model according to an embodiment of the present invention.

具体实施方式Detailed ways

为了使本发明的目的,技术方案及优点更加清楚明白,以下结合附图通过具体实施例对本发明进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本发明,并不用于限定本发明。In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings through specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention.

如在背景技术部分提到的,人的肢体伴随着日常行为活动,使得IMU数据中产生大量运动伪影,微弱的呼吸信号被运动伪影大量混叠。导致传统滤波算法首先无法针对运动产生的具有复杂干扰情况的IMU数据进行统筹分析处理,即未从多模态数据的多角度进行滤波,缺乏泛化性和精确度低,其次,未利用多个卷积网络提供更好的滤波能力。最后,现有的一种自适应滤波算法,依赖于期望呼吸信号的部分已知性进行参数调整,但由于呼吸的幅值、曲率、频率本身就是反应生理状态的重要指标,无法提前预知,且不断在进行微弱的变化,并且未利用多头注意力机制以弥补滤波过程中过于关注局部特征,导致该自适应滤波算法提取的呼吸波形存在精度低以及不具有全局感受野的问题。As mentioned in the background art section, human limbs are accompanied by daily behaviors, so that a large number of motion artifacts are generated in the IMU data, and the weak breathing signal is greatly aliased by the motion artifacts. As a result, the traditional filtering algorithm cannot firstly analyze and process the IMU data with complex interference generated by motion, that is, it does not filter from multiple perspectives of multimodal data, lacking generalization and low accuracy, and secondly, it does not use multiple Convolutional networks provide better filtering capabilities. Finally, an existing adaptive filtering algorithm relies on the partial knownness of the expected breathing signal to adjust parameters. However, because the amplitude, curvature and frequency of breathing are important indicators for reflecting the physiological state, they cannot be predicted in advance, and are constantly changing. Weak changes are carried out, and the multi-head attention mechanism is not used to make up for the excessive attention to local features in the filtering process, resulting in the problems of low precision and no global receptive field in the respiratory waveform extracted by the adaptive filtering algorithm.

针对现有方法的缺陷,根据本发明的一个实施例,提供一种基于惯性传感器采集的数据进行呼吸监测的系统,参见图1,包括数据处理模块、呼吸监测模型和均值平滑模块,首先,通过数据处理模块获取穿戴于人体的惯性传感器的加速度计数据和陀螺仪数据,并对两种数据进行处理,处理过程中增强惯性传感器的各数据的特征,获得加速度模态数据、角速度模态数据和欧拉角模态数据;其次,通过呼吸监测模型的相应处理支路2的卷积滤波器对每种模态数据进行卷积滤波处理,以实现从多模态数据的多角度滤波,避免呼吸监测模型过拟合和缺乏泛化性,处理总路1设有的卷积滤波器对各模态数据的滤波结果进行叠加得到的多模态呼吸特征进行卷积滤波处理,得到关联性呼吸特征,基于关联性呼吸特征生成呼吸波形,提高模型精确度;最后,通过均值平滑模块获得优化的呼吸波形。In view of the defects of the existing method, according to an embodiment of the present invention, a system for monitoring respiration based on data collected by an inertial sensor is provided. Referring to FIG. 1 , it includes a data processing module, a respiration monitoring model and a mean smoothing module. First, by The data processing module obtains the accelerometer data and gyroscope data of the inertial sensor worn on the human body, and processes the two kinds of data. During the processing, the characteristics of each data of the inertial sensor are enhanced to obtain acceleration modal data, angular velocity modal data and Euler angle modal data; secondly, convolution filtering is performed on each modal data through the convolution filter of the corresponding processing branch 2 of the breathing monitoring model, so as to realize multi-angle filtering from multi-modal data and avoid breathing To monitor the over-fitting and lack of generalization of the model, the convolution filter provided in the main circuit 1 superimposes the filtering results of each modal data to perform convolution filtering on the multi-modal respiratory features obtained by convolution filtering to obtain correlated respiratory features. , and generate the respiratory waveform based on the relevant respiratory features to improve the accuracy of the model; finally, the optimized respiratory waveform is obtained through the mean smoothing module.

进一步的,各处理支路2和处理总路1设有的卷积滤波器以多个卷积网络为基础进行卷积滤波,增强滤波能力,利用多头自注意力机制层增强呼吸波形的全局感受野。Further, the convolution filters provided in each processing branch 2 and processing main circuit 1 perform convolution filtering on the basis of multiple convolutional networks to enhance the filtering ability, and use the multi-head self-attention mechanism layer to enhance the global experience of the breathing waveform. wild.

在对本发明的实施例进行具体介绍之前,先对其中使用到的部分术语作如下解释:Before the embodiments of the present invention are specifically introduced, some terms used therein are explained as follows:

高维特征:是指包含了许多与呼吸监测模型学习任务无关的特征(如存在许多仅有微弱相关度的特征),许多与呼吸监测模型学习任务冗余的特征(如特征相互之间存在强烈的相关度)以及噪声数据等特征。如本发明的各模态数据的原始特征以及卷积滤波器对各模态数据进行卷积滤波输出的结果均为高维特征。High-dimensional features: refers to the inclusion of many features that are irrelevant to the learning task of the respiratory monitoring model (for example, there are many features with only weak correlations), and many features that are redundant with the learning task of the respiratory monitoring model (for example, there are strong mutual correlation) and noise data. For example, the original features of each modal data in the present invention and the convolution filter output results of performing convolution filtering on each modal data are high-dimensional features.

低维特征:是指对高维特征进行降维(剔除对呼吸监测模型学习任务无关的特征和部分冗余的特征)获得的特征。如本发明通过对各模态数据的原始特征进行下采样从而达到对原始特征的降维,获得的特征为低维特征。Low-dimensional features: refers to the features obtained by reducing the dimensionality of high-dimensional features (excluding features that are irrelevant to the learning task of the breathing monitoring model and partially redundant features). For example, in the present invention, the original features of each modal data are down-sampled to achieve dimensionality reduction of the original features, and the obtained features are low-dimensional features.

为了更好地理解本发明,下面结合具体的实施例针对呼吸监测模型的各部分结构进行详细说明。In order to better understand the present invention, the structure of each part of the respiratory monitoring model will be described in detail below with reference to specific embodiments.

根据本发明的一个实施例,提供一种呼吸监测模型,参见图2,其结构包括处理总路1和三个处理支路2,各处理支路2和处理总路1均设有卷积滤波器。三个处理支路2的输出端通过级联的方式将输出结果进行叠加并输入到处理总路1的输入端。而形如三个处理支路2的输入部分,箭头上的(N,3,256)的数组中的各个数据表示输入相应数据时对应的批次数为N,通道数为3和长度为256。在处理支路2内的其中一个箭头尾部为(N,8,256)的数组表示输出相应数据时对应的批次数为N,通道数为8和长度为256,头部为(N,8,128)的数组表示输入相应数据时对应的批次数为N,通道数为8和长度为128。According to an embodiment of the present invention, a respiration monitoring model is provided, see FIG. 2 , its structure includes a processing main circuit 1 and three processing branches 2 , and each processing branch 2 and processing general circuit 1 are provided with convolution filtering device. The output ends of the three processing branches 2 superimpose the output results in a cascaded manner and input them to the input end of the processing main circuit 1 . In the input part of the three processing branches 2, each data in the array of (N, 3, 256) on the arrow indicates that the corresponding batch number is N, the channel number is 3 and the length is 256 when the corresponding data is input. One of the arrays in the processing branch 2 whose tail is (N, 8, 256) indicates that when the corresponding data is output, the corresponding batch number is N, the number of channels is 8 and the length is 256, and the head is (N, 8, The array of 128) indicates that the number of batches corresponding to the input of the corresponding data is N, the number of channels is 8 and the length is 128.

根据本发明的一个实施例,呼吸监测模型被配置为:将基于惯性传感器数据得到的多模态数据中的各模态数据分别输入到对应的处理支路2进行卷积滤波,得到各模态数据的滤波结果;以及将对各模态数据的滤波结果进行叠加得到的多模态呼吸特征输入到处理总路1进行卷积滤波,得到关联性呼吸特征,基于关联性呼吸特征生成呼吸波形。According to an embodiment of the present invention, the breathing monitoring model is configured to: input each modal data in the multimodal data obtained based on inertial sensor data into the corresponding processing branch 2 to perform convolution filtering to obtain each modal The filtering results of the data; and the multi-modal breathing features obtained by superimposing the filtering results of the modal data are input into the processing circuit 1 for convolution filtering to obtain relevant breathing features, and a breathing waveform is generated based on the relevant breathing features.

根据本发明的一个实施例,处理总路1和多个处理支路2中的每个卷积滤波器中包括用于对输入的数据进行滤波的多个卷积网络、设置在相应卷积网络间的用于增强全局感受野的多头自注意力机制层以及设置在相应卷积网络间的下采样层和上采样层。参见图3,每个卷积滤波器的具体结构可以为:多个卷积网络包括均为一维卷积网络的第一卷积网络、第二卷积网络、第三卷积网络和第四卷积网络,第一卷积网络的输入端为卷积滤波器的输入端,第四卷积网络的输出端为卷积滤波器的输出端。其中,第一卷积网络与第四卷积网络间设有多头自注意力机制层,与第二卷积网络间设有下采样层,以及与第三卷积网络间设有下采样层;第二卷积网络与第四卷积网络间设有上采样层,与第三卷积网络间设有多头自注意力机制层;第三卷积网络与第四卷积网络间设有上采样层。According to an embodiment of the present invention, each convolution filter in the processing bus 1 and the plurality of processing branches 2 includes a plurality of convolutional networks for filtering input data, which are arranged in the corresponding convolutional networks. The multi-head self-attention mechanism layer for enhancing the global receptive field between the two layers and the down-sampling layer and the up-sampling layer are arranged between the corresponding convolutional networks. Referring to FIG. 3 , the specific structure of each convolutional filter may be as follows: the multiple convolutional networks include a first convolutional network, a second convolutional network, a third convolutional network, and a fourth convolutional network, all of which are one-dimensional convolutional networks. Convolutional network, the input end of the first convolution network is the input end of the convolution filter, and the output end of the fourth convolution network is the output end of the convolution filter. Among them, a multi-head self-attention mechanism layer is arranged between the first convolutional network and the fourth convolutional network, a downsampling layer is arranged between the first convolutional network and the second convolutional network, and a downsampling layer is arranged between the third convolutional network; An upsampling layer is set between the second convolutional network and the fourth convolutional network, and a multi-head self-attention mechanism layer is set between the second convolutional network and the third convolutional network; an upsampling layer is set between the third convolutional network and the fourth convolutional network Floor.

根据本发明的一个实施例,卷积滤波器的下采样层用于对相应卷积网络对输入的数据进行滤波获得的结果进行下采样,获得低维特征;卷积滤波器的上采样层用于对相应卷积网络对输入的相应低维特征进行滤波获得的结果进行上采样,获得高维特征,其中,低维特征和高维特征分别利用多头自注意力机制层增强各自的全局感受野。According to an embodiment of the present invention, the down-sampling layer of the convolution filter is used to down-sample the result obtained by filtering the input data by the corresponding convolution network to obtain low-dimensional features; the up-sampling layer of the convolution filter uses Upsampling the results obtained by filtering the corresponding low-dimensional features input by the corresponding convolutional network to obtain high-dimensional features, wherein the low-dimensional features and high-dimensional features use multi-head self-attention mechanism layers to enhance their respective global receptive fields. .

根据本发明的一个实施例,下采样层采用使用最大池化策略,上采样层采用线性插值算法,其中,下采样层设置在相应卷积网络的输出端之后,使用最大池化策略,获得保留核心特征的低维特征,有助于复杂信号的特征抽象工作,其对相应卷积网络的输出结果选取区域最大值,有效的帮助卷积核进行时不变性的特征发现,增加鲁棒性。下采样层采用的线性插值算法将低维特征展开,获得高维特征,线性插值算法具有低通滤波的性质,更聚焦于低维特征的核心特征,使得最后生成的呼吸波形更平滑。According to an embodiment of the present invention, the downsampling layer adopts a maximum pooling strategy, and the upsampling layer adopts a linear interpolation algorithm, wherein the downsampling layer is set after the output end of the corresponding convolutional network, and the maximum pooling strategy is used to obtain the reserved The low-dimensional features of the core features are helpful for the feature abstraction of complex signals. It selects the regional maximum value for the output of the corresponding convolutional network, which effectively helps the convolution kernel to perform time-invariant feature discovery and increase robustness. The linear interpolation algorithm used in the downsampling layer expands the low-dimensional features to obtain high-dimensional features. The linear interpolation algorithm has the nature of low-pass filtering, and focuses more on the core features of the low-dimensional features, making the final generated respiratory waveform smoother.

根据本发明的一个实施例,每个卷积网络包括多层结构,例如,参见图4,每个卷积网络包括依次连接的一维卷积层、标准化操作层、线性整流激活函数层(Rectified LinearUnit,ReLU)、一维卷积层、标准化操作层和线性整流激活函数层。According to an embodiment of the present invention, each convolutional network includes a multi-layer structure. For example, referring to FIG. 4 , each convolutional network includes a one-dimensional convolutional layer, a normalized operation layer, and a linear rectification activation function layer (Rectified LinearUnit, ReLU), 1D convolution layer, normalization operation layer and linear rectification activation function layer.

根据本发明的一个实施例,参见图5,多头自注意力机制层包括h个自注意力头(Attentioni)和一个全连接层,通过将全部自注意力头的输出端级联起来,与全连接层的输入端连接形成的多头自注意力机制,其原理如下:According to an embodiment of the present invention, referring to FIG. 5 , the multi-head self-attention mechanism layer includes h self-attention heads (Attention i ) and a fully connected layer. The principle of the multi-head self-attention mechanism formed by the connection of the input terminals of the fully connected layer is as follows:

每个自注意力头对输入的特征F进行线性变换,将h个自注意力头进行特征的注意力加权,获得每个自注意力头的处理结果head。Each self-attention head performs linear transformation on the input feature F, and weights the attention of the h self-attention heads to obtain the processing result head of each self-attention head.

如第i个自注意力层对输入的特征F进行线性变换,得到For example, the i-th self-attention layer performs linear transformation on the input feature F to obtain

索引:

Figure BDA0003398443000000081
为对应的权重矩阵,
Figure BDA0003398443000000082
为对应的偏置矩阵;index:
Figure BDA0003398443000000081
is the corresponding weight matrix,
Figure BDA0003398443000000082
is the corresponding bias matrix;

键:

Figure BDA0003398443000000083
为对应的权重矩阵,
Figure BDA0003398443000000084
为对应的偏置矩阵;key:
Figure BDA0003398443000000083
is the corresponding weight matrix,
Figure BDA0003398443000000084
is the corresponding bias matrix;

值:

Figure BDA0003398443000000085
为对应的权重矩阵,
Figure BDA0003398443000000086
为对应的偏置矩阵;value:
Figure BDA0003398443000000085
is the corresponding weight matrix,
Figure BDA0003398443000000086
is the corresponding bias matrix;

将h个自注意力头进行特征的注意力加权,获得每个自注意力头的处理结果headi=Attention(Qi,Ki,Vi),如下:Carry out the attention weighting of the h self-attention heads to obtain the processing result of each self-attention head head i =Attention(Q i ,K i ,V i ), as follows:

Figure BDA0003398443000000087
Figure BDA0003398443000000087

其中,

Figure BDA0003398443000000088
为输入键Ki的维度,
Figure BDA0003398443000000089
为Vi的注意力权重矩阵,系数
Figure BDA00033984430000000810
用于对注意力权重矩阵进行标准化,最后,通过softmax层对Vi进行注意力加权。in,
Figure BDA0003398443000000088
is the dimension of the input key Ki ,
Figure BDA0003398443000000089
is the attention weight matrix of V i , the coefficient
Figure BDA00033984430000000810
It is used to normalize the attention weight matrix, and finally, the attention weights V i through the softmax layer.

对h个自注意力头head的输出进行级联,并输入到全连接层进行处理,获得多头自注意力机制层的最终输出结果MultiHead(Q,K,V),如下:The outputs of the h self-attention heads are cascaded and input to the fully connected layer for processing to obtain the final output MultiHead(Q, K, V) of the multi-head self-attention mechanism layer, as follows:

MultiHead(Q,K,V)=Concat(head1,…,headh)WO+BOMultiHead(Q, K, V) = Concat(head 1 , . . . , head h ) W O +B O ;

其中,Q表示h个自注意力头分别对特征进行线性变换获得的h个索引合并后的最终索引,K表示h个自注意力头分别对特征进行线性变换获得的h个键合并后的最终键,V表示h个自注意力头分别对特征进行线性变换获得的h个值合并后的最终值,Concat表示将head1,...,headh合并为一个字符串,WO是每个自注意力头进行线性变换的相应的权重矩阵,BO是每个自注意力头进行线性变换的相应的偏置矩阵。Among them, Q represents the final index of the h indices obtained by linearly transforming the features by the h self-attention heads, and K represents the final index of the h keys obtained by linearly transforming the features by the h self-attention heads. key, V represents the final value of h values obtained by linearly transforming the features of the h self-attention heads, Concat represents the combination of head 1 , ..., head h into a string, and W O is each The corresponding weight matrices linearly transformed from the attention heads, BO is the corresponding bias matrix of each self-attention head linearly transformed.

卷积滤波器的多头自注意力机制层具备全局分析能力,如针对呼吸周期长、特征微弱的特点,进行对长序列的全局时序相关性分析,以弥补具有多个卷积网络的结构过于关注于局部特征而缺乏全局感受野的缺陷。并且具有多个卷积网络的结构也可弥补多头自注意力机制层适合高语义的序列特征处理,对低语义的多模态数据处理效果不佳的缺陷,提供更好的滤波能力。利用多个卷积网络实现对低语义的多模态数据进行滤波,获得高语义的序列特征,并利用多头自注意力机制层进行全局的时序关联性特征信号发现,增强全局感受野。The multi-head self-attention mechanism layer of the convolutional filter has the ability of global analysis. For example, for the characteristics of long breathing cycle and weak features, global time-series correlation analysis of long sequences is performed to make up for the structure with multiple convolutional networks. The defect of lack of global receptive field due to local features. Moreover, the structure with multiple convolutional networks can also make up for the defect that the multi-head self-attention mechanism layer is suitable for high-semantic sequence feature processing, and has poor processing effect on low-semantic multimodal data, providing better filtering capabilities. Multiple convolutional networks are used to filter low-semantic multi-modal data to obtain high-semantic sequence features, and a multi-head self-attention mechanism layer is used to discover global temporal correlation feature signals to enhance the global receptive field.

根据本发明的一个实施例,卷积滤波器在对输入的数据进行滤波时,还包括通过使用极少量的卷积网络,结合下采样层和上采样层,实现对输入数据的多重编解码,再次避免模型过拟合和缺乏泛化性,增强滤波能力。优选的,卷积滤波器对输入的数据进行滤波包括以下方式:According to an embodiment of the present invention, when filtering the input data, the convolution filter further includes using a very small number of convolutional networks and combining the down-sampling layer and the up-sampling layer to realize multiple encoding and decoding of the input data, Again, model overfitting and lack of generalization are avoided, and filtering capabilities are enhanced. Preferably, the convolution filter filters the input data in the following ways:

卷积滤波器将输入的数据依次通过第一卷积网络和多头自注意力机制层的处理,得到第一高维特征。The convolution filter sequentially processes the input data through the first convolutional network and the multi-head self-attention mechanism layer to obtain the first high-dimensional feature.

进行多重编解码的第一个编解码过程为:卷积滤波器将输入的数据依次通过第一卷积网络、下采样层、第二卷积网络和上采样层的处理,得到第二高维特征。The first encoding and decoding process for multiple encoding and decoding is: the convolution filter passes the input data through the first convolutional network, the downsampling layer, the second convolutional network and the upsampling layer in turn to obtain a second high-dimensional feature.

进行第二个编解码过程为:卷积滤波器将输入的数据依次通过第一卷积网络和下采样层的处理,得到第一低维特征;将输入的数据依次通过第一卷积网络、下采样层、第二卷积网络、多头自注意力机制层的处理,得到第二低维特征;将对第一低维特征和第二低维特征进行叠加后依次通过第三卷积网络和上采样层的处理,得到第三高维特征。The second encoding and decoding process is as follows: the convolution filter passes the input data through the first convolution network and the downsampling layer in turn to obtain the first low-dimensional feature; the input data passes through the first convolution network, The downsampling layer, the second convolution network, and the multi-head self-attention mechanism layer are processed to obtain the second low-dimensional feature; the first low-dimensional feature and the second low-dimensional feature will be superimposed and then passed through the third convolutional network and the second low-dimensional feature in turn. The processing of the upsampling layer, the third high-dimensional feature is obtained.

卷积滤波器将以上获得的第一高维特征、第二高维特征和第三高维特征进行叠加后通过第四卷积网络的处理,得到滤波结果。The convolution filter superimposes the first high-dimensional feature, the second high-dimensional feature, and the third high-dimensional feature obtained above, and then processes the fourth convolutional network to obtain a filtering result.

根据本发明的一个实施例,参见图6,呼吸监测模型的每个处理支路2设有一个卷积滤波器,处理总路1设有两个卷积滤波器,且两个卷积滤波器按照纵向堆叠连接的方式进行连接。其中,纵向堆叠连接的第一卷积滤波器和第二卷积滤波器的连接方式参见图7,包括第一卷积滤波器的第二卷积网络的输出端与第二卷积滤波器的输入端连接,第二卷积滤波器的输出端与第一卷积滤波器的第三卷积网络的输入端连接。通过该纵向堆叠连接的方式,增加下采样层的数量和上采样层的数量,可以实现更深度的编解码。According to an embodiment of the present invention, referring to FIG. 6 , each processing branch 2 of the respiration monitoring model is provided with one convolution filter, the processing circuit 1 is provided with two convolution filters, and the two convolution filters Connect in a vertical stack connection. The connection mode of the first convolution filter and the second convolution filter connected by vertical stacking is shown in FIG. 7 , the output end of the second convolution network including the first convolution filter and the output end of the second convolution filter The input end is connected, and the output end of the second convolution filter is connected with the input end of the third convolution network of the first convolution filter. By increasing the number of down-sampling layers and the number of up-sampling layers by means of the vertical stack connection, deeper encoding and decoding can be achieved.

根据本发明的另一个实施例,处理总路1的两卷积滤波器也可按照横向堆叠连接的方式进行连接,参见图8,即第一卷积滤波器和第二卷积滤波器的连接方式包括第一卷积滤波器的输出端与第二卷积滤波器的输入端相互连接。横向堆叠连接可增加对特征的拟合次数,实现对特征更好的拟合。According to another embodiment of the present invention, the two convolution filters of the processing bus 1 can also be connected in a horizontally stacked connection, see FIG. 8 , that is, the connection of the first convolution filter and the second convolution filter The manner includes interconnecting the output of the first convolution filter and the input of the second convolution filter. Horizontal stacking connections can increase the number of fittings to the features and achieve better fitting of the features.

根据本发明的另一个实施例,卷积滤波器具有较好的模块化特性和可扩展性能,可以根据任务需要进行纵向堆叠连接和横向堆叠连接。可将呼吸监测模型的处理支路2设置为一个卷积滤波器,或者设置纵向堆叠连接和/或横向堆叠连接的多个卷积滤波器,处理总路1也可设置为一个卷积滤波器,或者设置纵向堆叠连接和/或横向堆叠连接的多个卷积滤波器。According to another embodiment of the present invention, the convolution filter has good modularity and scalability, and can be connected vertically and horizontally according to the needs of the task. The processing branch 2 of the respiratory monitoring model can be set as a convolution filter, or a plurality of convolution filters connected by vertical stacking and/or horizontal stacking can be set, and the processing circuit 1 can also be set as a convolution filter , or set up multiple convolution filters connected vertically and/or horizontally.

根据本发明的另一个实施例,在处理支路2或者处理总路1中设置有多个卷积滤波器时,其中,多个卷积滤波器中的任意两个卷积滤波器按照纵向堆叠连接或者横向堆叠连接的方式连接,如处理总路1设置有三个卷积滤波器,则第一个卷积滤波器与第二个卷积滤波器进行纵向堆叠连接,第二个卷积滤波器与第三个卷积滤波器进行横向堆叠连接;或者三个卷积滤波器间均为横向堆叠连接;或均为纵向堆叠连接。According to another embodiment of the present invention, when multiple convolution filters are set in the processing branch 2 or the processing bus 1, any two convolution filters in the multiple convolution filters are stacked vertically Connection or horizontal stacking connection, if processing bus 1 is set with three convolution filters, the first convolution filter and the second convolution filter are vertically stacked and connected, and the second convolution filter Connect horizontally with the third convolutional filter; or all three convolutional filters are connected horizontally; or all are connected vertically.

根据本发明的一个实施例,呼吸监测模型的三个处理支路2分别对基于对惯性传感器的数据进行处理得到的加速度模态数据、角速度模态数据和欧拉角模态数据进行卷积滤波。对多模态数据进行的呼吸特征的多角度发现,以避免呼吸监测模型难以提取过于微弱的特征,出现过拟合和缺乏泛化性,同时增强呼吸监测模型的滤波能力。According to an embodiment of the present invention, the three processing branches 2 of the respiration monitoring model respectively perform convolution filtering on acceleration modal data, angular velocity modal data and Euler angle modal data obtained by processing inertial sensor data. . Multi-angle discovery of respiratory features on multi-modal data to avoid the difficulty of extracting too weak features, overfitting and lack of generalization, while enhancing the filtering ability of the respiratory monitoring model.

根据本发明的一个实施例,为保证呼吸监测模型的精确度,需通过大量的样本数据对其进行训练。根据本发明的一个实施例,样本可以通过以下方式获得:According to an embodiment of the present invention, in order to ensure the accuracy of the breathing monitoring model, it needs to be trained through a large amount of sample data. According to one embodiment of the present invention, the sample can be obtained by:

在获取各模态数据和采集标准呼吸波形时会将每一数据帧标注上时间戳,将标准呼吸波形和各模态数据进行时间和数据帧数对齐后分割为一定时间窗口大小(例如256个数据帧)的数据片段,获得训练集。相应时间窗口对应的标准呼吸波形作为样本的标签,相应时间窗口对应的各模态数据作为样本的输入数据。其中,每个样本包括256组如下的输入数据:When acquiring each modal data and collecting the standard respiratory waveform, each data frame will be marked with a timestamp, and the standard respiratory waveform and each modal data will be aligned with time and data frame number and divided into a certain time window size (for example, 256 data frame) to obtain the training set. The standard respiratory waveform corresponding to the corresponding time window is used as the label of the sample, and the modal data corresponding to the corresponding time window is used as the input data of the sample. Among them, each sample includes 256 sets of input data as follows:

(ax,ay,az,gx,gy,gz,a′x,a′y,a′z),其中,每组数据对应X轴,Y轴,Z轴三个通道的在相应时刻的加速度模态数据:ax,ay,az;X轴,Y轴,Z轴三个通道的在相应时刻的角速度模态数据:gx,gy,gz;在相应时刻的欧拉角模态数据:a′x,a′y,a′z(a x , a y , a z , g x , g y , g z , a' x , a' y , a' z ), where each set of data corresponds to the three channels of X-axis, Y-axis, and Z-axis Acceleration modal data at the corresponding moment: a x , a y , az ; angular velocity modal data of the three channels of X-axis, Y-axis, Z-axis at the corresponding moment: g x , g y , g z ; Euler angle modal data at time: a' x , a' y , a' z .

根据本发明的一个实施例,在获得训练集后,通过该训练集训练呼吸监测模型,同时调整该模型的参数,使最后获得的呼吸监测模型能输出更准确的呼吸波形,通过提供一种利用上述获得的训练集训练呼吸监测模型的方法,获得更优的呼吸监测模型,该方法包括按照以下步骤a1、a2、a3和a4,对呼吸监测模型进行多次迭代训练:According to an embodiment of the present invention, after the training set is obtained, the respiration monitoring model is trained through the training set, and the parameters of the model are adjusted at the same time, so that the finally obtained respiration monitoring model can output a more accurate respiration waveform. The above-mentioned method for training a breathing monitoring model on the training set obtains a better breathing monitoring model. The method includes performing multiple iterations of training on the breathing monitoring model according to the following steps a1, a2, a3 and a4:

步骤a1:获取训练集,其中,训练集中的样本的输入数据为相应时间窗口对应的基于惯性传感器的数据得到的多模态数据中的各模态数据,样本的标签为相应时间窗口对应的标准呼吸波形。Step a1: Obtain a training set, wherein the input data of the samples in the training set is each modal data in the multi-modal data obtained from the inertial sensor-based data corresponding to the corresponding time window, and the label of the sample is the standard corresponding to the corresponding time window. Respiratory waveform.

步骤a2:利用训练集训练呼吸监测模型对输入数据进行卷积滤波,生成呼吸波形。Step a2: Use the training set to train a breathing monitoring model to perform convolution filtering on the input data to generate a breathing waveform.

步骤a3:基于生成的呼吸波形和标准呼吸波形的差异,计算总损失值。Step a3: Calculate the total loss value based on the difference between the generated respiratory waveform and the standard respiratory waveform.

在本发明的一些实施例中,总损失值为基于生成的呼吸波形和标准呼吸波形计算的胡伯损失和L2正则化项计算获得,将胡伯损失和余弦距离进行组合,胡伯损失有助于离群点的拟合并防止梯度爆炸,余弦距离有助于整体波形特征的拟合。同时为避免模型出现过拟合,可使用L2正则化项。计算方式如下:In some embodiments of the present invention, the total loss value is calculated based on the Huber loss and the L2 regularization term calculated based on the generated respiration waveform and the standard respiration waveform. The Huber loss and the cosine distance are combined, and the Huber loss helps To fit outliers and prevent exploding gradients, the cosine distance helps fit the overall waveform features. At the same time, in order to avoid overfitting of the model, the L2 regularization term can be used. It is calculated as follows:

Figure BDA0003398443000000111
Figure BDA0003398443000000111

其中,n为样本总量,zi为第i个样本的胡伯损失,等于

Figure BDA0003398443000000121
xi是基于第i个样本生成的呼吸波形,yi是第i个样本的标签,||xi||2表示xi的2范数,||yi||2表示yi的2范数,max(||xi||2·||yi||2,∈)表示取||xi||2·||yi||2和∈中的最大值作为分母,∈为标量值且等于1e-8,以防止分母为0的情况,α是L2正则化项的参数,Ω是L2正则化项。Among them, n is the total number of samples, zi is the Huber loss of the ith sample, equal to
Figure BDA0003398443000000121
xi is the respiratory waveform generated based on the ith sample, yi is the label of the ith sample, || xi || 2 represents the 2 norm of xi , ||y i || 2 represents the 2 of yi Norm, max(||x i || 2 ·||y i || 2 , ∈) means taking the maximum value of ||x i || 2 ·||y i || 2 and ∈ as the denominator, ∈ is a scalar value and is equal to 1e-8 to prevent the case where the denominator is 0, α is the parameter of the L2 regularization term, and Ω is the L2 regularization term.

步骤a4:基于总损失值更新呼吸监测模型参数,获得经训练的呼吸监测模型。直至达到预设的迭代次数或其总损失值在预设范围内,停止更新参数,获得训练好的呼吸监测模型。Step a4: Update respiratory monitoring model parameters based on the total loss value to obtain a trained respiratory monitoring model. Until the preset number of iterations is reached or the total loss value is within the preset range, the parameters are stopped to be updated, and the trained respiratory monitoring model is obtained.

通过上述对呼吸监测模型的训练,最终获得的训练好的呼吸监测模型,可以用于呼吸监测。根据本发明的一个实施例,提供一种基于惯性传感器采集的数据进行呼吸监测的系统,包括数据处理模块、训练好的呼吸监测模型和均值平滑模块,下面结合具体的实施例对系统各部分进行详细说明。Through the above training of the breathing monitoring model, the trained breathing monitoring model finally obtained can be used for breathing monitoring. According to an embodiment of the present invention, a system for respiratory monitoring based on data collected by an inertial sensor is provided, including a data processing module, a trained respiratory monitoring model, and a mean smoothing module. The following describes each part of the system with reference to specific embodiments. Detailed description.

根据本发明的一个实施例,数据处理模块,用于基于可穿戴设备中惯性传感器采集的数据,得到加速度模态数据、角速度模态数据以及欧拉角模态数据。According to an embodiment of the present invention, the data processing module is configured to obtain acceleration modal data, angular velocity modal data and Euler angle modal data based on data collected by an inertial sensor in the wearable device.

根据本发明的一个实施例,将可穿戴设备穿戴于人体上,获取可穿戴设备中惯性传感器的加速度计数据和陀螺仪数据,对加速度计数据进行低通滤波和姿态解算,得到加速度模态数据,对陀螺仪数据进行低通滤波和姿态解算,得到角速度模态数据,以及通过姿态解算互补滤波算法对加速度模态数据和角速度模态数据进行处理,得到欧拉角模态数据。According to an embodiment of the present invention, the wearable device is worn on the human body, the accelerometer data and gyroscope data of the inertial sensor in the wearable device are obtained, and the accelerometer data is subjected to low-pass filtering and attitude calculation to obtain the acceleration mode Data, perform low-pass filtering and attitude calculation on the gyroscope data to obtain angular velocity modal data, and process the acceleration modal data and angular velocity modal data through the attitude calculation complementary filtering algorithm to obtain Euler angle modal data.

根据本发明的一个实施例,加速度计数据包括X轴,Y轴,Z轴三通道的加速度计数据,陀螺仪数据包括X轴,Y轴,Z轴三通道的陀螺仪数据。According to an embodiment of the present invention, the accelerometer data includes three-channel accelerometer data of X-axis, Y-axis, and Z-axis, and the gyroscope data includes three-channel gyroscope data of X-axis, Y-axis, and Z-axis.

使用低通滤波器以最大呼吸频率的3-5倍作为截止频率,对三个通道上的加速度计数据进行低通滤波,获取低频率的加速度计数据,再进行姿态解算,获得X轴,Y轴,Z轴三通道的加速度方向,将该三通道的加速度方向作为加速度模态数据。Use a low-pass filter with 3-5 times the maximum breathing frequency as the cut-off frequency, perform low-pass filtering on the accelerometer data on the three channels to obtain low-frequency accelerometer data, and then perform attitude calculation to obtain the X-axis, The acceleration directions of the three channels of the Y axis and the Z axis are used as the acceleration modal data.

使用低通滤波器以最大呼吸频率的3-5倍作为截止频率,对三个通道上的陀螺仪数据进行低通滤波,获取低频率的陀螺仪数据,在进行姿态解算,获得X轴,Y轴,Z轴三通道的角速度,将该三通道的角速度作为角速度模态数据。Use a low-pass filter with 3-5 times the maximum breathing frequency as the cut-off frequency, and perform low-pass filtering on the gyroscope data on the three channels to obtain the low-frequency gyroscope data, and perform the attitude calculation to obtain the X-axis, Y-axis, Z-axis three-channel angular velocity, the three-channel angular velocity as the angular velocity modal data.

基于每个通道上的数据加速度方向和角速度,使用姿态解算互补滤波算法,如式(1):Based on the data acceleration direction and angular velocity on each channel, the complementary filtering algorithm for attitude calculation is used, as shown in Equation (1):

anglei=K1*(anglei-1+gyroi*dt)+K2*acceli (1);angle i =K 1 *(angle i-1 +gyro i *dt)+K 2 *accel i (1);

其中,K1为对应项(anglei-1+gyroi*dt)的权重系数,K2为对应项acceli的权重系数,且(K1+K2)=1,anglei是第i时刻的欧拉角角度,acceli是第i时刻的加速度方向,gyroi是第i时刻的角速度。Among them, K 1 is the weight coefficient of the corresponding item (angle i-1 +gyro i *dt), K 2 is the weight coefficient of the corresponding item accel i , and (K 1 +K 2 )=1, angle i is the i-th moment The Euler angle of , accel i is the acceleration direction at the i-th moment, and gyro i is the angular velocity at the i-th moment.

该公式(1)不断使用加速度方向对角速度的积分进行校准,以避免陀螺仪的传感器误差在积分中的不断积累,最终得到滤波后的欧拉角角度特征作为欧拉角模态数据,包括横滚角(Roll),俯仰角(Pitch),偏航角(Yaw)。将加速度模态数据、角速度模态数据、欧拉角模态数据分别输入到呼吸监测模型的对应的处理支路2进行卷积滤波。The formula (1) continuously uses the acceleration direction to calibrate the integral of the angular velocity to avoid the accumulation of the sensor error of the gyroscope in the integral, and finally obtains the filtered Euler angle feature as the Euler angle modal data, including the horizontal Roll angle (Roll), pitch angle (Pitch), yaw angle (Yaw). The acceleration modal data, the angular velocity modal data, and the Euler angle modal data are respectively input into the corresponding processing branch 2 of the respiration monitoring model for convolution filtering.

基于上述训练方法训练的呼吸监测模型,用于对输入的欧拉角模态数据、加速度模态数据和角速度模态数据进行处理,生成呼吸波形。The breathing monitoring model trained based on the above training method is used to process the input Euler angle modal data, acceleration modal data and angular velocity modal data to generate a breathing waveform.

呼吸监测模型在对以上各模态数据进行卷积滤波后,生成的呼吸波形含有噪声数据,而呼吸波形是面向流数据的,具有连续性,因此,对呼吸监测模型生成的呼吸波形需要进行去噪处理,获得优化的呼吸波形。根据本发明的一个实施例,均值平滑模块,用于在每个时刻,取当前时刻所有候选点的均值作为该时刻呼吸波形最终的幅值,以对呼吸监测模型生成的涵盖幅值、曲率、频率变化的呼吸波形进行去噪处理,获得优化的呼吸波形。After the respiratory monitoring model performs convolution filtering on the above modal data, the generated respiratory waveform contains noise data, and the respiratory waveform is oriented to flow data and has continuity. Therefore, the respiratory waveform generated by the respiratory monitoring model needs to be decomposed. Noise processing to obtain optimized breathing waveform. According to an embodiment of the present invention, the mean value smoothing module is configured to, at each moment, take the mean value of all candidate points at the current moment as the final amplitude of the respiratory waveform at that moment, so as to cover the amplitude, curvature, The frequency-changing respiratory waveform is de-noised to obtain an optimized respiratory waveform.

基于上述进行呼吸监测的系统,根据本发明的一个实施例,提供一种呼吸监测的方法,包括步骤b1、b2和b3:Based on the above-mentioned system for respiratory monitoring, according to an embodiment of the present invention, a method for respiratory monitoring is provided, including steps b1, b2 and b3:

步骤b1:基于可穿戴设备中惯性传感器采集的数据,得到加速度模态数据、角速度模态数据以及欧拉角模态数据。Step b1: Acceleration modal data, angular velocity modal data and Euler angle modal data are obtained based on the data collected by the inertial sensor in the wearable device.

步骤b2:利用上述训练呼吸监测模型的方法获得训练好的呼吸监测模型,对输入的欧拉角模态数据、加速度模态数据和角速度模态数据进行处理,生成呼吸波形。Step b2: Using the above method for training the breathing monitoring model to obtain a trained breathing monitoring model, and processing the input Euler angle modal data, acceleration modal data and angular velocity modal data to generate a breathing waveform.

步骤b3:利用均值平滑模块对呼吸波形进行优化,获得滑动感受野更平滑的呼吸波形。Step b3: Use the mean smoothing module to optimize the respiration waveform to obtain a smoother respiration waveform with a sliding receptive field.

图9示出了本发明呼吸监测模型输出的呼吸波形和专业呼吸监测仪的真实呼吸波形对比结果,纵坐标代表呼吸波形的振幅,横坐标代表对应的时间,呼吸监测模型输出的呼吸波形和真实呼吸波形在相同时间下,两者的呼吸波形振幅相同或相近,整体的呼吸波形曲率大部分相似。Fig. 9 shows the comparison result of the respiratory waveform output by the respiratory monitoring model of the present invention and the real respiratory waveform of the professional respiratory monitor, the ordinate represents the amplitude of the respiratory waveform, the abscissa represents the corresponding time, the respiratory waveform output by the respiratory monitoring model and the real respiratory waveform At the same time, the respiratory waveform amplitudes of the two are the same or similar, and the overall respiratory waveform curvature is mostly similar.

需要说明的是,虽然上文按照特定顺序描述了各个步骤,但是并不意味着必须按照上述特定顺序来执行各个步骤,实际上,这些步骤中的一些可以并发执行,甚至改变顺序,只要能够实现所需要的功能即可。It should be noted that although the steps are described above in a specific order, it does not mean that the steps must be executed in the above-mentioned specific order. In fact, some of these steps can be executed concurrently, or even change the order, as long as it can be achieved The required function can be.

本发明可以是系统、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本发明的各个方面的计算机可读程序指令。The present invention may be a system, method and/or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of the present invention.

计算机可读存储介质可以是保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以包括但不限于电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。A computer-readable storage medium may be a tangible device that retains and stores instructions for use by the instruction execution device. Computer-readable storage media may include, but are not limited to, electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing, for example. More specific examples (non-exhaustive list) of computer readable storage media include: portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM) or flash memory), static random access memory (SRAM), portable compact disk read only memory (CD-ROM), digital versatile disk (DVD), memory sticks, floppy disks, mechanically coded devices, such as printers with instructions stored thereon Hole cards or raised structures in grooves, and any suitable combination of the above.

以上已经描述了本发明的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。Various embodiments of the present invention have been described above, and the foregoing descriptions are exemplary, not exhaustive, and not limiting of the disclosed embodiments. Numerous modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein was chosen to best explain the principles of the embodiments, the practical application or technical improvement in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (11)

1. A device based on a respiration monitoring model is characterized in that the respiration monitoring model comprises a processing main path and a plurality of processing branch paths,
each processing branch and the processing main road comprise convolution filters, each convolution filter comprises a plurality of convolution networks for filtering input data and a multi-head self-attention mechanism layer arranged between the corresponding convolution networks for enhancing the global receptive field,
wherein the respiratory monitoring model is configured to:
respectively inputting each modal data in the multi-modal data obtained based on the data of the inertial sensor into a corresponding processing branch circuit for convolution filtering to obtain a filtering result of each modal data; and
and inputting multi-modal breathing characteristics obtained by superposing filtering results of the modal data into a processing main path for convolution filtering to obtain correlation breathing characteristics, and generating a breathing waveform based on the correlation breathing characteristics.
2. The apparatus of claim 1, wherein the convolution filter further comprises a downsampling layer and an upsampling layer disposed between respective convolution networks;
the down-sampling layer is used for down-sampling a result obtained by filtering input data by a corresponding convolution network to obtain a low-dimensional feature;
the up-sampling layer is used for up-sampling a result obtained by filtering the corresponding input low-dimensional features by the corresponding convolution network to obtain high-dimensional features;
wherein the low-dimensional features and the high-dimensional features respectively enhance the respective global receptive fields by utilizing a multi-head self-attention mechanism layer.
3. The apparatus of claim 1 or 2, wherein the convolution filter comprises a first convolution network, a second convolution network, a third convolution network and a fourth convolution network, all of which are one-dimensional convolution networks, wherein an input end of the first convolution network is an input end of the convolution filter, and an output end of the fourth convolution network is an output end of the convolution filter;
a multi-head self-attention mechanism layer is arranged between the first convolution network and the fourth convolution network, a down-sampling layer is arranged between the first convolution network and the second convolution network, and a down-sampling layer is arranged between the first convolution network and the third convolution network;
an upper sampling layer is arranged between the second convolution network and the fourth convolution network, and a multi-head self-attention mechanism layer is arranged between the second convolution network and the third convolution network;
an upper sampling layer is arranged between the third convolution network and the fourth convolution network.
4. The apparatus of claim 3, wherein the convolution filter is configured to:
processing input data sequentially through a first convolution network and a multi-head self-attention mechanism layer to obtain a first high-dimensional feature;
processing input data sequentially through a first convolution network, a down-sampling layer, a second convolution network and an up-sampling layer to obtain a second high-dimensional feature;
processing input data through a first convolution network and a down-sampling layer in sequence to obtain a first low-dimensional feature;
processing input data sequentially through a first convolution network, a down-sampling layer, a second convolution network and a multi-head self-attention mechanism layer to obtain a second low-dimensional feature;
overlapping the first low-dimensional feature and the second low-dimensional feature, and sequentially processing the first low-dimensional feature and the second low-dimensional feature through a third convolution network and an upper sampling layer to obtain a third high-dimensional feature;
and superposing the first high-dimensional feature, the second high-dimensional feature and the third high-dimensional feature, and processing the superposed high-dimensional features through a fourth convolution network to obtain a filtering result.
5. The apparatus of claim 3, wherein the processing branch or processing head comprises one or more convolution filters;
when the processing branch or the processing main comprises a plurality of convolution filters, any two convolution filters in the plurality of convolution filters are connected in a vertical stacking connection mode or a horizontal stacking connection mode,
the first convolution filter and the second convolution filter which are longitudinally stacked and connected are connected in a mode that the output end of a second convolution network of the first convolution filter is connected with the input end of the second convolution filter, and the output end of the second convolution filter is connected with the input end of a third convolution network of the first convolution filter;
the first convolution filter and the second convolution filter which are connected in a transverse stacking mode are connected in a mode that the output end of the first convolution filter is connected with the input end of the second convolution filter.
6. A training method for the respiration monitoring model according to any one of claims 1 to 5, comprising performing a plurality of iterative training of the respiration monitoring model in the following manner:
acquiring a training set, wherein input data of a sample in the training set is each modal data in multi-modal data which is obtained based on data of an inertial sensor and corresponds to a corresponding time window, and a label of the sample is a standard respiration waveform corresponding to the corresponding time window;
training a respiration monitoring model by using a training set, and performing convolution filtering on input data to generate a respiration waveform;
calculating a total loss value based on a difference of the generated respiration waveform and a standard respiration waveform;
and updating parameters of the respiration monitoring model based on the total loss value to obtain a trained respiration monitoring model.
7. The method of claim 6, wherein the total loss value is calculated for a huber loss calculated based on the generated respiratory waveform and a standard respiratory waveform and an L2 regularization term by:
Figure FDA0003714804930000031
wherein n is the total amount of samples, z i Huber loss for the ith sample, equal to
Figure FDA0003714804930000032
x i Is a respiratory waveform, y, generated based on the ith sample i Is the label of the ith sample, | | x i || 2 Denotes x i 2 norm, | | y i || 2 Denotes y i 2 norm of, max (| | x) i || 2 ·||y i || 2 And e) represents taking x i || 2 ·||y i || 2 And the maximum value in e is used as a denominator, e is a scalar value, a is a parameter of the L2 regularization term, and Ω is the L2 regularization term.
8. A system for respiratory monitoring based on data collected by inertial sensors, comprising:
the data processing module is used for obtaining acceleration modal data, angular velocity modal data and Euler angle modal data based on data collected by an inertial sensor in the wearable device;
processing the acceleration modal data, the angular velocity modal data, and the euler angular modal data using a respiration monitoring model trained using the method of claim 6 or 7 to generate a respiration waveform.
9. A method for respiratory monitoring based on data collected by an inertial sensor, comprising:
obtaining acceleration modal data, angular velocity modal data and Euler angle modal data based on data acquired by an inertial sensor in the wearable device;
processing the acceleration mode data, the angular velocity mode data and the Euler angle mode data by using a respiration monitoring model trained by the method of claim 6 or 7 to generate a respiration waveform.
10. A computer-readable storage medium, having stored thereon a computer program executable by a processor for carrying out the steps of the method according to any one of claims 6-7 and 9.
11. An electronic device, comprising:
one or more processors; and
a memory, wherein the memory is to store executable instructions;
the one or more processors are configured to implement the steps of the method of any of claims 6-7 and 9 via execution of the executable instructions.
CN202111489019.3A 2021-12-08 2021-12-08 Method for monitoring respiration based on data acquired by inertial sensor Active CN114041780B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111489019.3A CN114041780B (en) 2021-12-08 2021-12-08 Method for monitoring respiration based on data acquired by inertial sensor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111489019.3A CN114041780B (en) 2021-12-08 2021-12-08 Method for monitoring respiration based on data acquired by inertial sensor

Publications (2)

Publication Number Publication Date
CN114041780A CN114041780A (en) 2022-02-15
CN114041780B true CN114041780B (en) 2022-08-30

Family

ID=80212419

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111489019.3A Active CN114041780B (en) 2021-12-08 2021-12-08 Method for monitoring respiration based on data acquired by inertial sensor

Country Status (1)

Country Link
CN (1) CN114041780B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114652297B (en) * 2022-03-07 2025-03-14 骏楷国际有限公司 A respiratory rate detection method, device, mobile terminal and storage medium
CN115486833B (en) * 2022-08-22 2023-06-06 华南师范大学 Respiratory state detection method, device, computer equipment and storage medium
CN116701954A (en) * 2023-05-17 2023-09-05 中国科学院计算技术研究所 A Method of Infrastructure Status Identification Based on IMU Data
CN119257614B (en) * 2024-12-09 2025-03-21 中国科学院大学 Method, device, equipment, storage medium and program product for determining electroencephalogram phase

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109805898A (en) * 2019-03-22 2019-05-28 中国科学院重庆绿色智能技术研究院 Prediction method of critically ill death based on attention mechanism time series convolutional network algorithm
CN112006654A (en) * 2020-07-16 2020-12-01 中国科学技术大学 Bone age assessment method based on convolutional neural network and multiple attention mechanism
CN112806977A (en) * 2021-02-05 2021-05-18 复旦大学 Physiological parameter measuring method based on multi-scale fusion network
CN113229825A (en) * 2021-06-22 2021-08-10 郑州大学 Deep neural network-based multi-label multi-lead electrocardiogram classification method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11145293B2 (en) * 2018-07-20 2021-10-12 Google Llc Speech recognition with sequence-to-sequence models
US11011154B2 (en) * 2019-02-08 2021-05-18 Tencent America LLC Enhancing hybrid self-attention structure with relative-position-aware bias for speech synthesis

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109805898A (en) * 2019-03-22 2019-05-28 中国科学院重庆绿色智能技术研究院 Prediction method of critically ill death based on attention mechanism time series convolutional network algorithm
CN112006654A (en) * 2020-07-16 2020-12-01 中国科学技术大学 Bone age assessment method based on convolutional neural network and multiple attention mechanism
CN112806977A (en) * 2021-02-05 2021-05-18 复旦大学 Physiological parameter measuring method based on multi-scale fusion network
CN113229825A (en) * 2021-06-22 2021-08-10 郑州大学 Deep neural network-based multi-label multi-lead electrocardiogram classification method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Multimodal Sleep Signals-Based Automated Sleep Arousal Detection;GUANGXIN ZHOU et.al;《IEEE Access》;20200605;第106157-106164页 *
融合卷积神经网络与双向GRU的文本情感分析胶囊模型;程艳 等;《中文信息学报》;20210531;第118-129页 *

Also Published As

Publication number Publication date
CN114041780A (en) 2022-02-15

Similar Documents

Publication Publication Date Title
CN114041780B (en) Method for monitoring respiration based on data acquired by inertial sensor
Singh et al. Deep ConvLSTM with self-attention for human activity decoding using wearable sensors
Hnoohom et al. An Efficient ResNetSE Architecture for Smoking Activity Recognition from Smartwatch.
EP3314541A1 (en) Deriving movement behaviour from sensor data
CN108245172B (en) Human body posture recognition method free of position constraint
CN114943324A (en) Neural network training method, human motion recognition method and equipment, storage medium
CN110659677A (en) A human fall detection method based on movable sensor combination device
CN112418166B (en) Emotion distribution learning method based on multi-mode information
CN109976526A (en) A kind of sign Language Recognition Method based on surface myoelectric sensor and nine axle sensors
CN110443309A (en) A kind of electromyography signal gesture identification method of combination cross-module state association relation model
Liu et al. Deep-learning-based signal enhancement of low-resolution accelerometer for fall detection systems
Guo et al. Smart Healthcare System Based on Cloud‐Internet of Things and Deep Learning
CN113609999B (en) Human body model building method based on gesture recognition
CN115995015A (en) CXR image classification method and system based on residual convolution and multi-head self-attention
CN107766930B (en) Equivalent ROM Distance Calculation Method Based on DTW Cluster Fuzzy Grouping SOM Neurons
Hafeez et al. Multi-sensor-based action monitoring and recognition via hybrid descriptors and logistic regression
CN116861245A (en) System and method for identifying cognitive impairment ranks
Sun et al. A rapid response system for elderly safety monitoring using progressive hierarchical action recognition
CN109191425B (en) Medical image analysis method based on multi-layer neural network model
CN119007301A (en) Vestibular illusion training method and device and electronic equipment
Kraft et al. Wrist-worn accelerometer based fall detection for embedded systems and IoT devices using deep learning algorithms
Ren et al. PDCHAR: Human activity recognition via multi-sensor wearable networks using two-channel convolutional neural networks
Rossi et al. Identification of characteristic points in multivariate physiological signals by sensor fusion and multi-task deep networks
CN116756571A (en) Behavior recognition model training method based on time-frequency fusion enhancement
Cao Analysis of aerobic training posture using machine vision for body area networks

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant