Respiratory pattern classification method and system based on sparse representation and convolutional neural network
Through the method based on sparse representation and convolutional neural network, the problem that the prior art is difficult to accurately classify multiple breathing patterns is solved, and high accuracy classification of breathing signals is achieved.
Patent Information
- Application Number
- CN202011492595.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-17
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2040-12-17
AI Technical Summary
Existing breath monitoring methods are difficult to accurately classify other breathing patterns besides apnea, such as tidal breathing and rhythmic disordered breathing.
Using a method based on sparse representation and convolutional neural network, breathing signals are collected through vital sign radar, and the sparse solution is solved using wavelet dictionary and orthogonal matching tracking algorithm, and it is input as feature to the convolutional neural network for classification.
Accurate classification of unknown respiratory signals is achieved, and multiple respiratory patterns can be identified, including normal breathing, tidal breathing and rhythmic disordered breathing, improving the accuracy and reliability of monitoring.
Smart Images

Figure CN114642418B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of breathing pattern detection, in particular to a breathing pattern classification method and system based on sparse representation and convolutional neural network. Background Art
[0002] Breathing is an important indicator of human physiological health.
[0003] Existing respiratory monitoring methods are mainly divided into contact and non-contact methods. Traditional contact respiratory monitoring methods require contact with the human body through electrodes or other medical sensors. During long-term monitoring, it will cause physical and psychological discomfort to the monitored person, thereby affecting the accuracy of the monitoring results. Vital sign radar can achieve long-term non-contact respiratory monitoring, reduce the discomfort of the tested person, and has the advantages of being unaffected by the environment, high sensitivity, and strong penetration.
[0004] Breathing pattern classification is an important part of respiratory monitoring. Common breathing pattern classification is mainly for normal breathing and apnea classification, and the breathing pattern classification method is achieved by extracting common time-frequency domain features. However, in actual breathing pattern classification, in addition to apnea, there are also breathing patterns such as tidal breathing and rhythmic breathing. These breathing patterns are difficult to accurately classify by extracting common time-frequency domain features. Summary of the invention
[0005] The purpose of the present invention is to provide a breathing pattern classification method and system based on sparse representation and convolutional neural network to address the deficiencies of the above-mentioned prior art.
[0006] The technical solution to achieve the purpose of the present invention is: a breathing pattern classification method based on sparse representation and convolutional neural network, the method comprising the following steps:
[0007] Step 1, using a vital sign radar to collect an echo signal of the subject, performing arc tangent demodulation and bandpass filtering on the echo signal to obtain a respiratory signal;
[0008] Step 2, the respiratory signals of different breathing modes are cut into sample segments of fixed length T, and then the amplitude of the respiratory signals is normalized;
[0009] Step 3, construct a wavelet dictionary;
[0010] Step 4, according to the wavelet dictionary, using the orthogonal matching pursuit algorithm to solve the sparse solutions of the respiratory signal samples corresponding to different respiratory modes, and determining the sparsity of the sparse solutions, wherein the sparsity is the number of non-zero elements in the sparse solutions;
[0011] Step 5, using the sparse solution obtained in step 4 as the feature of the respiratory signal sample, constructing and training a convolutional neural network model;
[0012] Step 6: Use the convolutional neural network model obtained in step 5 to classify the unknown respiratory signal fragments to obtain their respiratory patterns.
[0013] Furthermore, the orthogonal matching pursuit algorithm is used in step 4 to solve the sparse solution of the respiratory signal sample, specifically including:
[0014] The input signal of the orthogonal matching pursuit algorithm is a one-dimensional breathing signal sample y∈R n×1 , n is the length of the respiratory signal, i.e., the number of sampling points, and the wavelet dictionary is an n×m-dimensional matrix Φ=(φ1,φ2,...,φ m ), φ q is a dictionary atom and satisfies ||φ q || 2 =1,q=1,…,m;
[0015] Step 4-1: Transform the breathing signal y Perform orthogonal projection on each atom in the wavelet dictionary, that is, find the inner product of the respiratory signal and the atom, and select the atom with the largest inner product as the best matching atom for the first decomposition, denoted as φ'1. Atom φ'1 satisfies the following formula:
[0016] <y,φ'1> > <y,φ i >φ i ∈Φ
[0017] Among them, φ i is any atom in Φ except φ'1;
[0018] Step 4-2, calculate the residual signal r1, the calculation formula is:
[0019] r1=y-φ'1<y,φ'1> ;
[0020] Step 4-3, repeat steps 4-1 and 4-2 for the residual signal r1. After the breathing signal is decomposed k times, k best matching atoms are selected, and the breathing signal y is expressed as:
[0021]
[0022] In the formula, φ' i is the best matching atom in the i-th decomposition, r i is the residual signal obtained after the i-th decomposition, r k is the residual signal obtained after the k-th decomposition;
[0023] Step 4-4, orthogonalize the atoms selected in the above process:
[0024] First, the residual signal r k Perform the k+1th decomposition and select the atoms that match r from the remaining atoms in Φ. k The atom with the largest inner product is denoted by φ' k+1 ;
[0025] φ' k+1 Orthogonalize the k atoms selected by the above process:
[0026]
[0027] In the formula, φ' i Orthogonalized atoms;
[0028] Step 4-5, based on the orthogonalized atoms Find the residual signal r k+1 , the calculation formula is:
[0029]
[0030] Step 4-6, the residual signal r k+1 Repeat steps 4-4 and 4-5 until the preset sparsity requirement is met, and combine the maximum inner products at each decomposition to obtain a sparse solution x of the respiratory signal sample.
[0031] Furthermore, determining the sparsity of the sparse solution in step 4 specifically includes:
[0032] Set the sparsity range to [p1, p2], the step size to Δ, and use p1 as the initial sparsity p0;
[0033] Step 4-7, based on steps 4-1 to 4-6, solve the sparse solution x0 of the current sparsity p0, and then reconstruct the respiratory signal. The calculation formula is:
[0034] y rec =Φx0
[0035] In the formula, y rec ∈R n×1 To reconstruct the breathing signal, the sparse solution x0∈R m×1 And ||x0||0=p0;
[0036] Step 4-8, calculate the average error between the reconstructed respiratory signal and the original respiratory signal The calculation formula is:
[0037]
[0038] In the formula, y rec (i) and y(i) are the reconstructed respiratory signals yrec , the i-th sampling point in the original respiratory signal y;
[0039] Step 4-9, set the threshold of the average error to Ths. If the average error is less than the threshold Ths, the current sparsity is used as the optimal sparsity; otherwise, increase the step size Δ based on the current sparsity, update p0, and then repeat steps 4-7 to 4-9 until the average error is less than the threshold and the optimal sparsity is obtained.
[0040] Furthermore, in step 5, the sparse solution obtained in step 4 is used as the feature of the respiratory signal sample to construct and train a convolutional neural network model. The specific process includes:
[0041] Step 5-1, constructing a convolutional neural network model, specifically: establishing a convolutional neural network model including N hidden layers;
[0042] Step 5-2, optimizing the convolutional neural network model, specifically: adding a Dropout layer and a batch normalization layer to the hidden layer of the convolutional neural network model for optimization;
[0043] Step 5-3, training the convolutional neural network model, specifically: constructing a feature data set from the sparse solution of respiratory signal samples of different breathing patterns, using the data set as the input of the model, training the convolutional neural network model, and outputting the classification result of the breathing pattern.
[0044] A breathing pattern classification system based on sparse representation and convolutional neural network, the system comprising:
[0045] A respiratory signal acquisition module is used to collect the echo signal of the subject using the vital sign radar, perform arc tangent demodulation and bandpass filtering on the echo signal to obtain a respiratory signal;
[0046] A breathing sample collection module is used to intercept the breathing signals of different breathing patterns into sample segments of fixed length T, and then normalize the amplitude of the breathing signals;
[0047] Construction module, used to construct wavelet dictionary;
[0048] A solution module, used to solve the sparse solutions of the respiratory signal samples corresponding to different respiratory modes using an orthogonal matching pursuit algorithm according to the wavelet dictionary, and determine the sparsity of the sparse solution, where the sparsity is the number of non-zero elements in the sparse solution;
[0049] A model building module, used to build and train a convolutional neural network model by taking the sparse solution as the feature of the respiratory signal sample;
[0050] The classification module is used to classify unknown respiratory signal fragments using a convolutional neural network model to obtain its respiratory pattern.
[0051] Compared with the prior art, the present invention has the following significant advantages: 1) It utilizes vital sign radar to realize non-contact monitoring of breathing. Compared with traditional contact equipment, it is simple to operate and greatly reduces the physiological and psychological discomfort of the subject; 2) It can realize accurate classification of unknown breathing patterns, the method is simple and effective, the performance is reliable, and it is easy to implement; 3) There is no need to extract complex breathing signal features, and accurate classification of breathing patterns can be achieved based on the sparse solution features of the breathing signal.
[0052] The present invention is further described in detail below in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 The present invention is a flowchart of a breathing pattern classification method based on sparse representation and convolutional neural network.
[0054] Figure 2 FIG. 4 is a time domain waveform diagram of normal breathing in one embodiment.
[0055] Figure 3 FIG. 4 is a time domain waveform diagram of tidal breathing in one embodiment.
[0056] Figure 4 FIG. 4 is a time domain waveform diagram of rhythmic breathing in one embodiment.
[0057] Figure 5 4 is a time domain waveform diagram of a reconstructed Cheyne-Stokes respiration signal when the sparsity is 400 in one embodiment.
[0058] Figure 6 A block diagram of a convolutional neural network model in one embodiment.
[0059] Figure 7 A schematic diagram of a confusion matrix of classification results of an unknown respiratory signal segment by a convolutional neural network model in one embodiment. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0061] Combination Figure 1 The present invention provides a breathing pattern classification method based on sparse representation and convolutional neural network, the method comprising the following steps:
[0062] Step 1, using a vital sign radar to collect an echo signal of the subject, performing arc tangent demodulation and bandpass filtering on the echo signal to obtain a respiratory signal;
[0063] Step 2, intercepting the respiratory signals of different breathing patterns (including normal breathing, tidal breathing, and rhythmic breathing) into sample segments of fixed length T, and then normalizing the amplitude of the respiratory signals;
[0064] Step 3, construct a wavelet dictionary; preferably, the wavelet basis function based on symlets is used for construction.
[0065] Step 4, according to the wavelet dictionary, using the orthogonal matching pursuit algorithm to solve the sparse solution of the respiratory signal samples corresponding to different respiratory modes, and determine the sparsity of the sparse solution, wherein the sparsity is the number of non-zero elements in the sparse solution; wherein solving the sparse solution specifically includes:
[0066] The input signal of the orthogonal matching pursuit algorithm is a one-dimensional breathing signal sample y∈R n×1 , n is the length of the respiratory signal, i.e., the number of sampling points, and the wavelet dictionary is an n×m-dimensional matrix Φ=(φ1,φ2,...,φ m ), φ q is a dictionary atom and satisfies ||φ q || 2 =1,q=1,…,m;
[0067] Step 4-1: Transform the breathing signal y Perform orthogonal projection on each atom in the wavelet dictionary, that is, find the inner product of the respiratory signal and the atom, and select the atom with the largest inner product as the best matching atom for the first decomposition, denoted as φ'1. Atom φ'1 satisfies the following formula:
[0068] <y,φ'1> > <y,φ i >φ i ∈Φ
[0069] Among them, φ i is any atom in Φ except φ'1;
[0070] Step 4-2, calculate the residual signal r1, the calculation formula is:
[0071] r1=y-φ'1<y,φ'1> ;
[0072] Step 4-3, repeat steps 4-1 and 4-2 for the residual signal r1. After the breathing signal is decomposed k times, k best matching atoms are selected, and the breathing signal y is expressed as:
[0073]
[0074] In the formula, φ' i is the best matching atom in the i-th decomposition, r i is the residual signal obtained after the i-th decomposition, r kis the residual signal obtained after the k-th decomposition;
[0075] Step 4-4, orthogonalize the atoms selected in the above process:
[0076] First, the residual signal r k Perform the k+1th decomposition and select the atoms that match r from the remaining atoms in Φ. k The atom with the largest inner product is denoted by φ' k+1 ;
[0077] φ' k+1 Orthogonalize the k atoms selected by the above process:
[0078]
[0079] In the formula, φ' i Orthogonalized atoms;
[0080] Step 4-5, based on the orthogonalized atoms Find the residual signal r k+1 , the calculation formula is:
[0081]
[0082] Step 4-6, the residual signal r k+1 Repeat steps 4-4 and 4-5 until the preset sparsity requirement is met, and combine the maximum inner products at each decomposition to obtain a sparse solution x of the respiratory signal sample.
[0083] The sparsity of the sparse solution is determined, specifically including:
[0084] Set the sparsity range to [p1, p2], the step size to Δ, and use p1 as the initial sparsity p0;
[0085] Step 4-7, based on steps 4-1 to 4-6, solve the sparse solution x0 of the current sparsity p0, and then reconstruct the respiratory signal. The calculation formula is:
[0086] y rec =Φx0
[0087] In the formula, y rec ∈R n×1 To reconstruct the breathing signal, the sparse solution x0∈R m×1 And ||x0||0=p0;
[0088] Step 4-8, calculate the average error between the reconstructed respiratory signal and the original respiratory signal The calculation formula is:
[0089]
[0090] In the formula, y rec (i) and y(i) are the reconstructed respiratory signals y rec , the i-th sampling point in the original respiratory signal y;
[0091] Step 4-9, set the threshold of the average error to Ths. If the average error is less than the threshold Ths, the current sparsity is used as the optimal sparsity; otherwise, increase the step size Δ based on the current sparsity, update p0, and then repeat steps 4-7 to 4-9 until the average error is less than the threshold and the optimal sparsity is obtained.
[0092] Here preferably, p1=100, p2=500, Δ=100, and the threshold value is Ths=5×10 -3 , the optimal sparsity is 400.
[0093] Step 5: Use the sparse solution obtained in step 4 as the feature of the respiratory signal sample to build and train a convolutional neural network model. The specific process includes:
[0094] Step 5-1, constructing a convolutional neural network model, specifically: establishing a convolutional neural network model including N hidden layers; according to the characteristics of the characteristic data set of the breathing sample, the present invention preferably has N=3, each hidden layer includes three convolutional layers, the first convolutional layer includes 16 convolutional kernels, the convolutional kernel size is 32, the second convolutional layer includes 32 convolutional kernels, the convolutional kernel size is 16, and the third convolutional layer includes 32 convolutional kernels, the convolutional kernel size is 8;
[0095] Step 5-2, optimizing the convolutional neural network model, specifically: adding a Dropout layer and a batch normalization layer to the hidden layer of the convolutional neural network model for optimization to improve the overfitting problem; preferably, the Dropout rate of the Dropout layer is 0.5;
[0096] Step 5-3, training the convolutional neural network model, specifically: constructing a feature data set from the sparse solution of respiratory signal samples of different breathing patterns, using the data set as the input of the model, training the convolutional neural network model, and outputting the classification result of the breathing pattern.
[0097] Step 6: Use the convolutional neural network model obtained in step 5 to classify the unknown respiratory signal fragments to obtain their respiratory patterns.
[0098] The present invention provides a breathing pattern classification system based on sparse representation and convolutional neural network, the system comprising:
[0099] A respiratory signal acquisition module is used to collect the echo signal of the subject using the vital sign radar, perform arc tangent demodulation and bandpass filtering on the echo signal to obtain a respiratory signal;
[0100] A breathing sample collection module is used to intercept the breathing signals of different breathing patterns into sample segments of fixed length T, and then normalize the amplitude of the breathing signals;
[0101] Construction module, used to construct wavelet dictionary;
[0102] A solution module is used to solve the sparse solutions of the respiratory signal samples corresponding to different respiratory modes using the orthogonal matching pursuit algorithm according to the wavelet dictionary, and determine the sparsity of the sparse solution, where the sparsity is the number of non-zero elements in the sparse solution; the module includes the following steps executed in sequence:
[0103] The input signal of the orthogonal matching pursuit algorithm is a one-dimensional breathing signal sample y∈R n×1 , n is the length of the respiratory signal, i.e., the number of sampling points, and the wavelet dictionary is an n×m-dimensional matrix Φ=(φ1,φ2,...,φ m ), φ q is a dictionary atom and satisfies ||φ q || 2 =1,q=1,…,m;
[0104] The first decomposition unit is used to perform orthogonal projection of the respiratory signal y on each atom in the wavelet dictionary, that is, to find the inner product of the respiratory signal and the atom, and select the atom with the largest inner product as the best matching atom for the first decomposition, denoted as φ'1. The atom φ'1 satisfies the following formula:
[0105] <y,φ'1> > <y,φ i >φ i ∈Φ
[0106] Among them, φ i is any atom in Φ except φ'1;
[0107] The first residual signal obtaining unit is used to obtain the residual signal r1, and the calculation formula is:
[0108] r1=y-φ'1<y,φ'1> ;
[0109] The multiple decomposition unit is used to repeatedly perform the above two units on the residual signal r1. After the breathing signal is decomposed k times, k best matching atoms are selected, thereby expressing the breathing signal y as:
[0110]
[0111] In the formula, φ' i is the best matching atom in the i-th decomposition, r i is the residual signal obtained after the i-th decomposition, r k is the residual signal obtained after the k-th decomposition;
[0112] The orthogonalization processing unit is used to perform orthogonalization on the atoms selected by the above process:
[0113] First, the residual signal r k Perform the k+1th decomposition and select the atoms that match r from the remaining atoms in Φ. k The atom with the largest inner product is denoted by φ' k+1 ;
[0114] φ' k+1 Orthogonalize the k atoms selected by the above process:
[0115]
[0116] In the formula, φ' i Orthogonalized atoms;
[0117] The second residual signal obtaining unit is used to obtain the residual signal based on the orthogonalized atomic Find the residual signal r k+1 , the calculation formula is:
[0118]
[0119] Sparse solution solving unit, used for residual signal r k+1 Repeat the orthogonalization processing unit and the second residual signal obtaining unit until the preset sparsity requirement is met, and combine the maximum inner products at each decomposition to obtain a sparse solution x of the respiratory signal sample;
[0120] The initial parameter setting unit is used to set the sparsity value range to [p1, p2], the step size to Δ, and p1 is used as the initial sparsity p0;
[0121] The respiratory signal reconstruction unit is used to solve the sparse solution x0 of the current sparsity p0 based on the first decomposition unit to the sparse solution solving unit, and then reconstruct the respiratory signal. The calculation formula is:
[0122] y rec =Φx0
[0123] In the formula, y rec ∈R n×1 To reconstruct the breathing signal, the sparse solution x0∈R m×1 And ||x0||0=p0;
[0124] Average error calculation unit, used to calculate the average error between the reconstructed respiratory signal and the original respiratory signal The calculation formula is:
[0125]
[0126] In the formula, y rec (i) and y(i) are the reconstructed respiratory signals y rec , the i-th sampling point in the original respiratory signal y;
[0127] The sparsity determination unit is used to set the threshold of the average error to Ths. If the average error is less than the threshold Ths, the current sparsity is used as the optimal sparsity; otherwise, the step size Δ is increased on the basis of the current sparsity, p0 is updated, and then the above-mentioned respiratory signal reconstruction unit to the sparsity determination unit are repeated until the average error is less than the threshold and the optimal sparsity is obtained.
[0128] The model building module is used to build and train a convolutional neural network model by taking the sparse solution as the feature of the respiratory signal sample; the module includes the following steps executed in sequence:
[0129] The model building unit is used to build a convolutional neural network model, specifically: building a convolutional neural network model including N hidden layers;
[0130] The model optimization unit is used to optimize the convolutional neural network model, specifically: adding a Dropout layer and a batch normalization layer to the hidden layer of the convolutional neural network model for optimization;
[0131] The model training unit is used to train the convolutional neural network model, specifically: a feature data set is constructed by sparse solution of respiratory signal samples of different respiratory patterns, the data set is used as the input of the model, the convolutional neural network model is trained, and the classification result of the respiratory pattern is output.
[0132] The classification module is used to classify unknown respiratory signal fragments using a convolutional neural network model to obtain its respiratory pattern.
[0133] For the specific limitations of the breathing pattern classification system based on sparse representation and convolutional neural network, please refer to the limitations of the breathing pattern classification method based on sparse representation and convolutional neural network mentioned above, which will not be repeated here. Each module in the above-mentioned breathing pattern classification system based on sparse representation and convolutional neural network can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0134] The present invention is further described in detail below with reference to the embodiments.
[0135] Example
[0136] Combination Figure 1The steps of the breathing pattern classification method based on sparse representation and convolutional neural network of the present invention are as follows:
[0137] Step 1, using a vital sign radar to collect an echo signal of the subject, performing arc tangent demodulation and bandpass filtering on the echo signal to obtain a respiratory signal;
[0138] Step 2: The respiratory signals of different breathing modes are intercepted into sample segments of fixed length T, wherein the period of tidal breathing is usually 30 to 120 seconds. In order to avoid misjudgment, T=120 is selected, and then the amplitude of the respiratory signal is normalized;
[0139] Figure 2 , 3 4 are 120s long respiratory signal segments with different breathing patterns obtained after preprocessing. Figure 2 It can be seen that the frequency and amplitude of normal breathing are relatively stable, and the number of breaths of an adult in a quiet state is 12-20 times. Figure 3 It can be seen that the characteristic of Cheyne-Stokes breathing is that the breathing first slowly increases, then slowly decreases, followed by a period of apnea, and this cycle is repeated. Figure 4 It can be seen that the characteristics of rhythmic breathing are that the depth, frequency and rhythm of breathing are chaotic and irregular.
[0140] Step 3, constructing a wavelet dictionary based on the sparse characteristics and distinguishability of respiratory signals of different respiratory modes in the wavelet domain;
[0141] Step 4, according to the wavelet dictionary, using the orthogonal matching pursuit algorithm to solve the sparse solution of the respiratory signal samples corresponding to different respiratory modes, and determine the sparsity of the sparse solution, wherein the sparsity is the number of non-zero elements in the sparse solution; wherein solving the sparse solution specifically includes:
[0142] The input signal of the orthogonal matching pursuit algorithm is a one-dimensional breathing signal sample y∈R n×1 , n is the length of the respiratory signal, i.e., the number of sampling points, and the wavelet dictionary is an n×m-dimensional matrix Φ=(φ1,φ2,...,φ m ), φ q is a dictionary atom and satisfies ||φ q || 2 =1,q=1,…,m;
[0143] Step 4-1, orthogonally project the respiratory signal y onto each atom in the wavelet dictionary, that is, find the inner product between the respiratory signal and the atom, and select the atom with the largest inner product as the best matching atom for the first decomposition, denoted as φ'1. Atom φ'1 satisfies the following formula:
[0144] <y,φ'1> > <y,φ i >φi ∈Φ
[0145] Among them, φ i is any atom in Φ except φ'1;
[0146] Step 4-2, calculate the residual signal r1, the calculation formula is:
[0147] r1=y-φ'1<y,φ'1> ;
[0148] Step 4-3, repeat steps 4-1 and 4-2 for the residual signal r1. After the breathing signal is decomposed k times, k best matching atoms are selected, and the breathing signal y is expressed as:
[0149]
[0150] In the formula, φ' i is the best matching atom in the i-th decomposition, r i is the residual signal obtained after the i-th decomposition, r k is the residual signal obtained after the k-th decomposition;
[0151] Step 4-4, orthogonalize the atoms selected in the above process:
[0152] First, the residual signal r k Perform the k+1th decomposition and select the atoms that match r from the remaining atoms in Φ. k The atom with the largest inner product is denoted by φ' k+1 ;
[0153] φ' k+1 Orthogonalize the k atoms selected by the above process:
[0154]
[0155] In the formula, φ' i Orthogonalized atoms;
[0156] Step 4-5, based on the orthogonalized atoms Find the residual signal r k+1 , the calculation formula is:
[0157]
[0158] Step 4-6, the residual signal r k+1 Repeat steps 4-4 and 4-5 until the preset sparsity requirement is met, and combine the maximum inner products at each decomposition to obtain a sparse solution x of the respiratory signal sample.
[0159] The sparsity of the sparse solution is determined, specifically including:
[0160] Set the sparsity range to [p1, p2] = [100, 500], the step size to Δ = 100, and use p1 as the initial sparsity p0;
[0161] Step 4-7, based on steps 4-1 to 4-6, solve the sparse solution x0 of the current sparsity p0, and then reconstruct the respiratory signal. The calculation formula is:
[0162] y rec =Φx0
[0163] In the formula, y rec ∈R n×1 To reconstruct the breathing signal, the sparse solution x0∈R m×1 And ||x0||0=p0;
[0164] Step 4-8, calculate the average error between the reconstructed respiratory signal and the original respiratory signal The calculation formula is:
[0165]
[0166] In the formula, y rec (i) and y(i) are the reconstructed respiratory signals y rec , the i-th sampling point in the original respiratory signal y;
[0167] Step 4-9, set the average error threshold to Ths. If the average error is less than the threshold Ths = 5×10 -3 , the current sparsity is taken as the optimal sparsity; otherwise, the step size Δ is increased based on the current sparsity, p0 is updated, and then steps 4-7 to 4-9 are repeated until the average error is less than the threshold, and the optimal sparsity 400 is obtained. Figure 5 This is the time domain waveform of the reconstructed respiratory signal of Cheyne-Stokes breathing when the sparsity is 400. It can be seen from the figure that the reconstructed respiratory signal is consistent with the original respiratory signal.
[0168] Step 5: Use the sparse solution obtained in step 4 as the feature of the respiratory signal sample, build and train a convolutional neural network model, and obtain a convolutional neural network model that can realize respiratory pattern classification. Figure 6 shown.
[0169] Step 6: Use the convolutional neural network model obtained in step 5 to classify the unknown respiratory signal fragments to obtain their respiratory patterns.
[0170] The convolutional neural network model in step 5 was used to classify 270 normal breathing segments, 88 tidal breathing segments, and 140 rhythmic breathing segments. Figure 7 This is the confusion matrix of the classification results. The classification accuracy is 95.6%.
[0171] It can be seen from the above that the present invention can realize accurate classification of breathing patterns based on sparse representation and convolutional neural network, which is effective and feasible.
[0172] The above shows and describes the basic principles, main features and advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited to the above embodiments. The above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. A breathing pattern classification method based on sparse representation and convolutional neural network, characterized in that: The method comprises the following steps: Step 1, using a vital sign radar to collect an echo signal of the subject, performing arc tangent demodulation and bandpass filtering on the echo signal to obtain a respiratory signal; Step 2, the respiratory signals of different breathing modes are cut into sample segments of fixed length T, and then the amplitude of the respiratory signals is normalized; Step 3, construct a wavelet dictionary; Step 4, according to the wavelet dictionary, using the orthogonal matching pursuit algorithm to solve the sparse solutions of the respiratory signal samples corresponding to different respiratory modes, and determining the sparsity of the sparse solutions, wherein the sparsity is the number of non-zero elements in the sparse solutions; Step 5, using the sparse solution obtained in step 4 as the feature of the respiratory signal sample, constructing and training a convolutional neural network model; Step 6: Use the convolutional neural network model obtained in step 5 to classify the unknown respiratory signal fragments to obtain their respiratory patterns.
2. The breathing pattern classification method based on sparse representation and convolutional neural network according to claim 1, characterized in that: The wavelet dictionary constructed in step 3 is specifically constructed based on the symlets wavelet basis function.
3. The breathing pattern classification method based on sparse representation and convolutional neural network according to claim 2, characterized in that: The orthogonal matching pursuit algorithm described in step 4 is used to solve the sparse solution of the respiratory signal sample, which specifically includes: The input signal of the orthogonal matching pursuit algorithm is a one-dimensional breathing signal sample y∈R n×1 , n is the length of the respiratory signal, i.e., the number of sampling points, and the wavelet dictionary is an n×m-dimensional matrix Φ=(φ1,φ2,...,φ m ), φ q is a dictionary atom and satisfies ||φ q || 2 =1,q=1,…,m; Step 4-1: Transform the breathing signal y Perform orthogonal projection on each atom in the wavelet dictionary, that is, find the inner product of the respiratory signal and the atom, and select the atom with the largest inner product as the best matching atom for the first decomposition, denoted as φ'1. Atom φ'1 satisfies the following formula: <y,φ'1>> <y,φ i >φ i ∈Φ Among them, φ i is any atom in Φ except φ'1; Step 4-2, calculate the residual signal r1, the calculation formula is: r1=y-φ'1<y,φ'1> ; Step 4-3, repeat steps 4-1 and 4-2 for the residual signal r1. After the breathing signal is decomposed k times, k best matching atoms are selected, and the breathing signal y is expressed as: In the formula, φ' i is the best matching atom in the i-th decomposition, r i is the residual signal obtained after the i-th decomposition, r k is the residual signal obtained after the k-th decomposition; Step 4-4, orthogonalize the selected atoms: First, the residual signal r k Perform the k+1th decomposition and select the atoms that match r from the remaining atoms in Φ. k The atom with the largest inner product is denoted by φ' k+1 ; φ' k+1 Orthogonalize the k atoms selected by the above process: In the formula, φ' i Orthogonalized atoms; Step 4-5, based on the orthogonalized atoms Find the residual signal r k+1 , the calculation formula is: Step 4-6, the residual signal r k+1 Repeat steps 4-4 and 4-5 until the preset sparsity requirement is met, and combine the maximum inner products at each decomposition to obtain a sparse solution x of the respiratory signal sample.
4. The breathing pattern classification method based on sparse representation and convolutional neural network according to claim 3, characterized in that: Determining the sparsity of the sparse solution in step 4 specifically includes: Set the sparsity range to [p1, p2], the step size to Δ, and use p1 as the initial sparsity p0; Step 4-7, based on steps 4-1 to 4-6, solve the sparse solution x0 of the current sparsity p0, and then reconstruct the respiratory signal. The calculation formula is: and rec =Φx0 In the formula, y rec ∈R n×1 To reconstruct the breathing signal, the sparse solution x0∈R m×1 And ||x0||0=p0; Step 4-8, calculate the average error between the reconstructed respiratory signal and the original respiratory signal The calculation formula is: In the formula, y rec (i) and y(i) are the reconstructed respiratory signals y rec , the i-th sampling point in the original respiratory signal y; Step 4-9, set the threshold of the average error to Ths. If the average error is less than the threshold Ths, the current sparsity is used as the optimal sparsity; otherwise, increase the step size Δ based on the current sparsity, update p0, and then repeat steps 4-7 to 4-9 until the average error is less than the threshold and the optimal sparsity is obtained.
5. The breathing pattern classification method based on sparse representation and convolutional neural network according to claim 4, characterized in that: In step 5, the sparse solution obtained in step 4 is used as the feature of the respiratory signal sample to construct and train a convolutional neural network model. The specific process includes: Step 5-1, constructing a convolutional neural network model, specifically: establishing a convolutional neural network model including N hidden layers; Step 5-2, optimizing the convolutional neural network model, specifically: adding a Dropout layer and a batch normalization layer to the hidden layer of the convolutional neural network model for optimization; Step 5-3, training the convolutional neural network model, specifically: constructing a feature data set from the sparse solution of respiratory signal samples of different breathing patterns, using the data set as the input of the model, training the convolutional neural network model, and outputting the classification result of the breathing pattern.
6. The breathing pattern classification method based on sparse representation and convolutional neural network according to claim 5, characterized in that: In step 5-1, N=3, each hidden layer includes three convolution layers, the first convolution layer includes 16 convolution kernels, the convolution kernel size is 32, the second convolution layer includes 32 convolution kernels, the convolution kernel size is 16, and the third convolution layer includes 32 convolution kernels, the convolution kernel size is 8.
7. The breathing pattern classification method based on sparse representation and convolutional neural network according to claim 6, characterized in that: The Dropout rate of the Dropout layer in step 5-2 is 0.
5.
8. A breathing pattern classification system based on sparse representation and convolutional neural network implementing the method of any one of claims 1 to 7, characterized in that: The system comprises: A respiratory signal acquisition module is used to collect the echo signal of the subject using the vital sign radar, perform arc tangent demodulation and bandpass filtering on the echo signal to obtain a respiratory signal; A breathing sample collection module is used to intercept the breathing signals of different breathing patterns into sample segments of fixed length T, and then normalize the amplitude of the breathing signals; Construction module, used to construct wavelet dictionary; A solution module, used to solve the sparse solutions of the respiratory signal samples corresponding to different respiratory modes using an orthogonal matching pursuit algorithm according to the wavelet dictionary, and determine the sparsity of the sparse solution, where the sparsity is the number of non-zero elements in the sparse solution; A model building module, used to build and train a convolutional neural network model by taking the sparse solution as the feature of the respiratory signal sample; The classification module is used to classify unknown respiratory signal fragments using a convolutional neural network model to obtain its respiratory pattern.
9. The breathing pattern classification system based on sparse representation and convolutional neural network according to claim 8, characterized in that: The solution module includes the following steps executed in sequence: The input signal of the orthogonal matching pursuit algorithm is a one-dimensional breathing signal sample y∈R n×1 , n is the length of the respiratory signal, i.e., the number of sampling points, and the wavelet dictionary is an n×m-dimensional matrix Φ=(φ1,φ2,...,φ m ), φ q is a dictionary atom and satisfies ||φ q || 2 =1,q=1,…,m; The first decomposition unit is used to convert the respiratory signal y Perform orthogonal projection on each atom in the wavelet dictionary, that is, find the inner product of the respiratory signal and the atom, and select the atom with the largest inner product as the best matching atom for the first decomposition, denoted as φ'1. Atom φ'1 satisfies the following formula: <y,φ'1>> <y,φ i >φ i ∈Φ Among them, φ i is any atom in Φ except φ'1; The first residual signal obtaining unit is used to obtain the residual signal r1, and the calculation formula is: r1=y-φ'1<y,φ'1> ; The multiple decomposition unit is used to repeatedly perform the above two units on the residual signal r1. After the breathing signal is decomposed k times, k best matching atoms are selected, thereby expressing the breathing signal y as: In the formula, φ' i is the best matching atom in the i-th decomposition, r i is the residual signal obtained after the i-th decomposition, r k is the residual signal obtained after the k-th decomposition; The orthogonalization unit is used to perform orthogonalization on the selected atoms: First, the residual signal r k Perform the k+1th decomposition and select the atoms that match r from the remaining atoms in Φ. k The atom with the largest inner product is denoted by φ' k+1 ; φ' k+1 Orthogonalize the k atoms selected by the above process: In the formula, φ' i Orthogonalized atoms; The second residual signal obtaining unit is used to obtain the residual signal based on the orthogonalized atomic Find the residual signal r k+1 , the calculation formula is: Sparse solution solving unit is used to solve the residual signal r k+1 Repeat the orthogonalization processing unit and the second residual signal obtaining unit until the preset sparsity requirement is met, and combine the maximum inner products at each decomposition to obtain a sparse solution x of the respiratory signal sample; The initial parameter setting unit is used to set the sparsity value range to [p1, p2], the step size to Δ, and p1 is used as the initial sparsity p0; The respiratory signal reconstruction unit is used to solve the sparse solution x0 of the current sparsity p0 based on the first decomposition unit to the sparse solution solving unit, and then reconstruct the respiratory signal. The calculation formula is: and rec =Φx0 In the formula, y rec ∈R n×1 To reconstruct the breathing signal, the sparse solution x0∈R m×1 And ||x0||0=p0; Average error calculation unit, used to calculate the average error between the reconstructed respiratory signal and the original respiratory signal The calculation formula is: In the formula, y rec (i) and y(i) are the reconstructed respiratory signals y rec , the i-th sampling point in the original respiratory signal y; The sparsity determination unit is used to set the threshold of the average error to Ths. If the average error is less than the threshold Ths, the current sparsity is used as the optimal sparsity; otherwise, the step size Δ is increased on the basis of the current sparsity, p0 is updated, and then the above-mentioned respiratory signal reconstruction unit to the sparsity determination unit are repeated until the average error is less than the threshold and the optimal sparsity is obtained.
10. The breathing pattern classification system based on sparse representation and convolutional neural network according to claim 9, characterized in that: The model building module includes the following steps: The model building unit is used to build a convolutional neural network model, specifically: building a convolutional neural network model including N hidden layers; The model optimization unit is used to optimize the convolutional neural network model, specifically: adding a Dropout layer and a batch normalization layer to the hidden layer of the convolutional neural network model for optimization; The model training unit is used to train the convolutional neural network model, specifically: a feature data set is constructed by sparse solution of respiratory signal samples of different respiratory patterns, the data set is used as the input of the model, the convolutional neural network model is trained, and the classification result of the respiratory pattern is output.
Citation Information
Patent Citations
A depression auxiliary detection method based on acoustic characteristics and sparse mathematics and a classifier
CN107657964A
Through-wall ultra-wideband radar human body respiration signal detection method based on Faster-RCNN network
CN109031287A