CN111317499A - Heart sound signal processing method based on wavelet technology - Google Patents

Heart sound signal processing method based on wavelet technology Download PDF

Info

Publication number
CN111317499A
CN111317499A CN201811542958.8A CN201811542958A CN111317499A CN 111317499 A CN111317499 A CN 111317499A CN 201811542958 A CN201811542958 A CN 201811542958A CN 111317499 A CN111317499 A CN 111317499A
Authority
CN
China
Prior art keywords
heart sound
wavelet
sound signal
threshold
data
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
CN201811542958.8A
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.)
Tianjin Optical Electrical Communication Technology Co Ltd
Original Assignee
Tianjin Optical Electrical Communication 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 Tianjin Optical Electrical Communication Technology Co Ltd filed Critical Tianjin Optical Electrical Communication Technology Co Ltd
Priority to CN201811542958.8A priority Critical patent/CN111317499A/en
Publication of CN111317499A publication Critical patent/CN111317499A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B7/00Instruments for auscultation
    • A61B7/02Stethoscopes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2411Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines

Abstract

The invention provides a heart sound signal processing method based on wavelet technology, which comprises the following steps: 1. acquiring a heart sound signal; 2. preprocessing the heart sound signal; 3. selecting a wavelet mother function and a threshold rule based on wavelet denoising; 4. extracting time domain, frequency domain and energy characteristics of the heart sound signal; 5. and identifying the heart sound signal based on the support vector machine algorithm. The method comprises the steps of carrying out noise reduction processing and classification recognition on collected heart sound signals by utilizing wavelet transformation, extracting different characteristic parameters for each beat of heart sound signals by utilizing selected characteristic parameters including time domain, frequency domain and energy, carrying out distinguishing classification on the heart sound signals and other heart sound signals by utilizing a support vector machine method, and calculating the classification accuracy rate; has the advantages of no wound, low cost, standard judgment and the like.

Description

Heart sound signal processing method based on wavelet technology
Technical Field
The invention relates to the technical field of heart sound signal analysis and processing, in particular to a wavelet technology-based heart sound signal processing method.
Background
The heart sounds, as the name implies, are the sounds made by the heart during its movement. The movement of the heart is generally associated with the pumping of the heart, during which vibrations of the heart's heart muscle, blood vessels and valves, etc., constitute a necessary condition for the generation of sound. In this case, the different sound manifestations of the heart sound are certainly related to the physiological condition of the site where it is generated, i.e. the heart sound signal contains a lot of physiological and pathological information about the various parts of the heart. The conclusion of whether the heart sound is abnormal can be obtained through auscultation and comparison of the heart sound, so that the specific heart disease is further judged, and a basis is provided for early diagnosis of cardiovascular diseases. However, in the process of acquiring the heart sound signal, due to the use of the instrument and the movement of the patient or the carrying of various heart diseases, various noises may be mixed in the heart sound signal, which affects the diagnosis of the doctor. Therefore, it is necessary to develop a method for processing a heart sound signal based on wavelet technology.
Disclosure of Invention
The present invention is directed to solve the above technical problems, and provides a method for processing a heart sound signal based on a wavelet technique, which can filter noise in the heart sound signal.
In order to solve the technical problems, the invention adopts the technical scheme that:
a heart sound signal processing method based on wavelet technology comprises the following steps:
1. acquiring a heart sound signal;
2. preprocessing the heart sound signal;
3. selecting a wavelet mother function and a threshold rule based on wavelet denoising;
4. and extracting time domain, frequency domain and energy characteristics of the heart sound signal.
Further, the method also comprises a fifth step of: and identifying the heart sound signal based on the support vector machine algorithm.
Further, in the step one, the acquired heart sound signals include healthy heart sound signals and diseased heart sound signals, and the diseased heart sound signals include diseases such as S1 different in strength and weakness, pulmonary artery stenosis, mitral insufficiency, right ventricular outflow tract stenosis, and farrow tetranection.
Further, in the second step, the collected heart sound signal data is sorted, and the process is as follows:
firstly, adopting an audio file in a wav format for a heart sound signal data format;
secondly, classifying the heart sound signal data into healthy heart sounds, right ventricular outflow tract stenosis (the second intercostal space at the left edge of the sternum), pulmonary artery stenosis, mitral valve insufficiency (the anterior axillary line), and Fabry-Perot tetranectasis (the third intercostal space at the left edge of the sternum);
thirdly, carrying out data processing on the acquired heart sound signals by adopting two channels, wherein single-channel data is obtained by copying audio data in a single channel to obtain two-channel data for subsequent processing;
and finally, reducing the sampling frequency of the heart sound signal to 2205Hz, and then removing power frequency interference by a wave trap filtering method.
Further, in step three, the wavelet-based denoising process of the heart sound signal is as follows:
1) determining the number of decomposition layers
Before wavelet transformation, the signal-noise characteristics of the heart sound signals can be effectively classified and identified through three-layer decomposition according to the characteristics of the heart sound signals, and preparation is made for subsequent wavelet transformation.
And 3, carrying out 3-layer decomposition on the sampled heart sound signals:
frequency range of approximation coefficient AAA 3: 0-138 Hz;
frequency range of detail coefficient DAA 3: 138-275 Hz;
frequency range of detail coefficient ADA 3: 275-413 Hz;
frequency range of detail coefficient DDA 3: 413-551 Hz;
frequency range of detail coefficient D1: 551-1102 Hz;
2) determining mother functions of wavelets
Energy value analysis contained in different levels is respectively carried out on four wavelets of Haar, Daubechies, Symlets and Coiflets, 5 heart sound signals in a database are selected for analysis, the energy variance and the maximum of the Coif5 corresponding to each level can be obtained, therefore, the characteristic variance of the Coif5 is maximum, the energy value of each level can be effectively distinguished, and the Coif5 wavelets are selected as wavelet mother functions for subsequent processing analysis.
3) Performing thresholding denoising processing
The soft threshold adopted by the method is that the wavelet coefficient in the signal is processed by taking the absolute value, then the absolute value is compared with the manually set threshold, and if the absolute value is less than or equal to the threshold point, the final value is taken as 0; if the difference value is larger than the threshold value point, the value is the difference value between the point and the threshold value point.
T is chosen as a given threshold, and for the soft threshold, there are
Figure BDA0001908653350000031
4) Determining threshold selection rules
a. The Sqtwolog rule is a general threshold value, a signal is set as f (T) which contains partial noise components, decomposition processing is carried out on a scale of 1-m (1 < m < J), J represents the layer number of the node, and the general threshold value T is1Comprises the following steps:
Figure BDA0001908653350000032
where n is the sum of the number of wavelet coefficients of each level obtained by wavelet decomposition, and σ is the standard deviation of the noise-mixed signal.
b. The Rigrsure rule is a Stein unbiased risk threshold, and the specific selection rule is as follows: and setting W as a known vector, wherein elements contained in the vector are squares of all wavelet coefficients obtained after decomposition, and finally arranging the wavelet coefficients according to the numerical value from large to small, wherein n is the number of the wavelet coefficients. And setting a risk vector R, wherein the elements are as follows:
Figure BDA0001908653350000033
then the threshold value T2The corresponding formula is:
Figure BDA0001908653350000034
wherein ω isbIs riWhen the minimum value is taken, b is equal to i.
C. The Heursure rule is a combination of two threshold methods, namely Sqtwolog rule and Rigrsure rule, combines the characteristics of the two thresholds, and is therefore theoretically the optimal threshold selection rule. When the signal-to-noise ratio is very small, the fixed threshold value selection rule is very suitable to be adopted; when the signal-to-noise ratio is large, the Rigrsure criterion is adopted.
Let W be the sum of the squares of the values corresponding to the n wavelet coefficients, and let the variance be σ midle (W)1,k,0≤k≤2J-1-1)/0.6745, J represents the number of layers in which the node is located, so the threshold T3The selection rule is as follows:
Figure BDA0001908653350000041
Figure BDA0001908653350000042
and finally, selecting a noise reduction method based on a Heursure threshold value selection rule to prepare for subsequent heart sound segmentation and classification identification.
Further, in step four, the time domain feature extraction step is as follows:
1) setting a threshold value
Setting a threshold value required by the envelope of the heart sound signal, obtaining an average value x through operation according to the signal after the envelope is extracted, then setting a corresponding adjusting coefficient as a, and selecting a formula of the threshold value as y ═ a · x, wherein when a ═ 0.8, the formula is an optimal solution, and the optimal threshold value can be obtained.
2) Flying wing removal
Setting n to 400, namely, taking the first data smaller than the threshold point from 400 as the starting point of the data.
3) Determining a differential threshold
Extracting a part of data from the collected heart sound data to be used as a learning group, and performing machine learning on the learning group; the machine learning method is to read the heart sound data with the time length of 5 seconds and calculate the maximum 10 difference values. Then, the maximum value and the minimum value contained in the signal are removed to avoid mixing spike noise in the signal; and finally, extracting a polynomial of which the coefficient is zero from the remaining 8 difference values by adopting a square approximation method, setting the polynomial as a standard value required by us to eliminate random errors, and then taking 0.3 of the value as a standard detection threshold value X.
4) Determining positive and negative differential pairs
The positive difference is represented as the rising edge of the heart sound waveform, and the negative difference is represented as the falling edge of the heart sound waveform; firstly, a correct positive differential pair is used as a starting point to start inquiring, then a first negative differential occurs and is marked, and then a first positive differential occurs and is marked; the positive and negative differences just marked are a positive and negative difference pair.
5) Marking possible values
And analyzing and identifying the positive and negative difference pairs found out before, marking the possible first heart sound S1 and the second heart sound S2, namely determining a threshold value according to the time domain characteristics of the heart sound signals, marking the possible positive and negative difference pairs according to the determined threshold value range, namely the rising edge and the falling edge of S1 and S2, and finally finding out the maximum amplitude point in the same way.
6) Categorical comparison
Grouping the heart sound data according to the heart rate, then carrying out a comparison experiment, and when the heart rate is more than 100 times/minute, carrying out comparison analysis by adopting an energy value, namely comparing the energy values of the time domain characteristics S1 and S2; when the heart rate is less than 100 times per minute, an interval method is selected for comparison, namely, the comparison analysis is carried out through the time difference between the diastole and the systole of the heart and the period duration of the interval.
7) Time domain features S1 and S2 identify
The collected heart sound signals are selected, and effective identification of the time domain characteristics of S1 and S2 can be achieved through the method.
Further, in step four, the frequency domain feature extraction step is as follows:
taking a group of random signals x (n) and n ∈ R, wherein the length of the random signals is L, processing the group of random signals x (n) to averagely divide the random signals into S sections, and taking the ith section of data corresponding to each section with the length of L/S for rectangular windowing, and setting d (n) as a rectangular window:
Figure BDA0001908653350000051
Figure BDA0001908653350000052
wherein d isj(n) is a Hanning or Hamming window.
Further, in step four, the energy feature extraction step is as follows:
the energy calculation formula of the heart sound is as follows:
Figure BDA0001908653350000053
and X (i) in the formula is heart sound acquisition data which is obtained through wavelet transformation and subjected to discretization processing, and N in the formula is the total number of sampling points.
Further, in step five, for different practical application scenarios, machine learning is constructed:
firstly, carrying out numerical analysis on collected heart sound data, namely carrying out characteristic analysis on a heart sound signal based on time domain characteristics and frequency domain characteristics; then carrying out data analysis through the characteristic values of the data; meanwhile, the suitability of two parameters, namely a vector W and a constant a, is considered, namely an algorithm is trained; then, the algorithm is verified by applying simple operation; and finally, classifying and identifying the acquired heart sound data by adopting the SVM.
1) Heart sound signal segmentation
Segmenting the signal subjected to wavelet denoising, extracting each beat of heart sound, performing feature extraction on each beat of heart sound, and finding out the same feature as a segmentation basis;
segmenting a heart sound signal, namely performing envelope processing on the heart sound signal which is subjected to wavelet threshold denoising pretreatment; the envelope method adopted by the method is that in the preprocessed signals, the maximum values are taken at intervals of 100 points, and then the maximum values are connected to form a curve;
after an envelope curve is obtained, recording a first non-zero number of each section, wherein the length of each beat of heart sound signal is the difference of the subtraction of two adjacent numbers; therefore, the starting point and the end point of each beat in the continuous heart sound signals of a plurality of beats can be known, and the characteristics of each beat can be specifically researched; and finishing segmentation and feature extraction of the corresponding heart sound signals.
2) Heart sound signal classification and identification
In order to facilitate subsequent heart sound characteristic analysis, energy values of different frequency bands of the heart sound signals with previous energy characteristics are written into excel and are divided into a learning group and a sample group.
The invention has the advantages and positive effects that: the method comprises the steps of carrying out noise reduction processing and classification recognition on collected heart sound signals by utilizing wavelet transformation, extracting different characteristic parameters for each beat of heart sound signals by utilizing selected characteristic parameters including time domain, frequency domain and energy, carrying out distinguishing classification on the heart sound signals and other heart sound signals by utilizing a support vector machine method, and calculating the classification accuracy rate; has the advantages of no wound, low cost, standard judgment and the like.
Drawings
FIG. 1 is a flow chart of the present invention;
FIG. 2 is a flow chart of a denoising process;
FIG. 3 is a diagram of a three-level wavelet decomposition tree;
FIG. 4 is a flow chart of a time domain identification algorithm;
fig. 5 is a general flow chart of the SVM.
Detailed Description
The following detailed description of specific embodiments of the invention refers to the accompanying drawings.
As shown in fig. 1, a method for processing a heart sound signal based on a wavelet technique includes the following steps:
firstly, acquiring a heart sound signal;
the obtained heart sound signals are provided by hospitals, and 589 healthy heart sound signals and diseased heart sound signals are provided in total, wherein the diseased heart sound signals comprise diseases such as S1 different in strength and weakness, pulmonary artery stenosis, mitral insufficiency, right ventricular outflow tract stenosis, and Falurtetrad disease.
Secondly, preprocessing the heart sound signals;
firstly, heart sound data collected by a hospital are obtained and sorted. And the unified format conversion is carried out aiming at different audio files, so that the subsequent heart sound processing is facilitated. The audio file finally adopted in the method is in the wav format. Then, a large amount of data is classified, because the collected data comprises a large amount of healthy heart sounds and heart diseases, the heart sound data is classified according to different symptoms, and the data is divided into healthy heart sounds, right ventricular outflow tract stenosis (the second intercostals at the left edge of the sternum), pulmonary artery stenosis, mitral insufficiency (the anterior axillary line), and Fabry tetrad disease (the third intercostals at the left edge of the sternum). Through data arrangement, the found heart sound signal of gathering is including single channel and binary channels, and is convenient for subsequent processing, consequently carries out standardization with data and unifies, all adopts the binary channels to carry out data processing, and wherein single channel data then duplicates audio data in the single channel and obtains the binary channels data and carry out subsequent processing. The sampling rate of the original heart sound data is 44100Hz, and since the effective components in the heart sound signal are lower than 800Hz, the signal is down-sampled to 2205 Hz. And then, the trap filter is used for removing power frequency interference, but noise components still remain in the heart sound signals, and subsequent research is needed. In the process of collecting heart sounds, due to the existence of 50Hz mains supply voltage, the acquisition process can be affected badly, and 50Hz power frequency interference is mixed in the collected signals. Therefore, a method of wave trap filtering is adopted to remove power frequency interference.
Selecting a wavelet mother function and a threshold rule based on wavelet denoising;
the denoising of the heart sound signal based on the wavelet technology can be divided into the following 3 steps, as shown in fig. 2.
1) Number of decomposition layers
After resampling, setting the sampling frequency to 2205Hz, and obtaining the frequency of the first heart sound and the second heart sound which are not more than 400Hz through the time-frequency characteristics of the heart sound signals. On this premise, the resampled signal may be subjected to 3-level decomposition, and fig. 3 is a diagram of a three-level wavelet decomposition tree.
Frequency range of approximation coefficient AAA 3: 0-138 Hz;
frequency range of detail coefficient DAA 3: 138-275 Hz;
frequency range of detail coefficient ADA 3: 275-413 Hz;
frequency range of detail coefficient DDA 3: 413-551 Hz;
frequency range of detail coefficient D1: 551-1102 Hz;
2) mother function of wavelet
The wavelet function and the scale function of the orthogonal wavelet Coif5 have outstanding symmetrical characteristics, and the orthogonal wavelet Coif5 is verified and analyzed through experimental quantitative analysis. The analysis of the energy values contained in different levels is respectively carried out on four wavelets of Haar, Daubechies, Symlets and Coiffets by carrying out data normalization analysis based on the frequency bands of the decomposition layer number before. 5 heart sound signals in the database are selected for analysis, and the energy variance sum of each level corresponding to the Coif5 is the largest, so that the characteristic variance of the Coif5 is the largest, the energy values of each level can be effectively distinguished, and the method has very important significance for subsequent feature extraction. So the Coif5 wavelet will be selected as the mother wavelet function for subsequent processing analysis in the method.
3) Thresholding denoising process
The soft threshold adopted by the method is that the wavelet coefficient in the signal is processed by taking the absolute value, then the absolute value is compared with the manually set threshold, and if the absolute value is less than or equal to the threshold point, the final value is taken as 0; if the difference value is larger than the threshold value point, the value is the difference value between the point and the threshold value point. Therefore, the coefficient with larger absolute value is reduced proportionally on the original basis, and then the processed wavelet coefficient is used for directly reconstructing the signal, thereby achieving the purpose of removing the noise.
T is chosen as a given threshold, and for the soft threshold, there are
Figure BDA0001908653350000091
4) Threshold selection rule
(1) The Sqtwolog rule is a general threshold value, a signal is set as f (T) which contains partial noise components, decomposition processing is carried out on a scale of 1-m (1 < m < J), J represents the layer number of the node, and the general threshold value T is1Comprises the following steps:
Figure BDA0001908653350000092
where n is the sum of the number of wavelet coefficients of each level obtained by wavelet decomposition, and σ is the standard deviation of the noise-mixed signal.
(2) The Rigrsure rule is the Stein unbiased risk threshold. The Rigrsure rule threshold extraction method is a threshold selection rule with adaptive characteristics based on Stein's unbiased likelihood estimation principle. The specific selection rule is as follows: and setting W as a known vector, wherein elements contained in the vector are squares of all wavelet coefficients obtained after decomposition, and finally arranging the wavelet coefficients according to the numerical value from large to small, wherein n is the number of the wavelet coefficients. And setting a risk vector R, wherein the elements are as follows:
Figure BDA0001908653350000093
then the threshold value T2The corresponding formula is:
Figure BDA0001908653350000094
wherein ω isbIs riWhen the minimum value is taken, b is equal to i.
(3) The Heursure rule is a combination of two threshold methods, namely Sqtwolog rule and Rigrsure rule, combines the characteristics of the two thresholds, and is therefore theoretically the optimal threshold selection rule. When the signal-to-noise ratio is very small, the fixed threshold value selection rule is very suitable to be adopted; when the signal-to-noise ratio is large, the Rigrsure criterion is adopted.
Let W be the sum of the squares of the values corresponding to the n wavelet coefficients, and let the variance be σ midle (W)1,k,0≤k≤2J-1-1)/0.6745, J represents the number of layers in which the node is located, so the threshold T3The selection rule is as follows:
Figure BDA0001908653350000095
Figure BDA0001908653350000101
for the threshold value selection rule, a noise reduction method based on the Heursure threshold value selection rule is selected finally through the analysis of the noise reduction effect of various diseased heart sound signals on the Sqtwolog rule, the Rigrsure rule, the Heursure rule and other threshold value selection rules, and a foundation is laid for the subsequent heart sound segmentation and classification identification.
Time domain, frequency domain and energy feature extraction of heart sound signals
For stationary linear signals, the more traditional feature extraction methods are now based on instantaneous-frequency analysis. Therefore, the method and the structure for extracting the time domain characteristics, the frequency domain characteristics and the energy characteristics are mainly introduced in the scheme. And extracting time domain features based on the principle of a variance method, and acquiring other feature parameters by the positions of the first heart sound and the second heart sound in the whole heart sound period. And extracting frequency domain characteristics, performing power spectrum analysis on the heart sound signals by using a Welch method, and extracting characteristic parameters such as maximum power spectrum density, frequency points where maximum power spectrums are located and the like. The energy characteristic is extracted by analyzing the energy value of the center tone signal in each frequency band.
1) Time domain feature extraction
The flow of the time domain identification algorithm is shown in fig. 4, and the algorithm will be described as follows:
1. setting a threshold value
First, a threshold value required for the envelope of the heart sound signal is set, and the basic principle of the envelope of the heart sound signal and the forming principle of the envelope map have been described above. The threshold value of the envelope is provided with three methods, and through comparative analysis, the method adopts a relatively suitable compromise mode. An average value x can be obtained through operation according to the signal after the envelope is extracted, and then a corresponding adjusting coefficient is set to be a, and then the formula of the selected threshold is y-a-x. And then, experiments verify that the optimal solution is obtained when the value of a is 0.8, and the optimal threshold value can be obtained. The threshold value selecting method cannot be influenced by suddenly increased noise, and can completely store the time domain characteristics of the heart sound signals to a certain extent without being influenced by transformation. And finally, setting the point smaller than the set threshold value to be zero.
2. Flying wing removal
An "end-point flying wing" is a device that may be mixed with some noise under the interference of some heart sound collecting instruments, and the noise is concentrated at the beginning of heart sound data. But some common filtering is difficult to filter out. Therefore, the method removes the part of abnormal data, and sets n to 400, namely, the data which is smaller than the threshold point from the first 400 data after the first data is used as the starting point of the data.
3. Determining a differential threshold
The difference method selection threshold rule has been introduced above. According to the heart sound data collected by us, a part of the data is extracted as a learning group, and machine learning is carried out on the learning group. The machine learning method is to read the heart sound data with the time length of 5 seconds and calculate the maximum 10 difference values. The maximum and minimum values contained therein are then removed to avoid mixing spike noise in the signal. And finally, extracting a polynomial of which the coefficient is zero from the remaining 8 difference values by adopting a square approximation method, setting the polynomial as a standard value required by us to eliminate random errors, and then taking 0.3 of the value as a standard detection threshold value X.
4. Positive and negative differential pair
In this step, a correct positive-negative differential pair needs to be found and determined, where a positive differential is represented as a rising edge of a heart sound waveform, and a negative differential is represented as a falling edge of the heart sound waveform. However, due to various interferences such as noise, a relatively complete rising edge may contain a plurality of forward differences larger than the difference threshold. Thus, the first choice is to start the query with a correct pair of positive differentials, then mark the first negative differential, and then mark the first positive differential. The positive and negative differences just marked are a positive and negative difference pair.
5. Marking possible values
And analyzing and identifying the positive and negative difference pairs found out before, marking the possible first heart sound S1 and the second heart sound S2, namely determining a threshold value according to the time domain characteristics of the heart sound signals, marking the possible positive and negative difference pairs according to the determined threshold value range, namely the rising edge and the falling edge of S1 and S2, and finally finding out the maximum amplitude point in the same way.
6. Categorical comparison
Firstly, simply grouping the heart sound data according to the heart rate, then carrying out comparison experiments by adopting different methods, and when the heart rate is more than 100 times per minute, carrying out comparison analysis by adopting energy values, namely comparing the energy values of S1 and S2; when the heart rate is less than 100 times per minute, an interval method is selected for comparison, namely, the comparison analysis is carried out through the time difference between the diastole and the systole of the heart and the period duration of the interval.
7. S1 and S2 identify
The collected heart sound signals are selected, and effective identification of the S1 and S2 on time domain characteristics can be achieved through the method.
2) Frequency domain feature extraction
The method adopted by the scheme is an improvement and promotion of the Bartlett method, namely, sectional treatment and partial technical sublimation on rectangular windowing are carried out. Compared with the Bartlett method, the Welch method has partial overlap on segments; and the Hanning window or the Hamming window is adopted in the rectangular windowing treatment.
For the convenience of discussion, a set of random signals x (n) and n ∈ R are taken, and the length of the random signals x (n) is L, the random signals x (n) are processed and equally divided into S sections, and each section corresponds to the length of L/S, the ith section of data is taken for rectangular windowing, and we now assume that d (n) is a rectangular window:
Figure BDA0001908653350000121
Figure BDA0001908653350000122
wherein d isj(n) is a Hanning or Hamming window.
3) Energy feature extraction
In the method, the extracted features are energy features, and after the information of each frequency band is obtained, the energy of each reconstructed signal is calculated, namely the square sum of each point. The energy calculation formula of the heart sound is as follows:
Figure BDA0001908653350000123
x (i) in the formula is heart sound acquisition data obtained by wavelet transform and subjected to discretization processing. N in the formula is the total number of sampling points.
And fifthly, identifying the heart sound signals of various diseases based on the machine learning theory of the support vector machine algorithm.
As shown in fig. 5, the steps of constructing machine learning are different for different practical application scenarios, and we must perform specific analysis and interpretation according to practical situations.
A large amount of data was first collected, corresponding to the acquisition of heart sound data in this study, which had been previously completed for a total of about 589 sets of heart sound data. The heart sound data of a large number of symptoms, such as S1 strength and weakness, Faru' S tetrad disease, pulmonary artery stenosis, mitral insufficiency, right ventricular outflow tract stenosis, etc., are included for the convenience of subsequent studies. Firstly, the collected heart sound data is analyzed numerically, namely, the heart sound signal is analyzed based on the characteristics of time domain characteristics and frequency domain characteristics. And then performing data analysis through the characteristic value of the sample. Since the SVMs are all derived from training, it should be noted that the suitability of two parameters, i.e. vector W and constant a, is considered, i.e. the training algorithm. The algorithm is then verified using simple operations. And finally, classifying and identifying the acquired heart sound data by adopting the SVM introduced above.
1) Heart sound signal segmentation
Usually, a plurality of heart sound signals are continuously acquired clinically, and in research, a large amount of data is processed for one period to summarize the rule and find out features. Therefore, the wavelet de-noised signal needs to be segmented, each beat of heart sound is extracted, feature extraction is carried out on each beat of heart sound, and the same feature is found out to be used as a segmentation basis.
Segmenting the heart sound signal firstly needs to carry out envelope processing on the heart sound signal which is subjected to the wavelet threshold denoising preprocessing. In the subject, the envelope method adopted by i is to take the maximum value every 100 points in the preprocessed signals and then connect them to form a curve.
After the envelope curve is obtained, the first non-zero number of each segment is recorded, and the length of each beat of heart sound signal is the difference of the subtraction of two adjacent numbers. Thus, the start point and the end point of each beat in the continuous heart sound signals of a plurality of beats can be known, and the characteristics of each beat can be specifically studied. Thus completing segmentation and feature extraction of the corresponding heart sound signal.
2) Heart sound signal classification and identification
By means of the characteristic parameters extracted from different diseases under the time domain characteristics, the frequency domain characteristics and the energy characteristics and the comparative analysis chart, the heart sounds can be classified and identified more effectively through the combination of the characteristics. Machine learning is now performed by the support vector machine theory above, as machine learning requires a large amount of sample data.
From the foregoing data, it is known that right ventricular outflow tract stenosis has distinct classification features in energy characteristics. Therefore, taking the right ventricular outflow tract stenosis as an example, the analysis introduction of the machine learning method is performed. In order to facilitate subsequent heart sound characteristic analysis, energy values of different frequency bands of the heart sound signals with previous energy characteristics are written into excel and are divided into a learning group and a sample group.
1. Stenosis of right ventricular outflow tract
The deformity of the outflow tract of the right ventricle, which is a common congenital heart disease in pediatric diseases, has the main diagnosis means of cardiovascular contrast examination, and has complex detection means and high cost. The energy characteristics are extracted for identification and classification in the method, and the result is shown in table 1. I.e. the main energy is concentrated in the band 138Hz-275Hz and the proportion is high. From table 1 below, it can be seen that the right ventricular outflow tract stenosis recognition rate is as high as 95.56%.
TABLE 1 Right ventricular outflow tract stenosis identification Rate
Figure BDA0001908653350000141
2. Stenosis of pulmonary artery and mitral insufficiency
Stenosis of pulmonary artery and mitral insufficiency refer to organic lesions caused by injury of pulmonary artery due to various pathogenic factors or congenital dysplasia, and are mainly manifested as stenosis and/or insufficiency of mitral valve orifice. Eventually leading to cardiac insufficiency. In the present subject, time domain features and energy features are extracted and classified, and the results are shown in table 2. Namely, the time ratio of the second heart sound to the diastole in the time domain characteristic and the energy ratio of the first heart sound to the second heart sound in the energy characteristic are selected. It can be seen from the following table 2 that the recognition rate of pulmonary artery stenosis and mitral insufficiency is as high as 90.67%.
TABLE 2 recognition rates of pulmonary stenosis and mitral insufficiency
Figure BDA0001908653350000142
Figure BDA0001908653350000151
3. Faru type tetrad disease
The Faru tetrad disease is caused by pulmonary artery stenosis, ventricular septal defect, aortic straddling, and right ventricular hypertrophy. In this subject, the frequency domain features and the energy features are extracted and classified, and the results are shown in table 3. Namely, the density value of the maximum power spectrum in the frequency domain characteristic, the frequency band where the highest energy is located, and the energy ratio of the first heart sound to the second heart sound in the energy characteristic are selected. From tables 5-6 below, it is clear that the recognition rate of Faru tetrad is as high as 91.67%.
TABLE 3 Faru tetrad recognition rate
Figure BDA0001908653350000152
In the process of collecting the heart sound signals, the heart sound is a biomedical signal and is weak, and in addition, a large amount of noise interference is introduced due to the problems of technology, instruments and the like, so that some of a large amount of various noises mixed in the collected signals can even directly submerge the heart sound signals, and then the signals are possibly partially lost in the transmission process, so that accurate information of the signals cannot be obtained, and the diagnosis is not favorable. Generally, noise interference mixed in the heart sound signal may include power frequency interference, lung sound interference, breath sound interference, interference of white noise, and the like, and before performing specific analysis and diagnosis, we must first perform a noise removal step on the heart sound signal. The heart sound denoising based on the wavelet technology has a good effect in the wavelet decomposition denoising process, and in order to reduce the data processing amount and improve the data running speed, relevant preprocessing, namely down-sampling and power frequency interference elimination, needs to be carried out on the selected data. And then selecting a proper wavelet mother function and the decomposition layer number, selecting a threshold parameter through analysis, performing noise reduction, and finally completing the noise reduction process through signal reconstruction. And then, classifying the heart sounds through a support vector machine theory, extracting various characteristic parameters, and extracting time domain characteristics, frequency domain characteristics, energy characteristics and the like of various diseases in the research to perform comparative analysis. The corresponding characteristics of various cardiovascular diseases are known and summarized and analyzed. Finally, feature extraction is carried out on various diseased heart sound signals, and final classification recognition and intelligent diagnosis can be achieved.
The embodiments of the present invention have been described in detail, but the description is only for the preferred embodiments of the present invention and should not be construed as limiting the scope of the present invention. All equivalent changes and modifications made within the scope of the present invention should be covered by the present patent.

Claims (8)

1. A heart sound signal processing method based on wavelet technology is characterized by comprising the following steps:
1) acquiring a heart sound signal;
2) preprocessing the heart sound signal;
3) selecting a wavelet mother function and a threshold rule based on wavelet denoising;
4) and extracting time domain, frequency domain and energy characteristics of the heart sound signal.
2. The wavelet-technology-based heart sound signal processing method according to claim 1, wherein: the method also comprises a fifth step of: and identifying the heart sound signal based on the support vector machine algorithm.
3. A wavelet-technology-based heart sound signal processing method according to claim 1 or 2, characterized in that: in the first step, the acquired heart sound signals comprise healthy heart sound signals and diseased heart sound signals, and the diseased heart sound signals comprise S1 different strength, pulmonary artery stenosis, mitral insufficiency, right ventricular outflow tract stenosis and Faru tetrad disease.
4. A wavelet-technology-based heart sound signal processing method according to claim 3, characterized in that: in the second step, the collected heart sound signal data is sorted, and the process is as follows:
firstly, adopting an audio file in a wav format for a heart sound signal data format;
secondly, classifying the heart sound signal data into healthy heart sounds, right ventricular outflow tract stenosis (the second intercostal part at the left edge of the sternum), pulmonary artery stenosis, mitral insufficiency (the anterior axillary line) and Fabry-Perot tetranectasis (the third intercostal part at the left edge of the sternum);
thirdly, carrying out data processing on the acquired heart sound signals by adopting two channels, wherein single-channel data is obtained by copying audio data in a single channel to obtain two-channel data for subsequent processing;
and finally, reducing the sampling frequency of the heart sound signal to 2205Hz, and then removing power frequency interference by a wave trap filtering method.
5. The wavelet-technology-based heart sound signal processing method according to claim 4, wherein: in step three, the process of denoising the heart sound signal based on the wavelet technology is as follows:
1) determining the number of decomposition layers
Before wavelet transformation, according to the characteristics of the heart sound signals, the signal-noise characteristics of the heart sound signals can be effectively classified and identified through three-layer decomposition, and preparation is made for subsequent wavelet transformation;
and 3, carrying out 3-layer decomposition on the sampled heart sound signals:
frequency range of approximation coefficient AAA 3: 0-138 Hz;
frequency range of detail coefficient DAA 3: 138-275 Hz;
frequency range of detail coefficient ADA 3: 275-413 Hz;
frequency range of detail coefficient DDA 3: 413-551 Hz;
frequency range of detail coefficient D1: 551-1102 Hz;
2) determining mother functions of wavelets
Respectively analyzing energy values contained in different levels of Haar wavelets, Daubechies, Symlets and Coiflets, selecting 5 heart sound signals in a database for analysis, and obtaining the maximum energy variance and the maximum energy variance of the Coif5 corresponding to each level, so that the characteristic variance of the Coif5 is maximum, the energy values of the levels can be effectively distinguished, and selecting the Coif5 wavelets as wavelet mother functions for subsequent processing analysis;
3) performing thresholding denoising processing
The soft threshold adopted by the method is that the wavelet coefficient in the signal is processed by taking the absolute value, then the absolute value is compared with the manually set threshold, and if the absolute value is less than or equal to the threshold point, the final value is taken as 0; if the difference value is larger than the threshold value point, the value is the difference value between the point and the threshold value point;
t is chosen as a given threshold, and for the soft threshold, there are
Figure FDA0001908653340000021
4) Determining threshold selection rules
a. The Sqtwolog rule is a general threshold value, a signal is set as f (T) which contains partial noise components, and decomposition processing is carried out on a scale of 1-m (1 < m < J), and then the general threshold value T is1Comprises the following steps:
Figure FDA0001908653340000022
wherein n is the sum of the number of wavelet coefficients of each level obtained by wavelet decomposition, and σ is the standard deviation of the noise-mixed signal;
b. the Rigrsure rule is a Stein unbiased risk threshold, and the specific selection rule is as follows: and setting W as a known vector, wherein elements contained in the vector are squares of all wavelet coefficients obtained after decomposition, and finally arranging the wavelet coefficients according to the numerical value from large to small, wherein n is the number of the wavelet coefficients. And setting a risk vector R, wherein the elements are as follows:
Figure FDA0001908653340000031
then the threshold value T2The corresponding formula is:
Figure FDA0001908653340000032
wherein ω isbIs riWhen the minimum value is taken, b is equal to i;
C. the Heursure rule is a combination of two threshold methods, namely Sqtwolog rule and Rigrsure rule, combines the characteristics of the two thresholds, and is therefore theoretically the optimal threshold selection rule. When the signal-to-noise ratio is very small, the fixed threshold value selection rule is very suitable to be adopted; when the signal-to-noise ratio is larger, a Rigrsure criterion is adopted;
let W be the sum of the squares of the corresponding values of the n wavelet coefficients, and let the variance be σ mindle (W)1,k,0≤k≤2J-1-1)/0.6745, so threshold T3The selection rule is as follows:
Figure FDA0001908653340000033
Figure FDA0001908653340000034
and finally, selecting a noise reduction method based on a Heursure threshold value selection rule to prepare for subsequent heart sound segmentation and classification identification.
6. The wavelet-technology-based heart sound signal processing method according to claim 1, wherein: in step four, the time domain feature extraction steps are as follows:
1) setting a threshold value
Setting a threshold value required by the envelope of the heart sound signal, obtaining an average value x through operation according to the signal after the envelope is extracted, then setting a corresponding adjusting coefficient as a, and selecting a formula of the threshold value as y ═ a · x, wherein when a ═ 0.8, the formula is an optimal solution, and the optimal threshold value can be obtained;
2) flying wing removal
Setting n to 400, namely, taking the first data smaller than the threshold point from 400 as the starting point of the data;
3) determining a differential threshold
Extracting a part of data from the collected heart sound data to be used as a learning group, and performing machine learning on the learning group; the machine learning method is to read the heart sound data with the time length of 5 seconds and calculate the maximum 10 difference values. Then, the maximum value and the minimum value contained in the signal are removed to avoid mixing spike noise in the signal; finally, extracting a polynomial of which the coefficient is zero from the remaining 8 difference values by adopting a square approximation method, setting the polynomial as a standard value required by people to eliminate random errors, and then taking 0.3 of the value as a standard detection threshold value X;
4) determining positive and negative differential pairs
The positive difference is represented as the rising edge of the heart sound waveform, and the negative difference is represented as the falling edge of the heart sound waveform; firstly, a correct positive differential pair is used as a starting point to start inquiring, then a first negative differential occurs and is marked, and then a first positive differential occurs and is marked; the positive difference and the negative difference just marked are a positive and negative difference pair;
5) marking possible values
Analyzing and identifying according to the positive and negative difference pairs found out before, and marking possible first heart sound S1 and second heart sound S2, namely determining a threshold value according to the time domain characteristics of the heart sound signals, and marking possible positive and negative difference pairs according to the determined threshold value range, namely the rising edge and the falling edge of S1 and S2, and finally finding out the maximum amplitude point in the same way;
6) categorical comparison
Grouping the heart sound data according to the heart rate, then carrying out a comparison experiment, and when the heart rate is more than 100 times/minute, carrying out comparison analysis by adopting an energy value, namely comparing the energy values of the time domain characteristics S1 and S2; when the heart rate is less than 100 times per minute, an interval method is selected for comparison, namely, the comparison analysis is carried out through the time difference between the diastole and the systole of the heart and the period duration of the diastole and the systole;
7) time domain features S1 and S2 identify
The collected heart sound signals are selected, and effective identification of the time domain characteristics of S1 and S2 can be achieved through the method.
7. The wavelet-technology-based heart sound signal processing method according to claim 1, wherein: in the fourth step, the frequency domain feature extraction step is as follows:
taking a group of random signals x (n) and n ∈ R, wherein the length of the random signals is L, processing the group of random signals x (n) to averagely divide the random signals into S sections, and taking the ith section of data corresponding to each section with the length of L/S for rectangular windowing, and setting d (n) as a rectangular window:
Figure FDA0001908653340000051
Figure FDA0001908653340000052
wherein d isj(n) is a hanning window or a hamming window;
further, in step four, the energy feature extraction step is as follows:
the energy calculation formula of the heart sound is as follows:
Figure FDA0001908653340000053
and X (i) in the formula is heart sound acquisition data which is obtained through wavelet transformation and subjected to discretization processing, and N in the formula is the total number of sampling points.
8. The wavelet-technology-based heart sound signal processing method according to claim 2, wherein: in the fifth step, aiming at different practical application scenes, machine learning is constructed:
firstly, carrying out numerical analysis on collected heart sound data, namely carrying out characteristic analysis on a heart sound signal based on time domain characteristics and frequency domain characteristics; then carrying out data analysis through the characteristic values of the data; meanwhile, the suitability of two parameters, namely a vector W and a constant a, is considered, namely an algorithm is trained; then, the algorithm is verified by applying simple operation; finally, classification and identification can be carried out on the collected heart sound data by adopting an SVM;
1) heart sound signal segmentation
Segmenting the signal subjected to wavelet denoising, extracting each beat of heart sound, performing feature extraction on each beat of heart sound, and finding out the same feature as a segmentation basis;
segmenting a heart sound signal, namely performing envelope processing on the heart sound signal which is subjected to wavelet threshold denoising pretreatment; the envelope method adopted by the method is that in the preprocessed signals, the maximum values are taken at intervals of 100 points, and then the maximum values are connected to form a curve;
after an envelope curve is obtained, recording a first non-zero number of each section, wherein the length of each beat of heart sound signal is the difference of the subtraction of two adjacent numbers; therefore, the starting point and the end point of each beat in the continuous heart sound signals of a plurality of beats can be known, and the characteristics of each beat can be specifically researched; completing segmentation and feature extraction of corresponding heart sound signals;
2) heart sound signal classification and identification
In order to facilitate subsequent heart sound characteristic analysis, energy values of different frequency bands of the heart sound signals with previous energy characteristics are written into excel and are divided into a learning group and a sample group.
CN201811542958.8A 2018-12-17 2018-12-17 Heart sound signal processing method based on wavelet technology Pending CN111317499A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811542958.8A CN111317499A (en) 2018-12-17 2018-12-17 Heart sound signal processing method based on wavelet technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811542958.8A CN111317499A (en) 2018-12-17 2018-12-17 Heart sound signal processing method based on wavelet technology

Publications (1)

Publication Number Publication Date
CN111317499A true CN111317499A (en) 2020-06-23

Family

ID=71163173

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811542958.8A Pending CN111317499A (en) 2018-12-17 2018-12-17 Heart sound signal processing method based on wavelet technology

Country Status (1)

Country Link
CN (1) CN111317499A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111863021A (en) * 2020-07-21 2020-10-30 上海宜硕网络科技有限公司 Method, system and equipment for recognizing breath sound data
CN111863035A (en) * 2020-07-21 2020-10-30 上海宜硕网络科技有限公司 Method, system and equipment for recognizing heart sound data
CN112336369A (en) * 2020-11-30 2021-02-09 山东大学 Coronary heart disease risk index evaluation system of multichannel heart sound signals
CN112767970A (en) * 2021-01-22 2021-05-07 广州联智信息科技有限公司 Abnormal lung sound detection method and system
CN113066502A (en) * 2021-03-11 2021-07-02 电子科技大学 Heart sound segmentation positioning method based on VMD and multi-wavelet

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102302373A (en) * 2011-06-30 2012-01-04 重庆大学 Method for detecting heart sound signal feature points based on multiplexing multi-resolution wavelet transformation
CN110991254A (en) * 2019-11-08 2020-04-10 深圳大学 Ultrasound image video classification prediction method and system
CN113116377A (en) * 2019-12-31 2021-07-16 无锡祥生医疗科技股份有限公司 Ultrasonic imaging navigation method, ultrasonic device and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102302373A (en) * 2011-06-30 2012-01-04 重庆大学 Method for detecting heart sound signal feature points based on multiplexing multi-resolution wavelet transformation
CN110991254A (en) * 2019-11-08 2020-04-10 深圳大学 Ultrasound image video classification prediction method and system
CN113116377A (en) * 2019-12-31 2021-07-16 无锡祥生医疗科技股份有限公司 Ultrasonic imaging navigation method, ultrasonic device and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
姜博畅: "基于小波技术的心音信号特征提取", 《中国优秀博硕士学位论文全文数据库(硕士)医药卫生科技辑》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111863021A (en) * 2020-07-21 2020-10-30 上海宜硕网络科技有限公司 Method, system and equipment for recognizing breath sound data
CN111863035A (en) * 2020-07-21 2020-10-30 上海宜硕网络科技有限公司 Method, system and equipment for recognizing heart sound data
CN112336369A (en) * 2020-11-30 2021-02-09 山东大学 Coronary heart disease risk index evaluation system of multichannel heart sound signals
CN112767970A (en) * 2021-01-22 2021-05-07 广州联智信息科技有限公司 Abnormal lung sound detection method and system
CN113066502A (en) * 2021-03-11 2021-07-02 电子科技大学 Heart sound segmentation positioning method based on VMD and multi-wavelet
CN113066502B (en) * 2021-03-11 2022-07-26 电子科技大学 Heart sound segmentation positioning method based on VMD and multi-wavelet

Similar Documents

Publication Publication Date Title
CN111317499A (en) Heart sound signal processing method based on wavelet technology
CN109907752B (en) Electrocardiogram diagnosis and monitoring system for removing motion artifact interference and electrocardio characteristic detection
Merah et al. R-peaks detection based on stationary wavelet transform
Naseri et al. Detection and boundary identification of phonocardiogram sounds using an expert frequency-energy based metric
Abibullaev et al. A new QRS detection method using wavelets and artificial neural networks
CN110477906B (en) Electrocardiosignal QRS wave start and stop point positioning method
Haghighi-Mood et al. A sub-band energy tracking algorithm for heart sound segmentation
Daqrouq et al. Neural network and wavelet average framing percentage energy for atrial fibrillation classification
Sedighian et al. Pediatric heart sound segmentation using Hidden Markov Model
Pretorius et al. Development of a pediatric cardiac computer aided auscultation decision support system
CN108647584B (en) Arrhythmia identification and classification method based on sparse representation and neural network
Prashar et al. Semiautomatic detection of cardiac diseases employing dual tree complex wavelet transform
CN113796889A (en) Auxiliary electronic stethoscope signal discrimination method based on deep learning
Lahmiri et al. Complexity measures of high oscillations in phonocardiogram as biomarkers to distinguish between normal heart sound and pathological murmur
Gavrovska et al. Identification of S1 and S2 heart sound patterns based on fractal theory and shape context
Zhong et al. Heart murmur recognition based on hidden Markov model
Li et al. A novel abnormal ECG beats detection method
CN111528900A (en) Heart sound segmentation method and device based on Butterworth filter and Shannon entropy method
Daqrouq et al. Wavelet based method for congestive heart failure recognition by three confirmation functions
CN108836316B (en) Electrocardiosignal R wave extraction method based on BP neural network
CN114580477B (en) Wearable dynamic respiratory rate estimation system based on multi-time sequence fusion
Gad Feature extraction of electrocardiogram signals using discrete sinc transform
CN113449636B (en) Automatic aortic valve stenosis severity classification method based on artificial intelligence
Biran et al. Automatic qrs detection and segmentation using short time fourier transform and feature fusion
Agrawal et al. Wavelet subband dependent thresholding for denoising of phonocardiographic signals

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200623

RJ01 Rejection of invention patent application after publication