A dual feature based heart sound segmentation method

CN116895285BActive Publication Date: 2026-10-27NANJING UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310370286.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-10
Publication Date
2026-10-27
Estimated Expiration
2043-04-10

AI Technical Summary

Technical Problem

基于时域包络特征的心音分割算法,会受到提取包络方法的影响,例如通过希尔伯特变换提取的包络有较大的毛刺,从而影响心音分割的准确度

Benefits of technology

[0038]与现有技术相比,本发明的有益效果:本发明科学合理,通过本发明算法得到的平均F1分数为90.49±2.30%,而基于逻辑回归的隐半马尔可夫模型算法得到的平均F1分数为83.09±2.31%,结果表明本发明所提算法具有更好的心音分割效果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116895285B_ABST
    Figure CN116895285B_ABST
Patent Text Reader

Abstract

The application discloses a heart sound segmentation method based on double features, and belongs to the technical field of signal processing. The heart sound signal extracted through a millimeter wave radar is subjected to time domain segmentation of four different physiological stages, and the method comprises the following steps: after the heart sound signal of a tested person is obtained through the millimeter wave radar, the first derivative feature and the frequency envelope feature of the heart sound signal are extracted; the feature threshold values corresponding to the two feature values are respectively calculated through the maximum interclass variance method, and the heart sound signal is preliminarily segmented into the first or second heart sound part and the non-heart sound part in the time domain by means of the feature threshold values; according to the specific physiological characteristics of different heart sounds in the time aspect, the identification of the first heart sound and the second heart sound and the time domain segmentation of the four physiological stages of the heart sound signal are completed; the application is scientific and reasonable, and the algorithm has better heart sound segmentation effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of signal processing technology, specifically to a heart sound segmentation method based on dual features. Background Technology

[0002] Heart sounds reflect the mechanical movement of the heart and major blood vessels. Heart diseases can also cause abnormal heart sounds; therefore, accurate heart sound information can aid in the diagnosis of heart diseases. The time it takes for the heart to complete one full systolic and diastolic phase is called a cardiac cycle, and heart sounds recur with each heartbeat. Each cardiac cycle typically includes a first heart sound (S1) and a second heart sound (S2), but these two sounds are generated by completely different causes. The first heart sound is generated by the closure of the mitral and tricuspid valves during ventricular systole; the second heart sound is generated by the closure of the aortic and pulmonary valves during ventricular diastole. Accurate segmentation of heart sound signals involves precise temporal localization of S1 and S2, which is fundamental for heart sound information analysis such as heart sound classification, abnormal heart sound identification, and murmur detection, and is also crucial for heart sound feature extraction. Heart sound segmentation algorithms have always been a focus of heart sound research. Heart sound segmentation algorithms based on temporal envelope features are affected by the envelope extraction method; for example, the envelope extracted using Hilbert transform has significant spikes, thus affecting the accuracy of heart sound segmentation. Research based on Hidden Markov Models requires a large number of data samples to calculate model parameters, resulting in complex algorithms and segmentation performance limited by these parameters. Therefore, a low-complexity yet accurate method for heart sound segmentation is needed. Summary of the Invention

[0003] The purpose of this invention is to provide a dual-feature-based heart sound segmentation method that, with low complexity, can more accurately segment the time domain of heart sound signals at different physiological stages.

[0004] To achieve the above objectives, the present invention provides the following technical solution: a heart sound segmentation method based on dual features, comprising the following steps:

[0005] Step 1: After obtaining the heart sound signal of the test subject through millimeter-wave radar, extract the first derivative features and frequency envelope features of the heart sound signal;

[0006] Step 2: Calculate the feature thresholds corresponding to the two feature quantities using the Otsu's method. Use the feature thresholds to initially segment the heart sound signal in the time domain into the first heart sound or second heart sound part and the non-heart sound part.

[0007] Step 3: Based on the specific physiological characteristics of different heart sounds in terms of time, complete the identification of the first heart sound S1 and the second heart sound S2, and the time-domain segmentation of the four physiological stages of the heart sound signal.

[0008] Preferably, step S2 includes the following specific steps:

[0009] Step 21: In the time domain, assuming the heart sound signal is s(t), then the first derivative of s(t) is:

[0010]

[0011] When Δt is small, it can be approximated as:

[0012]

[0013] Where T s Given the sampling period of the heart sound signal s(t), the time-domain characteristics s′(t) are obtained by taking the absolute value of s′(t). p (t);

[0014] Step 22: In terms of time and frequency, perform time-frequency analysis on the heart sound signal s(t) using short-time Fourier transform:

[0015]

[0016] Where h(t) is a window function, the window length needs to meet two conditions: first, it must ensure good time resolution; second, it should not exceed the duration of the first or second heart sound. In this invention, the window length is set to 100ms. Through the short-time Fourier transform of the heart sound signal s(t), the frequency envelope FEnv of the heart sound signal with a frequency band range of [f1, f2] is obtained as follows:

[0017]

[0018] Where f i = i·Δf, where Δf is the frequency interval of the STFT, and the frequency envelope FEnv(t) represents the change of the sum of frequency energy within [f1,f2] over time;

[0019] Step 23, Temporal characteristics of heart sound signals s p The heart sound signal is composed of a set of feature vectors, namely g(t) and the time-frequency feature FEnv(t). t =[s p [FEnv], by setting a threshold, the heart sound signal is divided into two parts in the time dimension, including the first heart sound or the second heart sound part, and the non-heart sound part;

[0020] Step 24: Let θ represent the threshold vector, i.e., θ = [θ1, θ2]. If s p (t)>θ1 and FEnv(t)>θ2, that is, g t If θ1 > θ, then time t is classified as either the first or second heart sound; otherwise, time t is classified as a non-heart sound, where θ1 is the feature vector s. pThe corresponding threshold, θ2 is the threshold corresponding to the feature vector FEnv.

[0021] Preferably, the frequency energy of the heart sound signal belonging to the time interval of the first heart sound S1 and the second heart sound S2 is higher than that of the non-heart sound time interval, and the set frequency envelope features include FEnv1, FEnv2 and FEnv3, which represent three different frequency envelopes with different frequency bands, wherein the frequency range of FEnv1 is 20-30Hz, the frequency range of FEnv2 is 30-40Hz and the frequency range of FEnv3 is 40-60Hz.

[0022] Preferably, the thresholds corresponding to the two feature quantities are set as θ1 and θ2, respectively, and the calculation steps for threshold θ2 are the same as those for θ1. The specific steps include the following:

[0023] (1) Vector s p The elements in the vector are quantized, and all element values ​​are rounded to three decimal places according to the rounding principle. The quantized vector s is then obtained. p Represented as s p =[s p,1 ,s p,1 ,…,s p,L ], where L is vector s p The number of elements in the vector s p The value of the element in the middle is s p,i The number of elements is n i Calculate the element value as s p,i The probability p of the element appearing i for:

[0024]

[0025] Initialize threshold θ th Let θ th =mean(s p ), where the function To find the mean function;

[0026] (2) Based on the threshold θ th Vector s p The elements in the formula are divided into two parts, and s is calculated. p The probability P1 that the element belongs to the first heart sound S1 and the second heart sound S2, and the probability P2 that it is not a heart sound:

[0027]

[0028]

[0029] (3) Calculate s pThe elemental average μ1 of the first heart sound S1 and the second heart sound S2, and the elemental average μ2 of the non-heart sound portion:

[0030]

[0031]

[0032] The threshold is θ th At that time, the variance between classes is:

[0033] σ 2 =P1(μ1-μ0) 2 +P2(μ2-μ0) 2

[0034] in For vector s p The average value of the elements;

[0035] (4) Let θ th =θ th +0.001, if θ th Greater than s p If the maximum element value is found, the process stops; otherwise, proceed to step 22. After the above steps, the threshold θ1 is obtained.

[0036]

[0037] Preferably, in step (2), based on the threshold θ th Vector s p The elements in the array are divided into two parts, specifically including elements with values ​​greater than θ. th The partial and elemental values ​​of the first heart sound S1 and the second heart sound S2 are less than θ. th The non-heart sounds.

[0038] Compared with the prior art, the beneficial effects of the present invention are as follows: The present invention is scientific and reasonable. The average F1 score obtained by the algorithm of the present invention is 90.49±2.30%, while the average F1 score obtained by the hidden semi-Markov model algorithm based on logistic regression is 83.09±2.31%. The results show that the algorithm proposed in the present invention has better heart sound segmentation effect. Attached Figure Description

[0039] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof.

[0040] In the attached diagram:

[0041] Figure 1 This is a schematic diagram of the heart sound signals acquired by the millimeter-wave radar of this invention;

[0042] Figure 2 This is a schematic diagram of the time-domain distribution model of the heart sound signal of the present invention;

[0043] Figure 3 This is a schematic diagram of the time-domain characteristics and three frequency envelopes of the heart sound signal of the present invention;

[0044] Figure 4 This is a schematic diagram of the dual-feature threshold segmentation of the present invention;

[0045] Figure 5 This is a schematic diagram of heart sound signal segmentation according to the present invention. Detailed Implementation

[0046] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0047] Example: A heart sound segmentation method based on dual features, which achieves segmentation of heart sound signals extracted by millimeter-wave radar at different physiological stages in the time domain, includes the following steps:

[0048] Step 1: After obtaining the heart sound signal of the test subject through millimeter-wave radar, extract the first derivative features and frequency envelope features of the heart sound signal;

[0049] Step 2: Calculate the feature thresholds corresponding to the two feature quantities using the Otsu's method. Use these feature thresholds to initially segment the heart sound signal in the time domain into either the first or second heart sound portion and a non-heart sound portion. Specific steps include the following:

[0050] Step 21: In the time domain, assuming the heart sound signal is s(t), then the first derivative of s(t) is:

[0051]

[0052] When Δt is small, it can be approximated as:

[0053]

[0054] Where T s Given the sampling period of the heart sound signal s(t), the time-domain characteristics s′(t) are obtained by taking the absolute value of s′(t). p (t), from Figure 1 As shown in the heart sound signal waveform diagram, it can be observed that the waveforms of the first and second heart sounds generated by the vibration of the heart valves exhibit significant up-and-down fluctuations. Furthermore, the amplitudes of the first and second heart sounds are significantly higher than those of the non-heart sound portions. The durations of the first and second heart sounds are shorter than those during systole (excluding the first heart sound) and diastole (excluding the second heart sound). This corresponds to the time-domain characteristics s of the S1 and S2 portions of the heart sound signal.p The value of (t) will be significantly higher than that of non-heart sounds;

[0055] Step 22: In terms of time and frequency, perform time-frequency analysis on the heart sound signal s(t) using short-time Fourier transform:

[0056]

[0057] Where h(t) is the window function, the window length needs to meet two conditions: first, it must ensure good time resolution; second, it should not exceed the duration of the first or second heart sound. In this invention, the window length is set to 100ms. Through the short-time Fourier transform of the heart sound signal s(t), the frequency envelope FEnv of the heart sound signal with a frequency band range of [f1, f2] is obtained as follows:

[0058]

[0059] Where f i = i·Δf, where Δf is the frequency interval of the STFT, and the frequency envelope FEnv(t) represents the change of the sum of frequency energy within [f1,f2] over time. In the heart sound signal, the frequency energy of the time intervals of the first heart sound (S1) and the second heart sound (S2) is higher than that of the non-heart sound time intervals. The set frequency envelope features include FEnv1, FEnv2 and FEnv3, which represent three different frequency envelopes with different frequency bands. The frequency range of FEnv1 is 20-30Hz, the frequency range of FEnv2 is 30-40Hz, and the frequency range of FEnv3 is 40-60Hz.

[0060] Step 23, Temporal characteristics of heart sound signals s p The heart sound signal is composed of a set of feature vectors, namely g(t) and the time-frequency feature FEnv(t). t =[s p [FEnv], by setting a threshold, the heart sound signal is divided into two parts in the time dimension, including the first heart sound or the second heart sound part, and the non-heart sound part;

[0061] Step 24: Let θ represent the threshold vector, i.e., θ = [θ1, θ2]. If s p (t)>θ1 and FEnv(t)>θ2, that is, g t If θ1 > θ, then time t is classified as either the first or second heart sound; otherwise, time t is classified as a non-heart sound, where θ1 is the feature vector s. p The corresponding threshold, θ2 is the threshold corresponding to the feature vector FEnv.

[0062] The thresholds corresponding to the two feature quantities are set as θ1 and θ2, respectively, and the calculation steps for threshold θ2 are the same as those for θ1. The specific steps are as follows:

[0063] (1) Vector s p The elements in the vector are quantized, and all element values ​​are rounded to three decimal places according to the rounding principle. The quantized vector s is then obtained. p Represented as s p =[s p,1 ,s p,1 ,…,s p,L ], where L is vector s p The number of elements in the vector s p The value of the element in the middle is s p,i The number of elements is n i Calculate the element value as s p,i The probability p of the element appearing i for:

[0064]

[0065] Initialize threshold θ th Let θ th =mean(s p ), where the function To find the mean function;

[0066] (2) Based on the threshold θ th Vector s p The elements in the array are divided into two parts, specifically including elements with values ​​greater than θ. th The first heart sound (S1) and the second heart sound (S2) have partial and element values ​​less than θ. th For the non-heart sound portion, calculate s p The probability P1 that the element belongs to the first heart sound (S1) and the second heart sound (S2) S2, and the probability P2 that it is not a heart sound:

[0067]

[0068]

[0069] (3) Calculate s p The elemental average μ1 of the first heart sound (S1) and the second heart sound (S2) and the elemental average μ2 of the non-heart sound portion:

[0070]

[0071]

[0072] The threshold is θ th At that time, the variance between classes is:

[0073] σ 2 =P1(μ1-μ0) 2+P2(μ2-μ0) 2

[0074] in For vector s p The average value of the elements;

[0075] (4) Let θ th =θ th +0.001, if θ th Greater than s p If the maximum element value is found, the process stops; otherwise, proceed to step 22. After the above steps, the threshold θ1 is obtained.

[0076]

[0077] Step 3: Based on the specific physiological characteristics of different heart sounds in terms of time, complete the identification of the first heart sound S1 and the second heart sound S2, and the time-domain segmentation of the four physiological stages of the heart sound signal. This specifically includes the following steps:

[0078] Among them, such as Figure 2 As shown, Figure 2 This is a simplified time-domain distribution model of the heart sound signal obtained after processing by the algorithm of this invention. In the model, the heart sound signal is divided into signal segments of different lengths along the time dimension. The red heart sound signal segments represent the first or second heart sound, while the white portions represent the non-heart sound portions during systole (excluding the first heart sound) or diastole (excluding the second heart sound). The final segmentation of the heart sound signal can only be completed after determining the heart sound type of the red heart sound segments.

[0079] According to the literature, the duration of ventricular systole in a complete cardiac cycle is generally shorter than that of diastole, and the onset of the first and second heart sounds corresponds to the onset of ventricular systole and diastole, respectively. Figure 2 The time-domain distribution model of heart sound signals and the method for identifying heart sound types are as follows: If t start,i -t start,i-1 <t start,i+1 -t start,i , then s hs,i It is the first heart sound; if t start,i -t start,i-1 >t start,i+1 -t start,i , then s hs,i It is the second heart sound, where s hs,i For the i-th S1 or S2 partial signal segment, t start,iThis represents the start time of the i-th S1 or S2 segment of the signal. After the heart sound type identification is completed, the heart sound signal in a cardiac cycle can be divided into four continuous time phases: S1, Sys, S2, and Dia, which correspond to the first heart sound, the systolic phase excluding the first heart sound, the second heart sound, and the diastolic phase excluding the second heart sound, respectively.

[0080] Specific steps: For each heart sound signal data, the heart sound signal is initially segmented in the time domain into the first or second heart sound part and the non-heart sound part using a feature threshold. The first derivative s′(t) and frequency envelope FEnv(t) of the heart sound signal s(t) are extracted to obtain the feature vector s. p And FEnv. Temporal characteristics of heart sound signals s p (t) and three frequency envelopes such as Figure 3 As shown, the envelopes of the three frequencies are all normalized. The threshold vector θ corresponding to the heart sound signal s(t) is calculated using the maximum inter-class variance method. The threshold vector θ is then used to segment the first heart sound (S1), the second heart sound (S2), and the non-heart sound components of the heart sound signal s(t) along the time axis, as shown below. Figure 4 As shown. At this point, the heart sound signal is divided into a first heart sound (S1) and a second heart sound (S2) of varying durations, as well as non-heart sound signal segments. Since the systolic phase of the ventricle is generally shorter than the diastolic phase in clinical practice, the signal segments of the first heart sound (S1) and the second heart sound (S2) are classified as either the first or second heart sound based on the time interval between adjacent segments. Ultimately, the entire heart sound signal is divided into four time phases: S1, Sys, S2, and Dia. When the frequency envelope is selected as FEnv1, the heart sound segmentation result is as follows. Figure 5 As shown. From Figure 5 It can be seen that the present invention has achieved excellent results in the segmentation and localization of heart sound signals.

[0081] To accurately evaluate the segmentation effect of the proposed algorithm on heart sound signals, the results of manual heart sound signal segmentation were used as a reference standard. The proposed algorithm was compared with the LR-HSMM algorithm, and the F1 score was selected as the evaluation metric to assess the two algorithms. The F1 score is a commonly used metric for measuring test accuracy, which includes both precision (p) and recall (r). The calculation formula is as follows:

[0082]

[0083] According to the algorithm proposed in this invention, the p, r, and F1 scores of heart sound segmentation for six test subjects are shown in the following table, which is the F1 score table of heart sound segmentation using the algorithm proposed in this invention:

[0084]

[0085] Note: AVG: Average

[0086] As can be seen from the average F1 scores of the six different testers in the table above, when the frequency envelope is selected as FEnv1, the present invention has a significantly better effect on the segmentation of heart sound signals than FEnv2 and FEnv3.

[0087] The following table compares the F1 scores of the two algorithms.

[0088]

[0089] Note: AVG: Average. As can be seen from the table above, when the frequency envelope is FEnv1, whether it is the first heart sound (S1) or the second heart sound (S2), the present invention outperforms the LR-HSMM algorithm in the three indicators of p, r and F1 score.

[0090] The results in the two tables above are the average values ​​of all data indicators. Bold text indicates the optimal F1 score. The feature extraction part of the LR-HSMM algorithm uses homomorphic envelopes. Specifically, for the F1 score of the first heart sound, this invention achieved 92.29±0.94%, an improvement of 7.07% compared to the LR-HSMM algorithm; for the F1 score of the second heart sound, this invention achieved 88.71±4.61%, an improvement of 7.76% compared to the LR-HSMM algorithm.

[0091] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A heart sound segmentation method based on dual features, characterized in that, Includes the following steps: Step 1: After obtaining the heart sound signal of the test subject through millimeter-wave radar, extract the first derivative features and frequency envelope features of the heart sound signal; Step 2: Calculate the feature thresholds corresponding to the two feature quantities using the Otsu's method. Use the feature thresholds to initially segment the heart sound signal in the time domain into the first heart sound or second heart sound part and the non-heart sound part. Step 3: Based on the specific physiological characteristics of different heart sounds in terms of time, complete the identification of the first and second heart sounds and the time-domain segmentation of the four physiological stages of the heart sound signal; Step 2 specifically includes the following steps: Step 21: In the time domain, assume the heart sound signal is... ,but The first derivative is: ; when When the size is small, it can be approximated as: ; in Heart sound signal The sampling period, The heart sound signal is obtained by taking the absolute value. Temporal characteristics ; Step 22: In terms of time and frequency, the heart sound signal is analyzed using a short-time Fourier transform. Perform time-frequency analysis: ; in As a window function, through the heart sound signal The short-time Fourier transform yields the frequency band range of the heart sound signal. Frequency envelope for: ; in , For STFT frequency interval, frequency envelope It represents The change of the sum of internal frequency energies over time; Step 23: Temporal characteristics of heart sound signals and time-frequency characteristics This constitutes a set of feature vectors for the heart sound signal, namely By setting a threshold, the heart sound signal is divided into two parts in the time dimension, including the first heart sound or the second heart sound part, and the non-heart sound part; Step 24, let Represents the threshold vector, i.e. ,like and ,Right now Then at time Classified as either the first or second heart sound; Otherwise at any time Classified as non-cardiac sounds, among which For feature vectors The corresponding threshold, For feature vectors The corresponding threshold; The thresholds corresponding to the two feature quantities are respectively set as and And threshold Calculation steps and The specific steps are the same, including the following: (1) Vector The elements in the vector are quantized, and all element values ​​are rounded to three decimal places according to the rounding principle. The quantized vector is then... Represented as ,in For vectors The number of elements in a vector The value of the middle element is The number of elements is Calculate the element value The probability of the element appearing for: ; Initialize threshold ,make , where the function To find the mean function; (2) Based on the threshold vector The elements in the calculation are divided into two parts. The probability that an element belongs to the first or second heart sound. And the probability of non-heart sounds : ; ; (3) Calculation The average value of the elements belonging to the first and second heart sounds and the elemental mean of the non-heart sound portion : ; ; The threshold is At that time, the variance between classes is: ; in , is a vector The average value of the elements; (4) Order ,like Greater than If the maximum element value is found, the process stops; otherwise, proceed to step 22. The threshold is obtained through the above steps. : 。 2. The heart sound segmentation method based on dual features according to claim 1, characterized in that: The frequency energy of the heart sound signal belonging to the first and second heart sound time periods is higher than that of the non-heart sound time periods. The set frequency envelope features include FEnv1, FEnv2 and FEnv3, which represent three different frequency envelopes with different frequency bands. The frequency range of FEnv1 is 20-30 Hz, the frequency range of FEnv2 is 30-40 Hz and the frequency range of FEnv3 is 40-60 Hz.

3. The heart sound segmentation method based on dual features according to claim 2, characterized in that: In (2), according to the threshold vector The elements in the array are divided into two parts, specifically including elements with values ​​greater than 10 ... The first and second heart sounds, and their partial and elemental values ​​are less than 1. The non-heart sounds.

Citation Information

Patent Citations

  • Heart sound segmentation method and device

    CN112401924A