Method, device, electronic device and readable storage medium for processing heart sound signals
Through multi-step processing methods, including denoising, gain, deinterference and labeling processing, the problem of noise interference acquisition of heart sound signals is solved, and the analysis accuracy of heart sound signals is improved.
Patent Information
- Application Number
- CN202011475901.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-14
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2040-12-14
AI Technical Summary
During the acquisition process, heart sound signals are easily affected by the acquisition environment and equipment, resulting in noise interference and reducing the accuracy of signal identification and classification.
Multi-step processing methods are adopted, including primary denoising processing, loudness gain amplification, deinterference processing and labeling processing. By adjusting the sampling frequency, filtering, using noise reduction models and autocorrelation functions, the noise is gradually filtered out and the target heart sound signal is extracted. .
Effectively reduce the interference components in the heart sound signal, improve the accuracy of the analysis results, and make the heart sound signal clearer, suitable for subsequent detailed analysis.
Smart Images

Figure CN112614503B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of signal processing technology, and in particular to a method, device, electronic device and readable storage medium for processing heart sound signals. Background Art
[0002] Heart sound signal is a relatively weak biological signal. Heart sound sensor has high sensitivity. It will inevitably be affected by the collection environment and equipment during the collection process. For example, the friction sound between the sensor and the test subject, the breathing sound and lung sound interference of the human body, power frequency interference and external environmental noise. The presence of noise will cause certain interference to the positioning segmentation, envelope extraction and feature value extraction of heart sound signal, and reduce the accuracy of heart sound recognition and classification. Therefore, how to effectively filter out the noise in heart sound signal has become an urgent problem to be solved. Summary of the invention
[0003] In view of this, the purpose of the present application is to provide a method, device, electronic device and readable storage medium for processing heart sound signals, which can effectively filter out noise in heart sound signals, help reduce interference components in heart sound signals, and further improve the accuracy of analysis results when analyzing heart sound signals later.
[0004] The present application provides a method for processing a heart sound signal, the method comprising:
[0005] Performing primary denoising processing on the collected initial heart sound signal to obtain a denoised heart sound signal;
[0006] performing gain amplification processing on the denoised heart sound signal according to a plurality of loudness gain weights corresponding to the denoised heart sound signal to obtain an amplified heart sound signal;
[0007] performing interference removal processing on the amplified heart sound signal to obtain an interference-free heart sound signal;
[0008] The interference-free heart sound signal is labeled to obtain a target heart sound signal corresponding to the initial heart sound signal.
[0009] Furthermore, the performing primary denoising processing on the collected initial heart sound signal to obtain the denoised heart sound signal includes:
[0010] Adjusting the sampling frequency of the initial heart sound signal to the processing sampling frequency to obtain an adjusted initial heart sound signal;
[0011] Performing filtering processing on the adjusted initial heart sound signal, and determining a normal heart sound signal whose vibration frequency is within the heart sound vibration frequency range from the adjusted initial heart sound signal;
[0012] The normal heart sound signal is input into the trained denoising model to obtain a denoised heart sound signal.
[0013] Furthermore, filtering the adjusted initial heart sound signal to determine a normal heart sound signal whose vibration frequency is within the heart sound vibration frequency range from the adjusted initial heart sound signal includes:
[0014] Performing band-stop filtering on the adjusted initial heart sound signal to separate the power frequency noise signal from the adjusted initial heart sound signal to obtain a valid heart sound signal;
[0015] The effective heart sound signal is subjected to bandpass filtering, and a normal heart sound signal whose vibration frequency is within the heart sound vibration frequency range is determined from the effective heart sound signal.
[0016] Furthermore, the step of performing gain amplification processing on the denoised heart sound signal according to a plurality of loudness gain weights corresponding to the denoised heart sound signal to obtain an amplified heart sound signal includes:
[0017] For each frame of the denoised heart sound signal, determine a loudness gain factor corresponding to each signal frequency in the frame of the denoised heart sound signal;
[0018] Based on the mapping relationship between the loudness gain factor and the equal loudness curve, determining the loudness gain weight corresponding to each signal frequency;
[0019] Based on the loudness gain weight corresponding to each signal frequency in each frame of the denoised heart sound signal, the denoised heart sound signal is subjected to gain amplification processing to obtain an amplified heart sound signal.
[0020] Furthermore, the amplified heart sound signal is subjected to interference removal processing to obtain an interference-free heart sound signal, including:
[0021] Cutting out a heart sound signal segment within a preset time range from the amplified heart sound signal;
[0022] Extracting candidate fundamental frequency signals whose fundamental frequency in the heart sound signal segment is within a preset fundamental frequency range;
[0023] The candidate baseband signal is smoothed to obtain an interference-free heart sound signal.
[0024] Furthermore, extracting the candidate fundamental frequency signal whose fundamental frequency in the heart sound signal segment is within a preset fundamental frequency range includes:
[0025] Determining a plurality of signal periods from the heart sound signal segments by using an autocorrelation function;
[0026] For each signal period, determining the fundamental frequency corresponding to the sub-heart sound signal to which the signal period belongs;
[0027] When the fundamental frequency is within the preset fundamental frequency range, the sub-heart sound signal corresponding to the fundamental frequency is determined as a candidate fundamental frequency signal.
[0028] Furthermore, the labeling process of the interference-free heart sound signal to obtain a target heart sound signal corresponding to the initial heart sound signal includes:
[0029] Determining a heart sound signal envelope corresponding to the interference-free heart sound signal;
[0030] Based on the heart sound signal envelope, determining position information of a first heart sound signal and position information of a second heart sound signal from the interference-free heart sound signal;
[0031] Marking the interference-free heart sound signal based on the position information of the first heart sound signal and the position information of the second heart sound signal to obtain a heart sound signal to be processed;
[0032] The sampling frequency of the heart sound signal to be processed is reduced to obtain a target heart sound signal corresponding to the initial heart sound signal.
[0033] The embodiment of the present application further provides a heart sound signal processing device, the processing device comprising:
[0034] A denoising module is used to perform primary denoising processing on the collected initial heart sound signal to obtain a denoised heart sound signal;
[0035] A gain module, configured to perform gain amplification processing on the denoised heart sound signal according to a plurality of loudness gain weights corresponding to the denoised heart sound signal, to obtain an amplified heart sound signal;
[0036] A processing module, used for performing interference removal processing on the amplified heart sound signal to obtain an interference-free heart sound signal;
[0037] The labeling module is used to label the interference-free heart sound signal to obtain a target heart sound signal corresponding to the initial heart sound signal.
[0038] Furthermore, when the denoising module is used to perform primary denoising processing on the collected initial heart sound signal to obtain the denoised heart sound signal, the denoising module is used to:
[0039] Adjusting the sampling frequency of the initial heart sound signal to the processing sampling frequency to obtain an adjusted initial heart sound signal;
[0040] Performing filtering processing on the adjusted initial heart sound signal, and determining a normal heart sound signal whose vibration frequency is within the heart sound vibration frequency range from the adjusted initial heart sound signal;
[0041] The normal heart sound signal is input into the trained denoising model to obtain a denoised heart sound signal.
[0042] Furthermore, when the denoising module is used to filter the adjusted initial heart sound signal and determine a normal heart sound signal whose vibration frequency is within the heart sound vibration frequency range from the adjusted initial heart sound signal, the denoising module is used to:
[0043] Performing band-stop filtering on the adjusted initial heart sound signal to separate the power frequency noise signal from the adjusted initial heart sound signal to obtain a valid heart sound signal;
[0044] The effective heart sound signal is subjected to bandpass filtering, and a normal heart sound signal whose vibration frequency is within the heart sound vibration frequency range is determined from the effective heart sound signal.
[0045] Furthermore, when the gain module is used to perform gain amplification processing on the denoised heart sound signal according to a plurality of loudness gain weights corresponding to the denoised heart sound signal to obtain an amplified heart sound signal, the gain module is used to:
[0046] For each frame of the denoised heart sound signal, determine a loudness gain factor corresponding to each signal frequency in the frame of the denoised heart sound signal;
[0047] Based on the mapping relationship between the loudness gain factor and the equal loudness curve, determining the loudness gain weight corresponding to each signal frequency;
[0048] Based on the loudness gain weight corresponding to each signal frequency in each frame of the denoised heart sound signal, the denoised heart sound signal is subjected to gain amplification processing to obtain an amplified heart sound signal.
[0049] Furthermore, when the processing module is used to perform interference removal processing on the amplified heart sound signal to obtain an interference-free heart sound signal, the processing module is used to:
[0050] Cutting out a heart sound signal segment within a preset time range from the amplified heart sound signal;
[0051] Extracting candidate fundamental frequency signals whose fundamental frequency in the heart sound signal segment is within a preset fundamental frequency range;
[0052] The candidate baseband signal is smoothed to obtain an interference-free heart sound signal.
[0053] Furthermore, when the processing module is used to extract the candidate fundamental frequency signal whose fundamental frequency in the heart sound signal segment is within a preset fundamental frequency range, the processing module is used to:
[0054] Determining a plurality of signal periods from the heart sound signal segments by using an autocorrelation function;
[0055] For each signal period, determining the fundamental frequency corresponding to the sub-heart sound signal to which the signal period belongs;
[0056] When the fundamental frequency is within the preset fundamental frequency range, the sub-heart sound signal corresponding to the fundamental frequency is determined as a candidate fundamental frequency signal.
[0057] Furthermore, when the labeling module is used to label the interference-free heart sound signal to obtain the target heart sound signal corresponding to the initial heart sound signal, the labeling module is used to:
[0058] Determining a heart sound signal envelope corresponding to the interference-free heart sound signal;
[0059] Based on the heart sound signal envelope, determining position information of a first heart sound signal and position information of a second heart sound signal from the interference-free heart sound signal;
[0060] Marking the interference-free heart sound signal based on the position information of the first heart sound signal and the position information of the second heart sound signal to obtain a heart sound signal to be processed;
[0061] The sampling frequency of the heart sound signal to be processed is reduced to obtain a target heart sound signal corresponding to the initial heart sound signal.
[0062] An embodiment of the present application also provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the steps of the method for processing heart sound signals as described above are performed.
[0063] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method for processing heart sound signals as described above are executed.
[0064] In this way, the present application obtains a normal heart sound signal whose vibration frequency is within the heart sound vibration range by performing primary denoising processing on the collected initial heart sound signal; according to the multiple loudness gain weights corresponding to the obtained denoised heart sound signal, the denoised heart sound signal is gain amplified to obtain an amplified heart sound signal after amplification, so that the loudness gain of the frequency of the heart sound signal is basically the same; the amplified heart sound signal after amplification is again subjected to interference denoising processing to obtain an interference-free heart sound signal; finally, the obtained interference-free heart sound signal is labeled to obtain a target heart sound signal that can be used for subsequent analysis, thereby effectively filtering out the noise in the heart sound signal, helping to reduce the interference components in the heart sound signal, and further, can improve the accuracy of the analysis results when the heart sound signal is analyzed later.
[0065] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0067] Figure 1 A flowchart of a method for processing heart sound signals provided in an embodiment of the present application;
[0068] Figure 2 A flowchart of another method for processing heart sound signals provided in an embodiment of the present application;
[0069] Figure 3 A schematic diagram of the structure of a heart sound signal processing device provided in an embodiment of the present application;
[0070] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0071] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application usually described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, each other embodiment obtained by those skilled in the art without making creative work belongs to the scope of protection of the present application.
[0072] First, the application scenarios to which the present application is applicable are introduced. The present application can be applied to the field of signal processing technology. Before analyzing the heart sound signal, the heart sound signal is denoised. First, the collected heart sound signal is subjected to primary denoising to obtain a normal heart sound signal whose vibration frequency is within the heart sound vibration range after denoising; according to the multiple loudness gain weights corresponding to the obtained denoised heart sound signal, the denoised heart sound signal is gain-amplified to obtain an amplified heart sound signal; the amplified heart sound signal is again subjected to interference denoising to obtain an interference-free heart sound signal; the obtained interference-free heart sound signal is labeled to obtain a target heart sound signal that can be used for subsequent analysis. In this way, by processing the acquired initial heart sound signal, the noise in the heart sound signal can be effectively filtered out, which helps to reduce the interference components in the heart sound signal, and further, the accuracy of the analysis results when the heart sound signal is analyzed later can be improved.
[0073] Research has found that at present, the process of collecting heart sound signals will inevitably be affected by the collection environment and collection equipment. For example, the friction sound between the sensor and the test subject, the human body's own breathing sound, lung sound interference, power frequency interference and external environmental noise. The presence of noise will cause certain interference to the positioning segmentation, envelope extraction and feature value extraction of heart sound signals, reducing the accuracy of heart sound recognition and classification. Therefore, how to effectively filter out the noise in the heart sound signal has become an urgent problem to be solved.
[0074] Based on this, an embodiment of the present application provides a method for processing a heart sound signal, which can filter out noise in the heart sound signal and reduce interference components in the heart sound signal that interfere with subsequent heart sound signal analysis.
[0075] See also Figure 1 , Figure 1 Flow chart of a method for processing heart sound signals provided in an embodiment of the present application. Figure 1 As shown in , the method for processing heart sound signals provided in the embodiment of the present application includes:
[0076] S101 , performing primary denoising processing on the collected initial heart sound signal to obtain a denoised heart sound signal.
[0077] In this step, since the collected initial heart sound signal includes noise signals and interference signals, etc., in the later process of analyzing the heart sound signal, the above signals will affect the analysis results of the heart sound signal. Therefore, before analyzing the heart sound signal, the collected initial heart sound signal needs to be preprocessed to filter out the noise signals and interference signals, etc. in the initial heart sound signal.
[0078] Here, in order to remove unnecessary signals in the initial heart sound signal to the greatest extent, first, the collected initial heart sound signal is subjected to primary denoising processing to filter out the noise signal in the initial heart sound signal and obtain the denoised heart sound signal after denoising.
[0079] Among them, the noise signal in the heart sound signal is mainly generated by the signal acquisition system itself and the acquisition environment, so the initial heart sound signal collected will contain noise signals other than the heart sound signal. Common noises in the acquisition process include: a) audio noise in the surrounding environment; b) instrument noise of the acquisition equipment; c) other noises generated inside the human body.
[0080] S102: Perform gain amplification processing on the denoised heart sound signal according to a plurality of loudness gain weights corresponding to the denoised heart sound signal to obtain an amplified heart sound signal.
[0081] In this step, the heart sound signal is a relatively weak biological signal, and doctors need to make judgments based on the heart sounds when auscultating. Therefore, in order to make the heart sound signal clearer, the automatic gain control (AGC) processing technology in speech signal processing can be used to adjust the acquired heart sound signal according to the loudness of the speech.
[0082] However, since human hearing is nonlinear in perceiving each frequency, for a heart sound signal, the loudness gain weights corresponding to different frequencies are also different, and what needs to be followed is the equal loudness curve corresponding to the heart sound signal.
[0083] In this way, the loudness gain of each frequency can be made substantially the same, that is, the loudness of each frame of denoised heart sound signal sounds stable and does not fluctuate.
[0084] S103: performing interference removal processing on the amplified heart sound signal to obtain an interference-free heart sound signal.
[0085] In this step, after obtaining the amplified heart sound signal, in order to further reduce the interference existing in the analysis of the heart sound signal, it is necessary to perform interference removal processing on the amplified heart sound signal to filter out the interference signal in the heart sound signal and obtain the interference-free heart sound signal.
[0086] In this way, it can be further ensured that in the process of analyzing the heart sound signal, the analysis result will not be inaccurate due to the existence of interference signals.
[0087] S104: perform labeling processing on the interference-free heart sound signal to obtain a target heart sound signal corresponding to the initial heart sound signal.
[0088] In this step, after obtaining the interference-free heart sound signal, the obtained interference-free heart sound signal can be marked, that is, the first heart sound position and the second heart sound position, etc. are determined from the interference-free heart sound signal, so as to obtain a target heart sound signal that can be used for subsequent analysis.
[0089] In this way, the present application obtains a normal heart sound signal whose vibration frequency is within the heart sound vibration range by performing primary denoising on the collected initial heart sound signal; according to the multiple loudness gain weights corresponding to the obtained denoised heart sound signal, the denoised heart sound signal is gain-amplified to obtain an amplified heart sound signal, so that the frequency of the heart sound signal is within the optimal auditory frequency range in the human auditory range; the amplified heart sound signal is again denoised to obtain an interference-free heart sound signal; finally, the obtained interference-free heart sound signal is labeled to obtain a target heart sound signal that can be used for subsequent analysis, thereby effectively filtering out the noise in the heart sound signal, helping to reduce the interference components in the heart sound signal, and further, improving the accuracy of the analysis results when the heart sound signal is analyzed later.
[0090] See also Figure 2 , Figure 2 This is a flow chart of another method for processing heart sound signals provided in an embodiment of the present application. Figure 2 As shown in , the method for processing heart sound signals provided in the embodiment of the present application includes:
[0091] S201. Adjust the sampling frequency of the initial heart sound signal to a processing sampling frequency to obtain an adjusted initial heart sound signal.
[0092] In this step, the vibration frequency range of normal heart sounds is usually around 20Hz to 400Hz, the frequency of heart murmurs is generally no more than 800Hz, and the sampling frequency of the initial heart sound signal collected by the heart sound collection device is usually 4000Hz. Therefore, in this narrowband case, in order to obtain more information in the heart sound signal spectrum and facilitate subsequent processing of the heart sound signal, first, the collected initial heart sound signal needs to be upsampled, that is, the sampling frequency of the collected initial heart sound signal is adjusted to a processing sampling frequency that can be used for signal processing, that is, the initial heart sound signal with an original sampling frequency of 4000Hz is upsampled to 8000Hz.
[0093] S202: Filter the adjusted initial heart sound signal, and determine a normal heart sound signal whose vibration frequency is within a heart sound vibration frequency range from the adjusted initial heart sound signal.
[0094] In this step, the frequency of the heart murmur signal (low-frequency noise signal) is usually different from the vibration frequency of the heart sound. Therefore, the noise signal in the initial heart sound signal can be filtered out according to the vibration frequency of the heart sound signal, and the initial heart sound signal after upsampling adjustment is filtered. The normal heart sound signal whose vibration frequency is within the heart sound vibration frequency range is determined from the adjusted initial heart sound signal, that is, the heart murmur signal (low-frequency noise signal) is filtered out from the adjusted initial heart sound signal.
[0095] S203: Input the normal heart sound signal into a trained noise reduction model to obtain a denoised heart sound signal.
[0096] In this step, after the initial heart sound signal after upsampling is filtered to obtain a normal heart sound signal, in order to further eliminate the mixed noise signal in the initial heart sound signal whose vibration frequency is within the heart sound vibration frequency range, the obtained normal heart sound signal is input into a pre-trained noise reduction model to obtain a denoised heart sound signal after denoising.
[0097] Here, the denoising model is trained by the following steps:
[0098] Step 1: Acquire multiple sample heart sound signals and a sample denoised signal corresponding to each sample heart sound signal.
[0099] Step 2: Adjust the sampling frequency of each sample heart sound signal to the processing sampling frequency to obtain an adjusted sample heart sound signal.
[0100] Step 3: Filter the adjusted sample heart sound signals, and determine normal sample signals whose vibration frequencies are within the heart sound vibration frequency range from the adjusted sample heart sound signals.
[0101] Step 4: Take the normal sample signal corresponding to each sample heart sound signal as the input feature, take the sample denoised signal corresponding to each sample heart sound signal as the output feature, train the constructed recurrent neural network, and obtain the trained denoising model.
[0102] Among them, recurrent neural networks make it possible to model time series, rather than just considering input and output frames in isolation. Recurrent neural networks are very suitable for processing data that conforms to time series. For example, voice data or heart sound signals are all data related to time series. Since it takes time to obtain a better noise estimate, this feature of recurrent neural networks is very important for noise suppression. The use of gated recurrent units (GRU) can remember information for a longer period of time and solve the problem of inefficiency in back-propagation gradient descent. By using learning parameters, the neural network can learn to fine-tune the parts that are difficult to tune, such as the noise estimator, which makes up for the cumbersome parameter adjustment problem in the usual signal noise reduction processing.
[0103] S204 . Perform gain amplification processing on the denoised heart sound signal according to a plurality of loudness gain weights corresponding to the denoised heart sound signal to obtain an amplified heart sound signal.
[0104] S205, performing interference removal processing on the amplified heart sound signal to obtain an interference-free heart sound signal;
[0105] S206: perform labeling processing on the interference-free heart sound signal to obtain a target heart sound signal corresponding to the initial heart sound signal.
[0106] Among them, the description of S204 to S206 can refer to the description of S102 to S104, and can achieve the same technical effect, which is not repeated here.
[0107] Furthermore, step S202 includes: performing band-stop filtering on the adjusted initial heart sound signal, separating the industrial frequency noise signal from the adjusted initial heart sound signal, and obtaining a valid heart sound signal; performing bandpass filtering on the valid heart sound signal, and determining a normal heart sound signal whose vibration frequency is within the heart sound vibration frequency range from the valid heart sound signal.
[0108] In this step, the adjusted initial heart sound signal is subjected to band-stop filtering, and the power frequency noise signal is separated from the adjusted initial heart sound signal to obtain a valid heart sound signal. Here, since the power frequency noise signal is usually a noise signal of a fixed frequency, the power frequency noise signal can be separated from the adjusted initial heart sound signal by band-stop filtering to obtain a valid heart sound signal.
[0109] After obtaining the valid heart sound signal, the valid heart sound signal is subjected to bandpass filtering, and a normal heart sound signal whose vibration frequency is within the heart sound vibration range is determined from the valid heart sound signal. Here, since the vibration range of the normal heart sound signal is generally between 20 Hz and 400 Hz, the valid heart sound signal can be subjected to bandpass filtering through a window-sinc filter to obtain a normal heart sound signal whose vibration frequency is between 20 Hz and 400 Hz.
[0110] Furthermore, step S203 includes: determining, for each frame of denoised heart sound signal in the denoised heart sound signal, a loudness gain factor corresponding to each signal frequency in the frame of denoised heart sound signal; determining a loudness gain weight corresponding to each signal frequency based on a mapping relationship between the loudness gain factor and an equal loudness curve; and performing gain amplification processing on the denoised heart sound signal based on the loudness gain weight corresponding to each signal frequency in each frame of denoised heart sound signal to obtain an amplified heart sound signal.
[0111] In this step, for a denoised heart sound signal, it is composed of multiple frames of denoised heart sound signals, and each frame of the denoised heart sound signal includes multiple signal frequencies. Therefore, in order to make each signal frequency in each frame of the denoised heart sound signal in a section of the denoised heart sound signal be within the best auditory frequency range in the human auditory range, it is necessary to amplify this section of the denoised heart sound signal according to each signal frequency, specifically:
[0112] For each frame of denoised heart sound signal in the denoised heart sound signal, multiple signal sampling points of the frame of denoised heart sound signal are determined, and based on the determined multiple signal sampling points, multiple signal frequencies corresponding to the frame of denoised heart sound signal are determined, and then, the loudness gain factor corresponding to each signal frequency is determined through interpolation and fitting methods; according to the mapping relationship between the loudness gain factor and the equal loudness curve, the loudness gain weight corresponding to the signal sampling point is determined; finally, based on the loudness gain weight corresponding to each signal sampling point in each frame of denoised heart sound signal, the entire denoised heart sound signal is gain amplified to obtain an amplified heart sound signal.
[0113] Among them, multiple signal frequencies corresponding to the frame of denoised heart sound signal can be determined according to multiple continuous signal sampling points among the multiple signal sampling points. For example, multiple signal sampling points "signal sampling point 1", "signal sampling point 2", "signal sampling point 3", "signal sampling point 4", "signal sampling point 5" and "signal sampling point 6" are arranged in sequence. The "signal frequency A" in the frame of denoised heart sound signal can be determined based on "signal sampling point 1", "signal sampling point 2" and "signal sampling point 3", and the "signal frequency B" in the frame of denoised heart sound signal can be determined based on "signal sampling point 4", "signal sampling point 5" and "signal sampling point 6".
[0114] Here, each signal frequency in the denoised heart sound signal is comprehensively considered, and the denoised heart sound signal can be adjusted according to each signal frequency in the denoised heart sound signal, so that the loudness gain of each signal frequency in each frame of the adjusted denoised heart sound signal is basically the same, that is, the loudness of each frame of the denoised heart sound signal sounds stable and does not fluctuate.
[0115] Furthermore, step S204 includes: cutting out a heart sound signal segment within a preset time range from the amplified heart sound signal; extracting a candidate fundamental frequency signal whose fundamental frequency in the heart sound signal segment is within a preset fundamental frequency range; and smoothing the candidate fundamental frequency signal to obtain an interference-free heart sound signal.
[0116] In this step, in order to avoid the friction between the mobile heart sound signal acquisition device or the heart sound signal acquisition device and body clothing at the beginning and end of acquisition, there will be unstable heart sound signals within a certain length of time at the beginning and end of the heart sound segment. These unstable heart sound signals will interfere with the subsequent heart sound signal analysis. Therefore, it is necessary to crop the amplified heart sound signal, and crop the heart sound signal segments within a preset time range from the amplified heart sound signal, that is, crop out those unstable heart sound signals.
[0117] Next, a candidate fundamental frequency signal whose fundamental frequency is within a preset fundamental frequency range is extracted from the cropped heart sound signal segment, and the extracted candidate fundamental frequency signal is smoothed to obtain an interference-free heart sound signal.
[0118] Here, the extracted candidate baseband signals are smoothed, including: performing basic smoothing on the candidate baseband signals, removing candidate baseband signals with large baseband errors according to the signal-to-noise ratios of the candidate baseband signals and the detection results of endpoint detection on the candidate baseband signals;
[0119] Furthermore, a pre-trained hidden Markov model is used to perform global smoothing on the candidate fundamental frequency signals with large fundamental frequency errors removed to obtain an interference-free heart sound signal.
[0120] Here, the fundamental frequency in physics refers to the lowest oscillation frequency of a free oscillation system and the lowest frequency in a composite wave. Periodic functions or periodic waveforms can be decomposed by Fourier series, and their waveforms can be decomposed into a fundamental frequency sine wave plus many higher-order frequency sine waves (or cosine waves), and the higher-order frequencies are integer multiples of the fundamental frequency.
[0121] Furthermore, the extracting of a candidate fundamental frequency signal whose fundamental frequency in the heart sound signal segment is within a preset fundamental frequency range includes: determining a plurality of signal periods from the heart sound signal segment by an autocorrelation function; for each signal period, determining the fundamental frequency corresponding to the sub-heart sound signal to which the signal period belongs; and when the fundamental frequency is within the preset fundamental frequency range, determining the sub-heart sound signal corresponding to the fundamental frequency as the candidate fundamental frequency signal.
[0122] In this step, the collected heart sound signal comes from the vibration of the human body cavity and has periodic characteristics. Therefore, a section of heart sound signal collected in a calm state can be approximately processed as a periodic stationary signal. Since there are multiple cavities in the human body that can vibrate, the collected heart sound signal includes heart sound signals generated by multiple cavity vibrations, which means that the collected section of heart sound signal includes multiple sub-heart sound signals with different periods. However, since some heart sound signals generated by cavity vibrations will not play a positive role in the subsequent analysis of heart sound, and may even cause interference, it is necessary to filter out the unnecessary sub-heart sound signals at this time.
[0123] Specifically, multiple signal periods are determined from the cropped heart sound signal segments through an autocorrelation function, and the inverse of each signal period is calculated to obtain the fundamental frequency of the sub-heart sound signal belonging to each signal period; it is determined whether the fundamental frequency of each sub-heart sound signal is within a preset fundamental frequency range, and when the fundamental frequency of the sub-heart sound signal is within the preset fundamental frequency range, the sub-heart sound signal is determined as a candidate fundamental frequency signal.
[0124] Here, in human speech, the pitch is determined by the fundamental frequency. Since the heart sound signal is periodic like the speech signal, a fundamental frequency extraction method based on an autocorrelation algorithm commonly used in speech signal processing is used to extract the periodic correlation of the heart sound signal.
[0125] In addition, the correlation function between two signals is used to measure the similarity between them. The result of the correlation function varies with the delay in the start time of the two signal waveforms. The autocorrelation function is the correlation function of the signal itself. The autocorrelation function is used to measure the similarity of the signal itself.
[0126] Furthermore, step S206 includes: determining the heart sound signal envelope corresponding to the interference-free heart sound signal; based on the heart sound signal envelope, determining the position information of the first heart sound signal and the position information of the second heart sound signal from the interference-free heart sound signal; marking the interference-free heart sound signal based on the position information of the first heart sound signal and the position information of the second heart sound signal to obtain the heart sound signal to be processed; reducing the sampling frequency of the heart sound signal to be processed to obtain the target heart sound signal corresponding to the initial heart sound signal.
[0127] In this step, the normalized average Shannon energy widely used in the field of heart sound processing is used to extract the heart sound signal envelope of the interference-free heart sound signal; specifically, it mainly includes normalizing the interference-free heart sound signal, calculating the Shannon energy of the interference-free heart sound signal, calculating the average Shannon energy of the interference-free heart sound signal, and finally smoothing the interference-free heart sound signal to extract the heart sound signal envelope of the interference-free heart sound signal.
[0128] Secondly, the interference-free heart sound signal is segmented, and based on the heart sound signal envelope corresponding to the interference-free heart sound signal, the position information of the first heart sound signal and the position information of the second heart sound signal are determined from the interference-free heart sound signal.
[0129] Then, based on the position information of the first heart sound signal and the position information of the second heart sound signal, the interference-free heart sound signal is marked to obtain the marked heart sound signal to be processed. Here, after a series of processing of the acquired initial heart sound signal by the above method, the first heart sound signal and the second heart sound signal in the obtained interference-free heart sound signal are well preserved. At this time, the messy noise signal in the obtained interference-free heart sound signal is significantly reduced, and the influence of some heart murmur signals and additional heart sounds (except the required heart sound signal, for example, except the first heart sound signal and the second heart sound signal) is better removed, effectively reducing the difficulty of positioning with heart murmur and additional heart sound interference, thereby achieving a better heart sound signal segmentation effect.
[0130] Finally, the obtained heart sound signal to be processed is downsampled, that is, the sampling frequency of the heart sound signal to be processed is reduced, and the sampling frequency of the heart sound signal to be processed is adjusted to be consistent with the sampling frequency of the initial heart sound signal, so as to obtain the target heart sound signal corresponding to the initial heart sound signal.
[0131] Thus, in order to better perform subsequent processing on the collected initial heart sound signal, the present application firstly adjusts the sampling frequency of the initial heart sound signal to the processing sampling frequency, then performs filtering processing on the adjusted initial heart sound signal to obtain a normal heart sound signal whose vibration frequency is within the heart sound vibration frequency range, and finally obtains the denoised heart sound signal through a denoising model; according to the multiple loudness gain weights corresponding to the obtained denoised heart sound signal, the denoised heart sound signal is gain-amplified to obtain an amplified heart sound signal after amplification, so that the loudness gain of the frequency of the heart sound signal is substantially the same; the amplified heart sound signal after amplification is again subjected to interference denoising processing to obtain an interference-free heart sound signal; finally, the obtained interference-free heart sound signal is labeled to obtain a target heart sound signal that can be used for subsequent analysis, thereby effectively filtering out the noise in the heart sound signal, helping to reduce the interference components in the heart sound signal, and further, improving the accuracy of the analysis results when the heart sound signal is analyzed later.
[0132] See also Figure 3 , Figure 3 This is a schematic diagram of the structure of a heart sound signal processing device provided in an embodiment of the present application. Figure 3 As shown in , the processing device 300 includes:
[0133] A denoising module 310 is used to perform primary denoising processing on the collected initial heart sound signal to obtain a denoised heart sound signal;
[0134] A gain module 320, configured to perform gain amplification processing on the denoised heart sound signal according to a plurality of loudness gain weights corresponding to the denoised heart sound signal, to obtain an amplified heart sound signal;
[0135] A processing module 330, configured to perform interference removal processing on the amplified heart sound signal to obtain an interference-free heart sound signal;
[0136] The labeling module 340 is used to label the interference-free heart sound signal to obtain a target heart sound signal corresponding to the initial heart sound signal.
[0137] Furthermore, when the denoising module 310 is used to perform primary denoising processing on the collected initial heart sound signal to obtain the denoised heart sound signal, the denoising module 310 is used to:
[0138] Adjusting the sampling frequency of the initial heart sound signal to the processing sampling frequency to obtain an adjusted initial heart sound signal;
[0139] Performing filtering processing on the adjusted initial heart sound signal, and determining a normal heart sound signal whose vibration frequency is within the heart sound vibration frequency range from the adjusted initial heart sound signal;
[0140] The normal heart sound signal is input into the trained denoising model to obtain a denoised heart sound signal.
[0141] Furthermore, when the denoising module 310 is used to filter the adjusted initial heart sound signal and determine a normal heart sound signal whose vibration frequency is within the heart sound vibration frequency range from the adjusted initial heart sound signal, the denoising module 310 is used to:
[0142] Performing band-stop filtering on the adjusted initial heart sound signal to separate the power frequency noise signal from the adjusted initial heart sound signal to obtain a valid heart sound signal;
[0143] The effective heart sound signal is subjected to bandpass filtering, and a normal heart sound signal whose vibration frequency is within the heart sound vibration frequency range is determined from the effective heart sound signal.
[0144] Furthermore, when the gain module 320 is used to perform gain amplification processing on the denoised heart sound signal according to the multiple loudness gain weights corresponding to the denoised heart sound signal to obtain the amplified heart sound signal, the gain module 320 is used to:
[0145] For each frame of the denoised heart sound signal, determine a loudness gain factor corresponding to each signal frequency in the frame of the denoised heart sound signal;
[0146] Based on the mapping relationship between the loudness gain factor and the equal loudness curve, determining the loudness gain weight corresponding to each signal frequency;
[0147] Based on the loudness gain weight corresponding to each signal frequency in each frame of the denoised heart sound signal, the denoised heart sound signal is subjected to gain amplification processing to obtain an amplified heart sound signal.
[0148] Furthermore, when the processing module 330 is used to perform interference removal processing on the amplified heart sound signal to obtain an interference-free heart sound signal, the processing module 330 is used to:
[0149] Cutting out a heart sound signal segment within a preset time range from the amplified heart sound signal;
[0150] Extracting candidate fundamental frequency signals whose fundamental frequency in the heart sound signal segment is within a preset fundamental frequency range;
[0151] The candidate baseband signal is smoothed to obtain an interference-free heart sound signal.
[0152] Furthermore, when the processing module 330 is used to extract the candidate fundamental frequency signal whose fundamental frequency in the heart sound signal segment is within a preset fundamental frequency range, the processing module 330 is used to:
[0153] Determining a plurality of signal periods from the heart sound signal segments by using an autocorrelation function;
[0154] For each signal period, determining the fundamental frequency corresponding to the sub-heart sound signal to which the signal period belongs;
[0155] When the fundamental frequency is within the preset fundamental frequency range, the sub-heart sound signal corresponding to the fundamental frequency is determined as a candidate fundamental frequency signal.
[0156] Furthermore, when the labeling module 340 is used to label the interference-free heart sound signal to obtain the target heart sound signal corresponding to the initial heart sound signal, the labeling module 340 is used to:
[0157] Determining a heart sound signal envelope corresponding to the interference-free heart sound signal;
[0158] Based on the heart sound signal envelope, determining position information of a first heart sound signal and position information of a second heart sound signal from the interference-free heart sound signal;
[0159] Marking the interference-free heart sound signal based on the position information of the first heart sound signal and the position information of the second heart sound signal to obtain a heart sound signal to be processed;
[0160] The sampling frequency of the heart sound signal to be processed is reduced to obtain a target heart sound signal corresponding to the initial heart sound signal.
[0161] A heart sound signal processing device provided in an embodiment of the present application obtains a normal heart sound signal whose vibration frequency is within the heart sound vibration range by performing primary denoising on the collected initial heart sound signal; amplifies the denoised heart sound signal according to multiple loudness gain weights corresponding to the obtained denoised heart sound signal to obtain an amplified heart sound signal after amplification, so that the frequency of the heart sound signal is within the optimal auditory frequency range in the auditory range of people; performs interference denoising on the amplified heart sound signal after amplification to obtain an interference-free heart sound signal; and finally, labels the obtained interference-free heart sound signal to obtain a target heart sound signal that can be used for subsequent analysis, thereby effectively filtering out the noise in the heart sound signal, helping to reduce the interference components in the heart sound signal, and further, improving the accuracy of the analysis results when the heart sound signal is analyzed later.
[0162] See also Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 4 As shown in , the electronic device 400 includes a processor 410 , a memory 420 and a bus 430 .
[0163] The memory 420 stores machine-readable instructions executable by the processor 410. When the electronic device 400 is running, the processor 410 communicates with the memory 420 via the bus 430. When the machine-readable instructions are executed by the processor 410, the above-mentioned Figure 1 as well as Figure 2 The steps of the method for processing heart sound signals in the method embodiment shown, and the specific implementation manner can be found in the method embodiment, which will not be repeated here.
[0164] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the computer program can execute the above-mentioned Figure 1 as well as Figure 2 The steps of the method for processing heart sound signals in the method embodiment shown, and the specific implementation manner can be found in the method embodiment, which will not be repeated here.
[0165] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0166] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0167] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0168] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0169] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application can essentially be embodied in the form of a software product, or in other words, the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0170] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A method for processing heart sound signals, characterized in that: The processing method comprises: Performing primary denoising processing on the collected initial heart sound signal to obtain a denoised heart sound signal; performing gain amplification processing on the denoised heart sound signal according to a plurality of loudness gain weights corresponding to the denoised heart sound signal to obtain an amplified heart sound signal; Cut out a heart sound signal segment within a preset time range from the amplified heart sound signal; extract a candidate fundamental frequency signal whose fundamental frequency is within a preset fundamental frequency range from the heart sound signal segment; and smooth the candidate fundamental frequency signal to obtain an interference-free heart sound signal; The interference-free heart sound signal is labeled, and the target heart sound signal corresponding to the initial heart sound signal is obtained by determining the position information of the first heart sound signal and the position information of the second heart sound signal.
2. The processing method according to claim 1, characterized in that: The step of performing primary denoising on the collected initial heart sound signal to obtain a denoised heart sound signal includes: Adjusting the sampling frequency of the initial heart sound signal to the processing sampling frequency to obtain an adjusted initial heart sound signal; Performing filtering processing on the adjusted initial heart sound signal, and determining a normal heart sound signal whose vibration frequency is within the heart sound vibration frequency range from the adjusted initial heart sound signal; The normal heart sound signal is input into the trained denoising model to obtain a denoised heart sound signal.
3. The processing method according to claim 2, characterized in that: The filtering process of the adjusted initial heart sound signal to determine a normal heart sound signal whose vibration frequency is within the heart sound vibration frequency range from the adjusted initial heart sound signal includes: Performing band-stop filtering on the adjusted initial heart sound signal to separate the power frequency noise signal from the adjusted initial heart sound signal to obtain a valid heart sound signal; The effective heart sound signal is subjected to bandpass filtering, and a normal heart sound signal whose vibration frequency is within the heart sound vibration frequency range is determined from the effective heart sound signal.
4. The processing method according to claim 1, characterized in that: The step of performing gain amplification processing on the denoised heart sound signal according to a plurality of loudness gain weights corresponding to the denoised heart sound signal to obtain an amplified heart sound signal includes: For each frame of the denoised heart sound signal, determine a loudness gain factor corresponding to each signal frequency in the frame of the denoised heart sound signal; Based on the mapping relationship between the loudness gain factor and the equal loudness curve, determining the loudness gain weight corresponding to each signal frequency; Based on the loudness gain weight corresponding to each signal frequency in each frame of the denoised heart sound signal, the denoised heart sound signal is subjected to gain amplification processing to obtain an amplified heart sound signal.
5. The processing method according to claim 1, characterized in that: The step of extracting a candidate fundamental frequency signal whose fundamental frequency in the heart sound signal segment is within a preset fundamental frequency range includes: Determining a plurality of signal periods from the heart sound signal segments by using an autocorrelation function; For each signal period, determining the fundamental frequency corresponding to the sub-heart sound signal to which the signal period belongs; When the fundamental frequency is within the preset fundamental frequency range, the sub-heart sound signal corresponding to the fundamental frequency is determined as a candidate fundamental frequency signal.
6. The processing method according to claim 1, characterized in that: The labeling process of the interference-free heart sound signal to obtain a target heart sound signal corresponding to the initial heart sound signal by determining the position information of the first heart sound signal and the position information of the second heart sound signal includes: Determining a heart sound signal envelope corresponding to the interference-free heart sound signal; Based on the heart sound signal envelope, determining position information of a first heart sound signal and position information of a second heart sound signal from the interference-free heart sound signal; Marking the interference-free heart sound signal based on the position information of the first heart sound signal and the position information of the second heart sound signal to obtain a heart sound signal to be processed; The sampling frequency of the heart sound signal to be processed is reduced to obtain a target heart sound signal corresponding to the initial heart sound signal.
7. A heart sound signal processing device, characterized in that: The processing device comprises: A denoising module is used to perform primary denoising processing on the collected initial heart sound signal to obtain a denoised heart sound signal; A gain module, configured to perform gain amplification processing on the denoised heart sound signal according to a plurality of loudness gain weights corresponding to the denoised heart sound signal, to obtain an amplified heart sound signal; A processing module, configured to cut out a heart sound signal segment within a preset time range from the amplified heart sound signal; extract a candidate fundamental frequency signal whose fundamental frequency in the heart sound signal segment is within a preset fundamental frequency range; and perform smoothing on the candidate fundamental frequency signal to obtain an interference-free heart sound signal; The labeling module is used to label the interference-free heart sound signal, and obtain the target heart sound signal corresponding to the initial heart sound signal by determining the position information of the first heart sound signal and the position information of the second heart sound signal.
8. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor to perform the steps of the method for processing heart sound signals as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for processing heart sound signals according to any one of claims 1 to 6 are executed.
