A respiratory waveform processing method
Through deep learning methods combined with multiple feature parameters, a classification model is established using the LSTM network, which solves the problem that existing breath waveform processing methods cannot effectively extract information, realizes deep processing and abnormal identification of breath waveforms, and expands the application field.
Patent Information
- Application Number
- CN202210438996.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-25
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2042-04-25
AI Technical Summary
The existing respiratory waveform processing methods cannot effectively extract the essential characteristics of the respiratory waveform, resulting in low information utilization and limited application fields.
Deep learning method is used to combine a variety of feature parameters, including statistics, frequency domain features, nonlinear features and waveform physical features, and a classification model is established through a long and short-term memory network (LSTM) to identify abnormal waveforms.
Deep processing of breathing waveforms is realized, abnormal waveforms can be identified in a timely and effective manner, expanding the application field and improving information utilization.
Smart Images

Figure CN114818805B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of signal processing methods, and in particular to a respiratory waveform processing method. Background Art
[0002] The respiratory waveform signal is one of the most important physiological signals of the human body. A large amount of effective information can be extracted from a high-quality respiratory waveform to reflect the physiological and psychological activities of the human body.
[0003] Current methods for processing respiratory waveforms include: identifying signal normality based on peak thresholds; performing time-domain signal processing based on multiple detection points; analyzing respiratory frequency based on the spectral characteristics of the respiratory waveform; and performing simple detection, identification, and noise reduction on the respiratory signal to obtain an optimized waveform. Most of these respiratory waveform processing methods fail to capture effective information that reflects the waveform's essential characteristics.
[0004] Respiratory waveform processing primarily extracts effective characteristic parameters from the waveform that reflect respiratory rhythm and physiological information. However, a comprehensive and in-depth respiratory waveform processing method is currently needed. Due to the ease of access to respiratory waveform signals, respiratory waveform processing methods should also have a wide range of applications. By analyzing the comprehensive characteristic parameters of respiratory waveform signals, deeply mining the signal, and combining it with deep learning methods, the resulting parameters can be more effective and applied to a wider range of fields. Summary of the Invention
[0005] In view of the application value of the respiratory waveform processing method, as well as the accuracy and efficiency of the respiratory waveform processing method combined with deep learning, the present invention provides the following technical solutions:
[0006] A respiratory waveform processing method, the method comprising the following steps:
[0007] S001, perform signal preprocessing according to the respiratory waveform, obtain the respiratory waveform to be processed and record it as a sequence R{r1,r2,...,r n};
[0008] S002, detecting waveform peak points according to the respiratory waveform to be processed to obtain a respiratory waveform peak point sequence;
[0009] S003, the sequence after making the first-order difference based on the peak point sequence of the respiratory waveform is recorded as the original RR{rr (1) ,rr (2) ,...,rr (n1)} sequence, the original RR{rr (1) ,rr (2) ,...,rr (n1)The sequence after the first-order difference of the sequence is recorded as the original RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2)}sequence;
[0010] S004, according to the original RR (1) ,rr (2) ,...,rr (n1)} sequence and original RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2)}sequence to process outliers and obtain the current RR{rr (1) ,rr (2) ,...,rr (n1)}Sequence and current RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2)}sequence;
[0011] S005, according to the current RR{rr (1) ,rr (2) ,...,rr (n1)}Sequence and current RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2)} sequence, the method for calculating the respiratory rate variability RRV characteristic parameters is:
[0012] S100, calculate the current RR {rr (1) ,rr (2) ,...,rr (n1)}Sequence statistics parameters RRME, RRST, RRMS, RRSD, RRCV and current RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2)}Sequence statistics parameters RRFDME, RRFDST, RRFDMS, RRFDSD, RRFDCV;
[0013] The current RR (1) ,rr (2) ,...,rr (n1) The mean value of the sequence is defined as RRME, which is calculated as follows:
[0014]
[0015] The current RR(1) ,rr (2) ,...,rr (n1)}The standard deviation of the series is defined as RRST;
[0016] The current RR (1) ,rr (2) ,...,rr (n1) The root mean square of the sequence is defined as RRMS, which is calculated as follows:
[0017]
[0018] The current RR (1) ,rr (2) ,...,rr (n1) The maximum and minimum values of the elements in the sequence are defined as the range RRSD:
[0019] RRSD=max({rr(1),rr(2),...,rr(n1)})-min({rr(1),rr(2),...,rr(n1)})
[0020] In the formula, max represents the function of calculating the maximum value, and min represents the function of calculating the minimum value.
[0021] The current RR (1) ,rr (2) ,...,rr (n1) The coefficient of variation of the sequence is defined as RRCV:
[0022]
[0023] In the formula The calculation formula is as follows:
[0024]
[0025] According to the current RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2)} sequence, the current RR{rr (1) ,rr (2) ,...,rr (n1) In the calculation formula of each statistic parameter of the sequence, the rr(n1) element is replaced by rr fd (n2) element, to define its mean as RRFDME, standard deviation as RRFDST, root mean square as RRFDMS, range as RRFDSD, and coefficient of variation as RRFDCV;
[0026] S200, calculate the current RR {rr (1),rr (2) ,...,rr (n1) Frequency domain characteristic parameters of the sequence: HF, LF, VLF, HF / LF;
[0027] The current RR (1) ,rr (2) ,...,rr (n1) The sequence is converted into a frequency domain spectrum by Fourier transform. The maximum frequency value in the selected frequency domain segment is defined as HF, the minimum frequency value in the selected frequency domain segment is defined as LF, and the minimum frequency value in the frequency domain is defined as VLF. HF / LF is the ratio of the parameter HF to the parameter LF.
[0028] S300, calculating nonlinear characteristic parameters;
[0029] The calculation method of nonlinear feature parameter sample entropy is as follows:
[0030] For a time series consisting of N data {rr(n)}=rr(1),rr(2),...,rr(N), the sequence is organized into a set of vector sequences RR with dimension m m (1),...,RR m (N-m+1), where RR m (i) = {rr(i), rr(i+1), .., rr(i+m-1)}, 1≤i≤N-m+1, these vectors represent the m consecutive values of rr starting from point i;
[0031] Define vector RR m (i) With RR m (j) The distance d[RR m (i),RR m (j)] is the absolute value of the maximum difference between the two corresponding elements, that is: d[RR m (i),RR m (j)]=max k=0,...,m-1 (|rr(i+k)-rr(j+k)|);
[0032] For a given RR m (i) RR statistics m (i) With RR m The number of j (1≤j≤Nm,j≠i) whose distance between them is less than or equal to r, and is recorded as B i , for 1≤i≤Nm, define:
[0033]
[0034] Definition B (m) (r) is:
[0035]
[0036] Increase the dimension to m+1 and calculate RR m+1 (i) With RR m+1 The number of (j)(1≤j≤Nm,j≠i) distances less than or equal to r, denoted as A i , r is defined as: 0.1~0.25*std({rr(n)}), std is the function for obtaining the standard deviation of the sequence;
[0037] Defined as:
[0038]
[0039] Definition A m (r) is:
[0040]
[0041] So, B m (r) is the probability that two sequences match m points under similarity tolerance r, and A m (r) is the probability that two sequences match m + 1 points;
[0042] Sample entropy is defined as:
[0043]
[0044] When N is a finite value, it can be estimated using the following formula:
[0045]
[0046] According to the calculation method of sample entropy, the current RR{rr (1) ,rr (2) ,...,rr (n1) The nonlinear characteristic parameter RRSE of the sequence and the current RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2) Nonlinear characteristic parameter RRFDSE of the sequence
[0047] S400, calculating waveform physical characteristic parameters;
[0048] Calculate the sequence R{r1,r2,...,r n Peak value:
[0049] R f =findpeaks(R{r1,r2,...,rn})
[0050] Calculate the sequence R{r1,r2,...,rn Valley value:
[0051] R l =findpeaks(-R{r1,r2,...,rn})
[0052] Where findpeaks is the function for finding the peak point of the waveform;
[0053] According to R f To draw the upper envelope of the waveform:
[0054] RRUV=interp1(R f )
[0055] According to R l To draw the lower envelope of the waveform:
[0056] RRDV=interp1(R l )
[0057] In the formula, interp1 is the interpolation function. There are three ways to use the interp1 function:
[0058] Nearest difference (nearest), the function value at the interpolation point is equal to the function value of the nearest known point to the interpolation point;
[0059] Piecewise linear interpolation (liner), the function value at the interpolation point is predicted by the linear function connecting its two nearest points;
[0060] Spline interpolation (spline), the default is cubic spline interpolation.
[0061] Furthermore, the local maximum detection method is specifically as follows:
[0062] Define the sampling rate fs of respiratory waveform data;
[0063] Define the period window W, where W is fs*n, and n is specified during the respiratory waveform acquisition process;
[0064] The sequence R{r1,r2,...,r n} is scanned periodically using the periodic window W, that is, each time in the sequence R{r1,r2,...,r n}Scan W points on the graph to detect the local maximum value within the period window W.
[0065] S006, combining the RRV feature parameters into a feature sequence, inputting the sequence into a long short-term memory network (LSTM) for classification, and establishing a classification model capable of identifying abnormal waveforms.
[0066] Furthermore, in S001, signal preprocessing is performed according to the respiratory waveform to obtain the respiratory waveform to be processed:
[0067] Signal preprocessing methods include: data segmentation, respiratory waveform filtering, respiratory waveform data outlier cleaning, respiratory waveform data missing value interpolation, and respiratory waveform wavelet packet decomposition.
[0068] Furthermore, in S002, waveform peak points are detected according to the respiratory waveform to be processed, and a respiratory waveform peak point sequence is obtained, specifically:
[0069] The preprocessed sequence R{r1,r2,...,r n}, n is the number of sampling points constituting the respiratory waveform to be processed; the local maximum detection method is used in the sequence R{r1,r2,...,r n} mark the local maximum;
[0070] The detection method of the local maximum of the sequence R includes:
[0071] In the process of collecting respiratory waveform data, the sampling rate fs of the collection device must be determined first;
[0072] Define the period window W, where W is the parameter specified by fs*n, n in the respiratory waveform acquisition process;
[0073] The sequence R{r1,r2,...,r n}Periodic scanning is performed on the period window W as the scale, and in each W period, the maximum value is detected, that is, all the peaks within a W period;
[0074] The maximum value is detected among all the detected peaks, and the detected maximum value is the local maximum value of the sequence R;
[0075] The local maximum of sequence R is the peak point of the waveform. A group of local maximum values detected from sequence R is recorded as sequence R. max {r max(1) ,r max(2) ,...,r max(m)}, m is the number of local maxima detected in the sequence R, sequence R max {r max(1) ,r max(2) ,...,r max(m)} is the peak point sequence of the respiratory waveform.
[0076] Furthermore, in S003, the sequence obtained by performing first-order difference on the peak point sequence of the respiratory waveform is recorded as the original RR{rr (1) ,rr (2) ,...,rr(n1)} sequence, for the original RR{rr (1) ,rr (2) ,...,rr (n1) The sequence after the first-order difference of the sequence is recorded as the original RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2) The specific sequence is:
[0077] According to the respiratory waveform peak point sequence R max {r max(1) ,r max(2) ,...,r max(m)}, calculate the sequence R max The first-order difference sequence of :
[0078] rr (k) =r max(k+1) -r max(k) (k=1,2,...,n1)
[0079] Where n1=m-1, n1 is the original RR{rr (1) ,rr (2) ,...,rr (n1)}The number of elements in the sequence, represented by rr (k) Composition of the original RR{rr (1) ,rr (2) ,...,rr (n1)}sequence;
[0080] According to the original RR{rr (1) ,rr (2) ,...,rr (n1)}sequence, calculate its first-order difference sequence:
[0081] rr fd(k) =rr (k+1) -rr (k) (k=1,2,...,n2)
[0082] Where n2 = n1-1, n2 is the original RR fd The number of elements in the sequence, given by rr fd(k) Composition of original RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2)}sequence.
[0083] Further, in S004, according to the original RR{rr (1) ,rr (2) ,...,rr (n1)} sequence and original RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2)}sequence to process outliers and obtain the current RR{rr (1) ,rr (2) ,...,rr (n1)}Sequence and current RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2) The specific sequence is:
[0084] For the original RR{rr (1) ,rr (2) ,...,rr (n1)} sequence and original RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2)}Detect outliers in the sequence;
[0085] Original RR (1) ,rr (2) ,...,rr (n1)} sequence and original RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2) The outliers in the sequence are:
[0086] In the original RR{rr (1) ,rr (2) ,...,rr (n1) In the sequence, when the value of the element rr(n1) in the sequence is greater than 6 or less than 1, the element rr(n1) is determined to be an abnormal value;
[0087] Calculate the original RR{rr (1) ,rr (2) ,...,rr (n1)}sequence standard deviation, denoted as std(RR), in the original RR{rr (1) ,rr (2) ,...,rr (n1)} sequence, when the value of the element rr(k)-rr(k-1) in the sequence is greater than 3 times std(RR), the element rr(k) is determined to be the original RR{rr (1) ,rr (2) ,...,rr (n1)}Outliers in the sequence;
[0088] After detecting outliers, the original RR{rr (1) ,rr (2) ,...,rr (n1)} sequence and original RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2)} sequence is the current RR{rr (1) ,rr (2) ,...,rr (n1)}Sequence and current RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2)}sequence.
[0089] Furthermore, in S006, the RRV feature parameters are combined into a feature sequence, which is input into a long short-term memory network (LSTM) for classification, and a classification model capable of identifying abnormal waveforms is established. Specifically, the following is the process:
[0090] According to the RRV characteristic parameters proposed in the present invention, all RRV characteristic parameters are extracted from the acquired respiratory waveform, including: RRME, RRST, RRMS, RRSD, RRCV, RRFDME, RRFDST, RRFDMS, RRFDSD, RRFDCV, HF, LF, VLF, HF / LF, RRSE, RRFDSE, RRUV, and RRDV; all the extracted characteristic parameters are combined into a characteristic sequence according to the time sequence of respiratory waveform acquisition;
[0091] The feature sequence processed from the abnormal waveform is recorded as an abnormal sample, and the corresponding label is recorded as 1. The feature sequence processed from the normal waveform is recorded as a normal sample, and the corresponding label is recorded as 0.
[0092] Each feature sequence is a row vector and is input into the network as a sample, that is, a sample should contain all the RRV feature parameters.
[0093] Combine the feature sequences of all samples into a feature matrix, and input the samples in the feature matrix into the LSTM network for training in batches according to preset batches;
[0094] During the LSTM network training process, the network performs cyclic learning based on the time sequence of respiratory waveform acquisition.
[0095] The characteristic parameter learning content of each preset time period will be transferred to the characteristic parameter learning process of the next preset time period, with the aim of more accurately classifying abnormal waveforms and normal waveforms;
[0096] By combining RRV feature parameters with the application of deep learning network LSTM, a classification model that can accurately identify abnormal waveforms is finally obtained. BRIEF DESCRIPTION OF THE DRAWINGS
[0097] The accompanying drawings are used to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, constitute part of this application, and do not constitute an improper limitation of the present invention. In the accompanying drawings:
[0098] Figure 1 FIG2 is a flow chart of a respiratory waveform processing method in one embodiment;
[0099] Figure 2 FIG2 is a flow chart of a respiratory waveform processing method in another embodiment;
[0100] Figure 3 Shown is a schematic diagram of respiratory waveform peak point detection and related sequence extraction. DETAILED DESCRIPTION
[0101] It should be noted that the following detailed descriptions are illustrative and intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present application belongs.
[0102] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular also includes the plural. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or combinations thereof.
[0103] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0104] The purpose of the present invention is to provide a respiratory waveform processing method to process and analyze the waveform data generated when a user uses a ventilator, and to mine effective data information from the respiratory waveform.
[0105] To achieve the above object, the present invention provides the following solutions:
[0106] According to an embodiment of the present invention, a respiratory waveform processing method is provided. Figure 1The following steps are involved:
[0107] S011, obtaining the respiratory waveform to be processed;
[0108] S012, obtaining a sequence of respiratory waveform peak points;
[0109] S013, get the original RR (1) ,rr (2) ,...,rr (n1)} sequence and original RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2)}sequence;
[0110] S014, obtain the current RR (1) ,rr (2) ,...,rr (n1)}Sequence and current RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2)}sequence;
[0111] S015, calculate respiratory rate variability (RRV) characteristic parameters;
[0112] S016, train the LSTM network to obtain the classification model.
[0113] In S011, obtaining the respiratory waveform to be processed specifically involves performing signal preprocessing according to the respiratory waveform to obtain the respiratory waveform to be processed:
[0114] The preprocessing of the respiratory waveform is first segmented according to the preset duration, and then divided into data segments with a uniform number of sampling points for the next step of processing;
[0115] The respiratory waveform data divided into data segments are cleaned of outliers and interpolated for missing values;
[0116] The cleaned and interpolated respiratory waveform data should be low-pass filtered to obtain a low-frequency respiratory signal that can be used for feature extraction.
[0117] In S012, obtaining a respiratory waveform peak point sequence specifically involves detecting waveform peak points according to the respiratory waveform to be processed to obtain a respiratory waveform peak point sequence:
[0118] The respiratory waveform to be processed obtained after the processing in S011 is recorded as a sequence R{r1, r2, ..., r n}, n is the number of sampling points constituting the respiratory waveform to be processed; the local maximum detection method is used in the sequence R{r1,r2,...,rn} mark the local maximum;
[0119] The detection method of the local maximum of the sequence R includes:
[0120] In the process of collecting respiratory waveform data, the sampling rate fs of the collection device must be determined first;
[0121] Define the period window W, where W is the parameter specified by fs*n, n in the respiratory waveform acquisition process;
[0122] After preprocessing, the sequence R{r1, r2, ..., r n}Periodic scanning is performed on the period window W as the scale, and in each W period, the maximum value is detected, that is, all the peaks within a W period;
[0123] The maximum value is detected among all the detected peaks, and the detected maximum value is the local maximum value of the sequence R;
[0124] The local maximum of sequence R is the peak point of the waveform. A group of local maximum values detected from sequence R is recorded as sequence R. max {r max(1) ,r max(2) ,...,r max(m)}, m is the number of local maxima detected in the sequence R, sequence R max {r max(1) ,r max(2) ,...,r max(m)} is the peak point sequence of the respiratory waveform.
[0125] In S013, the original RR {rr (1) ,rr (2) ,...,rr (n1)} sequence and original RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2) The specific sequence is the sequence obtained by making the first-order difference based on the peak point sequence of the respiratory waveform, which is recorded as the original RR{rr (1) ,rr (2) ,...,rr (n1)} sequence, for the original RR{rr (1) ,rr (2) ,...,rr (n1) The sequence after the first-order difference of the sequence is recorded as the original RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2)}sequence:
[0126] According to the respiratory waveform peak point sequence R max {r max(1) ,r max(2) ,...,r max(m)}, calculate the sequence R max The first-order difference sequence of :
[0127] rr (k) =r max(k+1) -r max(k) (k=1,2,...,n1)
[0128] Where n1=m-1, n1 is the original RR{rr (1) ,rr (2) ,...,rr (n1)}The number of elements in the sequence, represented by rr (k) Composition of the original RR{rr (1) ,rr (2) ,...,rr (n1)}sequence;
[0129] According to the original RR{rr (1) ,rr (2) ,...,rr (n1)}sequence, calculate its first-order difference sequence:
[0130] rr fd(k) =rr (k+1) -rr (k) (k=1,2,...,n2)
[0131] Where n2 = n1-1, n2 is the original RR fd The number of elements in the sequence, given by rr fd(k) Composition of original RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2)}sequence.
[0132] In S014, the current RR {rr (1) ,rr (2) ,...,rr (n1)}Sequence and current RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2)} sequence is specifically based on the original RR{rr (1) ,rr (2) ,...,rr (n1)} sequence and original RR fd {rr fd(1) ,rr fd(2) ,...,rrfd(n2)}sequence to process outliers and obtain the current RR{rr (1) ,rr (2) ,...,rr (n1)}Sequence and current RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2)}sequence:
[0133] For the original RR{rr (1) ,rr (2) ,...,rr (n1)} sequence and original RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2)}Detect outliers in the sequence;
[0134] Original RR (1) ,rr (2) ,...,rr (n1)} sequence and original RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2) The outliers in the sequence are:
[0135] In the original RR{rr (1) ,rr (2) ,...,rr (n1) In the sequence, when the value of the element rr(n1) in the sequence is greater than 6 or less than 1, the element rr(n1) is determined to be an abnormal value;
[0136] Calculate the original RR{rr (1) ,rr (2) ,...,rr (n1)}sequence standard deviation, denoted as std(RR), in the original RR{rr (1) ,rr (2) ,...,rr (n1)} sequence, when the value of the element rr(k)-rr(k-1) in the sequence is greater than 3 times std(RR), the element rr(k) is determined to be the original RR{rr (1) ,rr (2) ,...,rr (n1)}Outliers in the sequence;
[0137] After detecting outliers, the original RR{rr (1) ,rr (2) ,...,rr (n1)} sequence and original RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2)} sequence is the current RR{rr (1) ,rr (2) ,...,rr (n1)}Sequence and current RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2)}sequence.
[0138] In S015, the respiratory rate variability (RRV) characteristic parameter is calculated based on the current RR{rr (1) ,rr (2) ,...,rr (n1)}Sequence and current RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2)}sequence is calculated, the specific method is:
[0139] S100, calculate the current RR {rr (1) ,rr (2) ,...,rr (n1)}Sequence statistics parameters RRME, RRST, RRMS, RRSD, RRCV and current RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2)}Sequence statistics parameters RRFDME, RRFDST, RRFDMS, RRFDSD, RRFDCV;
[0140] The current RR (1) ,rr (2) ,...,rr (n1) The mean value of the sequence is defined as RRME, which is calculated as follows:
[0141]
[0142] The current RR (1) ,rr (2) ,...,rr (n1)}The standard deviation of the series is defined as RRST;
[0143] The current RR (1) ,rr (2) ,...,rr (n1) The root mean square of the sequence is defined as RRMS, which is calculated as follows:
[0144]
[0145] The current RR (1) ,rr (2) ,...,rr (n1) The maximum and minimum values of the elements in the sequence are defined as the range RRSD:
[0146] RRSD=max({rr(1),rr(2),...,rr(n1)})-min({rr(1),rr(2),...,rr(n1)})
[0147] In the formula, max represents the function of calculating the maximum value, and min represents the function of calculating the minimum value.
[0148] The current RR (1) ,rr (2) ,...,rr (n1) The coefficient of variation of the sequence is defined as RRCV:
[0149]
[0150] In the formula The calculation formula is as follows:
[0151]
[0152] According to the current RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2)} sequence, the current RR{rr (1) ,rr (2) ,...,rr (n1) In the calculation formula of each statistic parameter of the sequence, the rr(n1) element is replaced by rr fd (n2) element, to define its mean as RRFDME, standard deviation as RRFDST, root mean square as RRFDMS, range as RRFDSD, and coefficient of variation as RRFDCV;
[0153] S200, calculate the current RR {rr (1) ,rr (2) ,...,rr (n1) Frequency domain characteristic parameters of the sequence: HF, LF, VLF, HF / LF;
[0154] The current RR (1) ,rr (2) ,...,rr (n1)The sequence is converted into a frequency domain spectrum by Fourier transform. The maximum frequency value in the selected frequency domain segment is defined as HF, the minimum frequency value in the selected frequency domain segment is defined as LF, and the minimum frequency value in the frequency domain is defined as VLF. HF / LF is the ratio of the parameter HF to the parameter LF.
[0155] S300, calculating nonlinear characteristic parameters;
[0156] The calculation method of nonlinear feature parameter sample entropy is as follows:
[0157] For a time series consisting of N data {rr(n)}=rr(1),rr(2),...,rr(N), the sequence is organized into a set of vector sequences RR with dimension m m (1),...,RR m (N-m+1), where RR m (i) = {rr(i), rr(i+1), .., rr(i+m-1)}, 1≤i≤N-m+1, these vectors represent the m consecutive values of rr starting from point i;
[0158] Define vector RR m (i) With RR m (j) The distance d[RR m (i),RR m (j)] is the absolute value of the maximum difference between the two corresponding elements, that is: d[RR m (i),RR m (j)]=max k=0,...,m-1 (|rr(i+k)-rr(j+k)|);
[0159] For a given RR m (i) RR statistics m (i) With RR m The number of j (1≤j≤Nm,j≠i) whose distance between them is less than or equal to r, and is recorded as B i , for 1≤i≤Nm, define:
[0160]
[0161] Definition B (m) (r) is:
[0162]
[0163] Increase the dimension to m+1 and calculate RR m+1 (i) With RR m+1 The number of (j)(1≤j≤Nm,j≠i) distances less than or equal to r, denoted as A i, r is defined as: 0.1~0.25*std({rr(n)}), std is the function for obtaining the standard deviation of the sequence;
[0164] Defined as:
[0165]
[0166] Definition A m (r) is:
[0167]
[0168] So, B m (r) is the probability that two sequences match m points under similarity tolerance r, and A m (r) is the probability that two sequences match m + 1 points;
[0169] Sample entropy is defined as:
[0170]
[0171] When N is a finite value, it can be estimated using the following formula:
[0172]
[0173] According to the calculation method of sample entropy, the current RR{rr (1) ,rr (2) ,...,rr (n1) The nonlinear characteristic parameter RRSE of the sequence and the current RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2) Nonlinear characteristic parameter RRFDSE of the sequence
[0174] S400, calculating waveform physical characteristic parameters;
[0175] Calculate the sequence R{r1,r2,...,r n Peak value:
[0176] R f =findpeaks(R{r1,r2,...,rn})
[0177] Calculate the sequence R{r1,r2,...,r n Valley value:
[0178] R l =findpeaks(-R{r1,r2,...,rn})
[0179] Where findpeaks is the function for finding the peak point of the waveform;
[0180] According to R f To draw the upper envelope of the waveform:
[0181] RRUV=interp1(R f )
[0182] According to R l To draw the lower envelope of the waveform:
[0183] RRDV=interp1(R l )
[0184] In the formula, interp1 is the interpolation function. There are three ways to use the interp1 function:
[0185] Nearest difference (nearest), the function value at the interpolation point is equal to the function value of the nearest known point to the interpolation point;
[0186] Piecewise linear interpolation (liner), the function value at the interpolation point is predicted by the linear function connecting its two nearest points;
[0187] Spline interpolation (spline), the default is cubic spline interpolation.
[0188] Furthermore, the local maximum detection method is specifically as follows:
[0189] Define the sampling rate fs of respiratory waveform data;
[0190] Define the period window W, where W is fs*n, and n is specified during the respiratory waveform acquisition process;
[0191] After preprocessing, the sequence R{r1, r2, ..., r n} is scanned periodically using the periodic window W, that is, each time in the sequence R{r1,r2,...,r n}Scan W points on the graph to detect the local maximum value within the period window W.
[0192] The above statistical parameters RRME, RRST, RRMS, RRSD, RRCV, RRFDME, RRFDST, RRFDMS, RRFDSD, RRFDCV, frequency domain characteristic parameters HF, LF, VLF, HF / LF, nonlinear characteristic parameters RRSE, RRFDSE and waveform physical characteristic parameters RRUV, RRDV constitute the feature extraction part of the RRV feature analysis content.
[0193] In S016, the LSTM network is trained to obtain a classification model. Specifically, the RRV feature parameters are combined into a feature sequence, input into a long short-term memory network (LSTM) for classification, and a classification model capable of identifying abnormal waveforms is established:
[0194] Extract RRV characteristic parameters from the acquired respiratory waveform, and combine all characteristic parameters into a characteristic sequence in chronological order;
[0195] Two types of feature sequences are obtained from abnormal waveforms and normal waveforms;
[0196] Each feature sequence is a row vector and is input into the network as a sample;
[0197] The feature sequences are combined into a feature matrix, and the feature matrix is input into the LSTM network for training, with the aim of obtaining a classification model that can identify abnormal waveforms and classify abnormal waveforms from normal waveforms.
[0198] As described above, the respiratory waveform processing method described in the present invention has the following beneficial effects:
[0199] (1) The respiratory waveform is a common physiological signal. The respiratory waveform processing method of the present invention can effectively preprocess the original waveform signal to obtain high-quality respiratory waveform data;
[0200] (2) The various parameters include: statistical parameters, frequency domain characteristic parameters, nonlinear characteristic parameters and waveform physical characteristic parameters. The combination of multi-dimensional parameters can make the parameters of this method more effectively reflect the true characteristics and meaning of the respiratory waveform;
[0201] (3) By combining the deep learning network to establish a classification model, normal waveforms and abnormal waveforms can be classified and identified in a timely and effective manner, making the processing method of the present invention more widely applicable.
[0202] Another embodiment of the present invention provides a respiratory waveform processing method, see Figure 2 The following steps are involved:
[0203] S017, obtain respiratory waveform data for a long period of time:
[0204] The long period of time specifically refers to respiratory waveform data for at least five days;
[0205] S018, extract the RRV characteristic parameters of all data in a long period of time:
[0206] Preprocess the acquired respiratory waveform and extract RRV characteristic parameters from the preprocessed waveform data, including statistical parameters RRME, RRST, RRMS, RRSD, RRCV, RRFDME, RRFDST, RRFDMS, RRFDSD, RRFDCV, frequency domain characteristic parameters HF, LF, VLF, HF / LF, nonlinear characteristic parameters RRSE, RRFDSE and waveform physical characteristic parameters RRUV, RRDV;
[0207] S019, combine the feature parameters into a feature matrix:
[0208] The feature parameters extracted from the respiratory waves over a long period of time are combined into a feature sequence in chronological order. Each sequence is a sample. The feature sequences of multiple samples are combined into a feature matrix for input into the deep learning network LSTM for training and learning.
[0209] S020, establish an abnormal respiratory waveform classification model:
[0210] During the input process of the LSTM network, ensure that the features learned by the network each time are the features of a time period, and bring the learned state into the learning of the features of the next time period;
[0211] That is, in the cyclic learning process of the LSTM network, all the feature parameters of a time period are learned each time, and then the state information obtained by the network learning in this time period is brought into the learning process of the next time period of the network, so as to ensure that the network training and learning process contains time series information.
[0212] In this embodiment, RRV feature parameters are combined with LSTM training to develop a classification model that can effectively and promptly identify abnormal respiratory waveforms. This has the beneficial effect of effectively integrating the temporal information contained in the feature sequence into the classification model, making the classification model's results more reliable, effective, and interpretable.
[0213] As mentioned above, the beneficial effects of adding the LSTM network model are: secondary mining through the deep learning network can make the method more portable and the extracted useful physiological information more comprehensive; the processing method combined with deep learning can more promptly and effectively identify abnormal respiratory waveforms.
[0214] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage and optical storage, etc.) containing computer-usable program code.
[0215] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0216] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0217] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0218] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to include such changes and modifications.
Claims
1. A respiratory waveform processing method, characterized in that: The method comprises the following steps: S001, perform signal preprocessing according to the respiratory waveform, obtain the respiratory waveform to be processed and record it as a sequence R{r1,r2,...,r n }; S002, detecting waveform peak points according to the respiratory waveform to be processed to obtain a respiratory waveform peak point sequence; S003, the sequence after making the first-order difference based on the peak point sequence of the respiratory waveform is recorded as the original RR{rr (1) ,rr (2) ,...,rr (n1) } sequence, the original RR{rr (1) ,rr (2) ,...,rr (n1) The sequence after the first-order difference of the sequence is recorded as the original RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2) }sequence; S004, according to the original RR (1) ,rr (2) ,...,rr (n1) } sequence and original RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2) }sequence to process outliers and obtain the current RR{rr (1) ,rr (2) ,...,rr (n1) }Sequence and current RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2) }sequence; S005, according to the current RR{rr (1) ,rr (2) ,...,rr (n1) }Sequence and current RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2) } sequence, the method for calculating the respiratory rate variability (RRV) characteristic parameters is: S100, calculate the current RR {rr (1) ,rr (2) ,...,rr (n1) }Sequence statistics parameters RRME, RRST, RRMS, RRSD, RRCV and current RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2) }Sequence statistics parameters RRFDME, RRFDST, RRFDMS, RRFDSD, RRFDCV; S200, calculate the current RR {rr (1) ,rr (2) ,...,rr (n1) Frequency domain characteristic parameters of the sequence: HF, LF, VLF, HF / LF; S300, calculate nonlinear characteristic parameters: According to the calculation method of sample entropy, the current RR{rr (1) ,rr (2) ,...,rr (n1) The nonlinear characteristic parameter RRSE of the sequence and the current RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2) Nonlinear characteristic parameter RRFDSE of the sequence S400, calculating waveform physical characteristic parameters; Calculate the sequence R{r1,r2,...,r n Peak value: R f =findpeaks(R{r1,r2,...,rn}) Calculate the sequence R{r1,r2,...,r n Valley value: R l =findpeaks(-R{r1,r2,...,rn}) Where findpeaks is the function for finding the peak point of the waveform; According to R f Obtain the waveform physical characteristic parameter RRUV, according to R l Obtain the waveform physical characteristic parameter RRDV; The RRV characteristic parameters include statistical parameters, frequency domain characteristic parameters, nonlinear characteristic parameters and waveform physical characteristic parameters; S006, combining the RRV feature parameters into a feature sequence, inputting the sequence into a long short-term memory network (LSTM) for classification, and establishing a classification model capable of identifying abnormal waveforms.
2. A respiratory waveform processing method according to claim 1, characterized in that: In S001, signal preprocessing is performed according to the respiratory waveform to obtain the respiratory waveform to be processed: The signal preprocessing method includes: performing data segmentation on the respiratory waveform, respiratory waveform filtering, respiratory waveform data abnormal value cleaning, respiratory waveform data missing value interpolation, and respiratory waveform wavelet packet decomposition.
3. A respiratory waveform processing method according to claim 1, characterized in that: In S002, waveform peak points are detected according to the respiratory waveform to be processed, and a respiratory waveform peak point sequence is obtained as follows: The preprocessed sequence R{r1,r2,...,r n }, n is the number of sampling points constituting the respiratory waveform to be processed; the local maximum detection method is used in the sequence R{r1,r2,...,r n } mark the local maximum; The local maximum is the peak point of the waveform, from the sequence R{r1,r2,...,r n The set of local maxima detected in} is recorded as sequence R max {r max(1) ,r max(2) ,...,r max(m) }, m is the number of n }, the number of local maxima detected in the sequence R max {r max(1) ,r max(2) ,...,r max(m) } is the respiratory waveform peak point sequence.
4. A respiratory waveform processing method according to claim 1, characterized in that: In S003, the sequence obtained by performing first-order difference on the peak point sequence of the respiratory waveform is recorded as the original RR{rr (1) ,rr (2) ,...,rr (n1) } sequence, the original RR{rr (1) ,rr (2) ,...,rr (n1) The sequence after the first-order difference of the sequence is recorded as the original RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2) The specific sequence is: According to the respiratory waveform peak point sequence R max {r max(1) ,r max(2) ,...,r max(m) }, calculate the sequence R max The first-order difference sequence of RR{rr (1) ,rr (2) ,...,rr (n1) }sequence; According to the original RR{rr (1) ,rr (2) ,...,rr (n1) } sequence, calculate its first-order difference sequence, and find the original RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2) }sequence.
5. A respiratory waveform processing method according to claim 1, characterized in that: In S004, according to the original RR{rr (1) ,rr (2) ,...,rr (n1) } sequence and original RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2) }sequence to process outliers and obtain the current RR{rr (1) ,rr (2) ,...,rr (n1) }Sequence and current RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2) The specific sequence is: For the original RR{rr (1) ,rr (2) ,...,rr (n1) } sequence and original RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2) }Detect outliers in the sequence; The original RR (1) ,rr (2) ,...,rr (n1) } sequence and original RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2) The outliers in the sequence are: In the original RR{rr (1) ,rr (2) ,...,rr (n1) In the sequence, when the value of the element rr(n1) in the sequence is greater than 6 or less than 1, the element rr(n1) is determined to be an abnormal value; Calculate the original RR{rr (1) ,rr (2) ,...,rr (n1) }sequence standard deviation, denoted as std(RR), in the original RR{rr (1) ,rr (2) ,...,rr (n1) } sequence, when the value of the element rr(k)-rr(k-1) in the sequence is greater than 3 times std(RR), the element rr(k) is determined to be the original RR{rr (1) ,rr (2) ,...,rr (n1) }Outliers in the sequence; After detecting outliers, the original RR{rr (1) ,rr (2) ,...,rr (n1) } sequence and original RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2) } sequence is the current RR{rr (1) ,rr (2) ,...,rr (n1) }Sequence and current RR fd {rr fd(1) ,rr fd(2) ,...,rr fd(n2) }sequence.
6. A respiratory waveform processing method according to claim 1, characterized in that: In S006, the RRV feature parameters are combined into a feature sequence, which is input into a long short-term memory network (LSTM) for classification, and a classification model capable of identifying abnormal waveforms is established. Specifically, the following is the process: According to the RRV characteristic parameters proposed in the present invention, the RRV characteristic parameters are extracted from the acquired respiratory waveform, and all characteristic parameters are combined into a characteristic sequence in chronological order; Two types of feature sequences are obtained from abnormal waveforms and normal waveforms; Each feature sequence is a row vector and is input into the network as a sample; The feature sequences are combined into a feature matrix, and the feature matrix is input into the LSTM network for training, with the aim of obtaining a classification model that can identify abnormal waveforms and classify abnormal waveforms from normal waveforms.
7. A respiratory waveform processing method according to claim 2, characterized in that: The signal preprocessing method is specifically as follows: The data segmentation is to segment the respiratory waveform into data segments according to a preset duration; The respiratory waveform filtering is to perform low-pass filtering on the respiratory waveform to obtain a low-frequency respiratory signal; The outlier cleaning of the respiratory waveform data is to remove outliers in the respiratory waveform using the three sigma theorem and then replace them with appropriate interpolation; The missing value interpolation of the respiratory waveform data is to fill the vacant values in the respiratory waveform due to individual reasons, and the respiratory waveform is completed by using a cubic spline interpolation method.
8. A respiratory waveform processing method according to claim 3, characterized in that: The method for detecting the local maximum value is specifically as follows: Define the sampling rate fs of respiratory waveform data; Define the period window W, where W is the parameter specified by fs*n, n in the respiratory waveform acquisition process; After preprocessing, the sequence R{r1, r2, ..., r n } is scanned periodically using the periodic window W, that is, each time in the sequence R{r1,r2,...,r n }Scan W points on the graph to detect the local maximum value within the period window W.
Citation Information
Patent Citations
Apparatus, system, and method for health and medical sensing
US20200367810A1
Apparatus, system, and method for health and medical sensing
WO2019122412A1