Cough detection model training method, cough detection method and cough detection device

By combining sound and electromyographic signal features to train a cough detection model, the problem of low accuracy in cough detection in existing technologies is solved, achieving more efficient cough recognition and diagnostic support.

CN114446319BActive Publication Date: 2026-01-16SHENZHEN SHULIAN TIANXIA INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210076475.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-21
Publication Date
2026-01-16
Estimated Expiration
2042-01-21

AI Technical Summary

Technical Problem

Existing cough detection technologies suffer from low accuracy, low reliability, and long processing times. They are also susceptible to environmental noise interference, which can affect doctors' diagnostic and treatment decisions.

Method used

By acquiring users' cough sample signals and electromyography sample signals, effective sample extraction is performed. Peak features, Mel-frequency cepstral coefficient features, and energy features are extracted and combined with signal labels to train a cough detection model, thereby improving recognition accuracy.

Benefits of technology

This improved the accuracy and reliability of the cough detection model, reduced the false positive rate, and increased the efficiency of analysts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114446319B_ABST
    Figure CN114446319B_ABST
Patent Text Reader

Abstract

This application proposes a method for training a cough detection model. The method includes: acquiring a user's cough sample signal and a signal label corresponding to the cough sample signal, wherein the cough sample signal includes a sound sample signal and an electromyographic (EMG) sample signal, and the signal label is used to indicate the cough state corresponding to the cough sample signal; extracting effective samples from the sound sample signal and the EMG sample signal to obtain an effective cough sample signal corresponding to the cough sample signal; extracting features from the effective cough sample signal to obtain peak features, Mel-frequency cepstral coefficient features, and energy features corresponding to the cough sample signal; and training a cough detection model based on the peak features, the Mel-frequency cepstral coefficient features, the energy features, and the signal label to obtain a target cough detection model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a cough detection model training method, a cough detection method, and a cough detection device. Background Technology

[0002] Clinically, coughing is a common symptom reported by patients to doctors and is a sign of respiratory diseases. A patient's cough can reflect their overall health condition or recovery progress. Assessing the frequency and intensity of coughing, as well as other health data, provides valuable clinical information for doctors, enabling timely and comprehensive diagnosis and treatment. It can also serve as a basis for evaluating treatment effectiveness.

[0003] In the current field of cough detection, commonly used techniques only record sound signals. Because the monitoring signal is singular and also records external sound signals such as speaking, knocking, cars, and stereos, using only the cough sound signal for identification is easily interfered with by similar cough sounds in the surrounding environment. This results in low accuracy and reliability, high requirements for analysts, long processing time, and is not conducive to doctors' comprehensive judgment of the condition and severity of cough patients, seriously affecting doctors' diagnostic and treatment decisions. Summary of the Invention

[0004] This application provides a cough detection model training method, a cough detection method, and a cough detection device to solve the technical problems of low accuracy, low reliability, and long time consumption for analysts in existing cough detection technologies.

[0005] Firstly, a method for training a cough detection model is provided, the method comprising:

[0006] Acquire a user's cough sample signal and a signal tag corresponding to the cough sample signal. The cough sample signal includes sound sample signal and electromyography sample signal. The signal tag is used to indicate the cough state corresponding to the cough sample signal.

[0007] Effective sample extraction is performed on the sound sample signal and the electromyography sample signal to obtain an effective cough sample signal corresponding to the cough sample signal; the effective cough sample signal is a signal in the sound sample signal that overlaps with the electromyography sample signal in the time domain;

[0008] Feature extraction is performed on the valid cough sample signal to obtain peak features, Mel-frequency cepstral coefficient features, and energy features corresponding to the cough sample signal; the Mel-frequency cepstral coefficient features are used to characterize the frequency domain features of the cough sample signal; the energy features are used to characterize the signal amplitude of the cough sample signal; and the peak features are used to characterize the highest amplitude of the cough sample signal.

[0009] The cough detection model is trained based on the peak features, the Mel frequency cepstral coefficient features, the energy features, and the signal labels to obtain the target cough detection model.

[0010] Secondly, a cough detection method is provided, the method comprising:

[0011] Acquire the user's cough signal to be identified;

[0012] The cough signal to be identified is input into the target cough detection model, which is trained by the cough detection model training method described in the first aspect.

[0013] The target cough detection model outputs the detection result of cough or non-cough corresponding to the cough signal to be identified.

[0014] Thirdly, a cough detection model training device is provided, the device comprising:

[0015] The sample acquisition module is used to acquire the user's cough sample signal and the signal tag corresponding to the cough sample signal. The cough sample signal includes sound sample signal and electromyography sample signal. The signal tag is used to indicate the cough state corresponding to the cough sample signal.

[0016] The effective sample extraction module is used to extract effective samples from the sound sample signal and the electromyography sample signal to obtain an effective cough sample signal corresponding to the cough sample signal; the effective cough sample signal is a signal in the sound sample signal that overlaps with the electromyography sample signal in the time domain;

[0017] The feature extraction module is used to extract features from the valid cough sample signal to obtain peak features, Mel-frequency cepstral coefficient features, and energy features corresponding to the cough sample signal; the Mel-frequency cepstral coefficient features are used to characterize the frequency domain features of the cough sample signal; the energy features are used to characterize the signal amplitude of the cough sample signal; and the peak features are used to characterize the highest amplitude of the cough sample signal.

[0018] The model training module is used to train the cough detection model based on the peak features, the Mel frequency cepstral coefficient features, the energy features, and the signal labels to obtain the target cough detection model.

[0019] Fourthly, a computer device is provided, including a memory and a processor, the memory storing a computer program, which, when executed by the processor, causes the processor to perform the following steps:

[0020] Acquire a user's cough sample signal and a signal tag corresponding to the cough sample signal. The cough sample signal includes sound sample signal and electromyography sample signal. The signal tag is used to indicate the cough state corresponding to the cough sample signal.

[0021] Effective sample extraction is performed on the sound sample signal and the electromyography sample signal to obtain an effective cough sample signal corresponding to the cough sample signal; the effective cough sample signal is a signal in the sound sample signal that overlaps with the electromyography sample signal in the time domain;

[0022] Feature extraction is performed on the valid cough sample signal to obtain peak features, Mel-frequency cepstral coefficient features, and energy features corresponding to the cough sample signal; the Mel-frequency cepstral coefficient features are used to characterize the frequency domain features of the cough sample signal; the energy features are used to characterize the signal amplitude of the cough sample signal; and the peak features are used to characterize the highest amplitude of the cough sample signal.

[0023] The cough detection model is trained based on the peak features, the Mel frequency cepstral coefficient features, the energy features, and the signal labels to obtain the target cough detection model.

[0024] Fifthly, a computer-readable storage medium is provided, storing a computer program that, when executed by a processor, causes the processor to perform the following steps:

[0025] Acquire a user's cough sample signal and a signal tag corresponding to the cough sample signal. The cough sample signal includes sound sample signal and electromyography sample signal. The signal tag is used to indicate the cough state corresponding to the cough sample signal.

[0026] Effective sample extraction is performed on the sound sample signal and the electromyography sample signal to obtain an effective cough sample signal corresponding to the cough sample signal; the effective cough sample signal is a signal in the sound sample signal that overlaps with the electromyography sample signal in the time domain;

[0027] Feature extraction is performed on the valid cough sample signal to obtain peak features, Mel-frequency cepstral coefficient features, and energy features corresponding to the cough sample signal; the Mel-frequency cepstral coefficient features are used to characterize the frequency domain features of the cough sample signal; the energy features are used to characterize the signal amplitude of the cough sample signal; and the peak features are used to characterize the highest amplitude of the cough sample signal.

[0028] The cough detection model is trained based on the peak features, the Mel frequency cepstral coefficient features, the energy features, and the signal labels to obtain the target cough detection model.

[0029] This application achieves the following beneficial effects: After acquiring the user's cough sample signal, effective sample extraction is performed on the sound sample signal and electromyography (EMG) sample signal. By constraining the sound sample signal with the EMG sample signal, sound sample signals that overlap with the EMG sample signal in the time domain can be accurately identified from the sound sample signal, eliminating sound sample signals that do not match the EMG sample signal and reducing the probability of false positives. Feature extraction is performed on the effective cough sample signal to obtain peak features, Mel-frequency cepstral coefficient features, and energy features corresponding to the cough sample signal. This fully considers the energy difference between the cough bursting through the glottis and non-coughing sounds and ambient sounds, and also fully considers situations where the signal frequency difference is small and difficult to identify, thereby enhancing the cough signal and obtaining high-quality data. Model training based on peak features, Mel-frequency cepstral coefficient features, and energy features—that is, training the model with high-quality data—significantly improves the accuracy and reliability of the trained model, reduces the requirements for analysts, and improves their work efficiency. Attached Figure Description

[0030] Figure 1 This is a schematic diagram of the structure of a cough detection device provided in an embodiment of this application;

[0031] Figure 2 A flowchart illustrating a cough detection model training method provided in an embodiment of this application;

[0032] Figure 3 A flowchart illustrating a cough detection model training method provided in an embodiment of this application;

[0033] Figure 4 A flowchart illustrating a cough detection model training method provided in an embodiment of this application;

[0034] Figure 5 A flowchart illustrating a cough detection model training method provided in an embodiment of this application;

[0035] Figure 6 A schematic flowchart of a cough detection method provided in an embodiment of this application;

[0036] Figure 7 This is a schematic diagram of the structure of a cough detection model training device provided in an embodiment of this application;

[0037] Figure 8 This is a schematic diagram of the structure of a cough detection device provided in an embodiment of this application;

[0038] Figure 9 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0039] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.

[0040] The technical solution of this application is applicable to various cough detection scenarios. Specifically, the technical solution of this application is applicable to detecting cough sounds and non-cough sounds in a user's voice using a cough detection model in a cough detection scenario. In practical applications, a cough detection model with cough detection function can be trained, and the trained cough detection model can be used to detect user voices in the scenario to determine the cough sounds and non-cough sounds in the user's voice.

[0041] The technical solution of this application can be applied to a cough detection device. The device acquires the user's cough signal to be identified through the sensor of the cough monitoring device, and then uses the cough detection model applied to the cough detection device to detect the cough signal to be identified, thereby determining the cough sound and non-cough sound contained in the cough signal to be identified.

[0042] To facilitate understanding of the technical solution of this application, the cough detection devices to which the cough detection model in this application can be applied will be introduced first. For example... Figure 1As shown, the cough detection device includes a cough detection device body 10, a first electrode 20, a second electrode 30, a third electrode 40, and a sound acquisition device 50. The first electrode 20, second electrode 30, third electrode 40, and sound acquisition device 50 are all connected to the cough detection device body 10. In practical application, the first electrode 20 is the N-pole, and the second electrode 30 is the P-pole. During use, the N-pole is located between the 6th and 7th ribs, at the intersection of the perpendicular rib line and the rib midline, close to the heart. The P-pole is located between the 6th and 7th ribs, at the intersection of the perpendicular rib line and the rib midline. The third electrode 40 is located on the right leg drive, specifically in the abdominal cavity. The sound acquisition device 50 is a microphone, located below the collar, placed in a way that prevents it from being touched or obstructed. Understandably, the first electrode 20, the second electrode 30, and the third electrode 40 can also be other sensors or devices that can collect the user's electromyographic signals, and the sound acquisition device 50 can be other sensors or devices that can collect the user's sound signals. The first electrode 20, the second electrode 30, the third electrode 40, and the sound acquisition device 50 can be connected to the cough detection device body 10 via wires, or via other wireless connections such as WiFi and Bluetooth.

[0043] In practical applications, for the aforementioned cough detection device, after the power is turned on, the indicator light of the cough detection device flashes, indicating that the cough detection device has entered the working state. The sound acquisition device 50 acquires the user's sound signal and sends it to the cough detection device body 10. The first electrode 20, the second electrode 30, and the third electrode 40 acquire the user's electromyography (EMG) signal and send it to the cough detection device body 10. After receiving the user's sound signal and EMG signal, the cough detection device body 10 saves the sound signal and EMG signal as binary files. Then, it uses a cough detection model to detect the sound signal and EMG signal, thereby determining whether the user's cough sound is a cough or not.

[0044] In one embodiment, such as Figure 2 As shown, this application proposes a method for training a cough detection model, the method comprising:

[0045] Step 201: Obtain the user's cough sample signal and the signal tag corresponding to the cough sample signal. The cough sample signal includes sound sample signal and electromyography sample signal. The signal tag is used to indicate the cough state corresponding to the cough sample signal.

[0046] The system collects the user's voice signals using a voice acquisition device and their electromyography (EMG) signals using an EMG acquisition device. After acquiring these signals, the cough detection device first saves them as binary files. During model training, the binary files are extracted from the stored database and encoded using preset encoding rules to obtain voice sample signals and EMG sample signals. These two signals together form the user's cough sample signal, which is then used to train the cough detection model. Specifically, the voice acquisition device can be as follows: Figure 1 The sound acquisition device 50 and the electromyography acquisition device can be, for example, as... Figure 1 The first electrode 20, the second electrode 30, and the third electrode 40.

[0047] After acquiring the user's cough sample signal, the cough sample signal is labeled with a sample tag indicating the corresponding cough state. Specifically, the cough state corresponding to the cough sample signal includes coughing and non-coughing.

[0048] Step 202: Extract effective samples from the sound sample signal and the electromyography sample signal to obtain an effective cough sample signal corresponding to the cough sample signal; the effective cough sample signal is a signal in the sound sample signal that overlaps with the electromyography sample signal in the time domain.

[0049] Among these, the physiological phenomenon of electromyography (EMG) response in the human body can be characterized as an EMG signal through EMG signal acquisition. Specifically, the EMG signal when a person is not coughing differs significantly from the EMG signal when coughing. By constraining the sound signal with the EMG signal, the sound signal during coughing, i.e., the effective cough signal, can be accurately extracted from the sound signal. Therefore, before training the cough detection model using cough sample signals, effective samples can be extracted from the sound sample signal and the EMG sample signal to obtain the effective cough sample signal corresponding to the cough sample signal. Specifically, the effective cough sample signal is the signal extracted from the sound sample signal under the constraint of the EMG sample signal that overlaps with the EMG sample signal in the time domain. In practical applications, signal overlap in the time domain means that the envelope of the sound sample signal and the envelope of the EMG sample signal overlap; the effective cough sample signal is the sound sample signal corresponding to the timestamp of the overlapping envelope portion.

[0050] In specific embodiments, such as Figure 3 As shown, the step of extracting effective samples from the sound sample signal and the electromyography sample signal to obtain an effective cough sample signal corresponding to the cough sample signal includes:

[0051] Step 2021: Extract the sound sample envelope corresponding to the sound sample signal and extract the electromyographic sample envelope corresponding to the electromyographic sample signal.

[0052] The sound sample envelope refers to the set of points consisting of maxima (absolute values ​​of sampled values) in the sound sampling points, which can reflect the temporal amplitude changes of the sound sample signal; the sound sample envelope corresponding to the sound sample signal is obtained by extracting the envelope of each frame of sound signal.

[0053] The electromyography (EMG) sample envelope refers to the set of points consisting of maximum values ​​(absolute values ​​of the sampled values) in the EMG sampling points, which can reflect the temporal amplitude changes of the EMG sample signal. The envelope is extracted for each frame of EMG signal to obtain the EMG sample envelope corresponding to the EMG sample signal.

[0054] Step 2022: Based on the overlap between the envelopes of the sound sample and the electromyography sample, extract valid samples from the cough sample signal to obtain a valid cough sample signal corresponding to the cough sample signal.

[0055] In particular, the temporal amplitude changes of the sound sample signal during coughing are consistent with the temporal amplitude changes of the electromyography (EMG) sample signal. The validity of the sound sample signal can be determined by judging the overlap between the sound sample envelope and the EMG sample envelope. Specifically, the greater the overlap (envelope intersection) between the sound sample envelope and the EMG sample envelope at a given time point, the higher the reliability of the sound sample signal at that time point, and the greater the likelihood that it is a cough sound.

[0056] For example, if the overlap between the envelopes of the sound sample corresponding to the first time stamp and the envelope of the electromyography (EMG) sample is 90%, and the overlap is 50% for the envelopes of the sound sample corresponding to the second time stamp, then the greater overlap indicates that the sound sample signal corresponding to the first time stamp is more reliable than the sound sample signal corresponding to the second time stamp, and the sound sample signal corresponding to the first time stamp is more likely to be a cough sound. Therefore, based on the overlap between the envelopes of the sound sample and the EMG sample, effective samples can be extracted from the cough sample signal to obtain an effective cough sample signal corresponding to the cough sample signal.

[0057] In specific embodiments, such as Figure 4As shown, based on the overlap between the envelopes of the sound sample and the electromyography sample, effective sample extraction is performed on the cough sample signal to obtain an effective cough sample signal corresponding to the cough sample signal, including:

[0058] Step 2022A: Extract the timestamp set corresponding to the envelope of the sound sample and the envelope of the electromyography sample.

[0059] After extracting the sound sample envelope corresponding to the sound sample signal, the start and end timestamps of the sound sample envelope can be determined. Furthermore, the timestamp set corresponding to the sound sample envelope can be determined based on the start and end timestamps. Specifically, the timestamp set corresponding to the sound sample envelope includes the start and end timestamps of the sound sample envelope, as well as multiple timestamps between the start and end timestamps.

[0060] Specifically, after extracting the electromyographic (EMG) sample envelope corresponding to the EMG sample signal, the start and end timestamps of the EMG sample envelope can be determined. Further, a timestamp set corresponding to the EMG sample envelope can be determined based on the start and end timestamps. Specifically, the timestamp set corresponding to the EMG sample envelope includes the start and end timestamps of the EMG sample envelope, as well as multiple timestamps between the start and end timestamps.

[0061] Step 2022B: If the overlap between the sound sample envelope corresponding to the nth timestamp and the electromyography sample envelope is greater than a preset threshold, then the sound sample signal corresponding to the nth timestamp is taken as a valid cough sample signal; wherein, the nth timestamp is any timestamp in the timestamp set, and n is a positive integer not less than 1.

[0062] In this embodiment, since the effective cough sample signal corresponding to the cough sample signal is extracted from the sound sample signal under the constraint of the electromyographic sample signal, after determining the timestamp set corresponding to the sound sample envelope and the timestamp set corresponding to the electromyographic sample envelope, it is necessary to align the timestamp set corresponding to the sound sample envelope with the timestamp set corresponding to the electromyographic sample envelope as the standard in terms of timing, so that the timestamp set corresponding to the sound sample envelope and the timestamp set corresponding to the electromyographic sample envelope have temporal consistency.

[0063] For example, if the timestamp set corresponding to the sound sample envelope is {0.01ms, 0.02ms, 0.03ms, 0.04ms, 0.05ms, 0.06ms, 0.07ms, 0.08ms......2.02ms, 2.03ms}, and the timestamp set corresponding to the electromyography sample envelope is {0.06ms, 0.07ms, 0.08ms......2.02ms, 2.03ms}, under the constraint of the electromyography sample signal, the timestamp set corresponding to the sound sample envelope is aligned to {0.06ms, 0.07ms, 0.08ms......2.02ms, 2.03ms}.

[0064] In this embodiment, after aligning the timestamp set corresponding to the sound sample envelope with the timestamp set corresponding to the electromyography (EMG) sample envelope as the standard, the overlap (intersection) between the sound sample envelope and the EMG sample envelope corresponding to any timestamp is determined. If the overlap (intersection) is greater than a preset threshold, it indicates that the reliability of the sound sample signal corresponding to that timestamp is higher, and the sound sample signal corresponding to that timestamp is then considered a valid sound sample signal. For example, the preset threshold can be flexibly set according to actual needs, such as 50%. Based on this, a threshold judgment is performed on the overlap between the sound sample envelope and the EMG sample envelope corresponding to each timestamp to obtain multiple valid sound sample signals. These multiple valid sound sample signals are combined into a valid sound sample set, which is used as the valid cough sample signal corresponding to the cough sample signal.

[0065] In this embodiment, after obtaining the user's cough sample signal, effective sample extraction is performed on the sound sample signal and electromyography (EMG) sample signal. By constraining the sound sample signal with the EMG sample signal, the sound sample signal that overlaps with the EMG sample signal in the time domain can be accurately obtained from the sound sample signal. Sound sample signals that do not match or have a low matching degree with the EMG sample signal are eliminated, reducing the probability of false positives.

[0066] Step 203: Extract features from the valid cough sample signal to obtain peak features, Mel frequency cepstral coefficient features, and energy features corresponding to the cough sample signal; the Mel frequency cepstral coefficient features are used to characterize the frequency domain features of the cough sample signal; the energy features are used to characterize the signal amplitude of the cough sample signal; and the peak features are used to characterize the highest amplitude of the cough sample signal.

[0067] In the field of sound processing, the Mel-Frequency Cepstrum is a linear transformation of the logarithmic energy spectrum based on a nonlinear Mel scale of sound frequency. Mel-Frequency Cepstral Coefficients (MFCCs) are the coefficients that make up the Mel-Frequency Cepstrum. These MFCC characteristics are used to characterize the frequency domain features of the cough sample signal.

[0068] The energy feature is used to characterize the signal amplitude of the cough sample signal, specifically, to characterize the signal strength of the cough sample signal, that is, to characterize the intensity of the user's cough. A larger signal amplitude indicates a stronger cough, and consequently, a stronger signal strength.

[0069] The peak feature is used to characterize the highest amplitude of the cough sample signal, where refers to the highest amplitude of the cough sample signal in the frequency domain. Specifically, the peak feature is used to characterize the maximum signal strength of the cough sample signal; that is, to characterize the maximum intensity of the user's cough.

[0070] In a specific embodiment, feature extraction is performed on the effective cough sample signal to obtain the Mel frequency cepstral coefficient features corresponding to the cough sample signal. This includes: firstly, pre-emphasizing, framing, and windowing the effective cough sample signal sequentially; then, performing a fast Fourier transform on each windowed frame to transform the time-domain signal to the frequency domain, obtaining the corresponding spectrum; passing the spectrum corresponding to each frame above through a Mel filter bank to obtain the Mel spectrum; and performing cepstral analysis on the Mel spectrum to obtain the Mel frequency cepstral coefficient features.

[0071] In this embodiment, after extracting the Mel-frequency cepstral coefficient features from the valid cough sample signal, a feature sequence composed of Mel-frequency cepstral coefficient features can be obtained. For example, it can be a feature sequence of length 20, namely mfcc1, mfcc2, ..., mfcc19, mfcc20.

[0072] In this embodiment, by extracting Mel frequency cepstral features, the detection accuracy is improved, enabling a more accurate distinction between cough sounds and environmental noise.

[0073] In a specific embodiment, before extracting features from the effective cough sample signal to obtain the peak features and energy features corresponding to the cough sample signal, the method further includes: performing spectral conversion on the effective cough sample signal to obtain a sample spectrum map corresponding to the cough sample signal.

[0074] Since changes in a signal in the time domain are often difficult to discern its characteristics, a Fourier transform is typically used to convert the valid cough sample signal into an energy distribution in the frequency domain for observation. Different energy distributions represent different sound characteristics. Specifically, the valid cough sample signal is cropped according to all corresponding timestamps to obtain a cropped time-domain segment. Then, the cropped time-domain segment is subjected to a short-time Fourier transform to obtain the corresponding sample spectrum.

[0075] In a specific embodiment, cropping the effective cough sample signal can be achieved by framing the effective cough sample signal. Specifically, the effective cough sample signal is divided into several effective cough sample signal units, each consisting of sampling points. In this embodiment, a sampling frequency of 16000Hz can be selected to analyze frequency domain data from 0-8000Hz within the frequency range. The frame length can be set between 10 and 35ms. In practical applications, framing can be done in 32ms increments, meaning one effective cough sample signal unit has 512 sampling points. Naturally, any effective cough sample signal unit has a certain frame length; in this embodiment, the frame length is 512. The framed effective cough sample signal is then processed by a high-pass filter as pre-emphasis. Since the noise in the effective cough sample signal generally has higher energy in the low-frequency part, using this high-pass filter can attenuate the low-frequency components, resulting in better noise reduction. Its form is as follows:

[0076] H(z) = 1 - αz -1

[0077] The value of α is generally between 0.75 and 0.95. Here, α = 0.9 can achieve good results.

[0078] In this embodiment, framing the valid cough sample signal can introduce discontinuities at frame boundaries, leading to frequency leakage. Therefore, a short-time Fourier transform (SFT) is performed on the framed valid cough sample signal. The SFT can be understood as applying a window to the frame signal before performing the Fourier transform. The purpose of the windowing function is to reduce frequency leakage caused by discontinuities at frame boundaries during the SFT, thereby reducing the "blocking effect." A Hamming window with a length equal to 512 points of the frame length is used here, which can effectively reduce the oscillation degree of the Gibbs effect.

[0079] The Hamming window function is defined as follows:

[0080] win(n)=(1-a)-acos[2πn / (M-1)],0≤n≤M-1

[0081] Different values ​​of a will produce different Hamming windows; generally, a is taken as 0.46.

[0082] The short-time Fourier transform is as follows:

[0083]

[0084] Where M = 512, is the computation length of the short-time Fourier transform. m represents the m-th frame of the signal.

[0085] In this embodiment, the step of extracting features from the effective cough sample signal to obtain peak features and energy features corresponding to the cough sample signal includes: extracting features from the effective cough sample signal based on the sample spectrum to obtain peak features and energy features corresponding to the cough sample signal.

[0086] Once the sample spectrum corresponding to the cough sample signal is obtained, the energy distribution of the effective cough sample signal on the corresponding sample spectrum can be obtained. Specifically, the energy corresponding to each frequency point on the sample spectrum can be obtained, which is the energy characteristic corresponding to the cough sample signal; the maximum energy value within a frequency range can also be obtained, which is the peak characteristic corresponding to the cough sample signal.

[0087] In a specific embodiment, before extracting features from the effective cough sample signal based on the sample spectrum to obtain the peak features corresponding to the cough sample signal, the method further includes: smoothing the sample spectrum to obtain a smoothed sample spectrum.

[0088] The process involves converting the effective cough sample signals from the time domain to the frequency domain and then performing a smoothing operation. Specifically, a cascaded mean smoothing window using a low-pass filter is used to obtain the smoothed waveform curve, and then peak features are extracted from the corresponding waveform.

[0089] In this embodiment, the step of extracting features from the effective cough sample signal based on the sample spectrum to obtain peak features corresponding to the cough sample signal includes: extracting features from the effective cough sample signal based on the smoothed sample spectrum to obtain peak features corresponding to the cough sample signal.

[0090] The peak characteristic refers to the peak value within a frequency band. In practical applications, the high energy distribution of most effective cough sample signals is in the 0-2500Hz range, and the high energy distribution of a few effective cough sample signals is in the 2500-3000Hz range. However, it is extremely rare for the high energy of effective cough sample signals to appear at 3000Hz and above. Therefore, obtaining the peak point can better statistically analyze the high energy characteristics.

[0091] In a specific embodiment, peak feature extraction can be performed by: acquiring the amplitude corresponding to each sampling point within a certain frequency band; if the amplitude corresponding to the nth sampling point is greater than the amplitude of any sampling point to its left or right, then the amplitude corresponding to the nth sampling point is determined as the maximum value within the certain frequency band, and this maximum value is taken as the peak value of the waveform within that frequency band. Taking the 0-2500Hz range as an example, it can be understood that the certain frequency band can be the entire 0-2500Hz range, or any interval after dividing the 0-2500Hz range. If it is any interval after division, peak feature extraction can be performed by using an interval traversal method to determine the peak value in each divided interval, and determining the largest peak value from the peak values ​​in each divided interval as the peak value in the 0-2500Hz range.

[0092] In this embodiment, although the smoothed curve fits the trend of the peaks, some peaks are still too close together. The presence of such peaks weakens the statistical significance. Therefore, the interval between peaks can be set to be no less than 50Hz. Under this constraint, extracting the peak features of the effective cough sample signal in the frequency domain can better conform to the actual waveform trend. For example, three peak features with an interval of no less than 50Hz can be extracted and named: max_point1, max_point2, and max_point3.

[0093] In a specific embodiment, the step of extracting features from the valid cough sample signal based on the sample spectrum to obtain the energy features corresponding to the cough sample signal includes: obtaining the spectral length of the valid cough sample signal after spectral conversion in the sample spectrum and the energy value corresponding to each frequency point in the sample spectrum; the spectral length is used to indicate the vector length corresponding to the valid cough sample signal after spectral conversion; and extracting energy features from the valid cough sample signal based on the spectral length, the energy value corresponding to each frequency point, and a preset energy calculation formula to obtain the energy features corresponding to the cough sample signal.

[0094] The energy released during a cough through the glottis differs significantly from that of non-coughing sounds and ambient noise. Therefore, by acquiring the energy characteristics of cough sample signals, this method can increase the accuracy of the samples and thus improve the accuracy of cough detection.

[0095] Specifically, when performing spectrum conversion on the effective cough sample signal, the effective cough sample signal is actually reduced in dimensionality to k MFCC feature vectors for representation. The spectrum length is used to indicate the length of the vector corresponding to the effective cough sample signal after spectrum conversion.

[0096] In this embodiment, after performing spectrum conversion on the valid cough sample signal, the spectral length of the valid cough sample signal after spectrum conversion and the energy value corresponding to each frequency point in the sample spectrum are obtained. The energy characteristics corresponding to the cough sample signal are determined according to the following formula:

[0097]

[0098] Where cal is the spectral length and p is the energy value at each point.

[0099] Step 204: Train the cough detection model based on the peak features, the Mel frequency cepstral coefficient features, the energy features, and the signal labels to obtain the target cough detection model.

[0100] After obtaining the peak features, Mel frequency cepstral coefficient features, and energy features corresponding to the cough sample signal, feature fusion can be performed on the peak features, Mel frequency cepstral coefficient features, and energy features. The fused features are then used to train the cough detection model to obtain the target cough detection model.

[0101] In specific embodiments, such as Figure 5 As shown, the step of training the cough detection model based on the peak features, the Mel-frequency cepstral coefficient features, the energy features, and the signal labels to obtain the target cough detection model includes:

[0102] Step 2041: Perform feature fusion on the peak feature, the Mel frequency cepstral coefficient feature, and the energy feature to obtain the target sample feature corresponding to the cough sample signal.

[0103] Specifically, the peak feature, the Mel-frequency cepstral coefficient feature, and the energy feature are fused to establish a new feature with the structure: max_point1, max_point2, max_point3, mfcc1, ..., mfcc20, p. After feature extraction from valid cough sample signals, the cough detection model can be trained.

[0104] Step 2042: Train the cough detection model based on the target sample features and the signal label to obtain the target cough detection model.

[0105] After establishing the new features, the final training samples are obtained, which are max_point1, max_point2, max_point3, mfcc1, ..., mfcc20, p, and Label. The first n-1 dimensions are the features extracted from the effective cough sample signals, and the nth dimension is the label information. The model is trained using the final training samples, with the training set and test set divided in a 30% and 70% ratio, respectively. The training set is set to 12-fold cross-validation during training. The feature structure constructed by this scheme can more accurately distinguish the features of cough and non-cough sounds, effectively solving the problem of significant individual differences and varied morphologies in coughs.

[0106] This application proposes a cough detection model training method: After acquiring the user's cough sample signal, effective sample extraction is performed on the sound sample signal and electromyography (EMG) sample signal. The sound sample signal is constrained by the EMG sample signal, which accurately identifies sound sample signals that overlap with the EMG sample signal in the time domain, eliminating sound sample signals that do not match the EMG sample signal and reducing the probability of false positives. Feature extraction is performed on the effective cough sample signal to obtain peak features, Mel-frequency cepstral coefficient features, and energy features corresponding to the cough sample signal. This fully considers the energy difference between the cough bursting through the glottis and non-coughing sounds and ambient sounds, and also takes into account situations where the signal frequency difference is small and difficult to identify, thereby enhancing the cough signal and obtaining high-quality data. Model training based on peak features, Mel-frequency cepstral coefficient features, and energy features—that is, training the model with high-quality data—significantly improves the accuracy and reliability of the trained model, reduces the requirements for analysts, and improves their work efficiency.

[0107] In one embodiment, such as Figure 6 As shown, this application proposes a cough detection method, the method comprising:

[0108] Step 601: Obtain the user's cough signal to be identified.

[0109] The cough signal to be identified includes a sound signal and an electromyography (EMG) signal. The user's sound signal is acquired using a sound acquisition device, and the user's EMG signal is acquired using an EMG acquisition device. After acquiring the sound and EMG signals, the cough detection device first saves them as binary files. During cough detection, the binary file is extracted from the stored database and then encoded using a preset encoding rule to obtain the sound and EMG signals to be identified. These two signals together constitute the user's cough signal to be identified. Once the cough signal is obtained, it can be used for cough detection by a cough detection model. Specifically, the sound acquisition device can be as follows: Figure 1 The sound acquisition device 50 and the electromyography acquisition device can be, for example, as... Figure 1 The first electrode 20, the second electrode 30, and the third electrode 40.

[0110] Step 602: The cough signal to be identified is input into the target cough detection model, which is trained by the cough detection model training method proposed in this application.

[0111] In this process, after the cough signal to be identified is input into the target cough detection model, the target cough detection model will perform signal processing on the cough signal to be identified, and finally perform cough detection based on the processed signal.

[0112] In a specific embodiment, the signal processing of the cough signal to be identified may be as follows: under the constraint of the electromyographic signal to be identified, extract the effective cough signal to be identified corresponding to the cough signal to be identified from the sound signal to be identified; perform feature extraction on the effective cough signal to be identified to obtain the peak features: max_point1, max_point2, max_point3, Mel-frequency cepstral coefficient features: mfcc1, ..., mfcc20, and energy feature p corresponding to the cough signal to be identified; and perform feature fusion on the peak features, the Mel-frequency cepstral coefficient features, and the energy feature to establish new features: max_point1, max_point2, max_point3, mfcc1, ..., mfcc20, p, Label, where the first n-1 dimensions are the features extracted from the effective cough sample signal, and the nth dimension is the label information.

[0113] In a specific embodiment, the cough detection model training method includes: acquiring a user's cough sample signal and a signal label corresponding to the cough sample signal, wherein the cough sample signal includes a sound sample signal and an electromyography (EMG) sample signal, and the signal label is used to indicate the cough state corresponding to the cough sample signal; extracting effective samples from the sound sample signal and the EMG sample signal to obtain an effective cough sample signal corresponding to the cough sample signal; the effective cough sample signal is a signal in the sound sample signal that overlaps with the EMG sample signal in the time domain; extracting features from the effective cough sample signal to obtain peak features, Mel-frequency cepstral coefficient features, and energy features corresponding to the cough sample signal; the Mel-frequency cepstral coefficient features are used to characterize the frequency domain features of the cough sample signal; the energy features are used to characterize the signal amplitude of the cough sample signal; the peak features are used to characterize the highest amplitude of the cough sample signal; and training the cough detection model based on the peak features, the Mel-frequency cepstral coefficient features, the energy features, and the signal label to obtain a target cough detection model.

[0114] Step 603: Output the detection result of cough or non-cough corresponding to the cough signal to be identified through the target cough detection model.

[0115] In this embodiment, by constraining the sound signal to be identified using the electromyography (EMG) signal to be identified, it is possible to accurately extract the sound signal that overlaps with the EMG signal in the time domain, and eliminate sound signals that do not match the EMG signal, thus reducing the probability of false positives. By extracting features from the valid cough signal to be identified, peak features, Mel-frequency cepstral coefficient features, and energy features corresponding to the cough signal are obtained. This fully considers the energy difference between the cough bursting through the glottis and non-coughing sounds and ambient sounds, and also takes into account situations where the signal frequency difference is small and difficult to identify, thereby enhancing the cough signal and obtaining high-quality data. This significantly improves the accuracy and reliability of the model after training, reduces the requirements for analysts, and improves their work efficiency.

[0116] like Figure 7 As shown, in one embodiment, the present invention provides a cough detection model training device, the device comprising:

[0117] The sample acquisition module 701 is used to acquire the user's cough sample signal and the signal tag corresponding to the cough sample signal. The cough sample signal includes sound sample signal and electromyography sample signal. The signal tag is used to indicate the cough state corresponding to the cough sample signal.

[0118] The effective sample extraction module 702 is used to extract effective samples from the sound sample signal and the electromyography sample signal to obtain an effective cough sample signal corresponding to the cough sample signal; the effective cough sample signal is a signal in the sound sample signal that overlaps with the electromyography sample signal in the time domain.

[0119] The feature extraction module 703 is used to extract features from the effective cough sample signal to obtain peak features, Mel frequency cepstral coefficient features, and energy features corresponding to the cough sample signal; the Mel frequency cepstral coefficient features are used to characterize the frequency domain features of the cough sample signal; the energy features are used to characterize the signal amplitude of the cough sample signal; and the peak features are used to characterize the highest amplitude of the cough sample signal.

[0120] The model training module 704 is used to train the cough detection model based on the peak features, the Mel frequency cepstral coefficient features, the energy features, and the signal labels to obtain the target cough detection model.

[0121] like Figure 8 As shown, in one embodiment, the present invention provides a cough detection device, the device comprising:

[0122] The acquisition module 801 is used to acquire the user's cough signal to be identified.

[0123] The input module 802 is used to input the cough signal to be identified into the target cough detection model, which is trained by the cough detection model training method proposed in this application.

[0124] The detection module 803 is used to output the detection result of cough or non-cough corresponding to the cough signal to be identified through the target cough detection model.

[0125] like Figure 9 As shown, in one embodiment, is an internal structural diagram of a computer device. This computer device may be a cough detection model training device, or a terminal or server connected to a cough detection model training device. Figure 9 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and may also store a computer program that, when executed by the processor, enables the processor to implement a cough detection model training method. The internal memory may also store a computer program that, when executed by the processor, enables the processor to implement a cough detection model training method. The network interface is used for communication with external devices. Those skilled in the art will understand that… Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0126] In one embodiment, the cough detection model training method provided in this application can be implemented as a computer program, which can be implemented as follows: Figure 9 The device runs on the computer shown. The computer's memory can store the various program templates that make up the age prediction device. For example, sample acquisition module 701, effective sample extraction module 702, feature extraction module 703, and model training module 704.

[0127] A computer device includes a memory and a processor. The memory stores a computer program that, when executed by the processor, causes the processor to perform the following steps: acquiring a user's cough sample signal and a signal tag corresponding to the cough sample signal, the cough sample signal including a sound sample signal and an electromyography (EMG) sample signal, the signal tag indicating a cough state corresponding to the cough sample signal; extracting effective samples from the sound sample signal and the EMG sample signal to obtain an effective cough sample signal corresponding to the cough sample signal; the effective cough sample signal is a signal in the sound sample signal that overlaps with the EMG sample signal in the time domain; extracting features from the effective cough sample signal to obtain a peak feature, a Mel-frequency cepstral coefficient feature, and an energy feature corresponding to the cough sample signal; the Mel-frequency cepstral coefficient feature characterizing the frequency domain feature of the cough sample signal; the energy feature characterizing the signal amplitude of the cough sample signal; the peak feature characterizing the highest amplitude of the cough sample signal; and training a cough detection model based on the peak feature, the Mel-frequency cepstral coefficient feature, the energy feature, and the signal tag to obtain a target cough detection model.

[0128] In one embodiment, the step of extracting effective samples from the sound sample signal and the electromyography (EMG) sample signal to obtain an effective cough sample signal corresponding to the cough sample signal includes: extracting the sound sample envelope corresponding to the sound sample signal, extracting the EMG sample envelope corresponding to the EMG sample signal; and extracting effective samples from the cough sample signal based on the overlap between the sound sample envelope and the EMG sample envelope to obtain an effective cough sample signal corresponding to the cough sample signal.

[0129] In one embodiment, the step of extracting effective samples from the cough sample signal based on the overlap between the sound sample envelope and the electromyography sample envelope to obtain a valid cough sample signal corresponding to the cough sample signal includes: extracting the timestamp set corresponding to the sound sample envelope and the electromyography sample envelope; if the overlap between the sound sample envelope and the electromyography sample envelope corresponding to the nth timestamp is greater than a preset threshold, then the sound sample signal corresponding to the nth timestamp is taken as a valid cough sample signal; wherein, the nth timestamp is any timestamp in the timestamp set, and n is a positive integer not less than 1.

[0130] In one embodiment, training the cough detection model based on the peak feature, the Mel-frequency cepstral coefficient feature, the energy feature, and the signal label to obtain the target cough detection model includes: performing feature fusion on the peak feature, the Mel-frequency cepstral coefficient feature, and the energy feature to obtain target sample features corresponding to the cough sample signal; and training the cough detection model based on the target sample features and the signal label to obtain the target cough detection model.

[0131] In one embodiment, before performing feature extraction on the effective cough sample signal to obtain peak features and energy features corresponding to the cough sample signal, the method further includes: performing spectral transformation on the effective cough sample signal to obtain a sample spectrum map corresponding to the cough sample signal; the step of performing feature extraction on the effective cough sample signal to obtain peak features and energy features corresponding to the cough sample signal includes: performing feature extraction on the effective cough sample signal based on the sample spectrum map to obtain peak features and energy features corresponding to the cough sample signal.

[0132] In one embodiment, before extracting features from the valid cough sample signal based on the sample spectrum to obtain peak features corresponding to the cough sample signal, the method further includes: smoothing the sample spectrum to obtain a smoothed sample spectrum; the step of extracting features from the valid cough sample signal based on the sample spectrum to obtain peak features corresponding to the cough sample signal includes: extracting features from the valid cough sample signal based on the smoothed sample spectrum to obtain peak features corresponding to the cough sample signal.

[0133] In one embodiment, the step of extracting features from the valid cough sample signal based on the sample spectrum to obtain energy features corresponding to the cough sample signal includes: obtaining the spectral length of the valid cough sample signal after spectral conversion in the sample spectrum and the energy value corresponding to each frequency point in the spectrum; the spectral length is used to indicate the vector length corresponding to the valid cough sample signal after spectral conversion; and extracting energy features from the valid cough sample signal based on the spectral length, the energy value corresponding to each frequency point, and a preset energy calculation formula to obtain energy features corresponding to the cough sample signal.

[0134] A computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to perform the following steps: acquiring a user's cough sample signal and a signal tag corresponding to the cough sample signal, the cough sample signal including an audio sample signal and an electromyographic (EMG) sample signal, the signal tag indicating a cough state corresponding to the cough sample signal; extracting effective samples from the audio sample signal and the EMG sample signal to obtain an effective cough sample signal corresponding to the cough sample signal; the effective cough sample signal being a signal in the audio sample signal that overlaps with the EMG sample signal in the time domain; extracting features from the effective cough sample signal to obtain peak features, Mel-frequency cepstral coefficient features, and energy features corresponding to the cough sample signal; the Mel-frequency cepstral coefficient features characterizing the frequency domain features of the cough sample signal; the energy features characterizing the signal amplitude of the cough sample signal; the peak features characterizing the highest amplitude of the cough sample signal; and training a cough detection model based on the peak features, the Mel-frequency cepstral coefficient features, the energy features, and the signal tag to obtain a target cough detection model.

[0135] In one embodiment, the step of extracting effective samples from the sound sample signal and the electromyography (EMG) sample signal to obtain an effective cough sample signal corresponding to the cough sample signal includes: extracting the sound sample envelope corresponding to the sound sample signal, extracting the EMG sample envelope corresponding to the EMG sample signal; and extracting effective samples from the cough sample signal based on the overlap between the sound sample envelope and the EMG sample envelope to obtain an effective cough sample signal corresponding to the cough sample signal.

[0136] In one embodiment, the step of extracting effective samples from the cough sample signal based on the overlap between the sound sample envelope and the electromyography sample envelope to obtain a valid cough sample signal corresponding to the cough sample signal includes: extracting the timestamp set corresponding to the sound sample envelope and the electromyography sample envelope; if the overlap between the sound sample envelope and the electromyography sample envelope corresponding to the nth timestamp is greater than a preset threshold, then the sound sample signal corresponding to the nth timestamp is taken as a valid cough sample signal; wherein, the nth timestamp is any timestamp in the timestamp set, and n is a positive integer not less than 1.

[0137] In one embodiment, training the cough detection model based on the peak feature, the Mel-frequency cepstral coefficient feature, the energy feature, and the signal label to obtain the target cough detection model includes: performing feature fusion on the peak feature, the Mel-frequency cepstral coefficient feature, and the energy feature to obtain target sample features corresponding to the cough sample signal; and training the cough detection model based on the target sample features and the signal label to obtain the target cough detection model.

[0138] In one embodiment, before performing feature extraction on the effective cough sample signal to obtain peak features and energy features corresponding to the cough sample signal, the method further includes: performing spectral transformation on the effective cough sample signal to obtain a sample spectrum map corresponding to the cough sample signal; the step of performing feature extraction on the effective cough sample signal to obtain peak features and energy features corresponding to the cough sample signal includes: performing feature extraction on the effective cough sample signal based on the sample spectrum map to obtain peak features and energy features corresponding to the cough sample signal.

[0139] In one embodiment, before extracting features from the valid cough sample signal based on the sample spectrum to obtain peak features corresponding to the cough sample signal, the method further includes: smoothing the sample spectrum to obtain a smoothed sample spectrum; the step of extracting features from the valid cough sample signal based on the sample spectrum to obtain peak features corresponding to the cough sample signal includes: extracting features from the valid cough sample signal based on the smoothed sample spectrum to obtain peak features corresponding to the cough sample signal.

[0140] In one embodiment, the step of extracting features from the valid cough sample signal based on the sample spectrum to obtain energy features corresponding to the cough sample signal includes: obtaining the spectral length of the valid cough sample signal after spectral conversion in the sample spectrum and the energy value corresponding to each frequency point in the spectrum; the spectral length is used to indicate the vector length corresponding to the valid cough sample signal after spectral conversion; and extracting energy features from the valid cough sample signal based on the spectral length, the energy value corresponding to each frequency point, and a preset energy calculation formula to obtain energy features corresponding to the cough sample signal.

[0141] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0142] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.

Claims

1. A method for training a cough detection model, characterized in that, The method comprises: obtaining a cough sample signal of a user and a signal label corresponding to the cough sample signal, the cough sample signal comprising a sound sample signal and an electromyography sample signal, and the signal label being used to indicate a cough state corresponding to the cough sample signal; performing effective sample extraction on the sound sample signal and the electromyography sample signal to obtain an effective cough sample signal corresponding to the cough sample signal; the effective cough sample signal being a signal in the sound sample signal that is signal-overlapped with the electromyography sample signal in a time domain; performing feature extraction on the effective cough sample signal to obtain a peak value feature, a mel-frequency cepstrum coefficient feature, and an energy feature corresponding to the cough sample signal; the mel-frequency cepstrum coefficient feature being used to represent a frequency domain feature of the cough sample signal; the energy feature being used to represent a signal amplitude of the cough sample signal; and the peak value feature being used to represent a highest amplitude of the cough sample signal; training a cough detection model according to the peak value feature, the mel-frequency cepstrum coefficient feature, the energy feature, and the signal label to obtain a target cough detection model; the effective sample extraction on the sound sample signal and the electromyography sample signal to obtain the effective cough sample signal corresponding to the cough sample signal comprises: extracting a sound sample envelope line corresponding to the sound sample signal and an electromyography sample envelope line corresponding to the electromyography sample signal; performing effective sample extraction on the cough sample signal according to envelope line overlap of the sound sample envelope line and the electromyography sample envelope line to obtain the effective cough sample signal corresponding to the cough sample signal; the effective sample extraction on the cough sample signal according to the envelope line overlap of the sound sample envelope line and the electromyography sample envelope line to obtain the effective cough sample signal corresponding to the cough sample signal comprises: extracting a timestamp set corresponding to the sound sample envelope line and the electromyography sample envelope line; if the sound sample envelope line and the electromyography sample envelope line corresponding to an nth timestamp are overlapped to a degree greater than a preset threshold, the sound sample signal corresponding to the nth timestamp is taken as an effective cough sample signal; wherein the nth timestamp is any timestamp in the timestamp set, and n is a positive integer not less than 1.

2. The method of claim 1, wherein, the training of the cough detection model according to the peak value feature, the mel-frequency cepstrum coefficient feature, the energy feature, and the signal label to obtain the target cough detection model comprises: performing feature fusion on the peak value feature, the mel-frequency cepstrum coefficient feature, and the energy feature to obtain a target sample feature corresponding to the cough sample signal; training the cough detection model according to the target sample feature and the signal label to obtain the target cough detection model.

3. The method of claim 1, wherein, the feature extraction on the effective cough sample signal to obtain the peak value feature and the energy feature corresponding to the cough sample signal further comprises: performing frequency spectrum conversion on the effective cough sample signal to obtain a sample frequency spectrum graph corresponding to the cough sample signal; The feature extraction on the effective cough sample signal includes: According to the sample spectrum diagram, the feature extraction on the effective cough sample signal includes:

4. The method of claim 3, wherein, Before the feature extraction on the effective cough sample signal according to the sample spectrum diagram, the method further includes: The sample spectrum diagram is smoothed to obtain a smoothed sample spectrum diagram. The feature extraction on the effective cough sample signal according to the sample spectrum diagram includes: According to the smoothed sample spectrum diagram, the feature extraction on the effective cough sample signal includes:

5. The method of claim 3, wherein, The feature extraction on the effective cough sample signal according to the sample spectrum diagram includes: The frequency spectrum length of the effective cough sample signal after the frequency spectrum conversion in the sample spectrum diagram and the energy value corresponding to each frequency point in the sample spectrum diagram are obtained; the frequency spectrum length is used to indicate the vector length corresponding to the effective cough sample signal after the frequency spectrum conversion; According to the frequency spectrum length, the energy value corresponding to each frequency point and a preset energy calculation formula, the energy feature extraction on the effective cough sample signal is performed to obtain the energy feature corresponding to the cough sample signal.

6. A cough detection method characterized by, The method includes: Obtaining a to-be-recognized cough signal of a user; inputting the to-be-recognized cough signal into a target cough detection model, the target cough detection model being trained by the cough detection model training method in any one of claims 1-5; outputting, by the target cough detection model, a detection result of cough or non-cough corresponding to the to-be-recognized cough signal. 7.A cough detection model training apparatus for use in the cough detection model training method according to claim 1, characterized by The device includes: A sample acquisition module is configured to acquire a cough sample signal of a user and a signal label corresponding to the cough sample signal, the cough sample signal including a sound sample signal and an electromyography sample signal, and the signal label being used to indicate a cough state corresponding to the cough sample signal. An effective sample extraction module is configured to perform effective sample extraction on the sound sample signal and the electromyography sample signal to obtain an effective cough sample signal corresponding to the cough sample signal; the effective cough sample signal is a signal in the sound sample signal that has signal overlap with the electromyography sample signal in a time domain. A feature extraction module is configured to perform feature extraction on the effective cough sample signal to obtain a peak value feature, a mel-frequency cepstral coefficient feature and an energy feature corresponding to the cough sample signal; the mel-frequency cepstral coefficient feature is used to represent a frequency domain feature of the cough sample signal; the energy feature is used to represent a signal amplitude of the cough sample signal; and the peak value feature is used to represent a highest amplitude of the cough sample signal. A model training module configured to train a cough detection model according to the peak feature, the mel-frequency cepstral coefficient feature, the energy feature, and the signal label, to obtain a target cough detection model. 8.A computer device comprising a memory and a processor, wherein the memory stores a computer program, and the computer program, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1-6. 9.A computer readable storage medium storing a computer program, and the computer program, when executed by a processor, causes the processor to perform the steps of the method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Cough monitoring device and system capable of being carried about

    CN108294756A

  • Cough sound automatic identification algorithm, device, medium and equipment

    CN113158916A