CN114298111A - Cough sound identification method and device and readable storage medium - Google Patents

Cough sound identification method and device and readable storage medium Download PDF

Info

Publication number
CN114298111A
CN114298111A CN202111649710.3A CN202111649710A CN114298111A CN 114298111 A CN114298111 A CN 114298111A CN 202111649710 A CN202111649710 A CN 202111649710A CN 114298111 A CN114298111 A CN 114298111A
Authority
CN
China
Prior art keywords
signal
effective
electromyographic
voice signal
diaphragm
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111649710.3A
Other languages
Chinese (zh)
Inventor
王立其
萧运泽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Shuliantianxia Intelligent Technology Co Ltd
Original Assignee
Shenzhen Shuliantianxia Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Shuliantianxia Intelligent Technology Co Ltd filed Critical Shenzhen Shuliantianxia Intelligent Technology Co Ltd
Priority to CN202111649710.3A priority Critical patent/CN114298111A/en
Publication of CN114298111A publication Critical patent/CN114298111A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)

Abstract

The embodiment of the application relates to the field of sound processing, and discloses a method, equipment and medium for identifying a cough sound. Wherein the method comprises the following steps: acquiring a diaphragm myoelectric signal and a voice signal to be detected; extracting effective electromyographic signals in the diaphragm electromyographic signals, and extracting effective voice signals in the voice signals to be detected; and when the intersection rate of the effective electromyographic signal and the effective voice signal in the time domain exceeds a preset intersection rate, determining that the cough sound exists in the effective voice signal. The method and the device have the advantages that through the combined analysis of the diaphragm myoelectric signals and the voice signals to be detected, the method and the device are simple and effective, the calculation force requirement is low, the method and the device can be transplanted into an embedded system with low calculation force, and the recognition rate of cough sounds can be guaranteed.

Description

Cough sound identification method and device and readable storage medium
Technical Field
The embodiment of the application relates to the technical field of sound processing, in particular to a cough sound identification method, equipment and a readable storage medium.
Background
Cough is a common respiratory symptom, caused by inflammation, foreign body, physical or chemical irritation of the trachea, bronchial mucosa or pleura. If the cough is not stopped, the acute cough is converted into the chronic cough, which brings great pain to the patient, such as chest distress, pharynx itch, asthma and the like. According to statistics, the incidence rate of chronic cough is 3% -5%, the incidence rate of chronic cough in the elderly can reach 10% -15%, especially the incidence rate in cold regions is higher. Cough is one of the symptoms of most respiratory diseases, 70-80% of patients who visit the clinic in the department of respiration are treated by the cough symptom. The weak and sick people, such as children and the elderly, are particularly prone to cough caused by respiratory tract infection. Therefore, the recording and identification of the cough sound are of great significance to the diagnosis and screening of respiratory diseases.
In the process of implementing the embodiment of the present application, the inventors of the present application find that: at present, the common method for recognizing the cough sound adopts a machine learning mode, needs model training, has high requirement on computing power and is relatively complex in operation.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method, an apparatus and a readable storage medium for recognizing a cough sound, which can save effort and are simple and effective.
In order to solve the technical problem, the embodiment of the application adopts the following technical scheme:
in a first aspect, an embodiment of the present application provides a method for identifying a cough sound, including:
acquiring a diaphragm myoelectric signal and a voice signal to be detected;
extracting effective electromyographic signals in the diaphragm electromyographic signals, and extracting effective voice signals in the voice signals to be detected;
and when the intersection rate of the effective electromyographic signal and the effective voice signal in the time domain exceeds a preset intersection rate, determining that the cough sound exists in the effective voice signal.
In some embodiments, the extracting of the valid electromyographic signal of the diaphragm electromyographic signal includes:
acquiring an envelope line of the diaphragm electromyographic signal;
detecting a plurality of valleys of the envelope;
when the diaphragm electromyographic signals between adjacent wave troughs of the envelope line meet a first preset condition, determining the diaphragm electromyographic signals meeting the first preset condition as effective electromyographic signals.
In some embodiments, the determining, when the diaphragm electromyography signal between adjacent wave troughs satisfies a first preset condition, the diaphragm electromyography signal satisfying the first preset condition as a valid electromyography signal includes:
obtaining the amplitude values of a plurality of wave troughs of the envelope curve;
setting the troughs in the envelope curve, the amplitude of which is smaller than the average amplitude, as first endpoints;
acquiring the maximum amplitude and first time length between the adjacent first end points, wherein the first time length is the time length of the diaphragm electromyographic signal between the adjacent first end points;
when the maximum amplitude is larger than a first threshold value and the first time length is within a first preset time length, determining the diaphragm electromyographic signal between the adjacent first end points as an effective electromyographic signal, wherein the first threshold value is N times of the average amplitude, and N is a positive integer larger than or equal to 2.
In some embodiments, the acquiring an envelope of the diaphragm electromyography signal includes:
preprocessing the diaphragm electromyographic signal, wherein the preprocessing is used for inhibiting an interference signal;
performing Hilbert transformation on the preprocessed diaphragm electromyographic signals to obtain transformation signals;
and obtaining an envelope curve of the diaphragm electromyographic signal based on the converted signal and the preprocessed diaphragm electromyographic signal.
In some embodiments, the extracting the valid speech signal from the speech signal under test includes:
acquiring an energy curve of the voice signal to be detected;
detecting a number of troughs of the energy curve;
and when the voice signal to be detected between adjacent wave troughs of the energy curve meets a second preset condition, determining the voice signal to be detected meeting the second preset condition as an effective voice signal.
In some embodiments, the determining, when the voice signal to be tested between adjacent troughs of the energy curve satisfies a second preset condition, the voice signal to be tested that satisfies the second preset condition as a valid voice signal includes:
acquiring the energy value of the trough of each energy curve;
setting the trough of the energy curve with the energy value smaller than the mute energy value as a second endpoint;
acquiring a maximum energy value and a second duration between the adjacent second end points, wherein the second duration is the duration of the voice signal to be detected between the adjacent second end points;
and when the maximum energy value is greater than a second threshold value and the second duration is within a second preset duration, determining the voice signal to be detected between the adjacent second end points as an effective voice signal, wherein the second threshold value is M times of the mute energy value, and M is a positive integer greater than or equal to 4.
In some embodiments, the obtaining an energy curve of the voice signal to be tested includes:
windowing and framing the voice signal to be detected to obtain a framed voice signal;
calculating the average energy of the frame-divided voice signals;
and obtaining an energy curve of the voice signal to be detected according to the average energy of the frame voice signal.
In some embodiments, the determining that the cough sound exists in the valid voice signal when the intersection rate of the valid electromyogram signal and the valid voice signal in the time domain exceeds a preset intersection rate includes:
acquiring two first end points of the effective electromyographic signal, and converting the two first end points of the effective electromyographic signal into a first starting time point and a first ending time point respectively, wherein the first starting time point and the first ending time point form an effective time domain of the effective electromyographic signal;
acquiring two second end points of the effective voice signal, and converting the two second end points of the effective voice signal into a second starting time point and a second ending time point respectively, wherein the second starting time point and the second ending time point form an effective time domain of the effective electromyographic signal;
and when the intersection rate of the effective time domain of the effective electromyographic signal and the effective time domain of the effective electromyographic signal exceeds a preset intersection rate, determining that the cough sound exists in the effective voice signal.
In a second aspect, embodiments of the present application further provide a cough sound recognition device, where the device includes:
the system comprises a to-be-detected signal acquisition module, a to-be-detected signal acquisition module and a to-be-detected voice signal acquisition module, wherein the to-be-detected signal acquisition module is used for acquiring diaphragm myoelectric signals and to-be-detected voice signals;
the effective signal acquisition module is used for extracting effective electromyographic signals in the diaphragm electromyographic signals and extracting effective voice signals in the voice signals to be detected;
the determination module is configured to determine that a cough sound exists in the valid voice signal when an intersection rate of the valid electromyographic signal and the valid voice signal in a time domain exceeds a preset intersection rate.
In a third aspect, the present application also provides a cough sound recognition device including:
at least one processor, and
a memory communicatively connected to the processor, the memory storing instructions executable by the at least one processor to enable the at least one processor to perform the method according to the first aspect.
In a fourth aspect, the present application also provides a non-transitory computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions that, when executed by a cough sound recognition device, cause the cough sound recognition device to perform the method according to any one of the first aspect.
The beneficial effects of the embodiment of the application are as follows: different from the prior art, the cough sound recognition method, the device and the medium provided by the embodiment of the application acquire the diaphragm myoelectric signal and the voice signal to be detected, then extract the effective myoelectric signal in the diaphragm myoelectric signal and extract the effective voice signal in the voice signal to be detected, and when the intersection rate of the effective myoelectric signal and the effective voice signal in the time domain exceeds the preset intersection rate, the cough sound is determined to exist in the effective voice signal. The method determines the cough sound through the combined analysis of the diaphragm myoelectric signal and the voice signal to be detected, is simple and effective, has low requirement on computing power, can be transplanted into an embedded system with lower computing power, and can improve the recognition rate of the cough sound.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the figures in which like reference numerals refer to similar elements and which are not to scale unless otherwise specified.
FIG. 1 is a schematic flow chart diagram illustrating one embodiment of a cough sound identification method of the present application;
fig. 2 is a waveform diagram of a diaphragm electromyogram signal of the cough sound recognition method of the present application;
fig. 3 is a waveform diagram of a diaphragm electromyographic signal after diaphragm electromyographic signal preprocessing of the cough sound identification method of the present application;
FIG. 4 is a schematic diagram of the cough sound recognition method extracting an envelope curve according to the present application;
FIG. 5 is a schematic diagram of an acquired energy curve of the cough sound identification method of the present application;
FIG. 6 is a schematic structural diagram of one embodiment of a cough sound recognition apparatus of the present application;
FIG. 7 is a schematic structural diagram of yet another embodiment of a cough sound recognition apparatus of the present application;
fig. 8 is a hardware configuration diagram of a controller according to an embodiment of the cough sound recognition device of the present application.
Detailed Description
The present application will be described in detail with reference to specific examples. The following examples will assist those skilled in the art in further understanding the present application, but are not intended to limit the present application in any way. It should be noted that various changes and modifications can be made by one skilled in the art without departing from the spirit of the application. All falling within the scope of protection of the present application.
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It should be noted that, if not conflicted, the various features of the embodiments of the present application may be combined with each other within the scope of protection of the present application. Additionally, while functional block divisions are performed in apparatus schematics, with logical sequences shown in flowcharts, in some cases, steps shown or described may be performed in sequences other than block divisions in apparatus or flowcharts. Further, the terms "first," "second," "third," and the like, as used herein, do not limit the data and the execution order, but merely distinguish the same items or similar items having substantially the same functions and actions.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the description of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
In addition, the technical features mentioned in the embodiments of the present application described below may be combined with each other as long as they do not conflict with each other.
The method and the device for recognizing the cough sound provided by the embodiment of the application can be applied to cough sound recognition equipment, and the cough sound recognition equipment comprises a controller, an electrode plate, a voice signal acquisition device, a low-pass filter, a high-pass filter and a notch filter. The method comprises the following steps that a controller serves as a master control center, an electrode plate collects diaphragm myoelectric signals, a voice signal collecting device collects voice signals to be detected, the controller obtains the diaphragm myoelectric signals from the electrode plate and obtains the voice signals to be detected from the voice signal collecting device, then the controller extracts effective myoelectric signals in the diaphragm myoelectric signals and extracts effective voice signals in the voice signals to be detected; and when the intersection rate of the effective electromyographic signal and the effective voice signal in the time domain exceeds a preset intersection rate, determining that the cough sound exists in the effective voice signal.
The notch filter is used for filtering the diaphragm electromyographic signals; the high-pass filter is used for filtering the signal filtered by the notch filter.
The high-pass filter and the low-pass filter are used for filtering the voice signal to be detected.
The voice signal collecting means may be means for collecting a sound signal.
The method for recognizing the cough sound through the combination analysis of the diaphragm myoelectric signal and the voice signal to be detected is simple and effective, has low requirement on computing power, can be transplanted into an embedded system with lower computing power, and can improve the recognition rate of the cough sound.
Referring to fig. 1, a flowchart of an embodiment of a cough sound identification method applied to the present application is shown, where the method may be executed by a controller in a cough sound identification device, and the method includes steps S101 to S103.
S101: and acquiring a diaphragm myoelectric signal and a voice signal to be detected.
The process of cough action is short and deep breathing, tight glottis, rapid and violent contraction of respiratory muscle, intercostal muscle and diaphragm muscle, so that high-pressure gas in the lung is ejected to form cough.
The original diaphragm myoelectric signals of the user can be collected from the epidermis at the 4 th to 5 th costal bones of the electrode slice. Is placed on the left or right chest of a human body
When the myoelectric signal of the original diaphragm is acquired, the original voice signal to be detected of the user is acquired through the voice signal acquisition device. Therefore, the original diaphragm electromyography signal and the original voice signal to be measured are synchronized on the time axis.
As shown in fig. 2, after obtaining the original diaphragm electromyographic signal, firstly, preprocessing the original diaphragm electromyographic signal to obtain a diaphragm electromyographic signal for suppressing an interference signal, so that the preprocessing the original diaphragm electromyographic signal may include:
acquiring the average amplitude of the original diaphragm electromyographic signal;
obtaining a first signal based on the average amplitude of the original diaphragm electromyographic signal and the original diaphragm electromyographic signal;
inputting the first signal into a notch filter for filtering to obtain a second signal;
inputting the second signal into a high-pass filter for filtering to obtain a third signal;
and performing median filtering processing on the third signal.
Specifically, firstly, calculating an average amplitude of the original diaphragm electromyographic signal, then obtaining a first signal based on the average amplitude of the original diaphragm electromyographic signal and the diaphragm electromyographic signal, and subtracting the average amplitude from the amplitude of the original diaphragm electromyographic signal to obtain the first signal, so as to subtract a direct current component in the original diaphragm electromyographic signal; and inputting the first signal into a notch filter for filtering, wherein the notch frequency of the notch filter can be selected to be 50Hz, and the notch filter is one of band elimination filters, has a narrow stop band and is used for eliminating power frequency interference of 50 Hz.
After the second signal is obtained, the second signal is input into a high-pass filter for filtering processing to obtain a third signal, the high-pass filter can be a filter with a sampling frequency of 55Hz, and the frequency range of the electrocardiosignal needs to be filtered in order to remove the interference of the electrocardiosignal because the original diaphragmatic muscle electromyographic signal contains a relatively strong electrocardiosignal.
Furthermore, the frequency range of the electrocardiosignals is 0.05Hz to 100Hz, the signal energy of the electrocardiosignals is concentrated in 0.2Hz to 35Hz, the frequency range of the original diaphragmatic muscle electromyographic signals is 0Hz to 500Hz, and the signal energy of the original diaphragmatic muscle electromyographic signals is concentrated in 20Hz to 150Hz, so that in order to remove the interference of the electrocardiosignals, a high-pass filter with the sampling frequency of 55Hz is selected to carry out high-pass filtering processing on the second signals, and the interference of the electrocardiosignals is filtered to the greatest extent.
Moreover, because noise exists when muscles of a human body are relaxed, and the frequency range of baseline noise when the muscles are relaxed is about 0Hz to 60Hz, the high-pass filter with the sampling frequency of 55Hz is selected to perform high-pass filtering processing on the second signal, and the baseline noise when the muscles are relaxed can be restrained to a certain extent.
And a high-pass filter with the sampling frequency of 55Hz is selected to carry out high-pass filtering processing on the second signal, and power frequency interference of 50Hz can be restrained to a certain extent.
After obtaining the third signal, median filtering the third signal. The median filtering is used for suppressing occasional peaks in the third signal, and individual data anomalies possibly caused by interference in the storage or transmission process in the third signal.
After the original diaphragm electromyogram signal shown in fig. 2 is preprocessed, a waveform diagram of the diaphragm electromyogram signal after interference filtering shown in fig. 3 is obtained.
S102: and extracting effective electromyographic signals in the diaphragm electromyographic signals, and extracting effective voice signals in the voice signals to be detected.
In some embodiments, extracting the valid electromyographic signal from the diaphragm electromyographic signals may include:
acquiring an envelope line of the diaphragm electromyographic signal;
detecting a plurality of valleys of the envelope;
when the diaphragm electromyographic signals between adjacent wave troughs of the envelope line meet a first preset condition, determining the diaphragm electromyographic signals meeting the first preset condition as effective electromyographic signals.
Specifically, when the envelope curve of the diaphragm electromyographic signal is acquired, preprocessing the diaphragm electromyographic signal, namely preprocessing the original diaphragm electromyographic signal to suppress interference signals and obtain a preprocessed diaphragm electromyographic signal, and then performing hilbert transform on the preprocessed diaphragm electromyographic signal to obtain a transformed signal; and obtaining an envelope curve of the diaphragm electromyographic signal based on the converted signal and the preprocessed diaphragm electromyographic signal.
Furthermore, hilbert transform is performed on the preprocessed diaphragm electromyographic signals to construct a function h (t), and the function h (t) is calculated according to the following formula 1:
Figure BDA0003446204690000081
wherein x (t) is a preprocessed diaphragm electromyographic signal,
Figure BDA0003446204690000082
the method is a signal obtained by performing Hilbert transform on a preprocessed diaphragm electromyographic signal, and the modulus | h (t) of h (t) is an envelope curve of the preprocessed diaphragm electromyographic signal, and the envelope curve can be calculated according to the following formula 2:
Figure BDA0003446204690000091
where, | h (t) | represents an envelope.
After the envelope is obtained, the envelope may be filtered and smoothed, and it is understood that the envelope filtering process may also be a median filtering process to obtain the envelope shown in fig. 4.
In some embodiments, after acquiring the envelope, detecting a number of wave troughs of the envelope, and when a diaphragm electromyography signal between adjacent wave troughs of the envelope satisfies a first preset condition, determining the diaphragm electromyography signal satisfying the first preset condition as a valid electromyography signal may include:
obtaining the amplitude values of a plurality of wave troughs of the envelope curve;
setting the troughs in the envelope curve, the amplitude of which is smaller than the average amplitude, as first endpoints;
acquiring the maximum amplitude and first time length between the adjacent first end points, wherein the first time length is the time length of the diaphragm electromyographic signal between the adjacent first end points;
when the maximum amplitude is larger than a first threshold value and the first time length is within a first preset time length, determining the diaphragm electromyographic signal between the adjacent first end points as an effective electromyographic signal, wherein the first threshold value is N times of the average amplitude, and N is a positive integer larger than or equal to 2.
Specifically, the average amplitude of the envelope is calculated, which is a value obtained by averaging all the amplitudes of the envelope; acquiring the amplitudes of all troughs on the envelope line, judging whether the amplitude of each trough is smaller than the average amplitude or not in order to select a first end point covering the effective myoelectric signal as much as possible, if the amplitude of the trough of the envelope line is smaller than the average amplitude, indicating that the position of the trough is smaller, covering the effective myoelectric signal as much as possible, and storing the trough with the amplitude smaller than the average amplitude as the first end point; if the magnitude of the trough is not less than the average magnitude, it is said that the trough position is high, which causes the first endpoint to be identified as an unreasonable position, and therefore the trough position is discarded as the first endpoint.
After the first end point is determined, the first end point serves as an envelope signal segmentation point, an envelope line is segmented into multiple segments of envelope signals, adjacent first end points can divide the diaphragm electromyographic signals into multiple segments of diaphragm electromyographic signals, the maximum amplitude between the adjacent first end points is obtained, the maximum amplitude is the maximum amplitude in a plurality of amplitudes between the two adjacent first end points, whether the maximum amplitude is larger than a first threshold value or not is judged, the first threshold value can be N times of the average amplitude, N can be a positive integer larger than or equal to 2, and if the maximum amplitude is larger than the first threshold value, the diaphragm electromyographic signals between the adjacent first end points are determined to be effective electromyographic signals; discarding the segment of the envelope signal if the maximum amplitude in the envelope signal between adjacent first end points is not greater than a first threshold.
It can be understood that, because the electrocardiosignals in the myoelectric signals of the diaphragm cannot be completely filtered, a small raised part is arranged at the position on the envelope line corresponding to the electrocardiosignals, and when the first threshold value is set to be twice of the average amplitude value, the influence of the envelope line on the identification of the first endpoint can be avoided.
After a first end point with the maximum amplitude larger than a first threshold value is obtained, a first time length of a diaphragm electromyographic signal between two adjacent first end points is obtained, wherein the first time length is the time length of the diaphragm electromyographic signal between the two adjacent first end points, and then whether the first time length is within a first preset time length is judged, it can be understood that the first preset time length is set according to the average time length of cough, according to experience, the average time length of one cough (including continuous cough) is 0.08 s-1.2 s, the average cough length is 0.25s, the upper limit of the first preset time length is 5s referring to the condition of the continuous cough, and if the first time length is larger than 5s, the waveforms of the diaphragm electromyographic signal and the voice signal to be detected can be subjected to waveform conversion along with the cough frequency, so that the waveform division is caused, and therefore, the upper limit is set to be 5 s.
Therefore, if the first duration of the segment of diaphragmatic muscle electromyographic signal is within the first preset duration, the diaphragmatic muscle electromyographic signal between the adjacent first end points is determined as a valid electromyographic signal.
Correspondingly, when extracting the effective electromyographic signal in the myoelectric signals of the diaphragm, extracting the effective voice signal in the voice signals to be detected may include:
acquiring an energy curve of the voice signal to be detected;
detecting a number of troughs of the energy curve;
and when the voice signal to be detected between adjacent wave troughs of the energy curve meets a second preset condition, determining the voice signal to be detected meeting the second preset condition as an effective voice signal.
Similarly, since the speech signal to be detected usually includes noises such as low-frequency component interference and baseline drift, the speech signal to be detected is preprocessed after the speech signal to be detected is acquired, and the method further includes:
acquiring the average amplitude of the voice signal to be detected;
obtaining a first voice signal based on the average amplitude of the voice signal to be detected and the voice signal to be detected;
and filtering the first voice signal.
Specifically, during preprocessing, firstly, obtaining an average amplitude of the voice signal to be detected, where the average amplitude of the voice signal to be detected is an average value of all amplitudes of the voice signal to be detected, and then, obtaining the voice signal to be detected based on the average amplitude of the voice signal to be detected and the voice signal to be detected, that is, subtracting the average amplitude of the voice signal to be detected from the amplitude of the voice signal to be detected to obtain the voice signal to be detected, so as to remove a direct current component in the voice signal to be detected and obtain a first voice signal; and then, filtering the first voice signal, wherein during filtering, the first voice signal can be input into a high-pass filter with the cutoff frequency of 100Hz, the first voice signal is filtered through the high-pass filter, the first voice signal is input into a low-pass filter with the cutoff frequency of 8KHz, and the first voice signal is filtered through the low-pass filter.
It can be understood that, considering that the frequency range of the sound is 20Hz to 20KHz and that humans cannot make ultra-low frequency and ultra-high frequency sounds, a high-pass filter with a cutoff frequency of 100Hz and a low-pass filter with a cutoff frequency of 8KHz are selected to filter the first voice signal to remove the interference of the external sound on the human sounds. Of course, the order of passing through the high pass filter and the low pass filter is not limited.
After preprocessing the voice signal to be detected, acquiring an energy curve of the voice signal to be detected, which may include:
windowing and framing the voice signal to be detected to obtain a framed voice signal;
calculating the average energy of the frame-divided voice signals;
and obtaining an energy curve according to the average energy of the frame voice signals.
Specifically, the windowing and framing processing of the voice signal to be detected is to perform windowing and framing processing on the preprocessed voice signal to be detected, and as can be known from the processing manner of the voice signal in the field, according to the characteristics that the voice signal is closely related to the movement of a sounding organ and the movement of the sounding organ causes the signal to be unstable, the voice signal can be regarded as a short-time stable signal, that is, the length of one frame of voice signal should be less than the length of one phoneme, and the duration of the phoneme is about 50ms to 200ms at the normal human speech speed, so the length (frame length) of one frame of voice signal is generally less than 50 ms.
Therefore, a section of speech signal to be detected includes multiple frames of speech signals, and windowing is performed on the speech signal to be detected, that is, a movable limited-length window is adopted to perform weighting processing on the speech signal to be detected, so as to realize framing of the speech signal to be detected. Then, the voice signal to be detected is intercepted by adopting a framing (frame shifting) mode, at least two frames of voice signals are obtained, the time difference of the initial positions of two adjacent frames is the frame shifting, the length of the overlapped part can be half of the frame length (less than 50ms) or other fixed values, and the framing voice signals are obtained.
Then, the average energy of the frame-divided voice signals is calculated, and the average energy of the voice signals is the weighted square sum of signals of each point in the voice signals. The average energy is calculated for each frame of the speech signal, for example, assuming that the frame length is n and the sequence is { x1, x2, x3, x4 … … xn }, according to the following equation 3:
average energy (x 1)2+x22+x32+……+xn2) Window length (frame length) formula 3;
after obtaining the average energies, the individual average energies are combined to obtain an energy curve, as shown in fig. 5, which is obtained.
As shown in fig. 5, the obtained energy curve has a good corresponding relationship with the voice signal to be detected, at this time, the end point detection on the voice signal to be detected may be approximate to the end point detection on the energy curve, so that a plurality of troughs of the energy curve are detected, and when the voice signal to be detected between adjacent troughs of the energy curve satisfies a second preset condition, determining the voice signal to be detected satisfying the second preset condition as a valid voice signal may include:
acquiring energy values of a plurality of wave troughs of the energy curve;
setting the trough of the energy curve with the energy value smaller than the mute energy value as a second endpoint;
acquiring a maximum energy value and a second duration between the adjacent second end points, wherein the second duration is the duration of the voice signal to be detected between the adjacent second end points;
and when the maximum energy value is greater than a second threshold value and the second duration is within a second preset duration, determining the voice signal to be detected between the adjacent second end points as an effective voice signal, wherein the second threshold value is M times of the mute energy value, and M is a positive integer greater than or equal to 4.
Specifically, energy values of a plurality of troughs of the energy curve are obtained, as shown in fig. 5, energy values of all troughs of the energy curve are obtained, whether the energy value of the trough of each energy curve is smaller than a mute energy value is judged, the mute energy value represents that no sound exists, if the energy value of the trough in the energy curve is not smaller than the mute energy value, it is indicated that a voice signal to be detected corresponding to the trough position has sound and cannot be used as an energy curve dividing point, and if the energy value of the trough in the energy curve is smaller than the mute energy value, it is indicated that no sound exists at the voice signal to be detected corresponding to the trough position, at this time, the trough position is saved and is used as a second endpoint.
Then, taking the second endpoint as an energy signal division point, dividing the energy curve into a plurality of sections of energy signals, obtaining a maximum energy value between two adjacent second endpoints, namely obtaining all energy values between two adjacent second endpoints, thereby obtaining the maximum energy value, judging whether the maximum energy value is greater than a second threshold value, wherein the second threshold value is M times of the mute energy value, for example, four times of the mute energy value, and it can be understood that cough is an explosive sound, therefore, the energy which can burst in a short time can be increased, and when the maximum energy value greater than the second threshold value exists, it can be considered that cough occurs; thus, an energy signal is retained with a maximum energy value greater than a second threshold; correspondingly, if there is an energy signal having a maximum energy value not greater than the second threshold, it is considered not to be a sound of a cough, and at this time, the energy signal having a maximum energy value not greater than the second threshold is discarded.
After a second endpoint with the maximum energy value larger than a second threshold value is obtained, a second time length of the voice signal to be detected between the two adjacent second endpoints is obtained, the second time length refers to the time length of the voice signal to be detected between the two adjacent second endpoints, and then whether the second time length is within a second preset time length is judged, it can be understood that the second preset time length can also be set to be 0.06 s-5 s related to cough, and similarly, if the second time length of the voice signal to be detected is within the second preset time length, the voice signal to be detected between the adjacent second endpoints is determined to be an effective voice signal.
S103, when the intersection rate of the effective electromyographic signal and the effective voice signal in the time domain exceeds a preset intersection rate, determining that cough sound exists in the effective voice signal.
After obtaining an effective electromyographic signal and an effective voice signal, obtaining two first end points of the effective electromyographic signal, and respectively converting the two first end points of the effective electromyographic signal into a first starting time point and a first ending time point, wherein the first starting time point and the first ending time point form an effective time domain of the effective electromyographic signal; and acquiring two second end points of the effective voice signal, and converting the two second end points of the effective voice signal into a second starting time point and a second ending time point respectively, wherein the second starting time point and the second ending time point form an effective time domain of the effective electromyographic signal. And when the intersection rate of the effective time domain of the effective electromyographic signal and the effective time domain of the effective electromyographic signal exceeds a preset intersection rate, determining that the cough sound exists in the effective voice signal.
Specifically, after the first end point and the second end point are obtained, the two first end points and the two second end points are respectively converted into time points, the time points can be rapidly calculated according to respective sampling rates and sampling points of the diaphragm electromyogram signal and the voice signal to be detected during conversion, the time point T is a sampling point x sampling rate, for example, in the two second end points, the second start time point is a 60 th sampling point, and the second end time node is an 80 th sampling point.
For another example, when the effective time domain of the effective electromyographic signal is from 1s to 2s, and the effective time domain of the effective electromyographic signal is from 1.5s to 2.5s, and then it is determined whether the intersection rate of the effective time domain of the effective electromyographic signal and the effective time domain of the effective electromyographic signal exceeds a preset intersection rate, such as a preset intersection rate of 50%, it is obvious that the intersection rate of the effective time domain of the effective electromyographic signal and the effective time domain of the effective electromyographic signal is from 1s to 2s, and the effective time domain of the effective electromyographic signal is from 1.5s to 2.5s, and the intersection rate of the effective time domain of the effective electromyographic signal and the effective time domain of the effective electromyographic signal is 0.5s and reaches 50%, it is determined that a cough sound exists in the effective speech signal. And if the intersection rate of the effective time domain of the effective electromyographic signal and the effective time domain of the effective electromyographic signal is less than 50% of the preset intersection rate, determining that no cough sound exists in the effective voice signal.
The embodiment of the application acquires diaphragm electromyographic signal and voice signal that awaits measuring simultaneously, then, extracts effective electromyographic signal among the diaphragm electromyographic signal, and, extracts effective voice signal among the voice signal that awaits measuring, works as effective electromyographic signal with when the crossing rate of effective voice signal on the time domain surpassed and predetermine the crossing rate, then confirm exist the cough sound among the effective voice signal. Through the combined analysis of the diaphragm electromyogram signal and the voice signal to be detected, the method is simple and effective, has low requirement on computing power, can be transplanted into an embedded system with lower computing power, can improve the recognition rate of cough sound, and does not need complicated modes such as complex endpoint detection, feature extraction, model training, sample recognition and the like in machine learning.
An embodiment of the present application further provides a cough sound recognition device, please refer to fig. 6, which shows a structure of the cough sound recognition device provided in the embodiment of the present application, and the cough sound recognition device 600 includes:
the to-be-detected signal acquisition module 601 is used for acquiring a diaphragm myoelectric signal and a to-be-detected voice signal;
an effective signal module 602, configured to extract an effective myoelectric signal in the diaphragm myoelectric signal, and extract an effective voice signal in the voice signal to be detected;
a determining module 603, configured to determine that a cough sound exists in the valid voice signal when an intersection rate of the valid electromyographic signal and the valid voice signal in a time domain exceeds a preset intersection rate.
The embodiment of the application acquires diaphragm electromyographic signal and voice signal that awaits measuring simultaneously, then, extracts effective electromyographic signal among the diaphragm electromyographic signal, and, extracts effective voice signal among the voice signal that awaits measuring, works as effective electromyographic signal with when the crossing rate of effective voice signal on the time domain surpassed and predetermine the crossing rate, then confirm exist the cough sound among the effective voice signal. Through the combined analysis of the diaphragm electromyogram signal and the voice signal to be detected, the method is simple and effective, has low requirement on computing power, can be transplanted into an embedded system with lower computing power, can improve the recognition rate of cough sound, and does not need complicated modes such as complex endpoint detection, feature extraction, model training, sample recognition and the like in machine learning.
In some embodiments, as shown in fig. 7, the valid signal module 602 includes a valid electromyography acquisition sub-module 6021 for:
acquiring an envelope line of the diaphragm electromyographic signal;
detecting a plurality of valleys of the envelope;
when the diaphragm electromyographic signals between adjacent wave troughs of the envelope line meet a first preset condition, determining the diaphragm electromyographic signals meeting the first preset condition as effective electromyographic signals.
In some embodiments, the valid electromyographic signal acquisition sub-module 6021 is further configured to:
obtaining the amplitude values of a plurality of wave troughs of the envelope curve;
setting the troughs in the envelope curve, the amplitude of which is smaller than the average amplitude, as first endpoints;
acquiring the maximum amplitude and first time length between the adjacent first end points, wherein the first time length is the time length of the diaphragm electromyographic signal between the adjacent first end points;
when the maximum amplitude is larger than a first threshold value and the first time length is within a first preset time length, determining the diaphragm electromyographic signal between the adjacent first end points as an effective electromyographic signal, wherein the first threshold value is N times of the average amplitude, and N is a positive integer larger than or equal to 2.
In some embodiments, the valid electromyographic signal acquisition sub-module 6021 is further configured to:
preprocessing the diaphragm electromyographic signal, wherein the preprocessing is used for inhibiting an interference signal;
performing Hilbert transformation on the preprocessed diaphragm electromyographic signals to obtain transformation signals;
and obtaining an envelope curve of the diaphragm electromyographic signal based on the converted signal and the preprocessed diaphragm electromyographic signal.
In some embodiments, as shown in fig. 7, the valid signal acquisition module 602 further includes a valid voice signal acquisition sub-module 6022 for:
acquiring an energy curve of the voice signal to be detected;
detecting a number of troughs of the energy curve;
and when the voice signal to be detected between adjacent wave troughs of the energy curve meets a second preset condition, determining the voice signal to be detected meeting the second preset condition as an effective voice signal.
In some embodiments, the valid speech signal acquisition sub-module 6022 is further configured to:
acquiring the energy value of the trough of each energy curve;
setting the trough of the energy curve with the energy value smaller than the mute energy value as a second endpoint;
acquiring a maximum energy value and a second duration between the adjacent second end points, wherein the second duration is the duration of the voice signal to be detected between the adjacent second end points;
and when the maximum energy value is greater than a second threshold value and the second duration is within a second preset duration, determining the voice signal to be detected between the adjacent second end points as an effective voice signal, wherein the second threshold value is M times of the mute energy value, and M is a positive integer greater than or equal to 4.
In some embodiments, the valid speech signal acquisition sub-module 6022 is further configured to:
windowing and framing the voice signal to be detected to obtain a framed voice signal;
calculating the average energy of the frame-divided voice signals;
and obtaining an energy curve of the voice signal to be detected according to the average energy of the frame voice signal.
In some embodiments, the determining module 603 is further configured to:
acquiring two first end points of the effective electromyographic signal, and converting the two first end points of the effective electromyographic signal into a first starting time point and a first ending time point respectively, wherein the first starting time point and the first ending time point form an effective time domain of the effective electromyographic signal;
acquiring two second end points of the effective voice signal, and converting the two second end points of the effective voice signal into a second starting time point and a second ending time point respectively, wherein the second starting time point and the second ending time point form an effective time domain of the effective electromyographic signal;
and when the intersection rate of the effective time domain of the effective electromyographic signal and the effective time domain of the effective electromyographic signal exceeds a preset intersection rate, determining that the cough sound exists in the effective voice signal.
It should be noted that the above-mentioned apparatus can execute the method provided by the embodiments of the present application, and has corresponding functional modules and beneficial effects for executing the method. For technical details which are not described in detail in the device embodiments, reference is made to the methods provided in the embodiments of the present application.
Fig. 8 is a schematic diagram of a hardware structure of a controller in an embodiment of the cough sound recognition device, and as shown in fig. 8, the controller includes:
one or more processors 111, memory 112. Fig. 8 illustrates one processor 111 and one memory 112.
The processor 111 and the memory 112 may be connected by a bus or other means, and fig. 8 illustrates the connection by the bus as an example.
The memory 112 is a non-volatile computer-readable storage medium, and can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules corresponding to the cough sound recognition method in the embodiment of the present application (for example, the signal-to-be-measured acquisition module 601, the valid signal acquisition module 602, the determination module 603, the valid electromyographic signal acquisition submodule 6021, and the valid voice signal acquisition submodule 6022 shown in fig. 6 to 7). The processor 111 executes various functional applications of the controller and data processing, i.e., implements the cough sound recognition method of the above-described method embodiment, by running the nonvolatile software programs, instructions, and modules stored in the memory 112.
The memory 112 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the person entry and exit detection apparatus, and the like. Further, the memory 112 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, the memory 112 optionally includes memory located remotely from the processor 111, which may be connected to the cough sound recognition device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The one or more modules are stored in the memory 112 and, when executed by the one or more processors 111, perform the cough sound recognition method in any of the above-described method embodiments, e.g., performing the above-described method steps S101-S103 of fig. 1; the functions of the modules 601 and 603 in fig. 6-7 are realized.
The product can execute the method provided by the embodiment of the application, and has the corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the methods provided in the embodiments of the present application.
Embodiments of the present application provide a non-transitory computer-readable storage medium storing computer-executable instructions, which are executed by one or more processors, such as one processor 111 in fig. 8, to enable the one or more processors to perform the cough sound identification method in any of the above method embodiments, such as performing the above-described method steps S101 to S103 in fig. 1; the functions of the modules 601 and 603 in fig. 6-7 are realized.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
Through the above description of the embodiments, those skilled in the art will clearly understand that the embodiments may be implemented by software plus a general hardware platform, and may also be implemented by hardware. It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a computer readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; within the idea of the invention, also technical features in the above embodiments or in different embodiments may be combined, steps may be implemented in any order, and there are many other variations of the different aspects of the invention as described above, which are not provided in detail for the sake of brevity; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A method of cough sound recognition, the method comprising:
acquiring a diaphragm myoelectric signal and a voice signal to be detected;
extracting effective electromyographic signals in the diaphragm electromyographic signals, and extracting effective voice signals in the voice signals to be detected;
and when the intersection rate of the effective electromyographic signal and the effective voice signal in the time domain exceeds a preset intersection rate, determining that the cough sound exists in the effective voice signal.
2. The method according to claim 1, wherein said extracting a valid electromyographic signal of said diaphragm electromyographic signal comprises:
acquiring an envelope line of the diaphragm electromyographic signal;
detecting a plurality of valleys of the envelope;
when the diaphragm electromyographic signals between adjacent wave troughs of the envelope line meet a first preset condition, determining the diaphragm electromyographic signals meeting the first preset condition as effective electromyographic signals.
3. The method according to claim 2, wherein the determining of the diaphragm electromyographic signal satisfying a first preset condition as a valid electromyographic signal when the diaphragm electromyographic signal between adjacent wave troughs satisfies the first preset condition comprises:
obtaining the amplitude values of a plurality of wave troughs of the envelope curve;
setting the troughs in the envelope curve, the amplitude of which is smaller than the average amplitude, as first endpoints;
acquiring the maximum amplitude and first time length between the adjacent first end points, wherein the first time length is the time length of the diaphragm electromyographic signal between the adjacent first end points;
when the maximum amplitude is larger than a first threshold value and the first time length is within a first preset time length, determining the diaphragm electromyographic signal between the adjacent first end points as an effective electromyographic signal, wherein the first threshold value is N times of the average amplitude, and N is a positive integer larger than or equal to 2.
4. The method of claim 3, wherein the obtaining the envelope of the diaphragm electromyography signal comprises:
preprocessing the diaphragm electromyographic signal, wherein the preprocessing is used for inhibiting an interference signal;
performing Hilbert transformation on the preprocessed diaphragm electromyographic signals to obtain transformation signals;
and obtaining an envelope curve of the diaphragm electromyographic signal based on the converted signal and the preprocessed diaphragm electromyographic signal.
5. The method according to claim 1, wherein the extracting the valid speech signal from the speech signal under test comprises:
acquiring an energy curve of the voice signal to be detected;
detecting a number of troughs of the energy curve;
and when the voice signal to be detected between adjacent wave troughs of the energy curve meets a second preset condition, determining the voice signal to be detected meeting the second preset condition as an effective voice signal.
6. The method according to claim 5, wherein when the speech signal under test between adjacent troughs of the energy curve satisfies a second preset condition, determining the speech signal under test satisfying the second preset condition as a valid speech signal comprises:
acquiring the energy value of the trough of each energy curve;
setting the trough of the energy curve with the energy value smaller than the mute energy value as a second endpoint;
acquiring a maximum energy value and a second duration between the adjacent second end points, wherein the second duration is the duration of the voice signal to be detected between the adjacent second end points;
and when the maximum energy value is greater than a second threshold value and the second duration is within a second preset duration, determining the voice signal to be detected between the adjacent second end points as an effective voice signal, wherein the second threshold value is M times of the mute energy value, and M is a positive integer greater than or equal to 4.
7. The method according to claim 6, wherein the obtaining the energy curve of the speech signal to be tested comprises:
windowing and framing the voice signal to be detected to obtain a framed voice signal;
calculating the average energy of the frame-divided voice signals;
and obtaining an energy curve of the voice signal to be detected according to the average energy of the frame voice signal.
8. The method according to any one of claims 1 to 5, wherein the determining that the cough sound exists in the valid voice signal when the intersection rate of the valid electromyographic signal and the valid voice signal in the time domain exceeds a preset intersection rate comprises:
acquiring two first end points of the effective electromyographic signal, and converting the two first end points of the effective electromyographic signal into a first starting time point and a first ending time point respectively, wherein the first starting time point and the first ending time point form an effective time domain of the effective electromyographic signal;
acquiring two second end points of the effective voice signal, and converting the two second end points of the effective voice signal into a second starting time point and a second ending time point respectively, wherein the second starting time point and the second ending time point form an effective time domain of the effective electromyographic signal;
and when the intersection rate of the effective time domain of the effective electromyographic signal and the effective time domain of the effective electromyographic signal exceeds a preset intersection rate, determining that the cough sound exists in the effective voice signal.
9. A cough sound recognition device, characterized in that the cough sound recognition device comprises:
at least one processor, and
a memory communicatively coupled to the processor, the memory storing instructions executable by the at least one processor to enable the at least one processor to perform the method of any of claims 1-8.
10. A non-transitory computer-readable storage medium having stored thereon computer-executable instructions that, when executed by a cough sound recognition device, cause the cough sound recognition device to perform the method of any one of claims 1-8.
CN202111649710.3A 2021-12-30 2021-12-30 Cough sound identification method and device and readable storage medium Pending CN114298111A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111649710.3A CN114298111A (en) 2021-12-30 2021-12-30 Cough sound identification method and device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111649710.3A CN114298111A (en) 2021-12-30 2021-12-30 Cough sound identification method and device and readable storage medium

Publications (1)

Publication Number Publication Date
CN114298111A true CN114298111A (en) 2022-04-08

Family

ID=80972967

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111649710.3A Pending CN114298111A (en) 2021-12-30 2021-12-30 Cough sound identification method and device and readable storage medium

Country Status (1)

Country Link
CN (1) CN114298111A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115132191A (en) * 2022-06-30 2022-09-30 济南大学 Anti-noise voice recognition method and system based on machine learning

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115132191A (en) * 2022-06-30 2022-09-30 济南大学 Anti-noise voice recognition method and system based on machine learning
CN115132191B (en) * 2022-06-30 2024-05-28 济南大学 Noise-resistant voice recognition method and system based on machine learning

Similar Documents

Publication Publication Date Title
CN108388912B (en) Sleep staging method based on multi-sensor feature optimization algorithm
Varghees et al. A novel heart sound activity detection framework for automated heart sound analysis
CN105796096B (en) A kind of heart rate variance analyzing method, system and terminal
CN107945817B (en) Method for classifying heart-lung sound signals, method for detecting heart-lung sound signals, device, medium and computer equipment
US9168018B2 (en) System and method for classifying a heart sound
WO2017135899A1 (en) Methods for detecting a sleep disorder and sleep disorder detection devices
CN103251388A (en) Method and system of snoring monitoring and prevention and treatment based on smart phone platform
CN110970042B (en) Pulmonary ralated artificial intelligence real-time classification method, system and device of electronic stethoscope and readable storage medium
CN114376564A (en) Sleep staging method, system, device and medium based on cardiac shock signal
KR102520138B1 (en) Method, system and non-transitory computer-readable recording medium for analyzing breath-related sounds
Schmidt et al. Coronary artery disease and low frequency heart sound signatures
Li et al. Application of an EMG interference filtering method to dynamic ECGs based on an adaptive wavelet-Wiener filter and adaptive moving average filter
CN107616782A (en) A kind of electrocardiosignal quality determining method and device
CN110942784A (en) Snore classification system based on support vector machine
CN114298111A (en) Cough sound identification method and device and readable storage medium
WO2015027544A1 (en) Method and device for detecting micturition perception
CN114305484A (en) Heart disease heart sound intelligent classification method, device and medium based on deep learning
CN111582138A (en) Electrocardio identity recognition method and system based on frequency domain cepstrum coefficient characteristics
CN102302373B (en) Method for detecting heart sound signal feature points based on multiplexing multi-resolution wavelet transformation
Casaseca-de-la-Higuera et al. Effect of downsampling and compressive sensing on audio-based continuous cough monitoring
Springer et al. Robust heart rate estimation from noisy phonocardiograms
WO2019046004A1 (en) Multisensor cardiac stroke volume monitoring system and analytics
CN110507299A (en) Heart rate signal detection device and method
KR20160147591A (en) Method and apparatus for preprocessing stethoscopic sound signal for diagnosing asthma
Jain et al. An algorithm for automatic segmentation of heart sound signal acquired using seismocardiography

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination