CN117064330B - Sound signal processing method and device - Google Patents

Sound signal processing method and device Download PDF

Info

Publication number
CN117064330B
CN117064330B CN202211592912.3A CN202211592912A CN117064330B CN 117064330 B CN117064330 B CN 117064330B CN 202211592912 A CN202211592912 A CN 202211592912A CN 117064330 B CN117064330 B CN 117064330B
Authority
CN
China
Prior art keywords
cough
signal
point
short
time
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.)
Active
Application number
CN202211592912.3A
Other languages
Chinese (zh)
Other versions
CN117064330A (en
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.)
Shanghai Pulmonary Hospital
Original Assignee
Shanghai Pulmonary Hospital
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 Shanghai Pulmonary Hospital filed Critical Shanghai Pulmonary Hospital
Priority to CN202211592912.3A priority Critical patent/CN117064330B/en
Publication of CN117064330A publication Critical patent/CN117064330A/en
Application granted granted Critical
Publication of CN117064330B publication Critical patent/CN117064330B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/48Other medical applications
    • A61B5/4803Speech analysis specially adapted for diagnostic purposes
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/08Detecting, measuring or recording devices for evaluating the respiratory organs
    • A61B5/0823Detecting or evaluating cough events
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B7/00Instruments for auscultation
    • A61B7/02Stethoscopes
    • A61B7/04Electric stethoscopes
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/02Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using spectral analysis, e.g. transform vocoders or subband vocoders
    • G10L19/0212Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using spectral analysis, e.g. transform vocoders or subband vocoders using orthogonal transformation
    • G10L19/0216Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using spectral analysis, e.g. transform vocoders or subband vocoders using orthogonal transformation using wavelet decomposition
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L25/00Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
    • G10L25/03Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 characterised by the type of extracted parameters
    • G10L25/18Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 characterised by the type of extracted parameters the extracted parameters being spectral information of each sub-band
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L25/00Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
    • G10L25/03Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 characterised by the type of extracted parameters
    • G10L25/21Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 characterised by the type of extracted parameters the extracted parameters being power information
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L25/00Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
    • G10L25/48Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use
    • G10L25/51Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use for comparison or discrimination
    • G10L25/66Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use for comparison or discrimination for extracting parameters related to health condition

Landscapes

  • Health & Medical Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Acoustics & Sound (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Signal Processing (AREA)
  • Computational Linguistics (AREA)
  • Public Health (AREA)
  • Molecular Biology (AREA)
  • Medical Informatics (AREA)
  • Surgery (AREA)
  • Veterinary Medicine (AREA)
  • Animal Behavior & Ethology (AREA)
  • Biomedical Technology (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Pulmonology (AREA)
  • Pathology (AREA)
  • Biophysics (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Epidemiology (AREA)
  • Physiology (AREA)
  • Measurement Of Mechanical Vibrations Or Ultrasonic Waves (AREA)

Abstract

The invention discloses a sound signal processing method and device, and relates to the technical field of sound signal processing. The method comprises the steps of firstly carrying out noise reduction treatment on an acquired cough signal to obtain a noise-reduced cough signal, then determining short-time energy of the noise-reduced cough signal to obtain a short-time energy signal, and generating a short-time energy map based on the short-time energy signal; then, after determining a target starting point and a target ending point of each short-time energy signal in the short-time energy diagram, feeding back the determined target starting point and target ending point to the noise-reduced cough signal to obtain a cough event; and finally, counting the number of the cough events to obtain the number of the cough events, and determining the energy of each cough event to obtain the energy value corresponding to each cough event so as to realize the purposes of accurately determining the number of the cough events in the cough data and determining the intensity of the cough events.

Description

Sound signal processing method and device
Technical Field
The present invention relates to the field of sound signal processing technologies, and in particular, to a method and an apparatus for processing a sound signal.
Background
Cough (cough) is a common symptom of respiratory tract, and is caused by inflammation, foreign body, physical or chemical stimulation of the trachea, bronchus mucosa or pleura, and is characterized by glottic closure, respiratory machine contraction, rise of pulmonary internal pressure, glottic opening and air injection in the lung, which is usually accompanied by sound. Cough has protective effect of removing foreign body and secretion of respiratory tract. If the cough is not stopped, the acute cough is changed into chronic cough, and great pain is often brought to patients, such as chest distress, pharynx itch, wheezing and the like. Cough may be accompanied by expectoration.
The cough contains a large amount of human physiological information, and the frequency and the energy of the cough event are determined, so that a reliable data basis can be provided for the preparation of the cough detection equipment. However, at present, people can only collect the cough sound data, but cannot obtain the number of cough events contained in the data, and cannot analyze the intensity of the cough events, so how to accurately determine the number of cough events in the cough data and determine the intensity of the cough events is a problem to be solved.
Disclosure of Invention
The invention aims to provide a sound signal processing method and device, which can accurately determine the number of cough events in cough data and determine the intensity of the cough events.
In order to achieve the above object, the present invention provides the following solutions:
a sound signal processing method comprising:
Acquiring a cough signal;
Carrying out noise reduction treatment on the cough signal to obtain a noise-reduced cough signal;
Determining short-time energy of the cough signal after noise reduction to obtain a short-time energy signal, and generating a short-time energy map based on the short-time energy signal;
determining a target starting point and a target ending point of each short-time energy signal in the short-time energy map;
Feeding back a target starting point and a target ending point of the short-time energy signal to the noise-reduced cough signal to obtain a cough event;
counting the number of the cough events to obtain the number of the cough events;
Determining the energy of each cough event results in an energy value corresponding to each cough event.
Preferably, the determining the short-time energy of the cough signal after noise reduction obtains a short-time energy signal, and generating a short-time energy map based on the short-time energy signal specifically includes:
determining the sampling frequency of the cough signal after noise reduction, and obtaining a target frequency based on the sampling frequency; the target frequency is less than the sampling frequency;
downsampling the noise-reduced cough signal based on the target frequency to obtain a downsampled cough signal;
Acquiring a framing window function;
Carrying out framing treatment on the downsampled cough signal based on the framing window function and a preset frame shift to obtain a plurality of frame data; the data amount in each frame of data is equal to a preset frame length value;
Determining the time corresponding to each frame data based on the number of frames of the frame data, the frame length of the frame data, the frame shift of the frame data and the target frequency;
Summing the square of the amplitude of each data in the frame data to obtain the energy corresponding to each frame of data;
generating an energy set based on energy corresponding to each frame of data, and obtaining the short-time energy signal based on the energy set;
and generating the short-time energy map based on the time corresponding to each frame data and the short-time energy signal.
Preferably, the determining the target start point and the target end point of each short-time energy signal in the short-time energy map specifically includes:
Acquiring an initial threshold value;
detecting a peak value larger than the initial threshold value in the short-time energy signal to obtain a peak value point;
Judging whether two adjacent peak points in the peak points belong to the same cough event or not, and obtaining a first judgment result;
when the first judgment result is that two adjacent peak points in the peak points belong to the same cough event, discarding the peak point with the small value in the two adjacent peak points to obtain an updated peak point; when the first judgment result is that two adjacent peak points in the peak points do not belong to the same cough event, the two adjacent peak points are taken as updated peak points;
Searching a starting point and an ending point of each updated peak point according to a preset direction and a preset time step on the basis of each updated peak point; the starting point and the ending point are points with minimum absolute value of the slope of the updated peak point;
A target start point for each short-time energy signal in the short-time energy map is determined based on the start point, and a target end point for each short-time energy signal in the short-time energy map is determined based on the end point.
Preferably, the feeding back the target start point and the target end point of the short-time energy signal to the noise-reduced cough signal to obtain a cough event specifically includes:
determining a starting time point and an ending time point which correspond to a target starting point and a target ending point of the short-time energy respectively;
determining a point with a first preset length from the current starting time point as an initial point of the cough event according to a preset direction;
Judging whether the time length between the current ending time point and the next starting time point is more than three times of the first preset length or not, and obtaining a second judging result; the next starting time point is a starting time point adjacent to the current starting time point;
If the second judging result is larger than the first judging result, determining a point with a second preset length from the current ending time point as an ending point of the current cough event according to the preset direction; the ending point of the current cough event is used as an initial point of the next cough time;
And if the second judgment result is smaller than the first judgment result, determining the midpoint between the current ending time point and the next starting time point as the ending point of the current cough event.
Preferably, the determining the energy of each cough event obtains an energy value corresponding to each cough event, which specifically includes:
Determining a length of time of the cough signal;
determining a cough number per unit time of a target according to the time length and the cough event number;
And carrying out accumulated square summation on points contained in each cough event based on the cough quantity in the target unit time, and obtaining the energy value corresponding to each cough event.
Preferably, the acquiring the cough signal further includes:
determining a cough type to be acquired, and determining a crowd to be acquired at a target place based on the cough type;
acquiring basic information of the crowd to be acquired, and setting screening conditions;
Screening the crowd to be acquired based on the set screening conditions and the basic information to obtain an object to be acquired;
determining sampling time length and sampling place, and judging whether to perform data acquisition on the object to be acquired at the sampling place to obtain a third judging result;
When the third judging result is that the data acquisition is carried out on the object to be acquired, the sound acquisition equipment is used for acquiring a cough signal of the object to be acquired, and the cough signal is obtained;
And when the third judging result is that the data acquisition is not performed on the object to be acquired, prompting the object to be acquired to perform position adjustment, and after the position adjustment is completed, acquiring a cough signal of the object to be acquired through the sound acquisition equipment to obtain the cough signal.
Preferably, the noise reduction processing is performed on the cough signal to obtain a noise-reduced cough signal, which specifically includes:
selecting the type of wavelet packet decomposition and determining the sampling frequency of the cough signal;
Determining the decomposition layer number of the wavelet packet according to the sampling frequency of the cough signal;
performing wavelet packet decomposition on the cough signal based on the type of wavelet packet decomposition, the sampling frequency of the cough signal and the decomposition layer number of the wavelet packet to obtain a decomposed cough signal;
and determining the frequency range of the cough, reconstructing the decomposed cough signal based on the frequency range to obtain a reconstructed signal, and determining the reconstructed signal as the cough signal after noise reduction.
According to the specific embodiment provided by the invention, the invention discloses the following technical effects:
According to the sound signal processing method, firstly, noise reduction processing is carried out on an obtained cough signal to obtain a noise-reduced cough signal, then, short-time energy of the noise-reduced cough signal is determined to obtain a short-time energy signal, and a short-time energy diagram is generated based on the short-time energy signal; then, after determining a target starting point and a target ending point of each short-time energy signal in the short-time energy diagram, feeding back the determined target starting point and target ending point to the noise-reduced cough signal to obtain a cough event; and finally, counting the number of the cough events to obtain the number of the cough events, and determining the energy of each cough event to obtain the energy value corresponding to each cough event so as to realize the purposes of accurately determining the number of the cough events in the cough data and determining the intensity of the cough events.
The invention also provides a sound signal processing device, which comprises:
the sound collection device is used for collecting cough signals;
A storage device for storing a computer control program;
and the processing device is respectively connected with the sound acquisition device and the storage device and is used for calling and executing the computer control program based on the cough signal so as to implement the provided sound signal processing method and obtain the number and energy value of the cough events.
Preferably, the processing device comprises:
the cough signal acquisition module is used for acquiring a cough signal;
The noise reduction processing module is used for carrying out noise reduction processing on the cough signal to obtain a noise-reduced cough signal;
The short-time energy map generation module is used for determining short-time energy of the cough signal after noise reduction to obtain a short-time energy signal and generating a short-time energy map based on the short-time energy signal;
a target start and end point determining module, configured to determine a target start point and a target end point of each short-time energy signal in the short-time energy map;
The cough event determining module is used for feeding back a target starting point and a target ending point of the short-time energy signal to the noise-reduced cough signal to obtain a cough event;
the cough event number determining module is used for counting the number of the cough events to obtain the number of the cough events;
and the energy value determining module is used for determining the energy of each cough event to obtain the energy value corresponding to each cough event.
Preferably, the storage device is a computer readable storage medium.
The technical effects achieved by the sound signal processing device provided by the invention are the same as those achieved by the sound signal processing method provided by the invention, so that the description thereof is omitted.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a sound signal processing method provided by the invention;
FIG. 2 is a flowchart illustrating a sound signal processing method according to an embodiment of the present invention;
FIG. 3 is a short-term energy diagram of an embodiment of the present invention;
FIG. 4 is a waveform of a cough according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a sound signal processing system according to the present invention;
fig. 6 is a schematic structural diagram of an audio signal processing device according to the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The invention aims to provide a sound signal processing method and device, which can accurately determine the number of cough events in cough data and determine the intensity of the cough events.
In order that the above-recited objects, features and advantages of the present invention will become more readily apparent, a more particular description of the invention will be rendered by reference to the appended drawings and appended detailed description.
As shown in fig. 1 and 2, the sound signal processing method of the present invention includes:
Step 100: a cough signal is acquired. Before the cough signal is acquired, the object to be acquired is also required to be determined, so that the cough signal is acquired by the object to be acquired, and the cough signal is obtained, and the specific implementation steps are as follows:
The type of cough to be collected is determined to determine the population to be collected at the target location based on the type of cough.
Basic information of the crowd to be acquired is acquired, screening conditions are set, and the crowd to be acquired is screened based on the screening conditions and the basic information, so that the object to be acquired is obtained.
Determining sampling time length and sampling place, judging whether the object to be acquired can acquire data at the sampling place, if so, acquiring cough signals of the object to be acquired by sound acquisition equipment to obtain cough signals,
If the cough signal cannot be acquired, reminding the object to be acquired of position adjustment, and acquiring the cough signal of the object to be acquired through the sound acquisition equipment after the position adjustment is completed, so that the original cough signal is obtained and is used as the cough signal.
The cough signal acquisition mode is adopted because the cough types include acute cough, subacute cough, chronic cough, dry cough, wet cough and the like, and the acquisition conditions of different cough are different. For example, the type of cough to be collected is determined to be chronic cough, and the target sites for its collection include, but are not limited to: personnel with chronic cough are at home or at hospital. And acquiring basic information of the crowd to be acquired. The basic information includes cases of the patient, basic personal information, and the like. Screening conditions are then set, including but not limited to ages between 40 and 70 years, cough duration exceeding one year, and the like. And then, screening personnel by comparing the screening conditions with the basic information, determining that the sampling time is 12h, determining that the sampling place is in the home, judging whether the posture of the object to be acquired is correct, if so, determining that the data acquisition can be performed, and acquiring through sound acquisition equipment such as a stethoscope, a recorder and the like. Based on the method, the type of the cough to be collected is determined firstly, so that the collected data can be ensured, the required data is researched, the object to be collected is reminded to carry out position adjustment, and the quality of the collected cough data can be ensured.
Step 101: and carrying out noise reduction treatment on the cough signal to obtain a noise-reduced cough signal. For example, the implementation process of this step is:
step 1011: the type of wavelet packet decomposition is selected and the sampling frequency of the original cough signal is determined.
Step 1012: and calculating the decomposition layer number of the wavelet packet according to the sampling frequency of the original cough signal to obtain the decomposition layer number of the wavelet packet.
Step 1013: and decomposing the number of wavelet packet decomposition layers of the original cough signal based on the type of wavelet packet decomposition and the sampling frequency of the original cough signal to obtain a decomposed cough signal.
Step 1014: and determining the frequency range of the cough, reconstructing the decomposed cough signal based on the frequency range to obtain a reconstructed signal, and determining the reconstructed signal as the cough signal after noise reduction.
For example, in the step, the type of wavelet packet decomposition is 'dmey', the sampling frequency is determined to be 8000hz, the decomposition layer number is determined to be 4, the process of wavelet packet decomposition is regarded as a binary tree, after 4-layer decomposition, the frequency step represented by each node at the minimum edge of the binary tree is 256hz, the first node is 0-256 hz, and the frequency of cough is increased in sequence, because the cough frequency is relatively high, the frequency of some noise is relatively low, the cough frequency is determined to be 501-4000 hz, so the decomposed cough signal which is larger than 500hz is reconstructed, and a large amount of noise is removed from the reconstructed signal, namely the cough signal after noise reduction. By decomposing and reconstructing the wavelet packet, other interference in the cough signal can be removed, and the noise-reduced cough signal which is as pure as possible can be obtained.
Step 102: and determining the short-time energy of the cough signal after noise reduction to obtain a short-time energy signal, and generating a short-time energy diagram based on the short-time energy signal. For example, the implementation of this step may be:
step 1021: and determining the sampling frequency of the cough signal after noise reduction, and resetting the frequency based on the sampling frequency to obtain the target frequency. Wherein the value of the target frequency is less than the sampling frequency.
Step 1022: and (3) carrying out downsampling on the cough signal after noise reduction based on the target frequency to obtain a downsampled cough signal.
Step 1023: the frame length is set to a first preset value and the frame is shifted to a second preset value. Wherein the first preset value is greater than the second preset value.
Step 1024: and selecting a Hamming window, and setting the Hamming window as a window function of a first preset value to obtain a framing window function.
Step 1025: and framing the downsampled cough signal through a framing window function and a second preset value to obtain data of a preset number of frames. The data amount in each frame of data is a first preset value.
Step 1026: and calculating the time corresponding to each frame based on the frame number, frame length, frame shift and target frequency of the preset number of frames to obtain the time corresponding to the data of the preset number of frames.
Step 1027: and summing the square of the amplitude of each data in each frame to obtain the energy corresponding to each frame, and determining the set of the energy corresponding to each preset number of frames as the short-time energy signal of the cough signal after noise reduction.
Step 1028: and drawing a short-time energy map according to the short-time energy signal of the cough signal after noise reduction and the time corresponding to the data of the preset number of frames to obtain the short-time energy map.
In the implementation of this step, the sampling frequency of the sound signal is typically set to 44.1kHz or 16kHz, and thus the frequency of the cough signal after noise reduction is determined to be 44.1kHz or 16kHz. The requirement of the invention can be met by resetting the sampling frequency to 8kHz, and the subsequent processing can be carried out on the cough event, wherein the size of the target frequency is 8kHz, the noise-reduced cough signal is downsampled based on the target frequency to obtain the downsampled cough signal, then the frame length is set to be a first preset value, the size of the first preset value is 400, the frame is shifted to be a second preset value, the frame can be set to be 160, a Hamming window is selected, the size of the window is set to be 400, a window function is obtained, then the frame is divided, and the data amount in each frame of data is 400.
Based on this, step 102 downsamples the noise-reduced cough signal, so that the subsequent calculation amount of the signal can be reduced to obtain the downsampled cough signal under the condition of meeting the requirement, then the framing window function is set to reduce the frequency spectrum leakage and improve the barrier effect, then the downsampled cough signal is framed, the time of each frame and the energy of each frame are calculated to obtain a short-time energy signal, and further the graph is drawn based on the two amounts, wherein the horizontal axis is time, the vertical axis is energy, and a short-time energy graph is obtained, so that the observation is convenient.
Step 103: a target start point and a target end point for each short-time energy signal in the short-time energy map are determined. Specifically, the implementation process of this step may be:
Step 1031: setting an initial threshold value, and carrying out peak detection larger than the initial threshold value on the short-time energy signals to obtain the peak points of the target quantity.
Step 1032: judging whether two adjacent peak points belong to the same cough event or not based on the peak points of the target number, if the two adjacent peak points belong to the same cough event, discarding the peak points with smaller median values, and finally obtaining a plurality of peak points.
Step 1033: and based on a plurality of peak points, searching the first preset time length data forward for each peak point, searching the point with the minimum slope absolute value of the peak point, and determining the point as the starting point corresponding to each peak point.
Step 1034: and searching second preset time length data for each peak point backwards based on a plurality of peak points, searching a point with the minimum slope absolute value of the peak point, and determining an ending point corresponding to each peak point.
Step 1035: and determining a target starting point and a target ending point of the short-time energy corresponding to the cough events respectively based on the starting point corresponding to each peak point and the ending point corresponding to each peak point.
In this step, the size of the initial threshold may be set to be 1, peak detection is performed on data greater than the threshold, then two adjacent peaks are sequentially determined, whether the peak belongs to the same cough event is determined, if so, a larger value is selected as the peak point of the cough event, then based on the peak point of each cough event, a search is performed forward for data with a first preset time length, and the time of one cough is generally hundreds of ms, so that the first preset time length is set to be 200ms, a start point corresponding to each peak is obtained by searching, then a search for data with a second preset time length is performed, the second preset time length is 300ms, an end point corresponding to each peak is obtained, and then, according to the points, a target start point and a target end point of short time energy corresponding to each cough event are determined, as shown in fig. 3, a target start point, a peak and a target end point corresponding to each cough event are marked, the first peak is taken as an example, the first peak is taken as a target start point, the second peak is a target end point and a target point is not shown in the cross axis, and the first peak is a target point and the target point is not shown.
Based on the above, the peak detection is performed after setting a threshold, so that the calculated amount can be reduced under the condition that each peak is detected, whether two adjacent peak points belong to a cough event is judged, so that erroneous judgment is avoided, and then the data with the preset length is searched forwards and the data with the preset length is searched backwards to find the target starting point and the target ending point to the greatest extent.
Step 104: and feeding back a target starting point and a target ending point of the short-time energy signal to the noise-reduced cough signal to obtain a cough event. The implementation process of the steps is as follows:
Step 1041: and determining a starting time point and an ending time point which respectively correspond to a target starting point and a target ending point of the short-time energy respectively corresponding to the cough events. Wherein, the number of the starting time points and the ending time points is a plurality of.
Step 1042: based on the number of start time points and the number of end time points, a point looking forward for a third preset length for the first start time point is determined as an initial point of the first cough event.
Step 1043: starting from the first ending time point, judging whether the time length between the current ending time point and the next starting time point is more than three times of a third preset length, if so, determining a point of searching for the fourth preset length backwards for the current ending time point as the ending point of the current cough event, and determining a point of continuously searching for the third preset length forwards for the next starting time point as the initial point of the next cough event.
Step 1044: if the third preset length is less than three times, determining that the midpoint between the current ending time point and the next starting time point is the ending point of the current cough event and the initial point of the next cough event, and obtaining a plurality of initial points and ending points.
Step 1045: and dividing the noise-reduced cough signal through a plurality of initial points and termination points, and taking out data between the paired initial points and termination points to obtain a plurality of cough events.
It can be seen that, in step 104, first, the time corresponding to the target start point and the target end point of the short-time energy are determined, for example, the start time point of a certain cough event is 2.95s and the end time point is 3.23s, based on these two time points, according to the characteristics of the cough, there are three phases including inhalation, pressurization and washout, and the inhalation and washout phases are not completely represented by the start time point and the end time point, so it is proposed to find a third preset length point forward from the start time point to determine the initial point of the cough event. The third preset length may be a time length of 50ms, and for the case that the time length between the current ending time point and the next starting time point is greater than 150ms, a point with a fourth preset length is searched backwards from the current ending time point, wherein the fourth preset length is 100ms long, so as to obtain an initial point and an ending point of each cough event, and for the case that the current ending time point and the next time point are less than 150ms, a midpoint between the current ending time point and the next time point is taken as the ending point of the current cough event and the starting point of the next cough event. As shown in fig. 4, an original waveform of a cough event is shown, wherein two points are a start time point and an end time point, and two horizontal axis points corresponding to two lines are an initial point and an end point of the cough time, respectively.
Based on this, by looking forward at the point of the third preset length for the start time point and looking backward at the point of the fourth preset length to determine the initial point and the termination point of the cough event, it is possible to ensure complete acquisition of the cough event.
Step 105: and counting the number of the cough events to obtain the number of the cough events.
Step 106: determining the energy of each cough event results in an energy value corresponding to each cough event. The implementation process of the step can be as follows:
step 1061: the length of time of the original cough signal is determined.
Step 1062: and counting the number of the cough events to obtain the number of the cough events.
Step 1063: and calculating the cough quantity in the target unit time according to the time length of the original cough signal and the quantity of the cough events.
Step 1064: and carrying out accumulated square summation on the points contained in each cough event to obtain the corresponding energy value of each cough event.
In step 106, the length of time the cough signal may be the length of the night, e.g., from 10 pm to ten am, for 12 hours. The number of cough events is counted, and then the number of cough events in a target unit time can be calculated, for example, the number of cough events is divided by 12, so as to obtain the number of cough events in each hour. Obviously, the step can acquire the cough condition of the person who sends the cough signal in a certain time by determining the time length of the original cough signal and the number of the cough events, and the cough intensity of the person can be obtained by combining the corresponding energy value of the cough event.
Based on the above description, the working principle of the sound signal processing method provided by the invention is as follows:
Determining an object to be acquired, acquiring a cough signal of the object to be acquired to obtain an original cough signal, denoising the original cough signal to obtain a denoised cough signal, calculating short-time energy of the denoised cough signal to obtain a short-time energy signal of the denoised cough signal, drawing a drawing based on the short-time energy signal to obtain a short-time energy diagram, calculating a target starting point and a target ending point of the short-time energy signal to obtain a target starting point and a target ending point of the short-time energy corresponding to a plurality of cough events respectively, feeding back the target starting point and the target ending point of the short-time energy corresponding to the plurality of cough events to the denoised cough signal to obtain a plurality of cough events, counting the number of the plurality of cough events to obtain the number of the cough events, calculating the energy of each cough event to obtain the energy value corresponding to each cough event.
Based on the method, the device and the system for acquiring the cough signals of the object to be acquired, acquiring original cough signals, then carrying out noise reduction treatment on the original cough signals to obtain pure cough signals as far as possible, removing noise such as speaking sound, snore, respiratory sound and the like in the original cough signals, obtaining the noise-reduced cough signals, then carrying out short-time energy calculation on the noise-reduced cough signals to obtain short-time energy signals corresponding to the noise-reduced cough signals, drawing the short-time energy signals, conveniently observing, then carrying out target starting point and target ending point calculation on the short-time energy, obtaining target starting points and target ending points of short-time energy corresponding to a plurality of cough events respectively, feeding back the short-time energy target starting points and the target ending points to the noise-reduced cough signals to obtain a plurality of cough events, counting the quantity and calculating energy of the cough events to obtain energy values corresponding to each cough event, and identifying the quantity of the cough events contained in the cough event and obtaining the intensity of the cough events.
The invention also discloses a sound signal processing system, as shown in fig. 5, comprising:
the acquisition module 501 is configured to determine an object to be acquired, so as to acquire a cough signal of the object to be acquired, and obtain an original cough signal.
The denoising module 502 is configured to denoise the original cough signal to obtain a denoised cough signal.
The energy obtaining module 503 is configured to obtain short-time energy of the noise-reduced cough signal, obtain a short-time energy signal of the noise-reduced cough signal, and draw a graph based on the short-time energy signal, so as to obtain a short-time energy graph.
The target point calculating module 504 is configured to calculate a target start point and a target end point for the short-time energy signal, so as to obtain a target start point and a target end point of short-time energy corresponding to the cough events, respectively.
The feedback module 505 is configured to feed back a target start point and a target end point of short-time energy corresponding to the plurality of cough events to the noise-reduced cough signal, so as to obtain a plurality of cough events.
The statistics module 506 is configured to count the number of the plurality of cough events to obtain the number of the cough events, and calculate energy of each cough event to obtain an energy value corresponding to each cough event.
The working principle and the beneficial effects of the above technical solution are already described in the method section and are not described here again.
In one embodiment, the energy solving module 503 includes:
And the first determining unit is used for determining the sampling frequency of the cough signal after noise reduction, and resetting the frequency based on the sampling frequency to obtain a target frequency, wherein the value of the target frequency is smaller than the sampling frequency.
And the downsampling unit is used for downsampling the cough signal after noise reduction based on the target frequency to obtain the downsampled cough signal.
The setting unit is used for setting the frame length to be a first preset value and the frame length to be a second preset value, wherein the first preset value is larger than the second preset value.
And the setting unit is used for selecting the Hamming window and setting the Hamming window as a window function of the frame length to obtain a framing window function.
The framing unit is used for framing the downsampled cough signal through a framing window function and frame shifting to obtain data of a preset number of frames, wherein the data amount in each frame of data is a first preset value.
And the calculating unit is used for calculating the time corresponding to each frame based on the frame number, the frame length, the frame shift and the target frequency of the preset number of frames to obtain the time corresponding to the data of the preset number of frames.
And the summing unit is used for summing the square of the amplitude of each data in each frame to obtain the energy corresponding to each frame, and determining the set of the energy corresponding to each preset number of frames as the short-time energy signal of the cough signal after noise reduction.
And the drawing unit is used for drawing the short-time energy map according to the short-time energy signal of the cough signal after noise reduction and the time corresponding to the data of the preset number of frames to obtain the short-time energy map.
In one embodiment, the target point determination module 504 includes:
And the detection unit is used for setting an initial threshold value, and carrying out peak detection larger than the initial threshold value on the short-time energy signal to obtain the peak points of the target number.
And the judging unit is used for judging whether two adjacent peak points belong to the same cough event or not based on the peak points of the target number, if the two adjacent peak points belong to the same cough event, discarding the peak points with small values, and finally obtaining a plurality of peak points.
The first searching unit is used for searching the first preset time length data forward for each peak point based on a plurality of peak points, searching the point with the minimum slope absolute value of the peak point, and determining the point as the starting point corresponding to each peak point.
And the second searching unit is used for searching the second preset time length data backwards for each peak point based on a plurality of peak points, searching the point with the minimum slope absolute value of the peak point, and determining the point as the ending point corresponding to each peak point.
And the second determining unit is used for determining a target starting point and a target ending point of the short-time energy corresponding to the cough events respectively based on the starting point corresponding to each peak point and the ending point corresponding to each peak point.
The present invention also provides an acoustic signal processing apparatus, as shown in fig. 6, comprising:
The sound collection device 600 is used for collecting cough signals.
A storage device 601 for storing a computer control program.
The processing device 602 is connected to the sound collecting device 600 and the storage device 601, respectively, and is configured to retrieve and execute a computer control program based on the cough signal, so as to implement the sound signal processing method provided above, and obtain the number and energy value of the cough events.
Wherein the processing device 602 comprises:
And the cough signal acquisition module is used for acquiring a cough signal.
The noise reduction processing module is used for carrying out noise reduction processing on the cough signal to obtain a noise-reduced cough signal.
And the short-time energy map generation module is used for determining short-time energy of the cough signal after noise reduction to obtain a short-time energy signal and generating a short-time energy map based on the short-time energy signal.
And the target starting and ending point determining module is used for determining a target starting point and a target ending point of each short-time energy signal in the short-time energy diagram.
And the cough event determining module is used for feeding back the target starting point and the target ending point of the short-time energy signal to the noise-reduced cough signal to obtain a cough event.
And the cough event number determining module is used for counting the number of the cough events to obtain the number of the cough events.
And the energy value determining module is used for determining the energy of each cough event to obtain the energy value corresponding to each cough event.
Further, the storage device 601 may be a computer readable storage medium.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
The principles and embodiments of the present invention have been described herein with reference to specific examples, the description of which is intended only to assist in understanding the methods of the present invention and the core ideas thereof; also, it is within the scope of the present invention to be modified by those of ordinary skill in the art in light of the present teachings. In view of the foregoing, this description should not be construed as limiting the invention.

Claims (8)

1. A sound signal processing method, comprising:
Acquiring a cough signal;
Carrying out noise reduction treatment on the cough signal to obtain a noise-reduced cough signal;
Determining short-time energy of the cough signal after noise reduction to obtain a short-time energy signal, and generating a short-time energy map based on the short-time energy signal;
determining a target starting point and a target ending point of each short-time energy signal in the short-time energy map;
Feeding back a target starting point and a target ending point of the short-time energy signal to the noise-reduced cough signal to obtain a cough event;
counting the number of the cough events to obtain the number of the cough events;
Determining the energy of each cough event to obtain the corresponding energy value of each cough event;
determining a target starting point and a target ending point of each short-time energy signal in the short-time energy map, wherein the method specifically comprises the following steps:
Acquiring an initial threshold value;
detecting a peak value larger than the initial threshold value in the short-time energy signal to obtain a peak value point;
Judging whether two adjacent peak points in the peak points belong to the same cough event or not, and obtaining a first judgment result;
when the first judgment result is that two adjacent peak points in the peak points belong to the same cough event, discarding the peak point with the small value in the two adjacent peak points to obtain an updated peak point; when the first judgment result is that two adjacent peak points in the peak points do not belong to the same cough event, the two adjacent peak points are taken as updated peak points;
Searching a starting point and an ending point of each updated peak point according to a preset direction and a preset time step on the basis of each updated peak point; the starting point and the ending point are points with minimum absolute value of the slope of the updated peak point;
determining a target starting point of each short-time energy signal in the short-time energy map based on the starting point, and determining a target ending point of each short-time energy signal in the short-time energy map based on the ending point;
Feeding back the target starting point and the target ending point of the short-time energy signal to the noise-reduced cough signal to obtain a cough event, wherein the method specifically comprises the following steps of:
determining a starting time point and an ending time point which correspond to a target starting point and a target ending point of the short-time energy respectively;
determining a point with a first preset length from the current starting time point as an initial point of the cough event according to a preset direction;
Judging whether the time length between the current ending time point and the next starting time point is more than three times of the first preset length or not, and obtaining a second judging result; the next starting time point is a starting time point adjacent to the current starting time point;
If the second judging result is larger than the first judging result, determining a point with a second preset length from the current ending time point as an ending point of the current cough event according to the preset direction; the ending point of the current cough event is used as an initial point of the next cough time;
And if the second judgment result is smaller than the first judgment result, determining the midpoint between the current ending time point and the next starting time point as the ending point of the current cough event.
2. The sound signal processing method according to claim 1, wherein the determining short-time energy of the noise-reduced cough signal obtains a short-time energy signal, and generating a short-time energy map based on the short-time energy signal, specifically comprises:
determining the sampling frequency of the cough signal after noise reduction, and obtaining a target frequency based on the sampling frequency; the target frequency is less than the sampling frequency;
downsampling the noise-reduced cough signal based on the target frequency to obtain a downsampled cough signal;
Acquiring a framing window function;
Carrying out framing treatment on the downsampled cough signal based on the framing window function and a preset frame shift to obtain a plurality of frame data; the data amount in each frame of data is equal to a preset frame length value;
Determining the time corresponding to each frame data based on the number of frames of the frame data, the frame length of the frame data, the frame shift of the frame data and the target frequency;
Summing the square of the amplitude of each data in the frame data to obtain the energy corresponding to each frame of data;
generating an energy set based on energy corresponding to each frame of data, and obtaining the short-time energy signal based on the energy set;
and generating the short-time energy map based on the time corresponding to each frame data and the short-time energy signal.
3. The method for processing sound signals according to claim 1, wherein said determining the energy of each cough event results in an energy value corresponding to each cough event, specifically comprising:
Determining a length of time of the cough signal;
determining a cough number per unit time of a target according to the time length and the cough event number;
And carrying out accumulated square summation on points contained in each cough event based on the cough quantity in the target unit time, and obtaining the energy value corresponding to each cough event.
4. The sound signal processing method of claim 1, wherein the acquiring the cough signal further comprises:
determining a cough type to be acquired, and determining a crowd to be acquired at a target place based on the cough type;
acquiring basic information of the crowd to be acquired, and setting screening conditions;
Screening the crowd to be acquired based on the set screening conditions and the basic information to obtain an object to be acquired;
determining sampling time length and sampling place, and judging whether to perform data acquisition on the object to be acquired at the sampling place to obtain a third judging result;
When the third judging result is that the data acquisition is carried out on the object to be acquired, the sound acquisition equipment is used for acquiring a cough signal of the object to be acquired, and the cough signal is obtained;
And when the third judging result is that the data acquisition is not performed on the object to be acquired, prompting the object to be acquired to perform position adjustment, and after the position adjustment is completed, acquiring a cough signal of the object to be acquired through the sound acquisition equipment to obtain the cough signal.
5. The method for processing a sound signal according to claim 1, wherein the noise reduction processing is performed on the cough signal to obtain a noise reduced cough signal, and the method specifically comprises:
selecting the type of wavelet packet decomposition and determining the sampling frequency of the cough signal;
Determining the decomposition layer number of the wavelet packet according to the sampling frequency of the cough signal;
performing wavelet packet decomposition on the cough signal based on the type of wavelet packet decomposition, the sampling frequency of the cough signal and the decomposition layer number of the wavelet packet to obtain a decomposed cough signal;
and determining the frequency range of the cough, reconstructing the decomposed cough signal based on the frequency range to obtain a reconstructed signal, and determining the reconstructed signal as the cough signal after noise reduction.
6. An acoustic signal processing apparatus, comprising:
the sound collection device is used for collecting cough signals;
A storage device for storing a computer control program;
Processing device, respectively connected with the sound collection device and the storage device, for retrieving and executing the computer control program based on the cough signal, so as to implement the sound signal processing method according to any one of claims 1-5, and obtain the number and energy value of the cough events.
7. The sound signal processing apparatus of claim 6, wherein the processing device comprises:
the cough signal acquisition module is used for acquiring a cough signal;
The noise reduction processing module is used for carrying out noise reduction processing on the cough signal to obtain a noise-reduced cough signal;
The short-time energy map generation module is used for determining short-time energy of the cough signal after noise reduction to obtain a short-time energy signal and generating a short-time energy map based on the short-time energy signal;
a target start and end point determining module, configured to determine a target start point and a target end point of each short-time energy signal in the short-time energy map;
The cough event determining module is used for feeding back a target starting point and a target ending point of the short-time energy signal to the noise-reduced cough signal to obtain a cough event;
the cough event number determining module is used for counting the number of the cough events to obtain the number of the cough events;
and the energy value determining module is used for determining the energy of each cough event to obtain the energy value corresponding to each cough event.
8. The sound signal processing apparatus of claim 6, wherein the storage device is a computer readable storage medium.
CN202211592912.3A 2022-12-13 2022-12-13 Sound signal processing method and device Active CN117064330B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211592912.3A CN117064330B (en) 2022-12-13 2022-12-13 Sound signal processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211592912.3A CN117064330B (en) 2022-12-13 2022-12-13 Sound signal processing method and device

Publications (2)

Publication Number Publication Date
CN117064330A CN117064330A (en) 2023-11-17
CN117064330B true CN117064330B (en) 2024-04-19

Family

ID=88701100

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211592912.3A Active CN117064330B (en) 2022-12-13 2022-12-13 Sound signal processing method and device

Country Status (1)

Country Link
CN (1) CN117064330B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWM446374U (en) * 2012-06-18 2013-02-01 Chung Shan Medical University Hospital Coughs recording device
CN110946554A (en) * 2019-11-27 2020-04-03 深圳和而泰家居在线网络科技有限公司 Cough type identification method, device and system
CN113288112A (en) * 2021-05-17 2021-08-24 上海市肺科医院 Disease examination and treatment device for department of respiration
WO2022015010A1 (en) * 2020-07-13 2022-01-20 다인기술 주식회사 Method for counting coughs by analyzing acoustic signal, server performing same, and non-transitory computer-readable recording medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7610199B2 (en) * 2004-09-01 2009-10-27 Sri International Method and apparatus for obtaining complete speech signals for speech recognition applications

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWM446374U (en) * 2012-06-18 2013-02-01 Chung Shan Medical University Hospital Coughs recording device
CN110946554A (en) * 2019-11-27 2020-04-03 深圳和而泰家居在线网络科技有限公司 Cough type identification method, device and system
WO2022015010A1 (en) * 2020-07-13 2022-01-20 다인기술 주식회사 Method for counting coughs by analyzing acoustic signal, server performing same, and non-transitory computer-readable recording medium
CN113288112A (en) * 2021-05-17 2021-08-24 上海市肺科医院 Disease examination and treatment device for department of respiration

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
基于NMF和短时能量特征提取的咳嗽识别研究;李越 等;中国计量大学学报;20220615;第235-241页 *
基于自适应分段的语音端点融合检测;沈希忠 等;应用技术学报;20180930;第273-277页 *
连续语音流中咳嗽信号的端点检测;阳国清;莫鸿强;李文;田联房;郑则广;;生物医学工程学杂志;20100625(第03期);第70-73+81页 *

Also Published As

Publication number Publication date
CN117064330A (en) 2023-11-17

Similar Documents

Publication Publication Date Title
US20240023886A1 (en) Noninvasive method and system for sleep apnea detection
US9198634B2 (en) Medical decision support system
Mahmoodabadi et al. ECG feature extraction based on multiresolution wavelet transform
WO2017148452A1 (en) Electrocardiography signal waveform feature point extraction method and device
Remya et al. Classification of myocardial infarction using multi resolution wavelet analysis of ECG
Hadjileontiadis Wavelet-based enhancement of lung and bowel sounds using fractal dimension thresholding-Part I: Methodology
JP2014505566A (en) Respiration monitoring method and system
CN111920407B (en) Electrocardiogram feature extraction method, system, device and medium based on wavelet transformation
Azam et al. Smartphone based human breath analysis from respiratory sounds
Shukla et al. An efficient heart sound segmentation approach using kurtosis and zero frequency filter features
CN110801212B (en) BCG signal heart rate extraction method based on neural network
CN115299911A (en) Heart rate extraction method and system based on cardiac shock signal
CN113729653A (en) Human body pulse wave signal acquisition method
CN117064330B (en) Sound signal processing method and device
Tan et al. EMD-based electrocardiogram delineation for a wearable low-power ECG monitoring device
CN113786202A (en) Electrocardiogram characteristic starting point and end point detection method, system, device and medium
CN106725487A (en) Respiration rate extraction method and device
CN106419884A (en) Heart rate calculating method and system based on wavelet analysis
Ari et al. On a robust algorithm for heart sound segmentation
Tu et al. Improved methods for detecting main components of heart sounds
CN116439690A (en) Ballistocardiogram signal extraction method, ballistocardiogram signal extraction device, ballistocardiogram signal extraction equipment and storage medium
CN112043263B (en) System and method for recognizing artifact generated by other instruments in neonatal electroencephalogram signals
Jingbo et al. Method of Extracting Respiration Rate and Heartrate by Ultra-wideband Radar for Human Monitoring.
CN113509169A (en) Multi-parameter-based non-contact sleep apnea detection system and method
Hermawan et al. Wavelet-based signal quality assessment: noise detection by temporal feature and heuristics-based

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
GR01 Patent grant
GR01 Patent grant