Heart sound signal segmentation method and device, computer equipment and storage medium
By identifying the envelope signal and peak of the heart sound signal, combined with data preprocessing and noise reduction technology, the heart sound signal is segmented, which solves the problem of low segmentation accuracy under the influence of noise in the existing technology and achieves higher heart sound quality. Signal segmentation accuracy and diagnostic efficiency.
Patent Information
- Application Number
- CN202310300882.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-23
- Publication Date
- 2024-09-24
AI Technical Summary
Existing heart sound signal segmentation technology cannot effectively eliminate the influence of noise, resulting in low segmentation accuracy. It is especially sensitive to noise such as environmental noise and clothing friction, and can easily cause segmentation errors.
By acquiring the envelope signal of the heart sound signal, identifying the initial and target wave peaks, determining the heart sound type, and segmenting the signal according to the time interval of the wave peak, combined with data preprocessing, noise reduction processing and frequency domain analysis, the first heart sound and The second heart sound determines diastole and systole.
It improves the accuracy and accuracy of heart sound signal segmentation, can extract heart sound features more completely, reduces dependence on other biological signals, and enhances diagnostic efficiency.
Smart Images

Figure CN118692500A
Abstract
Description
Technical Field
[0001] The present application relates to the field of signal processing technology, and in particular to a heart sound signal segmentation method, device, computer equipment, storage medium and computer program product. Background Art
[0002] Cardiovascular disease is one of the leading causes of death from disease worldwide. Heart sounds are roughly divided into high-frequency sounds and low-frequency sounds. High-frequency sounds originate from the closing or opening of valves, including mitral and tricuspid valve closure sounds (M1 and T1), non-ejection sounds, valve opening sounds, aortic and pulmonary valve closure sounds (A2 and P2), and early valvular ejection sounds. Artificial valve sounds are also high-frequency sounds. Low-frequency sounds include the third heart sound (S3, physiological or pathological) and the fourth heart sound (S4), S3 is related to early ventricular filling, and S4 is related to atrial contraction in late diastole. Heart sound segmentation refers to identifying different components in a segment of heart sound signals to help better understand heart function and further assist in the diagnosis of heart disease. At present, the research and analysis of heart sound signals face great challenges because the original collected heart sound signals are easily interfered by various noises (such as environmental noise, friction noise of acquisition equipment, patient's lung sounds, power frequency noise, etc.). Common heart sound signal processing technology mainly uses low-pass filtering, such as Butterworth low-pass filter and Chebyshev low-pass filter, to denoise heart sounds. Low-pass filter can only eliminate high-frequency noise, but cannot filter out low-frequency noise. Existing heart sound segmentation technology is sensitive to noise and is easily affected by noise such as clothing friction and environmental noise, which can easily cause segmentation errors.
[0003] The current segmentation of heart sound signals cannot effectively eliminate the influence of noise, resulting in low segmentation accuracy. Summary of the invention
[0004] Based on this, it is necessary to provide a heart sound signal segmentation method, apparatus, computer equipment, computer readable storage medium and computer program product that can improve the accuracy of heart sound signal segmentation in response to the above technical problems.
[0005] In a first aspect, the present application provides a heart sound signal segmentation method. The method comprises:
[0006] Acquire an envelope signal corresponding to the target heart sound signal;
[0007] Identify multiple initial peaks in the envelope signal, obtain the initial peak time difference between every two adjacent initial peaks, and determine multiple target peaks from the multiple initial peaks according to each initial peak time difference;
[0008] Obtaining a target peak time difference between every two adjacent target peaks, and determining the heart sound type to which every two adjacent target peaks belong according to each target peak time difference, wherein the heart sound type is divided into a first heart sound and a second heart sound;
[0009] According to the first preset ratio and the peak amplitude of each target peak, the starting signal value and the ending signal value corresponding to each target peak are obtained, and according to the starting signal value and the ending signal value corresponding to each target peak, the time interval corresponding to the corresponding target peak in the envelope signal is determined;
[0010] The target heart sound signal is segmented according to the heart sound type to which each target wave peak belongs and the corresponding time interval.
[0011] In one embodiment, obtaining an envelope signal corresponding to a target heart sound signal includes:
[0012] Performing data processing on the target heart sound signal to obtain a first intermediate signal; the data processing includes at least one of resampling or data normalization;
[0013] Performing noise reduction processing on the first intermediate signal to obtain a second intermediate signal; the noise reduction processing includes at least one of bandpass filtering noise reduction or wavelet transform noise reduction;
[0014] Performing a fragrant energy amplification process on the second intermediate signal to obtain a third intermediate signal;
[0015] Performing a Hibbert transform on the third intermediate signal to obtain a fourth intermediate signal;
[0016] An envelope signal is obtained according to the fourth intermediate signal.
[0017] In one embodiment, acquiring the envelope signal according to the fourth intermediate signal includes:
[0018] Performing envelope extraction on the fourth intermediate signal to obtain an original envelope signal corresponding to the target heart sound signal;
[0019] The original envelope signal is processed by sliding average to obtain the envelope signal.
[0020] In one embodiment, identifying a plurality of initial peaks in the envelope signal includes:
[0021] determining a time interval in the envelope signal based on the cardiac cycle;
[0022] Determine the detection boundary threshold corresponding to the time interval according to the minimum signal value and the average signal value within the time interval;
[0023] Within the time interval, determining at least one detection starting point and at least one detection ending point according to the detection boundary threshold;
[0024] The maximum value of the signal between every two adjacent preceding detection start points and succeeding detection end points is taken as a peak value, and the corresponding initial wave peak is determined according to each peak value.
[0025] In one embodiment, determining a plurality of target peaks from a plurality of initial peaks according to each initial peak time difference comprises:
[0026] Acquire a first time difference sequence corresponding to the envelope signal according to the initial peak time difference between every two adjacent initial peaks;
[0027] Determining a first value interval in the first time difference sequence based on a first preset number of peaks;
[0028] Calculate the average value of the initial peak time differences in the first value interval according to the number of initial peak time differences included in the first value interval, and determine the first time difference threshold of the first value interval according to the second preset ratio and the average value of the initial peak time differences, and determine the second time difference threshold of the first value interval according to the third preset ratio and the average value of the initial peak time differences;
[0029] In the first value interval, if there is an initial peak time difference that is less than the first time difference threshold, the initial peak with the smallest peak value among two adjacent initial peaks corresponding to the corresponding initial peak time difference is removed;
[0030] The remaining initial peaks are used as multiple target peaks.
[0031] In one embodiment, the method further comprises:
[0032] In the first value interval, if there is an initial peak time difference greater than the second time difference threshold, a peak missing mark is set for the corresponding initial peak time difference; the peak missing mark is used to indicate that there is an unidentified peak between two adjacent initial peaks corresponding to the corresponding initial peak time.
[0033] In one embodiment, determining the heart sound types to which each two adjacent target peaks belong according to each target peak time difference includes:
[0034] According to the target peak time difference between every two adjacent target peaks, a second time difference sequence corresponding to the envelope signal is obtained;
[0035] Determining a second value interval in the second time difference sequence based on the second preset number of peaks;
[0036] Calculate the average value of the target peak time difference in the second value interval according to the number of target peak time differences included in the second value interval;
[0037] In the second value interval, if there is a target peak time difference that is less than the target peak time difference average value, determine that of the two adjacent target peaks corresponding to the corresponding target peak time difference, the heart sound type of the first target peak is the first heart sound, and the heart sound type of the second target peak is the second heart sound;
[0038] In the second value interval, if there is a target peak time difference greater than the target peak time difference average, it is determined that among the two adjacent target peaks corresponding to the corresponding target peak time difference, the heart sound type of the first target peak is the second heart sound, and the heart sound type of the second target peak is the first heart sound.
[0039] In one embodiment, determining a time interval corresponding to each target peak in the envelope signal according to a start signal value and an end signal value corresponding to each target peak includes:
[0040] Determine the duration of each target wave peak according to the start signal value and the end signal value corresponding to each target wave peak;
[0041] If the duration corresponding to the target peak is greater than the preset maximum duration, the time interval corresponding to the corresponding target peak is determined according to the preset maximum duration;
[0042] If there is a target peak whose duration is less than the preset maximum duration, the time interval corresponding to the target peak is determined according to the duration corresponding to the target peak.
[0043] In one embodiment, segmenting the target heart sound signal according to the heart sound type and the corresponding time interval to which each target peak belongs includes:
[0044] Determine a first heart sound time interval and a second heart sound time interval in the target heart sound signal according to the heart sound type and the corresponding time interval to which each target wave peak belongs;
[0045] The period between two adjacent first heart sound time intervals and second heart sound time intervals is determined as the systolic period;
[0046] The period between two adjacent second heart sound time intervals and first heart sound time intervals is determined as the diastolic period.
[0047] In one embodiment, the method further comprises:
[0048] According to the segmentation result of the target heart sound signal, the heart sound characteristics of the target heart sound signal are obtained; the heart sound characteristics include at least one of average heart rate, left ventricular contraction time or heart murmur score.
[0049] In a second aspect, the present application also provides a heart sound signal segmentation device. The device comprises:
[0050] An acquisition module, used to acquire an envelope signal corresponding to a target heart sound signal;
[0051] A detection module, used to identify multiple initial peaks in the envelope signal, obtain an initial peak time difference between every two adjacent initial peaks, and determine multiple target peaks from the multiple initial peaks according to each initial peak time difference;
[0052] A determination module is used to obtain a target peak time difference between every two adjacent target peaks, and determine the heart sound type to which every two adjacent target peaks belong according to each target peak time difference, where the heart sound type is divided into a first heart sound and a second heart sound;
[0053] A positioning module, used to obtain a start signal value and an end signal value corresponding to each target peak according to a first preset ratio and a peak amplitude of each target peak, and determine a time interval corresponding to the corresponding target peak in the envelope signal according to the start signal value and the end signal value corresponding to each target peak;
[0054] The segmentation module is used to segment the target heart sound signal according to the heart sound type to which each target wave peak belongs and the corresponding time interval.
[0055] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0056] Acquire an envelope signal corresponding to the target heart sound signal;
[0057] Identify multiple initial peaks in the envelope signal, obtain the initial peak time difference between every two adjacent initial peaks, and determine multiple target peaks from the multiple initial peaks according to each initial peak time difference;
[0058] Obtaining a target peak time difference between every two adjacent target peaks, and determining the heart sound type to which every two adjacent target peaks belong according to each target peak time difference, wherein the heart sound type is divided into a first heart sound and a second heart sound;
[0059] According to the first preset ratio and the peak amplitude of each target peak, the starting signal value and the ending signal value corresponding to each target peak are obtained, and according to the starting signal value and the ending signal value corresponding to each target peak, the time interval corresponding to the corresponding target peak in the envelope signal is determined;
[0060] The target heart sound signal is segmented according to the heart sound type to which each target wave peak belongs and the corresponding time interval.
[0061] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0062] Acquire an envelope signal corresponding to the target heart sound signal;
[0063] Identify multiple initial peaks in the envelope signal, obtain the initial peak time difference between every two adjacent initial peaks, and determine multiple target peaks from the multiple initial peaks according to each initial peak time difference;
[0064] Obtaining a target peak time difference between every two adjacent target peaks, and determining the heart sound type to which every two adjacent target peaks belong according to each target peak time difference, wherein the heart sound type is divided into a first heart sound and a second heart sound;
[0065] According to the first preset ratio and the peak amplitude of each target peak, the starting signal value and the ending signal value corresponding to each target peak are obtained, and according to the starting signal value and the ending signal value corresponding to each target peak, the time interval corresponding to the corresponding target peak in the envelope signal is determined;
[0066] The target heart sound signal is segmented according to the heart sound type to which each target wave peak belongs and the corresponding time interval.
[0067] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0068] Acquire an envelope signal corresponding to the target heart sound signal;
[0069] Identify multiple initial peaks in the envelope signal, obtain the initial peak time difference between every two adjacent initial peaks, and determine multiple target peaks from the multiple initial peaks according to each initial peak time difference;
[0070] Obtaining a target peak time difference between every two adjacent target peaks, and determining the heart sound type to which every two adjacent target peaks belong according to each target peak time difference, wherein the heart sound type is divided into a first heart sound and a second heart sound;
[0071] According to the first preset ratio and the peak amplitude of each target peak, the starting signal value and the ending signal value corresponding to each target peak are obtained, and according to the starting signal value and the ending signal value corresponding to each target peak, the time interval corresponding to the corresponding target peak in the envelope signal is determined;
[0072] The target heart sound signal is segmented according to the heart sound type to which each target wave peak belongs and the corresponding time interval.
[0073] The above-mentioned heart sound signal segmentation method, device, computer equipment, storage medium and computer program product obtain an envelope signal corresponding to a target heart sound signal; identify multiple initial peaks in the envelope signal, obtain the initial peak time difference between every two adjacent initial peaks, and determine multiple target peaks from the multiple initial peaks according to each initial peak time difference; obtain the target peak time difference between every two adjacent target peaks, and determine the heart sound type to which every two adjacent target peaks belong according to each target peak time difference; obtain the start signal value and the end signal value corresponding to each target peak according to the first preset ratio and the peak amplitude of each target peak, and determine the time interval corresponding to the corresponding target peak in the envelope signal according to the start signal value and the end signal value corresponding to each target peak; finally, segment the target heart sound signal according to the heart sound type to which each target peak belongs and the corresponding time interval, and through frequency domain and time domain analysis, the first heart sound and the second heart sound can be extracted more completely, and the diastole and the systole can be further determined, and a heart sound segmentation result with a high accuracy can be obtained without relying on other biological signals. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] Figure 1 A schematic diagram of a process of segmenting a cardiac sound signal in one embodiment;
[0075] Figure 2 A schematic diagram of the relationship between the type of central sound and the peak in one embodiment;
[0076] Figure 3 is a schematic diagram of a normalized signal in one embodiment;
[0077] Figure 4 A schematic diagram of a signal after bandpass filtering and noise reduction in one embodiment;
[0078] Figure 5 A schematic diagram of a signal after wavelet transformation denoising in one embodiment;
[0079] Figure 6 A schematic diagram of a signal after Shannon energy amplification in one embodiment;
[0080] Figure 7 is a schematic diagram of a signal after Hilbert transformation in one embodiment;
[0081] Figure 8 A schematic diagram of an envelope signal waveform in an embodiment;
[0082] Fig. 9 A schematic diagram of an envelope signal waveform after envelope sliding averaging in one embodiment;
[0083] Fig.10 A schematic diagram of a threshold line in one embodiment;
[0084] Fig.11 A schematic diagram of a detection starting point and a detection ending point in an embodiment;
[0085] Fig.12 A schematic diagram of a peak point of a wave crest in an embodiment;
[0086] Fig.13 A schematic diagram of the starting point and the ending point of S1 and S2 in one embodiment;
[0087] Fig.14 is a schematic diagram of an autocorrelation waveform in an embodiment;
[0088] Fig.15 It is a flowchart of a method for segmenting and calculating features of heart sound signals in one embodiment;
[0089] Fig.16 is a structural block diagram of a heart sound signal segmentation device in an embodiment;
[0090] Fig.17 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0091] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0092] In one embodiment, Figure 1 As shown, a heart sound signal segmentation method is provided. This embodiment uses the method applied to a computer device as an example for illustration. It can be understood that the computer device can specifically be a terminal or a server. Among them, the terminal can be but is not limited to various personal computers, laptops, smart phones, tablet computers, Internet of Things devices, portable wearable devices, and the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart medical equipment, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server can be implemented as an independent server or a server cluster composed of multiple servers. In this embodiment, the method includes the following steps:
[0093] Step 102: Acquire an envelope signal corresponding to the target heart sound signal.
[0094] Optionally, the computer device preprocesses the segmented target heart sound signal and performs envelope extraction on the preprocessed signal to obtain an envelope signal corresponding to the target heart sound signal. The purpose of preprocessing is to amplify the waveform features in the target heart sound signal and remove noise in the target heart sound signal. The preprocessing includes but is not limited to data resampling, data normalization, bandpass filtering noise reduction, wavelet transform noise reduction, Shannon energy amplification, Hilbert transform, etc.
[0095] Step 104 , identifying multiple initial peaks in the envelope signal, obtaining an initial peak time difference between every two adjacent initial peaks, and determining multiple target peaks from the multiple initial peaks according to each initial peak time difference.
[0096] Optionally, the computer device first determines multiple time intervals in the envelope signal based on the cardiac cycle; determines the detection boundary threshold corresponding to each time interval according to the signal minimum value and signal average value in each time interval; determines at least one detection start point and at least one detection end point in each time interval according to the corresponding detection boundary threshold; takes the maximum value of the signal between every two adjacent preceding detection start points and following detection end points as a peak value, and determines the corresponding initial peak according to each peak value. Obtain the initial peak time difference between every two adjacent initial peaks. Then the computer device determines the initial peak time difference between every two adjacent initial peaks. Furthermore, the computer device obtains a first time difference sequence corresponding to the envelope signal; determines multiple first value intervals in the first time difference sequence based on a first preset number of peaks; calculates the average value of the initial peak time differences of each first value interval according to the number of initial peak time differences included in each first value interval, and determines the first time difference threshold of each first value interval according to a second preset ratio and the average value of the initial peak time differences of each first value interval; if there is an initial peak time difference that is less than the first time difference threshold of the corresponding first value interval, remove the initial peak with the smallest peak value between the two adjacent initial peaks corresponding to the corresponding initial peak time difference; and use the remaining initial peaks as multiple target peaks.
[0097] Step 106, obtaining the target peak time difference between every two adjacent target peaks, and determining the heart sound type to which every two adjacent target peaks belong according to each target peak time difference. The heart sound type is divided into a first heart sound and a second heart sound.
[0098] Among them, the relationship between heart sound type and wave peak is as follows Figure 2As shown in the figure, under normal circumstances, a normal heart sound signal can be mainly divided into four parts: the first heart sound (abbreviated as S1), systole, second heart sound (abbreviated as S2), and diastole, which constitute a complete cardiac cycle of the heart sound signal. The systole refers to the interval from the starting point of the first heart sound (S1) to the starting point of the second heart sound (S2), while the diastole refers to the interval from the starting point of the second heart sound (S2) to the starting point of the first heart sound (S1) of the next cardiac cycle. Heart sounds are complex signals, and different components are mainly distributed in different frequency bands. For example, the frequency distribution of the first and second heart sounds is 50-100 Hz, the frequency distribution of the third and fourth heart sounds is 10-50 Hz, the frequency distribution of diastolic filling rumbling murmur is 50-100 Hz, the frequency distribution of diastolic regurgitation and systolic ejection murmur is 100-600 Hz, and the frequency distribution of pericardial friction sound is 100-600 Hz.
[0099] Optionally, the computer device first obtains the target peak time difference between every two adjacent target peaks. Then, the computer device obtains the second time difference sequence corresponding to the envelope signal according to the target peak time difference between every two adjacent target peaks; determines multiple second value intervals in the second time difference sequence based on the second preset number of peaks; calculates the target peak time difference average value of each second value interval according to the number of target peak time differences included in each second value interval; if there is a target peak time difference that is less than the target peak time difference average value of the corresponding second value interval, determine that the heart sound type of the first target peak in the two adjacent target peaks corresponding to the corresponding target peak time difference is the first heart sound, and the heart sound type of the second target peak is the second heart sound; if there is a target peak time difference that is greater than the target peak time difference average value of the corresponding second value interval, determine that the heart sound type of the first target peak in the two adjacent target peaks corresponding to the corresponding target peak time difference is the second heart sound, and the heart sound type of the second target peak is the first heart sound.
[0100] Step 108, according to the first preset ratio and the peak amplitude of each target peak, obtain the starting signal value and the ending signal value corresponding to each target peak, and determine the time interval corresponding to the corresponding target peak in the envelope signal according to the starting signal value and the ending signal value corresponding to each target peak.
[0101] Optionally, the computer device multiplies a preset first preset ratio and the peak amplitude of each target peak to obtain a starting signal value and an ending signal value corresponding to each target peak. Normally, the starting signal value and the ending signal value corresponding to each target peak are the same, that is, in the envelope signal waveform, there are two points with the same signal values located in front of and behind the target peak, respectively. The point in front of the target peak is the starting signal value of the target peak, and the point behind the target peak is the ending signal value of the target peak. The interval between the two points is the time interval corresponding to the target peak in the envelope signal. This time interval can be directly corresponded to the original target heart sound signal as the time interval corresponding to the target peak in the target heart sound signal.
[0102] Step 110 , segmenting the target heart sound signal according to the heart sound type to which each target wave peak belongs and the corresponding time interval.
[0103] Optionally, the computer device determines the heart sound type corresponding to each time interval based on the heart sound type to which each target peak belongs and the corresponding time interval, thereby locating each first heart sound time interval and each second heart sound time interval in the target heart sound signal, and then determines the period between two adjacent first heart sound time intervals and second heart sound time intervals as the systole period, and determines the period between two adjacent second heart sound time intervals and the first heart sound time interval as the diastole period.
[0104] In the above-mentioned heart sound signal segmentation method, an envelope signal corresponding to a target heart sound signal is obtained; multiple initial peaks in the envelope signal are identified, and an initial peak time difference between every two adjacent initial peaks is obtained, and multiple target peaks are determined from the multiple initial peaks according to each initial peak time difference; a target peak time difference between every two adjacent target peaks is obtained, and the heart sound type to which every two adjacent target peaks belong is determined according to each target peak time difference; a start signal value and an end signal value corresponding to each target peak are obtained according to a first preset ratio and a peak amplitude of each target peak, and a time interval corresponding to the corresponding target peak in the envelope signal is determined according to the start signal value and the end signal value corresponding to each target peak; finally, the target heart sound signal is segmented according to the heart sound type to which each target peak belongs and the corresponding time interval, and by performing time domain and frequency domain analysis on the heart sound signal, the first heart sound and the second heart sound can be extracted more completely, and the diastole and the systole can be further determined, and a heart sound segmentation result with a higher accuracy can be obtained without relying on other biological signals.
[0105] In one embodiment, obtaining an envelope signal corresponding to a target heart sound signal includes: performing data processing on the target heart sound signal to obtain a first intermediate signal; the data processing includes at least one of resampling or data normalization; performing noise reduction processing on the first intermediate signal to obtain a second intermediate signal; the noise reduction processing includes at least one of bandpass filtering noise reduction or wavelet transform noise reduction; performing Shannon energy amplification processing on the second intermediate signal to obtain a third intermediate signal; performing Hibbert transform on the third intermediate signal to obtain a fourth intermediate signal; performing envelope extraction on the fourth intermediate signal to obtain an original envelope signal corresponding to the target heart sound signal; and performing sliding average processing on the original envelope signal to obtain an envelope signal.
[0106] Optionally, the target heart sound signal is first resampled. The heart sound signal frequency is mainly distributed below 1kHz. According to the Shannon sampling principle, the signal sampling frequency must be at least twice the signal frequency. The original heart sound signal is resampled to 2kHz to unify the input data standard. For high sampling rate data, resampling can also reduce the amount of data calculation and will not cause signal loss.
[0107] The second step is to normalize the data. Linear normalization is used to facilitate subsequent processing. Normalized value = original value / data range. The data range is related to the format of the collected data. The normalized data is scaled to between -1 and +1. Figure 3 shown.
[0108] Then perform bandpass filtering to reduce noise. The characteristics of S1 and S2 in the heart sound signal are the most obvious. When segmenting the heart sounds, these signals can be extracted for analysis first. The frequencies of S1 and S2 are concentrated in the low-frequency part of 50-100Hz. Generally, a low-pass or band-pass filter is used to filter the signal to filter out the high-frequency noise. The filter can be in various forms, either IIR or FIR, such as Butterworth filter or Chebyshev filter. It is preferred to use a 4th-order Butterworth bandpass filter. The Butterworth filter is a very effective filter. The frequency response curve is the smoothest in the passband and gradually decreases to zero in the stopband. The data waveform obtained after filtering and denoising is as follows: Figure 4 shown.
[0109] Further perform wavelet transform to reduce noise. Heart sound signals generally inevitably contain the background noise of the acquisition system. The use of wavelet transform can further reduce the noise in the heart sound signal. There can be many forms of wavelet transform, such as continuous wavelet transform, discrete wavelet transform, binary wavelet transform, etc. For signal noise reduction, discrete wavelet transform (DWT) based on orthogonal wavelets is generally used. It is preferred to use a wavelet transform based on the 6th order Daubechies Wavelet, combined with the hard threshold method to reduce the noise of the heart sound signal. The order of wavelet transform and the threshold method are related to the characteristics of the signal. The order can be selected from 1 to 15, and the threshold method can be selected from hard threshold, soft threshold, compromise method, etc. The signal waveform after noise reduction by wavelet transform is as follows. Figure 5 shown.
[0110] After denoising, Shannon energy amplification is performed. S1 and S2 in the heart sound signal appear as periodic peaks of the signal waveform in the time domain. The signal can be amplified to enhance the peak characteristics. There are many ways to amplify the signal, such as linear amplification, nonlinear amplification, etc. In order to highlight the peak characteristics, nonlinear amplification methods are generally used, and second-order Shannon energy amplification is preferred. The order of Shannon energy calculation is related to the characteristics of the signal, and generally 2 to 4 orders can be selected. The signal waveform after Shannon energy calculation is as follows Figure 6 shown.
[0111] Then perform Hilbert transform and extract the envelope. The heart sound envelope can better show the characteristics of peak changes than the heart sound waveform. The signal can be extracted by envelope. There are many methods for envelope extraction, such as Shannon energy sliding average, Hilbert transform, cepstrum method, etc. It is preferred to perform envelope extraction based on Hilbert transform. Hilbert transform can represent a real signal as a complex signal whose spectrum has values only in the positive frequency domain, which can easily extract the envelope. The signal waveform after Hilbert transform is as follows: Figure 7 As shown. The envelope of the signal after Hilbert transform is extracted, and the envelope signal waveform is as follows Figure 8 shown.
[0112] Finally, the envelope sliding average is performed. Denoising the envelope signal can make the envelope curve smoother and easier to analyze. There are many ways to eliminate noise, such as FIR, IIR filtering, exponential smoothing filtering, sliding average filtering, etc. Sliding average filtering is preferred. The envelope diagram after sliding average is as follows Fig. 9 shown.
[0113] In this embodiment, before segmenting the target heart sound signal, the noise in the heart sound data is filtered based on the Butterworth bandpass filter and wavelet transform, so that the heart sound characteristics are retained to the greatest extent. Then, segmentation is performed based on the heart sound characteristics, which can improve the segmentation accuracy of the target heart sound signal.
[0114] In one embodiment, identifying multiple initial peaks in an envelope signal includes: determining a time interval in the envelope signal based on the cardiac cycle; determining a detection boundary threshold corresponding to the time interval based on a signal minimum value and a signal average value within the time interval; determining at least one detection start point and at least one detection end point within the time interval based on the detection boundary threshold; taking the maximum value of the signal between every two adjacent preceding detection start points and succeeding detection end points as a peak value, and determining a corresponding initial peak based on each peak value.
[0115] Furthermore, based on each initial peak time difference, multiple target peaks are determined from multiple initial peaks, including: obtaining a first time difference sequence corresponding to the envelope signal based on the initial peak time difference between each two adjacent initial peaks; determining a first value interval in the first time difference sequence based on a first preset number of peaks; calculating an average value of the initial peak time differences in the first value interval based on the number of initial peak time differences included in the first value interval, and determining a time difference threshold for the first value interval based on a second preset ratio and the average value of the initial peak time differences, and determining a second time difference threshold for the first value interval based on a third preset ratio and the average value of the initial peak time differences; within the first value interval, if there is an initial peak time difference that is less than the first time difference threshold, removing the initial peak with the smallest peak value between the two adjacent initial peaks corresponding to the corresponding initial peak time difference; and using the remaining initial peaks as multiple target peaks. In the first value interval, if there is an initial peak time difference greater than the second time difference threshold, a peak missing mark is set for the corresponding initial peak time difference; the peak missing mark is used to indicate that there is an unidentified peak between two adjacent initial peaks corresponding to the corresponding initial peak time.
[0116] Optionally, a sliding window method may be used to determine the time interval and the first value interval.
[0117] First, use the first sliding window and dynamic threshold to detect the peak value in the envelope signal. The setting of the sliding window size must ensure that at least one cardiac cycle is included in the time window. Taking the lowest possible heart rate of 30BPM as an example, the minimum time window requirement is 2 seconds. The setting of the sliding step length must ensure that the cardiac component is not missed within the step length. Taking the longest possible duration of S1 and S2 as 0.2 seconds as an example, the maximum sliding step length requirement is 2 seconds - 0.2 seconds = 1.8 seconds. The amplitude of the heart sound signal may change with the change of the acquisition method. A dynamic threshold is used for peak detection. The calculation formula of the dynamic threshold is:
[0118] PEAK_=MIN(S)+_*MEAN()
[0119] Among them, S is the envelope data sequence within the sliding time window, MIN(S) is the minimum value of the envelope data sequence within the time window, MEAN(S) is the average value of the envelope data sequence within the time window, TH_FACTOR is the dynamic threshold adjustment coefficient, which can be adjusted according to the signal characteristics. In this embodiment, the preferred coefficient is 0.5. The presentation of the threshold line in the envelope diagram within the sliding time window is as Fig.10 shown by the dashed line in the figure. The detection starting point is the rising point where the envelope line intersects the threshold line, that is, the previous point is less than the threshold and the next point is greater than the threshold; the detection ending point is the falling point where the envelope line intersects the threshold line, that is, the previous point is greater than the threshold and the next point is less than the threshold. The presentation of the detection starting point A and the detection ending point B in the envelope diagram is as Fig.11 shown in the figure. The peak-to-peak value is the maximum value between the detection starting point and the detection ending point. The presentation of the peak-to-peak value point in the envelope diagram is as Fig.12 shown in the figure. By repeating the above steps, all the initial peaks can be obtained.
[0120] Furthermore, a second sliding window is used to screen the initial peaks. Calculate the time difference T1 between each pair of initial peaks to form a time difference sequence D1. Use the method of sliding window mean for D1 to filter out the smaller intervals caused by accidental peaks and the larger intervals caused by unrecognized peaks. The size and step length of the sliding window can be adjusted according to the data characteristics. It can be selected that the window size is 10 and the step length is 1, and calculate the mean value D1_WIN_MEAN of the time difference sequence within the window. If T1 < MIN_FACTOR * D1_WIN_MEAN, then filter out the peak with the smaller amplitude in the peak pair represented by T1. MIN_FACTOR is the filtering coefficient, which is equivalent to the second preset ratio and can be adjusted according to the signal characteristics. The preferred filtering coefficient is 0.5. If T1 > MAX_FACTOR * D1_WIN_MEAN, then mark that there may be unrecognized peaks in the peak pair represented by T1. MAX_FACTOR is the marking coefficient, which is equivalent to the third preset ratio and can be adjusted according to the signal characteristics. The preferred marking coefficient is 2.0.
[0121] In this embodiment, first identify multiple initial peaks in the envelope signal, then screen out the target peaks that meet the characteristics of the first heart sound and the second heart sound from the initial peaks, and subsequently segment the envelope signal according to the target peaks, which can improve the segmentation accuracy rate of the target heart sound signal.
[0122] In one embodiment, determining the heart sound types to which each two adjacent target peaks respectively belong according to each target peak time difference includes: obtaining a second time difference sequence corresponding to the envelope signal according to the target peak time difference between each two adjacent target peaks; determining a second value range in the second time difference sequence based on a second preset number of peaks; calculating an average value of the target peak time differences in the second value range according to the number of target peak time differences included in the second value range; within the second value range, if there is a target peak time difference less than the average value of the target peak time differences, determining that among the two adjacent target peaks corresponding to the corresponding target peak time difference, the heart sound type to which the previous target peak belongs is the first heart sound, and the heart sound type of the latter target peak is the second heart sound; within the second value range, if there is a target peak time difference greater than the average value of the target peak time differences, determining that among the two adjacent target peaks corresponding to the corresponding target peak time difference, the heart sound type to which the previous target peak belongs is the second heart sound, and the heart sound type of the latter target peak is the first heart sound.
[0123] Optionally, a third sliding window is used to determine the heart sound types to which each target peak belongs. According to the time difference T1 between each target peak, a time difference sequence D2 is formed, and each T1 corresponds to a pair of peaks including the previous and the subsequent target peaks. The sliding window mean method is used for D2 to identify S1 and S2. The size and step length of the sliding window can be adjusted according to the data characteristics. It can be selected that the window size is 10 and the step length is 10, and the mean value D2_WIN_MEAN of the time difference sequence within the window is calculated. If T1 < D2_WIN_MEAN, the previous and the subsequent target peaks corresponding to the peak pair represented by T1 are S1 and S2 respectively. If T1 > D2_WIN_MEAN, the previous and the subsequent target peaks corresponding to the peak pair represented by T1 are S2 and S1 respectively.
[0124] In this embodiment, judging the heart sound types of each target peak based on the average value of the target peak time differences in each second value range can improve the segmentation accuracy rate of the target heart sound signal.
[0125] In one embodiment, according to a first preset ratio and the peak amplitude of each target peak, an initial signal value and an end signal value corresponding to each target peak are obtained, and the duration corresponding to each target peak is determined respectively according to the initial signal value and the end signal value corresponding to each target peak; if there is a target peak whose corresponding duration is greater than a preset maximum duration, a time interval corresponding to the corresponding target peak is determined according to the preset maximum duration; if there is a target peak whose corresponding duration is less than the preset maximum duration, a time interval corresponding to the corresponding target peak is determined according to the duration corresponding to the corresponding target peak.
[0126] Furthermore, according to the heart sound type to which each target peak belongs and the corresponding time interval, the first heart sound time interval and the second heart sound time interval in the target heart sound signal are determined; the period between two adjacent first heart sound time intervals and second heart sound time intervals is determined as the systole period; and the period between two adjacent second heart sound time intervals and the first heart sound time interval is determined as the diastole period.
[0127] Optionally, the starting point and the ending point of S1 and S2 are determined by the product of the peak amplitude and the first preset ratio, that is, the threshold DU_TH = PEAK_VAL * DU_TH_FACTOR, where PEAK_VAL represents the peak amplitude and DU_TH_FACTOR represents the first preset ratio. The starting point of S1 is the point where the front envelope of S1 intersects the threshold, that is, the point before the starting point of S1 is less than the threshold and the point after it is greater than the threshold; the ending point of S1 is the point where the rear envelope of S1 intersects the threshold line, that is, the point before the ending point of S1 is greater than the threshold and the point after it is less than the threshold. Similarly, the starting point of S2 is the point where the front envelope of S2 intersects the threshold, that is, the point before the starting point of S2 is less than the threshold and the point after it is greater than the threshold; the ending point of S2 is the point where the rear envelope of S2 intersects the threshold line, that is, the point before the ending point of S2 is greater than the threshold and the point after it is less than the threshold. DU_TH_FACTOR is related to the characteristics of the signal and the selection of the aforementioned algorithm parameters. DU_TH_FACTOR can be selected as 0.15. According to phonocardiography, the maximum duration of S1 S1_MAX_DU is 120 milliseconds, and the maximum duration of S2 S2_MAX_DU is 160 milliseconds. If the duration of S1 determined by the threshold method is greater than S1_MAX_DU, S1_MAX_DU is used to determine the end point of S1. If the duration of S2 determined by the threshold method is greater than S2_MAX_DU, S2_MAX_DU is used to determine the end point of S2. The starting and ending points of S1 and S2 are marked on the original heart sound signal as shown in the figure. Fig.13 Next, the systolic period and the diastolic period can be determined, the duration of the systolic period is between the start point of S2 and the end point of the previous S1, and the duration of the diastolic period is between the start point of S1 and the end point of the previous S2.
[0128] In this embodiment, according to the first preset ratio and the peak amplitude of each target peak, the start signal value and the end signal value corresponding to each target peak are obtained, and according to the start signal value and the end signal value corresponding to each target peak, the time interval corresponding to the corresponding target peak in the envelope signal is determined; according to the heart sound type to which each target peak belongs and the corresponding time interval, the target heart sound signal is segmented. The segmentation accuracy of the target heart sound signal can be improved.
[0129] In one embodiment, the method further includes: acquiring heart sound characteristics of the target heart sound signal according to the segmentation result of the target heart sound signal; the heart sound characteristics include at least one of average heart rate, left ventricular contraction time or heart murmur score.
[0130] Optionally, after obtaining the segmentation result of the target heart sound signal, the computer device can calculate the heart sound features of the target heart sound signal based on the segmentation result. The heart sound features at least include average heart rate, left ventricular contraction time and heart murmur score.
[0131] The specific steps for calculating the average heart rate are as follows:
[0132] The difference between each cardiac cycle of the heart sound signal is small, showing a periodic characteristic, that is, the duration of each cardiac cycle is basically the same. By performing autocorrelation calculation on the aforementioned envelope signal, the average heart rate can be easily calculated. The autocorrelation waveform is as follows: Fig.14 As shown in the figure, extract the interval T between multiple adjacent peak positions in the autocorrelation waveform, calculate the mean value T_MEAN, and then the average heart rate HR = sampling rate / T_MEAN*60.
[0133] The specific steps for calculating the left ventricular systolic time (LVST) are as follows: Left ventricular systolic time (LVST) is the time interval from the peak of S1 to the peak of S2. LVST = S2 peak point - S1 peak point.
[0134] The specific steps for calculating the heart murmur score are as follows: Heart murmurs are mainly manifested as energy changes in diastole and systole, which are called systolic murmurs (SM) and diastolic murmurs (DM) in phonocardiography. After obtaining S1, systole, S2, and diastole in a cardiac cycle, the energy ratio of each component in this cardiac cycle can be calculated. Single sampling point X i Energy E i It can be defined as E i = i * i The power P of the heart sound component can be defined as Where n is the total number of sampling points of this component. The systolic murmur score SMS is defined as the ratio of the sum of the power of the systolic period in all recognized complete cardiac cycles in the entire heart sound segment to the sum of the overall power of the complete cardiac cycle: Where P SM is the power of the systolic period in a single cardiac cycle, P PCG is the overall power of a single cardiac cycle. Similarly, the diastolic murmur score DMS can be obtained.
[0135] In this embodiment, the heart sound features of the target heart sound signal are calculated based on the target heart sound signal segmentation results with high segmentation accuracy, which can improve the accuracy of feature calculation. Medical diagnosis based on the high-precision heart sound features can greatly reduce the possibility of misdiagnosis and improve diagnostic efficiency.
[0136] In one embodiment, a heart sound signal segmentation and feature calculation method, such as Fig.15 As shown, including:
[0137] The target heart sound signal is subjected to data processing to obtain a first intermediate signal; the data processing includes at least one of resampling or data normalization; the first intermediate signal is subjected to noise reduction processing to obtain a second intermediate signal; the noise reduction processing includes at least one of bandpass filtering noise reduction or wavelet transform noise reduction; the second intermediate signal is subjected to Shannon energy amplification processing to obtain a third intermediate signal; the third intermediate signal is subjected to Hibbert transform to obtain a fourth intermediate signal; the fourth intermediate signal is subjected to envelope extraction to obtain an original envelope signal corresponding to the target heart sound signal; the original envelope signal is subjected to sliding average processing to obtain an envelope signal.
[0138] Determine the time interval in the envelope signal based on the cardiac cycle; determine the detection boundary threshold corresponding to the time interval according to the signal minimum value and signal average value in the time interval; determine at least one detection start point and at least one detection end point in the time interval according to the detection boundary threshold; take the maximum value of the signal between every two adjacent preceding detection start points and following detection end points as a peak value, and determine the corresponding initial wave peak according to each peak value. Obtain the initial wave peak time difference between every two adjacent initial wave peaks. According to the initial peak time difference between each two adjacent initial peaks, a first time difference sequence corresponding to the envelope signal is obtained; based on the first preset number of peaks, a first value interval is determined in the first time difference sequence; according to the number of initial peak time differences included in the first value interval, the average value of the initial peak time difference in the first value interval is calculated, and according to the second preset ratio and the average value of the initial peak time difference, a first time difference threshold of the first value interval is determined, and according to the third preset ratio and the average value of the initial peak time difference, a second time difference threshold of the first value interval is determined; within the first value interval, if there is an initial peak time difference less than the first time difference threshold, the initial peak with the smallest peak value among the two adjacent initial peaks corresponding to the corresponding initial peak time difference is removed; the remaining initial peaks are used as multiple target peaks. Within the first value interval, if there is an initial peak time difference greater than the second time difference threshold, a peak missing mark is set for the corresponding initial peak time difference; the peak missing mark is used to indicate that there is an unidentified peak between the two adjacent initial peaks corresponding to the corresponding initial peak time.
[0139] Obtain a target peak time difference between every two adjacent target peaks, and obtain a second time difference sequence corresponding to the envelope signal based on the target peak time difference between every two adjacent target peaks; determine a second value interval in the second time difference sequence based on a second preset number of peaks; calculate an average value of the target peak time difference in the second value interval based on the number of target peak time differences included in the second value interval; within the second value interval, if there is a target peak time difference that is less than the average value of the target peak time difference, determine that, of the two adjacent target peaks corresponding to the corresponding target peak time difference, the heart sound type to which the previous target peak belongs is the first heart sound, and the heart sound type to which the next target peak belongs is the second heart sound; within the second value interval, if there is a target peak time difference that is greater than the average value of the target peak time difference, determine that, of the two adjacent target peaks corresponding to the corresponding target peak time difference, the heart sound type to which the previous target peak belongs is the second heart sound, and the heart sound type to which the next target peak belongs is the first heart sound.
[0140] According to the first preset ratio and the peak amplitude of each target peak, the starting signal value and the ending signal value corresponding to each target peak are obtained, and the duration corresponding to each target peak is determined according to the starting signal value and the ending signal value corresponding to each target peak; if there is a target peak corresponding to a duration greater than the preset maximum duration, the time interval corresponding to the corresponding target peak is determined according to the preset maximum duration; if there is a target peak corresponding to a duration less than the preset maximum duration, the time interval corresponding to the corresponding target peak is determined according to the duration corresponding to the corresponding target peak.
[0141] According to the heart sound type and corresponding time interval of each target wave peak, the first heart sound time interval and the second heart sound time interval in the target heart sound signal are determined; the period between two adjacent first heart sound time intervals and second heart sound time intervals is determined as the systole period; the period between two adjacent second heart sound time intervals and first heart sound time intervals is determined as the diastole period.
[0142] According to the segmentation result of the target heart sound signal, the heart sound characteristics of the target heart sound signal are obtained; the heart sound characteristics include at least one of average heart rate, left ventricular contraction time or heart murmur score.
[0143] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0144] Based on the same inventive concept, the embodiment of the present application also provides a heart sound signal segmentation device for implementing the heart sound signal segmentation method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations of one or more heart sound signal segmentation device embodiments provided below can refer to the limitations of the heart sound signal segmentation method above, and will not be repeated here.
[0145] In one embodiment, Fig.16 As shown, a heart sound signal segmentation device 1600 is provided, comprising: an acquisition module 1601, a detection module 1602, a determination module 1603, a positioning module 1604 and a segmentation module 1605, wherein:
[0146] The acquisition module 1601 is used to acquire the envelope signal corresponding to the target heart sound signal.
[0147] The detection module 1602 is used to identify multiple initial peaks in the envelope signal, obtain the initial peak time difference between every two adjacent initial peaks, and determine multiple target peaks from the multiple initial peaks according to each initial peak time difference.
[0148] The determination module 1603 is used to obtain the target peak time difference between every two adjacent target peaks, and determine the heart sound type to which every two adjacent target peaks belong according to each target peak time difference. The heart sound type is divided into the first heart sound and the second heart sound.
[0149] Positioning module 1604 is used to obtain the starting signal value and the ending signal value corresponding to each target peak according to the first preset ratio and the peak amplitude of each target peak, and determine the time interval corresponding to the corresponding target peak in the envelope signal according to the starting signal value and the ending signal value corresponding to each target peak.
[0150] The segmentation module 1605 is used to segment the target heart sound signal according to the heart sound type to which each target wave peak belongs and the corresponding time interval.
[0151] In one embodiment, the acquisition module 1601 is also used to perform data processing on the target heart sound signal to obtain a first intermediate signal; the data processing includes at least one of resampling or data normalization; the first intermediate signal is subjected to noise reduction processing to obtain a second intermediate signal; the noise reduction processing includes at least one of bandpass filtering noise reduction or wavelet transform noise reduction; the second intermediate signal is subjected to Shannon energy amplification processing to obtain a third intermediate signal; the third intermediate signal is subjected to Hibbert transform to obtain a fourth intermediate signal; and the envelope signal is obtained according to the fourth intermediate signal.
[0152] In one embodiment, the acquisition module 1601 is further used to perform envelope extraction on the fourth intermediate signal to obtain an original envelope signal corresponding to the target heart sound signal; and perform sliding average processing on the original envelope signal to obtain the envelope signal.
[0153] In one embodiment, the detection module 1602 is also used to determine a time interval in the envelope signal based on the cardiac cycle; determine a detection boundary threshold corresponding to the time interval based on the signal minimum value and the signal average value within the time interval; determine at least one detection start point and at least one detection end point within the time interval based on the detection boundary threshold; take the signal maximum value between every two adjacent previous detection start points and subsequent detection end points as a peak value, and determine the corresponding initial wave peak based on each peak value.
[0154] In one embodiment, the detection module 1602 is also used to obtain a first time difference sequence corresponding to the envelope signal based on the initial peak time difference between every two adjacent initial peaks; determine a first value interval in the first time difference sequence based on a first preset number of peaks; calculate the average value of the initial peak time difference in the first value interval based on the number of initial peak time differences included in the first value interval, and determine a first time difference threshold for the first value interval based on a second preset ratio and the average value of the initial peak time difference, and determine a second time difference threshold for the first value interval based on a third preset ratio and the average value of the initial peak time difference; within the first value interval, if there is an initial peak time difference less than the first time difference threshold, remove the initial peak with the smallest peak value between the two adjacent initial peaks corresponding to the corresponding initial peak time difference; and use the remaining initial peaks as multiple target peaks.
[0155] In one embodiment, the detection module 1602 is also used to set a peak missing mark for the corresponding initial peak time difference if there is an initial peak time difference greater than the second time difference threshold within the first value interval; the peak missing mark is used to characterize the existence of an unidentified peak between two adjacent initial peaks corresponding to the corresponding initial peak time.
[0156] In one embodiment, the determination module 1603 is also used to obtain a second time difference sequence corresponding to the envelope signal based on the target peak time difference between every two adjacent target peaks; determine a second value interval in the second time difference sequence based on a second preset number of peaks; calculate the target peak time difference average value in the second value interval based on the number of target peak time differences included in the second value interval; within the second value interval, if there is a target peak time difference that is less than the target peak time difference average value, determine that among the two adjacent target peaks corresponding to the corresponding target peak time difference, the heart sound type to which the previous target peak belongs is the first heart sound, and the heart sound type to which the next target peak belongs is the second heart sound; within the second value interval, if there is a target peak time difference that is greater than the target peak time difference average value, determine that among the two adjacent target peaks corresponding to the corresponding target peak time difference, the heart sound type to which the previous target peak belongs is the second heart sound, and the heart sound type to which the next target peak belongs is the first heart sound.
[0157] In one embodiment, the positioning module 1604 is also used to determine the duration corresponding to each target peak based on the start signal value and the end signal value corresponding to each target peak; if there is a target peak whose duration is greater than the preset maximum duration, the time interval corresponding to the corresponding target peak is determined according to the preset maximum duration; if there is a target peak whose duration is less than the preset maximum duration, the time interval corresponding to the corresponding target peak is determined according to the duration corresponding to the corresponding target peak.
[0158] In one embodiment, the segmentation module 1605 is also used to determine the first heart sound time interval and the second heart sound time interval in the target heart sound signal according to the heart sound type to which each target wave peak belongs and the corresponding time interval; determine the period between two adjacent first heart sound time intervals and second heart sound time intervals as the systole period; and determine the period between two adjacent second heart sound time intervals and the first heart sound time interval as the diastole period.
[0159] In one embodiment, the apparatus further comprises:
[0160] The calculation module 1606 is used to obtain the heart sound characteristics of the target heart sound signal according to the segmentation result of the target heart sound signal; the heart sound characteristics include at least one of the average heart rate, left ventricular contraction time or heart murmur score.
[0161] Each module in the above-mentioned heart sound signal segmentation device can be implemented in whole or in part by software, hardware or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0162] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.17 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store heart sound signal data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method 17 is implemented.
[0163] Those skilled in the art will understand that Fig.17 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0164] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0165] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0166] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0167] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0168] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0169] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0170] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A heart sound signal segmentation method, characterized in that: The method comprises: Acquire an envelope signal corresponding to the target heart sound signal; Identify multiple initial peaks in the envelope signal, obtain an initial peak time difference between every two adjacent initial peaks, and determine multiple target peaks from the multiple initial peaks according to each initial peak time difference; Obtaining a target peak time difference between every two adjacent target peaks, and determining the heart sound type to which every two adjacent target peaks belong according to each target peak time difference, wherein the heart sound type is divided into a first heart sound and a second heart sound; According to the first preset ratio and the peak amplitude of each target peak, obtaining the start signal value and the end signal value corresponding to each target peak, and determining the time interval corresponding to the corresponding target peak in the envelope signal according to the start signal value and the end signal value corresponding to each target peak; The target heart sound signal is segmented according to the heart sound type to which each target peak belongs and the corresponding time interval.
2. The method according to claim 1, characterized in that The step of acquiring an envelope signal corresponding to the target heart sound signal includes: Performing data processing on the target heart sound signal to obtain a first intermediate signal; the data processing includes at least one of resampling or data normalization; Performing noise reduction processing on the first intermediate signal to obtain a second intermediate signal; the noise reduction processing includes at least one of bandpass filtering noise reduction or wavelet transform noise reduction; Performing a fragrant energy amplification process on the second intermediate signal to obtain a third intermediate signal; Performing a Hibbert transform on the third intermediate signal to obtain a fourth intermediate signal; The envelope signal is obtained according to the fourth intermediate signal.
3. The method according to claim 2, characterized in that The acquiring the envelope signal according to the fourth intermediate signal comprises: Performing envelope extraction on the fourth intermediate signal to obtain an original envelope signal corresponding to the target heart sound signal; Perform sliding average processing on the original envelope signal to obtain the envelope signal.
4. The method according to claim 1, characterized in that: The identifying a plurality of initial peaks in the envelope signal comprises: determining a time interval in the envelope signal based on a cardiac cycle; Determine a detection boundary threshold corresponding to the time interval according to a minimum signal value and an average signal value within the time interval; Determining at least one detection starting point and at least one detection ending point within the time interval according to the detection boundary threshold; The maximum value of the signal between every two adjacent preceding detection start points and succeeding detection end points is taken as a peak value, and the corresponding initial wave peak is determined according to each peak value.
5. The method according to claim 1, characterized in that The step of determining a plurality of target peaks from a plurality of initial peaks according to each initial peak time difference comprises: Acquire a first time difference sequence corresponding to the envelope signal according to the initial peak time difference between every two adjacent initial peaks; Determining a first value interval in the first time difference sequence based on a first preset number of peaks; Calculate the average value of the initial peak time differences in the first value interval according to the number of initial peak time differences included in the first value interval, determine the first time difference threshold of the first value interval according to a second preset ratio and the average value of the initial peak time differences, and determine the second time difference threshold of the first value interval according to a third preset ratio and the average value of the initial peak time differences; In the first value interval, if there is an initial peak time difference that is less than the first time difference threshold, the initial peak with the smallest peak value among two adjacent initial peaks corresponding to the corresponding initial peak time difference is removed; The remaining initial peaks are used as multiple target peaks.
6. The method according to claim 5, characterized in that The method further comprises: Within the first value interval, if there is an initial peak time difference greater than the second time difference threshold, a peak missing mark is set for the corresponding initial peak time difference; the peak missing mark is used to indicate that there is an unidentified peak between two adjacent initial peaks corresponding to the corresponding initial peak time.
7. The method according to claim 1, characterized in that Determining the heart sound types to which each two adjacent target peaks belong according to each target peak time difference includes: Acquire a second time difference sequence corresponding to the envelope signal according to the target peak time difference between every two adjacent target peaks; Determining a second value interval in the second time difference sequence based on a second preset number of peaks; Calculate the average value of the target peak time difference in the second value interval according to the number of target peak time differences included in the second value interval; In the second value interval, if there is a target peak time difference that is less than the target peak time difference average value, determine that of two adjacent target peaks corresponding to the corresponding target peak time difference, the heart sound type of the first target peak is the first heart sound, and the heart sound type of the second target peak is the second heart sound; Within the second value interval, if there is a target peak time difference that is greater than the target peak time difference average value, it is determined that among the two adjacent target peaks corresponding to the corresponding target peak time difference, the heart sound type of the previous target peak is the second heart sound, and the heart sound type of the next target peak is the first heart sound.
8. The method according to claim 1, characterized in that The step of determining the time interval corresponding to each target peak in the envelope signal according to the start signal value and the end signal value corresponding to each target peak includes: Determine the duration of each target wave peak according to the start signal value and the end signal value corresponding to each target wave peak; If the duration corresponding to the target peak is greater than the preset maximum duration, the time interval corresponding to the corresponding target peak is determined according to the preset maximum duration; If there is a target peak whose duration is less than the preset maximum duration, the time interval corresponding to the target peak is determined according to the duration corresponding to the target peak.
9. The method according to claim 1, characterized in that: The target heart sound signal is segmented according to the heart sound type and the corresponding time interval to which each target peak belongs, including: Determine a first heart sound time interval and a second heart sound time interval in the target heart sound signal according to the heart sound type and the corresponding time interval to which each target wave peak belongs; The period between two adjacent first heart sound time intervals and second heart sound time intervals is determined as the systolic period; The period between two adjacent second heart sound time intervals and first heart sound time intervals is determined as the diastolic period.
10. The method according to claim 1, characterized in that The method further comprises: According to the segmentation result of the target heart sound signal, the heart sound characteristics of the target heart sound signal are obtained; the heart sound characteristics include at least one of average heart rate, left ventricular contraction time or heart murmur score.
11. A heart sound signal segmentation device, characterized in that: The device comprises: An acquisition module, used to acquire an envelope signal corresponding to a target heart sound signal; A detection module, used to identify multiple initial peaks in the envelope signal, obtain an initial peak time difference between every two adjacent initial peaks, and determine multiple target peaks from the multiple initial peaks according to each initial peak time difference; A determination module, used to obtain a target peak time difference between every two adjacent target peaks, and determine the heart sound type to which every two adjacent target peaks belong according to each target peak time difference, wherein the heart sound type is divided into a first heart sound and a second heart sound; A positioning module, used to obtain a start signal value and an end signal value corresponding to each target peak according to a first preset ratio and a peak amplitude of each target peak, and determine a time interval corresponding to the corresponding target peak in the envelope signal according to the start signal value and the end signal value corresponding to each target peak; The segmentation module is used to segment the target heart sound signal according to the heart sound type to which each target wave peak belongs and the corresponding time interval.
12. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 10 are implemented.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.
