A kind of breathing detection method
Technical field
The invention belongs to breathing detection technical fields, and in particular to a kind of breathing detection method.
Background technology
As cardiopulmonary exercise test is in the application of the clinical functions such as breathing, cycle, metabolism, nerve, human body respiration detection side
Method becomes more and more important.Human body respiration detects, and is under being acquired from quiescent condition to motion state by cardiopulmonary measuring device
Respiratory wave signal, the index point of detection breathing in real time, calculates respiratory characteristic parameter, largely related to patient to enable the clinician to obtain
Important information improve efficiency and diagnostic accuracy convenient for diagnosis.The method of breathing detection mainly uses extreme value currently on the market
Method and zero-crossing method, extremum method need to judge wave crest or trough in conjunction with threshold condition, when there is baseline drift in waveform, anti-interference energy
Respiration can not be accurately positioned in force difference.Zero-crossing method calculates respiration by judging the positive and negative values of air-breathing and expiration, when
When occurring faint fluctuation in respiration, easily it is judged as repeatedly breathing.
Patent 201711232535.1 discloses a kind of heart rate and respiratory rate data processing method, according to human body physical sign number
According to the characteristics of extraction sampled signal time domain and frequency domain character reconstruction signal waveform and repaiied by continuous waveform fitting mode
Just, include the following steps:1) it allows the data in a sampling period to carry out noise reduction process by filter and obtains preprocessed data;2)
Peak detection is carried out to obtain the Time Domain Amplitude of signal to preprocessed data, while FFT transform is made to obtain to preprocessed data
Its frequency domain character;3) signal frequency domain feature is utilized to use interpolation method reconfiguration waveform with Time Domain Amplitude;4) with next sampling period
Reconfiguration waveform be fitted to obtain the correction waveform of signal;5) revised waveform will obtain new with the waveform fitting after it again
Reconfiguration waveform, repeated several times, prediction error are gradually reduced, and precision is gradually increased.Patent 201310750413.7, is related to one kind
Respiration signal processing method comprising following steps:S101, breath signal is pre-processed, realizes signal band selection, obtains
Bandwidth signal must be limited;S103, Teager energy operator transformation is carried out to the restriction bandwidth signal, obtains the breath signal
Instantaneous amplitude and instantaneous frequency;S105, time domain and frequency transformation are carried out respectively to the instantaneous amplitude and the instantaneous frequency,
Obtain instantaneous respiratory intensity and instantaneous respiratory rate;S107, the instantaneous respiratory intensity and the instantaneous respiratory rate are carried out respectively
It is filtered, obtains average respiratory intensity and average respiration.
Above-mentioned patent has prediction error small, advantage with high accuracy, and flow chart of data processing calculation amount is moderate, is suitable for calculating
The limited portable device of power;Respiration signal processing method has good anti motion interference ability, can obtain simultaneously and can be real
Present line calculates respiratory rate and respiratory intensity in real time.But expiration and air-breathing rope can be obtained in real time by not providing technical solution
Draw a little, exhales to calculate cardiopulmonary test, inspiratory duration, the parameters such as oxygen pulse, respiratory rate, ventilatory capacity.
(1) the technical issues of solving
The invention aims to overcome the defect problem of the above-mentioned prior art, a kind of breathing detection method, energy are provided
Enough obtain in real time is exhaled and air-breathing index point, to calculate expiration, inspiratory duration, the parameters such as respiratory rate.
(2) technical solution
In order to achieve the above object, the present invention is achieved by the following technical programs:
A kind of breathing detection method, includes the following steps:
S1, initialization detection points are 0, and air-breathing mark is true, and mark of exhaling is false;
X S2, delay data on flows, are detected;
S3, acquisition data on flows;
S4, judge whether newest point is more than X to test point, if it is otherwise, it returns to step S3, if yes carries out in next step;
S5, judge whether current traffic data and the product of next data on flows are less than Y, if it is otherwise, detection points add
1, return to step S4 are recycled and are continued to judge, if yes carry out step S6;
S6, judge whether to meet suction condition, if it is otherwise, detection points plus 1, return to step S4, cycle continue to judge,
If yes step S7 is carried out;
S7, current traffic data and next data on flows are taken absolute value respectively, compares size, compared with small amount data
Index point is as air-breathing index point;
S8, record air-breathing index point, it is false to set air-breathing mark, and mark of exhaling is true;
S9, judge whether to meet expiration condition, if it is otherwise, detection points plus 1, return to step S4, cycle continue to judge,
If yes it carries out in next step;
S10, current traffic data and next data on flows take absolute value respectively, compare size, compared with small amount data
Index point is as expiration index point;
S11, record expiration index point, it is true to set air-breathing mark, and mark of exhaling is false;
S12, it stops data collection, detection terminates.
Further, X is adjusted according to cardiopulmonary test-types dynamic in the step S2, X ranging from 15-30.
Further, Y is zero in the step S5, and Y is adjusted according to cardiopulmonary test-types dynamic, and Y is ranging from
0.000001-0.0004。
Further, suction condition is specially in the step S6:(1) air-breathing mark is true;(2) judge X flow
If yes whether data carry out all greater than 0 in next step, if it is otherwise, being unsatisfactory for suction condition;(3) judge X data on flows
Maximum value whether more than or equal to Z if yes meet suction condition if it is otherwise, being unsatisfactory for suction condition.
Further, Z is adjusted according to cardiopulmonary test-types dynamic in the step S6, and Z is threshold value, Z ranging from 0.001-
0.03。
Further, expiration condition is specially in the step S9:(1) mark of exhaling is true;(2) judge X flow
If yes whether data carry out all less than 0 in next step, if it is otherwise, being unsatisfactory for expiration condition;(3) judge X data on flows
The absolute value of minimum value whether more than or equal to Z if yes meet expiration condition if it is otherwise, being unsatisfactory for expiration condition.
Further, Z is adjusted according to cardiopulmonary test-types dynamic in the step S9, and Z is threshold value, Z ranging from 0.001-
0.03。
(3) advantageous effect
Beneficial effects of the present invention:A kind of breathing detection method, complexity is low, and performance is good, can be used for preserving breathing in real time
Index point reduces operating personnel's burden;Suction condition provided by the invention or expiration condition judgment, effectively prevent feeble respiration
Error in data caused by fluctuation;Zero crossing provided by the invention judges that zero is a range, in conjunction with suction condition or expiration item
Part judges that the two mutually constrains, and more accurately calculates the index point of air-breathing and expiration.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with
Obtain other attached drawings according to these attached drawings.
Fig. 1 is the flow chart of the present invention;
Fig. 2 is that SVC tests data on flows and its result figure of corresponding breathing index point;
Fig. 3 is that FVC tests data on flows and its result figure of corresponding breathing index point;
Fig. 4 is that MVV tests data on flows and its result figure of corresponding breathing index point;
Fig. 5 is that CPET tests data on flows and its result figure of corresponding breathing index point.
Specific implementation mode
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is
A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art
The every other embodiment obtained without creative efforts, shall fall within the protection scope of the present invention.
Equipment for breath signal detection includes mainly host computer and slave computer, and slave computer is mainly breathing gas acquisition
Device, including ultrasonic flow transducer, 02 concentration analysis device, CO2 concentration sensor.Ultrasonic flow transducer is for testing human body
Breathing gas flow, 02 concentration analysis device is used to test oxygen concentration in breathing gas, and CO2 concentration sensor is for testing
Gas concentration lwevel in breathing gas.Host computer is mainly used to receive the data of slave computer acquisition, shows respiratory waveform, calculates the heart
Lung relevant parameter is used for clinical diagnosis.
The premise that cardiorespiratory parameters calculate is that breathing index point is accurately positioned, and by the data on flows processing to acquisition, is calculated
Index point is breathed, including:Whether cycle criterion current point meets delayed data condition to test point;Judge whether test point meets
Zero crossing condition;Judge whether test point meets suction condition or breathing condition;Alternately record air-breathing index point and index of exhaling
Point.
In conjunction with Fig. 1, a kind of breathing detection method includes the following steps:
S1, initialization detection points are 0, and air-breathing mark is true, and mark of exhaling is false;
X S2, delay data on flows, are detected;X is adjusted according to cardiopulmonary test-types dynamic, X ranging from 15-30;
S3, acquisition data on flows:
S4, judge whether newest point is more than X to test point, if it is otherwise, it returns to step S3, if yes carries out in next step;
S5, judge whether current traffic data and the product of next data on flows are less than Y, if it is otherwise, detection points add
1, return to step S4 are recycled and are continued to judge, if yes carry out step S6;Y is zero, and Y is adjusted according to cardiopulmonary test-types dynamic,
Y ranging from 0.000001-0.0004;
S6, judge whether to meet suction condition, if it is otherwise, detection points plus 1, return to step S4, cycle continue to judge,
If yes step S7 is carried out;Suction condition is specially in step S6:(1) air-breathing mark is true;(2) judge X data on flows
Whether all greater than 0, if yes carry out in next step, if it is otherwise, being unsatisfactory for suction condition;(3) judge X data on flows most
If yes whether big value more than or equal to Z meets suction condition if it is otherwise, being unsatisfactory for suction condition;Z is according to cardiopulmonary test-types
Dynamic adjusts, and Z is threshold value, Z ranging from 0.001-0.03;
S7, current traffic data and next data on flows are taken absolute value respectively, compares size, compared with small amount data
Index point (detection points or detection points plus 1) is used as air-breathing index point;
S8, record air-breathing index point, it is false to set air-breathing mark, and mark of exhaling is true;
S9, judge whether to meet expiration condition, if it is otherwise, detection points plus 1, return to step S4, cycle continue to judge,
If yes it carries out in next step;Expiration condition is specially in step S9:(1) mark of exhaling is true;(2) judge X data on flows
Whether all less than 0, if yes carry out in next step, if it is otherwise, being unsatisfactory for expiration condition;(3) judge X data on flows most
If yes whether the absolute value of small value more than or equal to Z meets expiration condition if it is otherwise, being unsatisfactory for expiration condition;Z is according to cardiopulmonary
Test-types dynamic adjusts, and Z is threshold value, Z ranging from 0.001-0.03;
S10, current traffic data and next data on flows take absolute value respectively, compare size, compared with small amount data
Index point (detection points or detection points plus 1) is used as expiration index point;
S11, record expiration index point, it is true to set air-breathing mark, and mark of exhaling is false;
S12, it stops data collection, detection terminates.
Breathing detection method is mainly for pulmonary function test (pft), including static lung volume (SVC) test, lung of exerting oneself in the present invention
Amount (FVC) living is tested, maximal ventilatory volume (MVV) is tested, cardiopulmonary exercise test (CPET) test.Each tests X, Y, the Z used
Numerical value is as shown in table 1.
1 pulmonary function test (pft) parameter list of table
Type |
SVC |
FVC |
MVV |
CPET |
Delay data number (X) |
30 |
30 |
15 |
25 |
Zero passage point range (Y) |
0.0004 |
0.000001 |
0.000001 |
0.00001 |
Expiration or Inhalation Threshold (Z) |
0.03 |
0.03 |
0.001 |
0.03 |
Static lung volume (SVC) test is carried out by using the method for the present invention, forced vital capacity (FVC) is tested, maximum logical
Tolerance (MVV) is tested, and Fig. 2 gives SVC test datas on flows and its result figure of corresponding breathing index point, Fig. 3 give FVC
Data on flows and its result figure of corresponding breathing index point are tested, Fig. 4 gives MVV test datas on flows and its corresponding breathing rope
Draw result figure a little, Fig. 5 gives CPET test datas on flows and its result figure of corresponding breathing index point.It can from Fig. 2 to Fig. 5
To find out, zero-crossing method calculates respiration by judging the positive and negative values of air-breathing and expiration, when occurring faint wave in respiration
When dynamic, erroneous judgement is not occurred.
In conclusion the embodiment of the present invention, breathing detection method, complexity is low, and performance is good, can be used for preserving breathing in real time
Index point reduces operating personnel's burden;Suction condition provided by the invention or expiration condition judgment, effectively prevent feeble respiration
Error in data caused by fluctuation;Zero crossing provided by the invention judges that zero is a range, in conjunction with suction condition or expiration item
Part judges that the two mutually constrains, and more accurately calculates the index point of air-breathing and expiration.
The above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although with reference to the foregoing embodiments
Invention is explained in detail, it will be understood by those of ordinary skill in the art that:It still can be to aforementioned each implementation
Technical solution recorded in example is modified or equivalent replacement of some of the technical features;And these modification or
It replaces, the spirit and scope for various embodiments of the present invention technical solution that it does not separate the essence of the corresponding technical solution.