Wearable cough monitoring system and cough monitoring method
By combining a flexible piezoelectric thin-film sensor and a microphone with a cough recognition model, the problems of external interference, low comfort, and low accuracy in existing cough monitoring systems are solved, achieving high accuracy and robust cough recognition.
Patent Information
- Application Number
- CN202411529975.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-01-10
AI Technical Summary
Existing cough monitoring systems suffer from problems such as external non-coughing noise interference, the influence of one's own physiological movements, poor device comfort, and low recognition accuracy, making it difficult to accurately distinguish cough from other physiological behaviors.
A flexible piezoelectric thin-film sensor and microphone combination, combined with a cough recognition model including a feature input module, a dung beetle optimization algorithm (DBO), a temporal feature attention module, a bidirectional long short-term memory network (BiLSTM), and a dynamic bottleneck structure (DBS), is used to achieve cough recognition by employing multimodal signal fusion and a composite loss function optimization model.
It improves the accuracy and robustness of cough recognition, reduces external noise interference, enhances wearing comfort, effectively distinguishes cough from other physiological behaviors, shortens training time, and optimizes parameters.
Smart Images

Figure CN119280508A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of cough monitoring, and in particular relates to a wearable cough monitoring system and a cough monitoring method. Background Art
[0002] Cough is a key indicator for diagnosing diseases and evaluating the efficacy of drugs. Traditional cough assessment relies on patient self-report and questionnaire surveys, which are affected by subjective factors and are difficult to accurately describe the severity of cough. Existing technologies can objectively record coughs through sound, electromyography and acceleration sensors. For example, the patent document with publication number CN111150405A discloses an intelligent medical observation watch, which uses the vibration sensor module in the watch to detect coughs and control the microphone to record cough sounds, but the correlation between wrist vibration and cough is weak, and violent movements other than coughing may trigger false detection. The patent document with announcement number CN108294756B discloses a portable cough monitoring device, which combines sound, electromyography and acceleration sensors to improve the accuracy of cough monitoring, but the device needs to paste electromyography electrodes in multiple positions, which is not comfortable to wear and difficult to locate the pasting position. The electromyography signal is susceptible to electromagnetic interference, which affects the cough monitoring effect. Therefore, it is urgent to develop a cough monitoring system with high cough recognition accuracy, multi-dimensional monitoring capabilities, and can effectively distinguish various physiological behaviors and sounds while ensuring wearing comfort. Summary of the invention
[0003] Based on the problems in existing cough monitoring such as interference from external non-cough sounds, influence of one's own physiological movements on cough recognition, poor equipment comfort and ease of use, and low cough recognition accuracy, the purpose of the present invention is to provide a wearable cough monitoring system and a cough monitoring method.
[0004] In order to achieve the above-mentioned object of the invention, the present invention adopts the following technical solutions:
[0005] A wearable cough monitoring system, comprising a wearable cough monitoring device and a data processing terminal;
[0006] The wearable cough monitoring device comprises a neck hanging piece and a signal acquisition module and a main control module respectively arranged at two ends of the neck hanging piece; wherein the signal acquisition module and the main control module are connected by signal through the neck hanging piece, and the signal acquisition module comprises a flexible piezoelectric film sensor and a microphone;
[0007] The data processing terminal and the main control module exchange information through wireless communication, and are used to perform cough recognition on the collected flexible piezoelectric film sensor and microphone signals using a cough recognition model to achieve cough monitoring;
[0008] Among them, the cough recognition model includes a feature input module, a dung beetle optimization algorithm DBO module, a temporal feature attention module, a bidirectional long short-term memory network BiLSTM module, a dynamic bottleneck structure DBS module and a classification output module connected in sequence. The learning rate, number of hidden layers and regularization parameters of the cough recognition model are optimized through the dung beetle optimization algorithm DBO module; the loss function of the cough recognition model is a composite loss function based on the label distribution aware marginal loss LDAMLoss and the gradient coordination mechanism loss GHM Loss.
[0009] As a preferred solution, the data processing terminal is provided with a feature extraction module for extracting features of flexible piezoelectric film sensors and microphone signals;
[0010] The feature extraction method is as follows: weighted fusion of flexible piezoelectric film sensor and microphone signals, extraction of acoustic features and generation of spectrogram; then simultaneous input of acoustic features and spectrogram into the cough recognition model;
[0011] Among them, the acoustic features include Mel-frequency cepstral coefficients, short-time energy and spectral centroid.
[0012] As a preferred solution, the time feature attention module is composed of a time attention module and a feature attention module connected in series, a multilayer perceptron is used to calculate the attention weight in the time dimension, and a nonlinear mapping is used to generate the feature attention weight, so as to highlight the key time points and useful features in the cough sequence.
[0013] As a preferred solution, the processing process of the temporal attention module includes:
[0014] (1) Use the multi-layer perceptron MLP to calculate the input feature matrix X = [x1, x2, ... x T ]∈R F×T The temporal attention score e t :
[0015] e t =MLP(x t )=W2*f(W1x t +b1)+b2;
[0016] Among them, x t represents the feature vector at the tth time step, F is the number of features, T is the time step, W1∈R H×F ,b1∈R H is the weight matrix and bias vector of the hidden layer, W2∈R 1×H ,b2∈R H is the weight matrix and bias vector of the output layer, H is the hidden layer size, and f is the activation function;
[0017] (2) Apply the softmax function to normalize the temporal attention and obtain the temporal attention weight α t :
[0018]
[0019] (3) Weight the time dimension of the input feature matrix X to obtain the time-weighted feature matrix
[0020]
[0021] in,
[0022] As a preferred solution, the processing process of the feature attention module includes:
[0023] (a) For the feature matrix Perform an average pooling operation on the time dimension to obtain the global description vector z of the feature dimension:
[0024]
[0025] (b) Generate feature attention score s using nonlinear mapping:
[0026] s=f(W f z+b f );
[0027] Among them, W f ∈R F×F is the learnable weight matrix, b f ∈R F is the bias vector, f is the nonlinear activation function;
[0028] (c) Apply the softmax function to normalize the feature attention and obtain the feature attention weight β m :
[0029]
[0030] (d) Input feature matrix The feature dimensions are weighted to obtain the feature matrix after feature weighting
[0031]
[0032] in, β=[β1,β2,......β F ] T ∈R F , ⊙ is the Hadamard product.
[0033] As a preferred solution, the processing process of the dynamic bottleneck structure DBS module includes:
[0034] Use a linear reduction strategy to dynamically adjust the model structure to balance the model's expression and generalization capabilities, including bottleneck size calculation and a fully connected layer, whose input is the output feature map of the previous layer, the current number of iterations, the maximum number of iterations, and the basic bottleneck size. The calculation method is:
[0035]
[0036] y b =W q *h+b q
[0037] Among them, Q is the maximum number of iterations, B(q) is the bottleneck size of the current iteration, B0 is the basic bottleneck size, and y b is the output of the fully connected layer, mapping the input feature h to a space with dimension B(q), W q is the weight matrix of the fully connected layer, b q is the dynamic bottleneck bias vector.
[0038] As a preferred solution, the composite loss function L based on the label distribution aware margin loss LDAM Loss and the gradient coordination mechanism loss GHM Loss is * for:
[0039] L * =ε*L DAM +(1-ε)*L GHM ,0≤ε≤1
[0040]
[0041] in, is the standard label distribution aware margin loss, is the feature vector of the input sample in the training set, δ is the true category label of the input sample in the training set, z δ is the predicted score value of δ, z j is the predicted score value of other categories j, Δδ is the margin defined by category δ, C is the constant for adjusting the margin, N is the total number of input samples in the training set, n is the total number of categories in the training set, and L GHM is the standard gradient coordination mechanism loss, is the cross entropy loss of the sample, g is the gradient of the sample, GD(g) is the gradient density function, and ε is the weight factor for adjusting the loss.
[0042] As a preferred solution, the training process of the cough recognition model includes:
[0043] S1, preprocessing and multimodal signal fusion operations are performed on the flexible piezoelectric film sensor and microphone signals to obtain Mel frequency cepstrum coefficients, short-time energy, spectrum centroid feature vectors and spectrograms;
[0044] S2. Initialize the cough recognition model, set the initial parameters of DBO, and define the learning rate α, number of hidden layers μ, and regularization parameter λ of the cough recognition model as the current solution, that is, [α, μ, λ] is the initial dung beetle position, set the prediction error of the cough recognition model as the fitness function, and optimize the parameter vector [α, μ, λ] by simulating the rolling and navigation behavior of the dung beetle. When the number of iterations is equal to the maximum number of iterations, the global optimal [α, μ, λ] parameter vector is obtained. The fitness calculation expression is as follows:
[0045]
[0046] in,
[0047] In the formula, J is the fitness function, S is the total number of test set samples, is the indicator function, y i is the model’s predicted label for the test set, is the true label of the test set.
[0048] S3. Use the optimal [α, μ, λ] parameter vector to train the cough recognition model, calculate the composite loss function, adjust the category margin and gradient contribution, process the imbalanced cough data and difficult-to-classify samples, stop the model training when the maximum iteration cycle is reached, and save the target cough recognition model;
[0049] S4. Make predictions on the test set and calculate the accuracy and confusion matrix to evaluate the target cough recognition model in terms of overfitting, generalization ability, and category balance.
[0050] As a preferred solution, the data processing terminal also performs quantitative analysis on cough, and the cough quantitative indicators include cough frequency, cough energy and cough duration;
[0051] Calculate the number of coughs within a fixed period of time, i.e. cough frequency;
[0052] The power spectrum density of each time frame is calculated and integrated to obtain the energy of each time frame. The sum of the energies of all time frames is the cough energy.
[0053] Calculate the length of time from the start to the end of each coughing attack, and then divide it by the coughing frequency to get the cough duration.
[0054] The present invention also provides a cough monitoring method of a wearable cough monitoring system as described in any of the above schemes, comprising the following steps:
[0055] Wear the neckband around the human neck, stick the flexible piezoelectric film sensor on the human jaw, and start cough monitoring;
[0056] Collect vibration and sound wave signals captured by flexible piezoelectric film sensors and microphones in real time, and wirelessly transmit vibration and sound wave signals to data processing terminals;
[0057] The data processing terminal performs signal preprocessing on the vibration and sound wave signals, and then uses the cough recognition model to perform cough recognition and quantitative analysis.
[0058] Compared with the prior art, the present invention has the following beneficial effects:
[0059] (1) DBO optimized and improved TFAM-DBS-BiLSTM cough recognition model: This model can effectively extract and utilize the temporal features and stage features of cough sounds, improving the accuracy and robustness of cough recognition; TFAM captures the important features of cough sounds in different stages such as inspiration, pressure, and burst, and combines BiLSTM to learn the time dependence of the entire cough process; DBS balances the expression and generalization capabilities of the model; the LDAM-GHM loss function effectively handles the imbalance and difficult-to-classify sample problems of cough data; DBO optimizes the learning rate, number of hidden layers, and regularization parameters of model training, shortening the training time and improving the efficiency of parameter optimization;
[0060] (2) Multimodal signal fusion: weighted fusion of flexible piezoelectric film sensor and microphone signals, extraction of multiple acoustic features (including Mel-frequency cepstral coefficients, short-time energy, and spectrum centroid), and generation of a spectrogram. The acoustic features and spectrogram are simultaneously input into the cough recognition model;
[0061] (3) Dual sensor joint acquisition: The skin vibration signal during coughing is collected by a flexible piezoelectric film sensor as a benchmark for effective signal endpoint detection to reduce external noise interference. The microphone captures the cough sound wave signal. Its wideband characteristics make up for the frequency band range limitation of the flexible piezoelectric film sensor, thereby improving the cough recognition accuracy of a single flexible piezoelectric film sensor in a limited frequency band or a single microphone in a noisy environment.
[0062] (4) The cough monitoring device adopts a U-shaped neck-hanging design, and the flexible piezoelectric film sensor only contacts the lower jaw, which simplifies wearing and reduces the jitter interference caused by user activities, thereby improving patient acceptance. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 is a schematic structural diagram of a wearable cough monitoring device of the present invention;
[0064] Figure 2 This is a diagram of endpoint detection results of the wearable cough monitoring device of the present invention;
[0065] Figure 3 The overall structure of the cough recognition model of the present invention;
[0066] Figure 4 is a training flow chart of the cough recognition model of the present invention;
[0067] Figure 5 A user interaction interface of the data processing terminal of the present invention;
[0068] Figure 6 Schematic diagram of the interaction of the wearable cough monitoring system of the present invention. DETAILED DESCRIPTION
[0069] In order to more clearly illustrate the embodiments of the present invention, the specific implementation methods of the present invention will be described below with reference to the accompanying drawings. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those of ordinary skill in the art, other accompanying drawings and other implementation methods can be obtained based on these accompanying drawings without creative work.
[0070] like Figure 1 and Figure 6 As shown, the wearable cough monitoring system of the present invention includes a wearable cough monitoring device and a data processing terminal 4. The wearable cough monitoring device includes a signal acquisition module 1, a main control module 2, a neck hanging piece 3 and a data processing terminal 4. The signal acquisition module 1 and the main control module 2 are located at both ends of the neck hanging piece 3, and signal connection is performed through the neck hanging piece 3. The main control module 2 exchanges information with the data processing terminal 4 through wireless communication.
[0071] The signal acquisition module 1 includes a housing 11, a flexible piezoelectric film sensor 102 and a microphone 103. The flexible piezoelectric film sensor 102 is connected to the signal acquisition circuit board 101 through its signal line, and its sensitive surface is attached to the patient's jaw. The microphone 103 is installed on the signal acquisition circuit board 101, and the signal acquisition circuit board 101 is located in the housing 11. The flexible piezoelectric film sensor signal conditioning circuit 103 and the microphone signal conditioning circuit 105 include signal amplification, filtering, biasing, and analog-to-digital conversion circuits. The cough data is transmitted from the flexible piezoelectric film sensor 102 and the microphone 104, respectively, through their conditioning circuits, and transmitted to the main control circuit board 201 through the signal line 301;
[0072] The main control module 2 includes a housing 21 and a main control circuit board 201. The main control circuit board 201 is located in the housing 21 and includes a main controller 202, a button 203, a storage module 204, a wireless communication module 205 and a power module 206. The button 203 is led out of the main control module 2 through its signal line;
[0073] The neck hanging piece 3 is a U-shaped structure, and contains a signal line 301 outside, which is electrically connected to the signal acquisition module 1 and the main control module 2;
[0074] The data processing terminal 4 includes a computer medium, a cough recognition model and a user interaction interface, realizes signal preprocessing, cough recognition and quantitative analysis, and generates a cough monitoring report.
[0075] Furthermore, the flexible piezoelectric film sensor 102 is made of PVDF material; the microphone is a MEMS microphone;
[0076] The main controller 202 can select STM32F103C8T6 as the main controller chip to control the collection and storage of vibration and sound wave signals captured by the flexible piezoelectric film sensor and microphone after signal conditioning. The storage module 204 can select a Flash storage module, and the wireless communication module 205 can select a WiFi module.
[0077] Furthermore, the signal preprocessing includes noise reduction, endpoint detection and multimodal signal fusion operations on the flexible piezoelectric film sensor and microphone signals.
[0078] The noise reduction method for flexible piezoelectric film sensor and microphone signals uses enhanced spectral subtraction.
[0079] The endpoint detection method of the flexible piezoelectric film sensor and microphone signal is based on the double threshold decision method, which takes the vibration signal as the reference to reduce the situation where the external noise is mistakenly classified as a cough signal, such as Figure 2 As shown, the upper waveform is the microphone signal, which contains external noise and is sensitive to sound waves in the air. The lower waveform is the flexible piezoelectric film sensor signal, which is only sensitive to pressure changes.
[0080] The feature extraction method of the flexible piezoelectric film sensor and microphone signal is: weighted fusion of the flexible piezoelectric film sensor and microphone signal, extraction of multiple acoustic features (including Mel frequency cepstral coefficients, short-time energy and spectrum centroid), and generation of a spectrogram, and the acoustic features and the spectrogram are simultaneously input into the cough recognition model.
[0081] Furthermore, the overall structure of the TFAM-DBS-BiLSTM cough recognition model is as follows: Figure 3 As shown in the figure, its main body is a bidirectional long short-term memory network BiLSTM, which also includes the temporal feature attention mechanism TFAM for cough recognition and the dynamic bottleneck structure DBS that balances the model expression and generalization ability. The dung beetle optimization algorithm DBO is then used to optimize the learning rate α, the number of hidden layers L and the regularization parameter λ of the TFAM-DBS-BiLSTM cough recognition model.
[0082] Specifically, since a cough has three stages: inhalation, pressurization, and outbreak, the temporal feature attention mechanism TFAM is composed of a temporal attention module and a feature attention module in series. It uses a multi-layer perceptron to calculate the attention weights in the time dimension, and uses nonlinear mapping to generate feature attention weights to highlight the key time points and useful features in the cough sequence.
[0083] Specifically, the temporal attention module is calculated as follows:
[0084] (1) Use a multi-layer perceptron (MLP) to calculate the input feature matrix X = [x1, x2, ... x T ]∈R F×T Temporal attention score e t :
[0085] e t =MLP(x t )=W2*f(W1x t +b1)+b2
[0086] where x t represents the feature vector at the tth time step, F is the number of features, T is the time step, W1∈R H×F ,b1∈R H is the weight matrix and bias vector of the hidden layer, W2∈R 1×H ,b2∈R H is the weight matrix and bias vector of the output layer, H is the hidden layer size, and f is the activation function.
[0087] (2) Apply the softmax function to normalize the temporal attention and obtain the temporal attention weight α t :
[0088]
[0089] (3) Weight the time dimension of the input feature matrix X to obtain the time-weighted feature matrix
[0090]
[0091] in,
[0092] The calculation method of the above feature attention module is as follows:
[0093] (1) For the feature matrix Perform an average pooling operation on the time dimension to obtain the global description vector z of the feature dimension:
[0094]
[0095] (2) Generate feature attention score s using nonlinear mapping:
[0096] s=f(W f z+b f )
[0097] Among them, W f ∈R F×F is the learnable weight matrix, b f ∈R F is the bias vector, f is the nonlinear activation function;
[0098] (3) Apply the softmax function to normalize the feature attention and obtain the feature attention weight β m :
[0099]
[0100] (4) Input feature matrix The feature dimensions are weighted to obtain the feature matrix after feature weighting
[0101]
[0102] in, β=[β1,β2,......β F ] T ∈R F ;
[0103] Specifically, the dynamic bottleneck structure DBS uses a linear decreasing strategy to dynamically adjust the model structure to balance the expression and generalization capabilities of the model, including bottleneck size calculation and a fully connected layer, whose input is the output feature map of the previous layer, the current number of iterations, the maximum number of iterations and the basic bottleneck size, and the calculation method is:
[0104]
[0105] y b =W q *h+b q
[0106] Among them, Q is the maximum number of iterations, B(q) is the bottleneck size of the current iteration, B0 is the basic bottleneck size, and y b is the output of the fully connected layer, mapping the input feature h to a space with dimension B(q), W q is the weight matrix of the fully connected layer, b q is the dynamic bottleneck bias vector.
[0107] Specifically, the design for cough recognition can effectively distinguish the patient's own coughing behavior from coughing sounds and non-coughing sounds such as talking, sneezing, clearing the throat, and snoring. Considering that non-coughing data accounts for a large proportion, and the strong breathing and swallowing signals are relatively easy to classify, in order to solve the adverse effects of data set imbalance and reduce the weight of mislabeled samples and easy-to-classify samples in training, a composite loss function (LDAM-GHM loss) based on label distribution aware marginal loss (LDAM Loss) and gradient coordination mechanism loss (GHM Loss) is proposed, and its calculation method is:
[0108] L * =ε*L DAM +(1-ε)*L GHM ,0≤ε≤1
[0109]
[0110] in, is the standard label distribution aware margin loss, is the feature vector of the input sample in the training set, δ is the true category label of the input sample in the training set, z δ is the predicted score value of δ, z j is the predicted score value of other categories j, Δδ is the margin defined by category δ, C is the constant for adjusting the margin, N is the total number of input samples in the training set, n is the total number of categories in the training set, and L GHM is the standard gradient coordination mechanism loss, is the cross entropy loss of the sample, g is the gradient of the sample, GD(g) is the gradient density function, and ε is the weight factor for adjusting the loss.
[0111] like Figure 4 As shown in the figure, the training steps of the TFAM-DBS-BiLSTM cough recognition model are as follows:
[0112] S1: Preprocessing and multimodal signal fusion operations are performed on the flexible piezoelectric film sensor and microphone signals to obtain Mel-frequency cepstrum coefficients, short-time energy, spectrum centroid feature vectors and spectrograms.
[0113] S2: Initialize the TFAM-DBS-BiLSTM model, set the initial parameters of DBO, and define the learning rate α, number of hidden layers μ, and regularization parameter λ of the FAM-DBS-BiLSTM model as the current solution, that is, [α, μ, λ] is the initial dung beetle position, set the prediction error of the TFAM-DBS-BiLSTM model as the fitness function, and optimize the parameter vector [α, μ, λ] by simulating the rolling and navigation behavior of the dung beetle. When the number of iterations is equal to the maximum number of iterations, the global optimal [α, μ, λ] parameter vector is obtained. The calculation expression of the above fitness is as follows:
[0114]
[0115] in,
[0116] In the formula, J is the fitness function, S is the total number of test set samples, is the indicator function, y i is the model’s predicted label for the test set, is the true label of the test set.
[0117] S3: Use the optimal [α, μ, λ] parameter vector to train the TFAM-DBS-BiLSTM model, calculate the LDAM-GHM loss, adjust the category margin and gradient contribution, handle the imbalanced cough data and difficult-to-classify samples, stop model training when the maximum iteration cycle is reached, and save the best model.
[0118] S4: Predictions were made on the test set, and the accuracy and confusion matrix were calculated to evaluate the TFAM-DBS-BiLSTM hybrid cough model in terms of overfitting, generalization ability, and category balance.
[0119] Specifically, the cough quantification method of the present invention is: calculating the number of coughs within a fixed time, that is, the cough frequency f c ; Calculate the power spectral density of each time frame and integrate it to obtain the energy of each time frame. The sum of the energy of all time frames is the cough energy E c ; Calculate the time from the start to the end of each cough attack, and then divide it by the cough frequency to get the cough duration t c .
[0120] like Figure 5 As shown, the user interaction interface of the data processing terminal includes wireless transmission network configuration, audio playback and storage, information bar, cough sound waveform, cough sound recognition and frequency recording panels. The user can establish wireless communication with the main control module through the wireless transmission network configuration panel, use the audio playback and storage panel to save the current cough signal, obtain the cough recognition result in real time from the information bar panel, observe the cough situation from the cough sound waveform panel, and distinguish sounds similar to cough sounds through the cough sound recognition panel, so as to obtain the patient's cough times, duration and average energy information in the frequency recording panel to quantify the cough.
[0121] like Figure 6 As shown, the wearable cough monitoring method of the present invention is based on the above system and comprises the following steps:
[0122] S1: Wear the wearable cough monitoring device on the patient's neck, stick the flexible piezoelectric film sensor 102 on the patient's jaw, and press the button 203 to start cough monitoring;
[0123] S2: the main control module 2 collects and stores the vibration and sound wave signals captured by the flexible piezoelectric film sensor and the microphone after signal conditioning in real time. When the button 203 is pressed again, the main control module 2 stops collecting and storing signals and wirelessly transmits the vibration and sound wave signals to the data processing terminal 4;
[0124] S3: At the data processing terminal 4, the vibration and sound wave signals are preprocessed, and the TFAM-DBS-BiLSTM cough recognition model is used to identify the patient's own coughing behavior from coughing sounds and non-coughing sounds such as talking, sneezing, and clearing the throat, so as to quantitatively analyze the cough frequency, intensity, and duration;
[0125] S4: Generate and display a cough report on the user interaction interface.
[0126] The above description is only a detailed description of the preferred embodiments and principles of the present invention. For ordinary technicians in this field, according to the ideas provided by the present invention, there will be changes in the specific implementation methods, and these changes should also be regarded as the protection scope of the present invention.
Claims
1. A wearable cough monitoring system, characterized in that: It includes a wearable cough monitoring device and a data processing terminal; The wearable cough monitoring device comprises a neck hanging piece and a signal acquisition module and a main control module respectively arranged at two ends of the neck hanging piece; wherein the signal acquisition module and the main control module are connected by signal through the neck hanging piece, and the signal acquisition module comprises a flexible piezoelectric film sensor and a microphone; The data processing terminal and the main control module exchange information through wireless communication, and are used to perform cough recognition on the collected flexible piezoelectric film sensor and microphone signals using a cough recognition model to achieve cough monitoring; Among them, the cough recognition model includes a feature input module, a dung beetle optimization algorithm DBO module, a temporal feature attention module, a bidirectional long short-term memory network BiLSTM module, a dynamic bottleneck structure DBS module and a classification output module connected in sequence. The learning rate, number of hidden layers and regularization parameters of the cough recognition model are optimized through the dung beetle optimization algorithm DBO module; the loss function of the cough recognition model is a composite loss function based on the label distribution aware marginal loss LDAMLoss and the gradient coordination mechanism loss GHMLoss.
2. The wearable cough monitoring system according to claim 1, characterized in that: The data processing terminal is provided with a feature extraction module for extracting features of flexible piezoelectric film sensors and microphone signals; The feature extraction method is as follows: weighted fusion of flexible piezoelectric film sensor and microphone signals, extraction of acoustic features and generation of spectrogram; then simultaneous input of acoustic features and spectrogram into the cough recognition model; Among them, the acoustic features include Mel-frequency cepstral coefficients, short-time energy and spectral centroid.
3. The wearable cough monitoring system according to claim 1, characterized in that: The temporal feature attention module is composed of a temporal attention module and a feature attention module in series, uses a multilayer perceptron to calculate the attention weight in the temporal dimension, and uses nonlinear mapping to generate the feature attention weight, thereby highlighting the key time points and useful features in the cough sequence.
4. The wearable cough monitoring system according to claim 3, characterized in that: The processing process of the temporal attention module includes: (1) Use the multi-layer perceptron MLP to calculate the input feature matrix X = [x1, x2, ... x T ]∈R F×T The temporal attention score e t : e t =MLP(x t )=W2*f(W1x t +b1)+b2; Among them, x t represents the feature vector at the tth time step, F is the number of features, T is the time step, W1∈R H×F ,b1∈R H is the weight matrix and bias vector of the hidden layer, W2∈R 1×H ,b2∈R H is the weight matrix and bias vector of the output layer, H is the hidden layer size, and f is the activation function; (2) Apply the softmax function to normalize the temporal attention and obtain the temporal attention weight α t : (3) Weight the time dimension of the input feature matrix X to obtain the time-weighted feature matrix in, 5. The wearable cough monitoring system according to claim 4, characterized in that: The processing process of the feature attention module includes: (a) For the feature matrix Perform an average pooling operation on the time dimension to obtain the global description vector z of the feature dimension: (b) Generate feature attention score s using nonlinear mapping: s=f(W f z+b f ); Among them, W f ∈R F×F is the learnable weight matrix, b f ∈R F is the bias vector, f is the nonlinear activation function; (c) Apply the softmax function to normalize the feature attention and obtain the feature attention weight β m : (d) Input feature matrix The feature dimensions are weighted to obtain the feature matrix after feature weighting in, β=[β1,β2,......β F ] T ∈R F , ⊙ is the Hadamard product.
6. The wearable cough monitoring system according to claim 5, characterized in that: The processing process of the dynamic bottleneck structure DBS module includes: Use a linear reduction strategy to dynamically adjust the model structure to balance the model's expression and generalization capabilities, including bottleneck size calculation and a fully connected layer, whose input is the output features of the previous layer, the current number of iterations, the maximum number of iterations, and the basic bottleneck size. The calculation method is: y b =W q *h+b q Among them, Q is the maximum number of iterations, B(q) is the bottleneck size of the current iteration, B0 is the basic bottleneck size, and y b is the output of the fully connected layer, mapping the input feature h to a space with dimension B(q), W q is the weight matrix of the fully connected layer, b q is the dynamic bottleneck bias vector.
7. The wearable cough monitoring system according to claim 6, characterized in that: The composite loss function L based on the label distribution aware marginal loss LDAMLoss and the gradient coordination mechanism loss GHM Loss * for: L * =e*L DAM +(1-e)*L GHM ,0≤ε≤1 in, is the standard label distribution aware margin loss, is the feature vector of the input sample in the training set, δ is the true category label of the input sample in the training set, z δ is the predicted score value of δ, z j is the predicted score value of other categories j, Δδ is the margin defined by category δ, C is the constant for adjusting the margin, N is the total number of input samples in the training set, n is the total number of categories in the training set, and L GHM is the standard gradient coordination mechanism loss, is the cross entropy loss of the sample, g is the gradient of the sample, GD(g) is the gradient density function, and ε is the weight factor for adjusting the loss.
8. The wearable cough monitoring system according to claim 7, characterized in that: The training process of the cough recognition model includes: S1, preprocessing and multimodal signal fusion operations are performed on the flexible piezoelectric film sensor and microphone signals to obtain Mel frequency cepstrum coefficients, short-time energy, spectrum centroid feature vectors and spectrograms; S2. Initialize the cough recognition model, set the initial parameters of DBO, and define the learning rate α, number of hidden layers μ, and regularization parameter λ of the cough recognition model as the current solution, that is, [α, μ, λ] is the initial dung beetle position, set the prediction error of the cough recognition model as the fitness function, and optimize the parameter vector [α, μ, λ] by simulating the rolling and navigation behavior of the dung beetle. When the number of iterations is equal to the maximum number of iterations, the global optimal [α, μ, λ] parameter vector is obtained. The fitness calculation expression is as follows: in, In the formula, J is the fitness function, S is the total number of test set samples, is the indicator function, y i is the model’s predicted label for the test set, is the true label of the test set; S3. Use the optimal [α, μ, λ] parameter vector to train the cough recognition model, calculate the composite loss function, adjust the category margin and gradient contribution, process the imbalanced cough data and difficult-to-classify samples, stop the model training when the maximum iteration cycle is reached, and save the target cough recognition model; S4. Make predictions on the test set and calculate the accuracy and confusion matrix to evaluate the target cough recognition model in terms of overfitting, generalization ability, and category balance.
9. The wearable cough monitoring system according to claim 8, characterized in that: The data processing terminal also performs quantitative analysis on cough, and the cough quantitative indicators include cough frequency, cough energy and cough duration; Calculate the number of coughs within a fixed period of time, i.e. cough frequency; The power spectrum density of each time frame is calculated and integrated to obtain the energy of each time frame. The sum of the energies of all time frames is the cough energy. Calculate the length of time from the start to the end of each coughing attack, and then divide it by the coughing frequency to get the cough duration.
10. The cough monitoring method of the wearable cough monitoring system according to any one of claims 1 to 9, characterized in that: The following steps are involved: Wear the neckband around the human neck, stick the flexible piezoelectric film sensor on the human jaw, and start cough monitoring; Collect vibration and sound wave signals captured by flexible piezoelectric film sensors and microphones in real time, and wirelessly transmit vibration and sound wave signals to data processing terminals; The data processing terminal performs signal preprocessing on the vibration and sound wave signals, and then uses the cough recognition model to perform cough recognition and quantitative analysis.
Citation Information
Patent Citations
A portable cough monitoring device and system
CN108294756B
Intelligent medical observation wrist watch with cough monitoring function
CN111150405A