Heart sound segmentation method and device, electronic equipment and storage medium

Through the combination of the waveform of the ECG signal and the Markov chain model, the artificial dependence and error problems in traditional ECG and cardiac sound signal analysis are solved, and the accurate segmentation and reliable analysis of the cardiac sound signal are achieved.

CN120257055APending Publication Date: 2025-07-04BEIJING YUANJIAN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510394922.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

Traditional electrocardiogram and heart sound signal analysis rely on manual annotation and is prone to errors. Especially when there is high noise or abnormal waveform, the heart sound information cannot be effectively divided, and the complex correlation between the electrocardiogram and heart sound signal is not fully considered.

Method used

The segmentation position of the heart sound signal is quickly determined through the waveform of the electrocardiogram signal, and the Markov chain model is used for intelligent compensation when the electrocardiogram signal cannot be detected effectively, and the signal preprocessing and the Markov chain model are combined to perform the segmentation of the heart sound signal.

Benefits of technology

Accurate segmentation of heart sound signals is achieved, the problems of missing or incorrect segmentation are avoided, the reliability of heart sound marks and the accuracy of signal analysis are improved, and the accuracy of data is still ensured in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120257055A_ABST
    Figure CN120257055A_ABST
Patent Text Reader

Abstract

The invention provides a heart sound segmentation method and device, electronic equipment and a storage medium, and the method comprises the steps: carrying out signal preprocessing on an electrocardiosignal and a heart sound signal, and determining the preprocessed electrocardiosignal and the preprocessed heart sound signal; aiming at the condition that the relationship category is a synchronous relationship, performing joint segmentation processing on the preprocessed heart sound signal based on the R wave and the T wave of the preprocessed electrocardiosignal, and determining the segmentation positions of the first heart sound and the second heart sound of the preprocessed heart sound signal; and independently segmenting the preprocessed heart sound signals on the basis of a Markov chain model aiming at the condition that the relationship category is an asynchronous relationship, and determining segmentation positions of the first heart sound and the second heart sound. According to the method, the segmentation position of the heart sound signal can be quickly determined through the waveform of the electrocardiosignal, intelligent compensation can be carried out through the Markov chain model to determine the segmentation position, and the problem of signal missing or wrong segmentation caused when the electrocardiogram cannot be fully acquired is effectively avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of medical signal processing, and particularly to a heart sound segmentation method, apparatus, electronic device, and storage medium. Background Art

[0002] With the rapid development of medical electronic technology, electrocardiogram (ECG) and phonocardiogram (PCG) signals are increasingly widely used in cardiac health monitoring and diagnosis. Traditional analysis of electrocardiogram and phonocardiogram signals relies on manual annotation and the experience of professional physicians, which is time-consuming and prone to errors. To solve this problem, the R-wave (R-peak) in the electrocardiogram is usually used as the starting marker point for heart sounds S1 and S2, and a threshold-based method is used to detect heart sounds. However, these methods perform poorly when the signal noise is large or the electrocardiogram waveform is abnormal, and the complex correlation between the electrocardiogram and the phonocardiogram signal is not fully considered. Therefore, how to segment heart sound information has become a technical problem that cannot be underestimated. Summary of the Invention

[0003] In view of this, the purpose of the present application is to provide a heart sound segmentation method, apparatus, electronic device, and storage medium, which can quickly determine the segmentation position of the heart sound signal through the waveform of the electrocardiogram signal. When the waveform of the electrocardiogram signal cannot be effectively detected, the Markov chain model can also be used for intelligent compensation to determine the segmentation position, effectively avoiding the problem of signal loss or incorrect segmentation caused by insufficient acquisition of the electrocardiogram.

[0004] An embodiment of the present application provides a heart sound segmentation method, and the heart sound segmentation method includes:

[0005] Collect the electrocardiogram signal and the heart sound signal of the patient, perform signal preprocessing on the electrocardiogram signal and the heart sound signal, and determine the preprocessed electrocardiogram signal and the preprocessed heart sound signal;

[0006] Determine the relationship category between the preprocessed electrocardiogram signal and the preprocessed heart sound signal;

[0007] For the relationship category being a synchronous relationship, perform joint segmentation processing on the preprocessed heart sound signal based on the R-wave and T-wave of the preprocessed electrocardiogram signal, and determine the segmentation position of the first heart sound and the second heart sound of the preprocessed heart sound signal;

[0008] For the relationship category being an asynchronous relationship, perform independent segmentation on the preprocessed heart sound signal based on the pre-trained Markov chain model, and determine the segmentation position of the first heart sound and the second heart sound.

[0009] In a possible implementation, the signal preprocessing of the electrocardiogram signal and the heart sound signal to determine the preprocessed electrocardiogram signal and the preprocessed heart sound signal includes:

[0010] Perform band-pass filtering and baseline drift elimination processing on the electrocardiogram signal to determine a first electrocardiogram signal;

[0011] Perform discrete wavelet transform decomposition processing on the first electrocardiogram signal, extract and label key waveform features from the decomposed first electrocardiogram signal to determine the preprocessed electrocardiogram signal;

[0012] Perform noise reduction processing on the heart sound signal based on wavelet transform to determine the preprocessed heart sound signal.

[0013] In a possible implementation, the joint segmentation processing of the preprocessed heart sound signal based on the R wave and T wave of the preprocessed electrocardiogram signal to determine the segmentation positions of the first heart sound and the second heart sound of the preprocessed heart sound signal includes:

[0014] Determine the starting moment of the first heart sound based on the peak position of the first R wave of the preprocessed electrocardiogram signal, and determine the ending moment of the first heart sound based on the peak position of the first R wave and the duration of the first heart sound;

[0015] Determine the starting moment of the second heart sound based on the peak position of the first T wave of the preprocessed electrocardiogram signal, and determine the ending moment of the second heart sound based on the peak position of the first T wave and the duration of the second heart sound;

[0016] Determine the segmentation position of the first heart sound based on the starting moment and the ending moment of the first heart sound, determine the segmentation position of the second heart sound based on the starting moment and the ending moment of the second heart sound, and perform segmentation annotation on the segmentation positions;

[0017] Based on the distance between the second heart sound and the first heart sound, determine the segmentation position of the next first heart sound after the second heart sound, and continue to determine the segmentation position of the next second heart sound in the preprocessed heart sound signal.

[0018] In a possible implementation, the independent segmentation of the preprocessed heart sound signal based on the pre-trained Markov chain model to determine the segmentation positions of the first heart sound and the second heart sound includes:

[0019] Input the preprocessed heart sound signal into the Markov chain model for key feature extraction to determine the heart sound signal features;

[0020] Match the heart sound signal features with the features of each heart sound state learned by the Markov chain model to determine the heart sound state labels at each moment in the heart sound signal; wherein, the heart sound states include the first heart sound, the second heart sound, the systolic state, and the diastolic state;

[0021] Based on the start time and the end time of the first heart sound label in the heart sound state labels at each moment, determine the segmentation position of the first heart sound in the heart sound signal;

[0022] Based on the start time and the end time of the second heart sound label in the heart sound state labels at each moment, determine the segmentation position of the second heart sound in the heart sound signal, and perform segmentation annotation on the segmentation position.

[0023] In a possible implementation manner, the Markov chain model is trained through the following steps:

[0024] Construct a state transition probability matrix based on the physiological characteristics of heart sounds;

[0025] Train the Markov chain model based on the training data with labeled heart sound states, and adjust the state transition probability matrix and the observation probability distribution so that the Markov chain model can identify the labels of the heart sound states corresponding to the training data.

[0026] In a possible implementation manner, for any one of the segmentation annotations, after performing the segmentation annotation on the segmentation position, the heart sound segmentation method further includes:

[0027] Detect whether the segmentation annotation is consistent with the manual annotation result;

[0028] If not, adjust the network parameters of the Markov chain model;

[0029] If so, store the segmentation annotation in the database.

[0030] The embodiment of the present application further provides a heart sound segmentation device, and the heart sound segmentation device includes:

[0031] A signal preprocessing module, configured to collect the electrocardiogram signal and the heart sound signal of the patient, perform signal preprocessing on the electrocardiogram signal and the heart sound signal, and determine the preprocessed electrocardiogram signal and the preprocessed heart sound signal;

[0032] A synchronization relationship judgment module, configured to determine the relationship category between the preprocessed electrocardiogram signal and the preprocessed heart sound signal;

[0033] A combined segmentation module, which is used for the relationship category being a synchronous relationship, to perform combined segmentation processing on the preprocessed heart sound signal based on the R wave and T wave of the preprocessed electrocardiogram signal, and determine the segmentation positions of the first heart sound and the second heart sound of the preprocessed heart sound signal;

[0034] An independent segmentation module, which is used for the relationship category being an asynchronous relationship, to perform independent segmentation on the preprocessed heart sound signal based on a pre-trained Markov chain model, and determine the segmentation positions of the first heart sound and the second heart sound.

[0035] In a possible implementation manner, when the signal preprocessing module is used to perform signal preprocessing on the electrocardiogram signal and the heart sound signal to determine the preprocessed electrocardiogram signal and the preprocessed heart sound signal, the signal preprocessing module specifically is used for:

[0036] Perform band-pass filtering processing and baseline drift elimination processing on the electrocardiogram signal to determine a first electrocardiogram signal;

[0037] Perform discrete wavelet transform decomposition processing on the first electrocardiogram signal, extract and label key waveform features of the decomposed first electrocardiogram signal, and determine the preprocessed electrocardiogram signal;

[0038] Perform noise reduction processing on the heart sound signal based on wavelet transform to determine the preprocessed heart sound signal.

[0039] An embodiment of the present application further provides an electronic device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device runs, the processor communicates with the memory through the bus. When the machine-readable instructions are executed by the processor, the steps of the heart sound segmentation method as described above are executed.

[0040] An embodiment of the present application further provides a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is run by a processor, the steps of the heart sound segmentation method as described above are executed.

[0041] A heart sound segmentation method, device, electronic device, and storage medium provided by an embodiment of the present application. The heart sound segmentation method includes: collecting an electrocardiogram (ECG) signal and a heart sound signal of a patient, performing signal preprocessing on the ECG signal and the heart sound signal to determine the preprocessed ECG signal and the preprocessed heart sound signal; determining the relationship category between the preprocessed ECG signal and the preprocessed heart sound signal; for the relationship category being a synchronous relationship, performing joint segmentation processing on the preprocessed heart sound signal based on the R wave and T wave of the preprocessed ECG signal to determine the segmentation positions of the first heart sound and the second heart sound of the preprocessed heart sound signal; for the relationship category being an asynchronous relationship, performing independent segmentation on the preprocessed heart sound signal based on a pre-trained Markov chain model to determine the segmentation positions of the first heart sound and the second heart sound. The segmentation positions of the heart sound signal can be quickly determined through the waveform of the ECG signal. When the waveform of the ECG signal cannot be effectively detected, the segmentation positions can also be determined through intelligent compensation by the Markov chain model, effectively avoiding the problems of signal loss or incorrect segmentation caused by the inability to fully obtain the electrocardiogram.

[0042] To make the above objects, features, and advantages of the present application more obvious and understandable, the following specifically enumerates preferred embodiments and, in conjunction with the accompanying drawings, provides a detailed description as follows. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] To more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the accompanying drawings required for use in the embodiments. It should be understood that the following drawings only show some embodiments of the present application and should not be regarded as limiting the scope. For those of ordinary skill in the art, without creative efforts, other related drawings can also be obtained based on these drawings.

[0044] Figure 1 A flowchart of a heart sound segmentation method provided by an embodiment of the present application;

[0045] Figure 2 A schematic structural diagram of a heart sound segmentation device provided by an embodiment of the present application;

[0046] Figure 3 A schematic structural diagram of a heart sound segmentation device provided by an embodiment of the present application;

[0047] Figure 4 A schematic structural diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0048] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of this application. Apparently, the described embodiments are only some of the embodiments of this application, rather than all of them. Usually, the components of the embodiments of this application described and illustrated in the accompanying drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. Based on the embodiments of this application, every other embodiment obtained by those skilled in the art without creative efforts belongs to the scope of protection of this application.

[0049] First, an application scenario applicable to this application will be introduced. This application can be applied to the technical field of medical signal processing.

[0050] Through research, it has been found that with the rapid development of medical electronic technology, electrocardiogram (ECG) and phonocardiogram (PCG) are increasingly widely used in cardiac health monitoring and diagnosis. The analysis of traditional electrocardiograms and phonocardiogram signals requires manual annotation and the experience of professional physicians, which is time-consuming and prone to errors. To solve this problem, the R wave (R-peak) in the electrocardiogram is usually used as the starting marker point of heart sounds S1 and S2, and a threshold-based method is used to detect heart sounds. However, these methods perform poorly when the signal noise is large or the electrocardiogram waveform is abnormal, and the complex correlation between the electrocardiogram and the phonocardiogram signal is not fully considered. Therefore, how to segment heart sound information has become a technical problem that cannot be underestimated.

[0051] Based on this, the embodiments of this application provide a heart sound segmentation method, which can quickly determine the segmentation position of the heart sound signal through the waveform of the electrocardiogram signal. When the waveform of the electrocardiogram signal cannot be effectively detected, the Markov chain model can also be used for intelligent compensation to determine the segmentation position, effectively avoiding the problems of signal loss or incorrect segmentation caused by the inability to fully obtain the electrocardiogram.

[0052] Please refer to Figure 1 , Figure 1 which is a flowchart of a heart sound segmentation method provided by the embodiments of this application. As shown in Figure 1 , the heart sound segmentation method provided by the embodiments of this application includes:

[0053] S101: Collect the electrocardiogram signal and the heart sound signal of the patient, perform signal preprocessing on the electrocardiogram signal and the heart sound signal, and determine the preprocessed electrocardiogram signal and the preprocessed heart sound signal.

[0054] In this step, the electrocardiogram (ECG) signal and the heart sound signal of the patient are collected by a device, and signal preprocessing is performed on the ECG signal and the heart sound signal to determine the preprocessed ECG signal and the preprocessed heart sound signal.

[0055] Here, during the process of collecting the ECG signal and the heart sound signal of the patient, they can be collected synchronously or asynchronously.

[0056] In a possible implementation manner, the signal preprocessing of the ECG signal and the heart sound signal to determine the preprocessed ECG signal and the preprocessed heart sound signal includes:

[0057] A: Perform band-pass filtering and baseline drift elimination processing on the ECG signal to determine a first ECG signal.

[0058] Here, band-pass filtering is performed on the electrocardiogram signal to remove electromyogram interference, and median filtering is applied to eliminate baseline drift, thereby effectively purifying the signal and ensuring the accuracy of subsequent waveform extraction.

[0059] B: Perform discrete wavelet transform decomposition processing on the first ECG signal, and extract and label key waveform features of the decomposed first ECG signal to determine the preprocessed ECG signal.

[0060] Here, the discrete wavelet transform (DWT) is used to decompose the first electrocardiogram signal, and key waveform features in the first electrocardiogram (ECG) signal, such as "ECG_P_Peaks" (P wave peak), "ECG_Q_Peaks" (Q wave peak), "ECG_S_Peaks" (S wave peak), "ECG_T_Peaks" (T wave peak), "ECG_P_Onsets" (P wave starting point), "ECG_T_Offsets" (T wave ending point), etc., are identified and labeled.

[0061] C: Perform noise reduction processing on the heart sound signal based on wavelet transform to determine the preprocessed heart sound signal.

[0062] Here, wavelet transform is used to reduce the noise of the heart sound signal to remove environmental noise and other interference signals and obtain a clear heart sound waveform.

[0063] S102: Determine the relationship category between the preprocessed ECG signal and the preprocessed heart sound signal.

[0064] In this step, it is determined whether they are synchronous according to the waveforms of the preprocessed ECG signal and the preprocessed heart sound signal.

[0065] Here, the synchronization relationship can be determined through the following steps: Use a multi-channel device to record the ECG and PCG signals simultaneously, ensure that the timestamps are consistent, and keep the sampling rates of the two signals the same for subsequent analysis. Filter the ECG and PCG signals to remove noise. For ECG, retain frequencies from 0.5 - 100 Hz, and for PCG, retain frequencies from 20 - 1000 Hz. Use the Pan-Tompkins algorithm to detect the R-wave peaks, and use envelope detection or wavelet transform to detect the first heart sound (S1) and the second heart sound (S2). Align the R-wave of the ECG with the S1 heart sound of the PCG, and calculate the time difference between the R-wave and S1 as the synchronization reference. Plot the ECG and PCG signals, check the alignment of the R-wave and S1, and calculate the time difference between the R-wave and S1 over multiple cardiac cycles. In a real-time system, use timestamps and feature point detection algorithms for real-time synchronization.

[0066] S103: For the relationship category being the synchronization relationship, based on the R-wave and T-wave of the preprocessed electrocardiogram signal, perform joint segmentation processing on the preprocessed heart sound signal to determine the segmentation positions of the first heart sound and the second heart sound of the preprocessed heart sound signal.

[0067] In this step, for the relationship category being the synchronization relationship, according to the R-wave and T-wave of the preprocessed electrocardiogram signal, perform joint segmentation processing on the preprocessed heart sound signal to determine the segmentation positions of the first heart sound and the second heart sound of the preprocessed heart sound signal.

[0068] Here, if the relationship category is the synchronization relationship, then the segmentation positions of the first heart sound and the second heart sound can be directly determined based on the R-wave and T-wave of the electrocardiogram signal.

[0069] In a possible implementation manner, the performing joint segmentation processing on the preprocessed heart sound signal based on the R-wave and T-wave of the preprocessed electrocardiogram signal to determine the segmentation positions of the first heart sound and the second heart sound of the preprocessed heart sound signal includes:

[0070] a: Determine the starting moment of the first heart sound based on the peak position of the first R-wave of the preprocessed electrocardiogram signal, and determine the ending moment of the first heart sound based on the peak position of the first R-wave and the duration of the first heart sound.

[0071] Here, the first heart sound (S1) is usually synchronized with the R-wave of the electrocardiogram signal. Therefore, determine the starting moment of the first heart sound based on the peak position of the first R-wave of the preprocessed electrocardiogram signal, and determine the ending moment of the first heart sound based on the peak position of the first R-wave and the duration of the first heart sound.

[0072] b: Determine the starting moment of the second heart sound based on the peak position of the first T wave in the preprocessed electrocardiogram signal, and determine the ending moment of the second heart sound based on the peak position of the first T wave and the duration of the second heart sound.

[0073] Here, the second heart sound (S2) is approximately synchronized with the ending position of the T wave in the electrocardiogram signal. Therefore, determine the starting moment of the second heart sound according to the peak position of the first T wave in the preprocessed electrocardiogram signal, and determine the ending moment of the second heart sound according to the peak position of the first T wave and the duration of the second heart sound.

[0074] c: Determine the segmentation position of the first heart sound based on the starting moment and the ending moment of the first heart sound, determine the segmentation position of the second heart sound based on the starting moment and the ending moment of the second heart sound, and perform segmentation annotation on the segmentation position.

[0075] Here, determine the segmentation position of the first heart sound according to the starting moment and the ending moment of the first heart sound, determine the segmentation position of the second heart sound according to the starting moment and the ending moment of the second heart sound, and perform segmentation annotation on the segmentation position.

[0076] Among them, in the code, s1_positions stores the position information of all S1 sounds, and mean_S1 is the average duration of S1. The code marks the time period from the R peak to the R peak + S1 duration as state 1, states(max([1,s1_positions(i)]):min([upper_bound,length(states)])) = 1. Locate the position of S2 through the position of the end - T - wave, s2_positions stores the position information of S2, and mean_S2 and std_S2 represent the average duration and standard deviation of S2. The code determines the exact position of S2 by finding the T - wave peak in the surrounding window around the end point of the T - wave, [~,S2_index] = max(search_window); this line in the code determines the specific position of S2, and then marks this position as state 3.

[0077] d: Determine the segmentation position of the next first heart sound after the second heart sound based on the distance between the second heart sound and the first heart sound, and continue to determine the segmentation position of the next second heart sound in the preprocessed heart sound signal.

[0078] Here, according to the distance between the second heart sound and the first heart sound, the segmentation position of the next first heart sound after the second heart sound is determined, and the above steps are continuously repeated to determine the segmentation position of the next second heart sound in the preprocessed heart sound signal.

[0079] Among them, a period of time after the second heart sound (S2) until the next S1 appears will be labeled as "4". The code determines the range of state 4 by calculating the distance between the end position of S2 and the next R peak: diffs = (s1_positions - s2_positions(i)); the code calculates the distance between S2 and S1, finds the position of the next S1, and marks the part between S2 and the next S1 as "4".

[0080] Here, the segmentation results of the processed electrocardiogram signal and heart sound signal are presented in the form of a visualization chart, and the labeled data is stored in the database for subsequent clinical analysis or doctor diagnosis.

[0081] S104: For the relationship category of asynchronous relationship, based on the pre-trained Markov chain model, the preprocessed heart sound signal is independently segmented to determine the segmentation positions of the first heart sound and the second heart sound.

[0082] In this step, for the relationship category of asynchronous relationship, based on the pre-trained Markov chain model, the preprocessed heart sound signal is independently segmented to determine the segmentation positions of the first heart sound and the second heart sound.

[0083] Here, the Markov chain model belongs to the probabilistic graph model and is suitable for sequence data modeling.

[0084] In a possible implementation manner, the Markov chain model is trained through the following steps:

[0085] (1) Construct a state transition probability matrix based on the physiological characteristics of heart sounds.

[0086] Here, according to the physiological characteristics of heart sounds, transfer constraints are designed, and the transition probability can be initialized through labeled data statistics or physiological knowledge to construct a state transition probability matrix.

[0087] Among them, the state space defines 4 heart sound states: the annotation information of the first heart sound (S1) is "1", the annotation information of the second heart sound (S2) is "2", the annotation information of the systolic state (Systole, located between S1 and S2) is "3", and the annotation information of the diastolic state (Diastole, located between S2 and the next cycle of S1) is "4".

[0088] (2) Train the Markov chain model using the training data with labeled heart sound states, and adjust the state transition probability matrix and the observation probability distribution so that the Markov chain model can identify the labels of the heart sound states corresponding to the training data.

[0089] Among them, the observation probability distribution is that the features under each heart sound state follow a Gaussian distribution or a Gaussian mixture model (GMM), and the mean and covariance are trained through the labeled data.

[0090] Among them, if the labeled data is sufficient, use the Baum-Welch algorithm to iteratively optimize the transition matrix and the observation probability parameters. If the data is limited, the parameters can be regularized by combining prior knowledge (such as the heart sound duration constraint). Use the Viterbi algorithm to find the most likely state sequence and output the state labels corresponding to each moment. Locate the start and end points of S1 / S2 according to the state sequence and segment the signal into periodic sub-segments.

[0091] In a possible implementation manner, the independent segmentation of the preprocessed heart sound signal based on the pre-trained Markov chain model to determine the segmentation positions of the first heart sound and the second heart sound includes:

[0092] I: Input the preprocessed heart sound signal into the Markov chain model for key feature extraction to determine the heart sound signal features.

[0093] Among them, the key feature extraction includes time domain features: short-time energy (STE): reflecting the instantaneous intensity of the signal amplitude, zero-crossing rate (ZCR): distinguishing high-frequency noise and low-frequency heart sound components. Envelope features: Extract the signal envelope through Hilbert transform to locate the start and end points of the heart sound. Frequency domain features: Mel frequency cepstral coefficients (MFCC): describing the spectral characteristics and suitable for heart sound classification. Spectral centroid: reflecting the spectral energy concentration region. Wavelet transform features: Use wavelet decomposition (such as Daubechies wavelet) to extract multi-scale time-frequency features and enhance the sensitivity to transient components (such as S1 / S2).

[0094] II: Match the heart sound signal features with the features of each heart sound state learned by the Markov chain model to determine the heart sound state labels at each moment in the heart sound signal; among them, the heart sound states include the first heart sound, the second heart sound, the systolic state, and the diastolic state.

[0095] Here, match the heart sound signal features with the features of each heart sound state learned by the Markov chain model to determine the heart sound state labels at each moment in the heart sound signal.

[0096] Among them, in the process of using the Markov chain model for labeling, the first clear state position in the signal is first identified. After setting the heart sound states of the first part and the last part, the other states at the positions before and after the first part are filled according to the state transition probability matrix and the observation probability distribution. For example, if the first determined state is 1 (i.e., S1), the front end of the signal will be labeled as state 4 (indicating between S2 and the next cycle's S1). The last segment of the signal is also assigned according to the last determined state to ensure that the end part of the signal gets the correct state label.

[0097] II: Based on the start time and the end time of the first heart sound label in the heart sound state labels at each moment, determine the segmentation position of the first heart sound in the heart sound signal; based on the start time and the end time of the second heart sound label in the heart sound state labels at each moment, determine the segmentation position of the second heart sound in the heart sound signal, and perform segmentation annotation on the segmentation position.

[0098] Here, based on the start time and the end time of the first heart sound label in the heart sound state labels at each moment, determine the segmentation position of the first heart sound in the heart sound signal; based on the start time and the end time of the second heart sound label in the heart sound state labels at each moment, determine the segmentation position of the second heart sound in the heart sound signal, and perform segmentation annotation on the segmentation position.

[0099] In a possible implementation manner, for any one of the segmentation annotations, after performing the segmentation annotation on the segmentation position, the heart sound segmentation method further includes:

[0100] Detect whether the segmentation annotation is consistent with the manual annotation result; if not, adjust the network parameters of the Markov chain model; if so, store the segmentation annotation in the database.

[0101] Here, evaluate the segmentation annotation result. By comparing with the standard data set or the manual annotation result, evaluate the accuracy and synchronization of the segmentation. If the result does not meet the expectation, the system will automatically adjust the parameters and re - perform the segmentation annotation until the expected annotation accuracy is achieved.

[0102] In this application, through the synchronous acquisition and analysis of electrocardiogram (ECG) signals and phonocardiogram (PCG) signals, this system can achieve the joint segmentation of ECG signals. This method not only maps the S1 and S2 markers of the PCG signal through the ECG signal to ensure synchronization and accuracy. At the same time, in the case where the ECG signal is missing or cannot be accurately detected, the system can independently use other algorithms (such as the Markov chain model) to effectively segment the PCG. This technology greatly improves the reliability of PCG markers, especially in the case of weak or missing ECG signals, ensuring continuous and accurate signal analysis. This application is also equipped with a variety of noise reduction methods, which can effectively reduce environmental noise, electromyogram interference and other factors that may occur during signal acquisition. Different from traditional devices, this system does not rely on cumbersome post-signal processing, but directly performs noise reduction processing on the original data by performing preprocessing while collecting signals. This not only improves the data quality, but also ensures the high reliability and high accuracy of the signal, especially in complex or noisy environments, still ensuring the accuracy and effectiveness of the collected data.

[0103] A method for segmenting phonocardiogram provided by an embodiment of this application, the method for segmenting phonocardiogram includes: collecting the electrocardiogram signal and the phonocardiogram signal of a patient, performing signal preprocessing on the electrocardiogram signal and the phonocardiogram signal to determine the preprocessed electrocardiogram signal and the preprocessed phonocardiogram signal; determining the relationship category between the preprocessed electrocardiogram signal and the preprocessed phonocardiogram signal; for the relationship category being a synchronous relationship, based on the R wave and T wave of the preprocessed electrocardiogram signal, performing joint segmentation processing on the preprocessed phonocardiogram signal to determine the segmentation positions of the first heart sound and the second heart sound of the preprocessed phonocardiogram signal; for the relationship category being an asynchronous relationship, based on the pre-trained Markov chain model, independently segmenting the preprocessed phonocardiogram signal to determine the segmentation positions of the first heart sound and the second heart sound. The segmentation positions of the phonocardiogram signal can be quickly determined through the waveform of the electrocardiogram signal. When the waveform of the electrocardiogram signal cannot be effectively detected, the segmentation positions can also be determined through intelligent compensation by the Markov chain model, effectively avoiding the problem of signal loss or incorrect segmentation caused by the inability to fully obtain the electrocardiogram.

[0104] Please refer to Figure 2 、 Figure 3 , Figure 2 which is one of the structural schematic diagrams of a phonocardiogram segmentation device provided by an embodiment of this application; Figure 3 which is the second structural schematic diagram of a phonocardiogram segmentation device provided by an embodiment of this application. As Figure 2 shown in

[0105] The signal preprocessing module 210 is configured to collect the electrocardiogram (ECG) signal and the heart sound signal of a patient, perform signal preprocessing on the ECG signal and the heart sound signal, and determine the preprocessed ECG signal and the preprocessed heart sound signal;

[0106] The synchronization relationship judgment module 220 is configured to determine the relationship category between the preprocessed ECG signal and the preprocessed heart sound signal;

[0107] The joint segmentation module 230 is configured to, for the relationship category being a synchronization relationship, perform joint segmentation processing on the preprocessed heart sound signal based on the R wave and the T wave of the preprocessed ECG signal, and determine the segmentation positions of the first heart sound and the second heart sound of the preprocessed heart sound signal;

[0108] The independent segmentation module 240 is configured to, for the relationship category being an asynchronous relationship, perform independent segmentation on the preprocessed heart sound signal based on a pre-trained Markov chain model, and determine the segmentation positions of the first heart sound and the second heart sound.

[0109] Further, when the signal preprocessing module 210 is used to perform signal preprocessing on the ECG signal and the heart sound signal and determine the preprocessed ECG signal and the preprocessed heart sound signal, the signal preprocessing module 210 is specifically configured to:

[0110] Perform band-pass filtering processing and baseline drift elimination processing on the ECG signal to determine a first ECG signal;

[0111] Perform discrete wavelet transform decomposition processing on the first ECG signal, extract and label key waveform features of the decomposed first ECG signal, and determine the preprocessed ECG signal;

[0112] Perform noise reduction processing on the heart sound signal based on wavelet transform to determine the preprocessed heart sound signal.

[0113] Further, the performing joint segmentation processing on the preprocessed heart sound signal based on the R wave and the T wave of the preprocessed ECG signal and determining the segmentation positions of the first heart sound and the second heart sound of the preprocessed heart sound signal includes:

[0114] Determine the starting moment of the first heart sound based on the peak position of the first R wave of the preprocessed ECG signal, and determine the ending moment of the first heart sound based on the peak position of the first R wave and the duration of the first heart sound;

[0115] Determine the starting moment of the second heart sound based on the peak position of the first T wave of the preprocessed ECG signal, and determine the ending moment of the second heart sound based on the peak position of the first T wave and the duration of the second heart sound;

[0116] Determine the segmentation position of the first heart sound based on the start time and the end time of the first heart sound, determine the segmentation position of the second heart sound based on the start time and the end time of the second heart sound, and perform segmentation annotation on the segmentation position;

[0117] Based on the distance between the second heart sound and the first heart sound, determine the segmentation position of the next first heart sound after the second heart sound, and continue to determine the segmentation position of the next second heart sound in the preprocessed heart sound signal.

[0118] Further, when the independent segmentation module 240 is used to independently segment the preprocessed heart sound signal based on the pre-trained Markov chain model to determine the segmentation positions of the first heart sound and the second heart sound, the independent segmentation module 240 is specifically configured to:

[0119] Input the preprocessed heart sound signal into the Markov chain model for key feature extraction to determine the heart sound signal features;

[0120] Match the heart sound signal features with the features of each heart sound state learned by the Markov chain model to determine the heart sound state labels at each moment in the heart sound signal; wherein, the heart sound states include the first heart sound, the second heart sound, the systolic state, and the diastolic state;

[0121] Based on the start time and the end time of the first heart sound label in the heart sound state labels at each moment, determine the segmentation position of the first heart sound in the heart sound signal;

[0122] Based on the start time and the end time of the second heart sound label in the heart sound state labels at each moment, determine the segmentation position of the second heart sound in the heart sound signal, and perform segmentation annotation on the segmentation position.

[0123] Further, as Figure 3 shown, the heart sound segmentation device 200 further includes a training module 250, and the training module 250 trains the Markov chain model through the following steps:

[0124] Construct a state transition probability matrix based on the physiological characteristics of the heart sound;

[0125] Train the Markov chain model based on the training data with labeled heart sound states, and adjust the state transition probability matrix and the observation probability distribution so that the Markov chain model can identify the labels of the heart sound states corresponding to the training data.

[0126] Further, as Figure 3As shown, the heart sound segmentation device 200 further includes a result evaluation module 260, and the result evaluation module 260 is used for:

[0127] detecting whether the segmentation annotation is consistent with the manual annotation result;

[0128] if not, adjusting the network parameters of the Markov chain model;

[0129] if so, storing the segmentation annotation in the database.

[0130] A heart sound segmentation device provided by an embodiment of the present application, the heart sound segmentation device includes: a signal preprocessing module, configured to collect an electrocardiogram signal and a heart sound signal of a patient, perform signal preprocessing on the electrocardiogram signal and the heart sound signal, and determine a preprocessed electrocardiogram signal and a preprocessed heart sound signal; a synchronization relationship judgment module, configured to determine a relationship category between the preprocessed electrocardiogram signal and the preprocessed heart sound signal; a joint segmentation module, configured to, for the relationship category being a synchronization relationship, perform joint segmentation processing on the preprocessed heart sound signal based on the R wave and the T wave of the preprocessed electrocardiogram signal, and determine the segmentation positions of the first heart sound and the second heart sound of the preprocessed heart sound signal; an independent segmentation module, configured to, for the relationship category being an asynchronous relationship, perform independent segmentation on the preprocessed heart sound signal based on a pre-trained Markov chain model, and determine the segmentation positions of the first heart sound and the second heart sound. The segmentation position of the heart sound signal can be quickly determined through the waveform of the electrocardiogram signal. When the waveform of the electrocardiogram signal cannot be effectively detected, the segmentation position can also be determined through intelligent compensation by the Markov chain model, effectively avoiding the problem of signal loss or incorrect segmentation caused by the inability to fully obtain the electrocardiogram.

[0131] Please refer to Figure 4 , Figure 4 , which is a schematic structural diagram of an electronic device provided by an embodiment of the present application. As shown in Figure 4 , the electronic device 400 includes a processor 410, a memory 420, and a bus 430.

[0132] The memory 420 stores machine-readable instructions executable by the processor 410. When the electronic device 400 runs, the processor 410 communicates with the memory 420 through the bus 430. When the machine-readable instructions are executed by the processor 410, the steps of the heart sound segmentation method in the method embodiment as shown in the above Figure 1 can be executed. For the specific implementation manner, reference can be made to the method embodiment, which will not be elaborated here.

[0133] The embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, it can execute the steps of the heart sound segmentation method in the method embodiments as described above. For the specific implementation manners, reference can be made to the method embodiments and will not be elaborated herein. Figure 1 The specific working processes of the system, device, and unit described above can be referred to the corresponding processes in the foregoing method embodiments for the convenience and conciseness of description, and will not be elaborated herein.

[0134] Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the system, device, and unit described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein.

[0135] In several embodiments provided by the present application, it should be understood that the disclosed system, device, and method can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there can be other division manners in actual implementation. For another example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some communication interfaces. The indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms.

[0136] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0137] In addition, in each embodiment of the present application, the functional units can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.

[0138] When the above-mentioned functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.

[0139] Finally, it should be noted that the above-mentioned embodiments are only specific implementation manners of the present application, used to illustrate the technical solutions of the present application, rather than limiting them. The protection scope of the present application is not limited thereto. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: any person skilled in the art within the technical scope disclosed by the present application can still modify the technical solutions recorded in the foregoing embodiments, or can easily think of changes, or perform equivalent replacements on some of the technical features; and these modifications, changes, or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be covered by the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims

1. A heart sound segmentation method, characterized in that, The heart sound segmentation method includes: Collecting the electrocardiogram signal and heart sound signal of a patient, performing signal preprocessing on the electrocardiogram signal and the heart sound signal, and determining the preprocessed electrocardiogram signal and the preprocessed heart sound signal; Determining the relationship category between the preprocessed electrocardiogram signal and the preprocessed heart sound signal; For the relationship category being a synchronous relationship, performing joint segmentation processing on the preprocessed heart sound signal based on the R wave and T wave of the preprocessed electrocardiogram signal, and determining the segmentation positions of the first heart sound and the second heart sound of the preprocessed heart sound signal; For the relationship category being an asynchronous relationship, independently segmenting the preprocessed heart sound signal based on a pre-trained Markov chain model, and determining the segmentation positions of the first heart sound and the second heart sound.

2. The heart sound segmentation method according to claim 1, characterized in that, The performing signal preprocessing on the electrocardiogram signal and the heart sound signal, and determining the preprocessed electrocardiogram signal and the preprocessed heart sound signal includes: Performing band-pass filtering processing and baseline drift elimination processing on the electrocardiogram signal, and determining a first electrocardiogram signal; Performing discrete wavelet transform decomposition processing on the first electrocardiogram signal, and performing key waveform feature extraction and annotation on the decomposed first electrocardiogram signal, and determining the preprocessed electrocardiogram signal; Performing noise reduction processing on the heart sound signal based on wavelet transform, and determining the preprocessed heart sound signal.

3. The heart sound segmentation method according to claim 1, characterized in that The performing joint segmentation processing on the preprocessed heart sound signal based on the R wave and T wave of the preprocessed electrocardiogram signal, and determining the segmentation positions of the first heart sound and the second heart sound of the preprocessed heart sound signal includes: Determining the starting moment of the first heart sound based on the peak position of the first R wave of the preprocessed electrocardiogram signal, and determining the ending moment of the first heart sound based on the peak position of the first R wave and the duration of the first heart sound; Determining the starting moment of the second heart sound based on the peak position of the first T wave of the preprocessed electrocardiogram signal, and determining the ending moment of the second heart sound based on the peak position of the first T wave and the duration of the second heart sound; Determining the segmentation position of the first heart sound based on the starting moment and the ending moment of the first heart sound, determining the segmentation position of the second heart sound based on the starting moment and the ending moment of the second heart sound, and performing segmentation annotation on the segmentation positions; Based on the distance between the second heart sound and the first heart sound, determining the segmentation position of the next first heart sound after the second heart sound, and continuing to determine the segmentation position of the next second heart sound in the preprocessed heart sound signal.

4. The heart sound segmentation method according to claim 1, wherein, The independently segmenting the preprocessed heart sound signal based on a pre-trained Markov chain model, and determining the segmentation positions of the first heart sound and the second heart sound includes: Inputting the preprocessed heart sound signal into the Markov chain model for key feature extraction, and determining the heart sound signal features; Match the heart sound signal features with the features of each heart sound state learned by the Markov chain model to determine the heart sound state labels at each moment in the heart sound signal; wherein, the heart sound states include the first heart sound, the second heart sound, the systolic state, and the diastolic state; Based on the start time and end time of the first heart sound label in the heart sound state labels at each moment, determine the segmentation position of the first heart sound in the heart sound signal; Based on the start time and end time of the second heart sound label in the heart sound state labels at each moment, determine the segmentation position of the second heart sound in the heart sound signal, and perform segmentation annotation on the segmentation position.

5. The heart sound segmentation method according to claim 1, characterized in that Train the Markov chain model through the following steps: Construct a state transition probability matrix based on the physiological characteristics of heart sounds; Train the Markov chain model based on the training data with labeled heart sound states, and adjust the state transition probability matrix and the observation probability distribution so that the Markov chain model can identify the labels of the heart sound states corresponding to the training data.

6. The heart sound segmentation method according to claim 3, wherein For any one of the segmentation annotations, after performing the segmentation annotation on the segmentation position, the heart sound segmentation method further includes: Detect whether the segmentation annotation is consistent with the manual annotation result; If not, adjust the network parameters of the Markov chain model; If so, store the segmentation annotation in the database.

7. A heart sound segmentation device, characterized in that, The heart sound segmentation device includes: A signal preprocessing module, configured to collect the electrocardiogram signal and heart sound signal of a patient, perform signal preprocessing on the electrocardiogram signal and the heart sound signal, and determine the preprocessed electrocardiogram signal and the preprocessed heart sound signal; A synchronization relationship judgment module, configured to determine the relationship category between the preprocessed electrocardiogram signal and the preprocessed heart sound signal; A joint segmentation module, configured to, for the relationship category being a synchronization relationship, perform joint segmentation processing on the preprocessed heart sound signal based on the R wave and T wave of the preprocessed electrocardiogram signal, and determine the segmentation positions of the first heart sound and the second heart sound of the preprocessed heart sound signal; An independent segmentation module, configured to, for the relationship category being an asynchronous relationship, perform independent segmentation on the preprocessed heart sound signal based on a pre-trained Markov chain model, and determine the segmentation positions of the first heart sound and the second heart sound.

8. The heart sound segmentation device according to claim 7, wherein, When the signal preprocessing module is used to perform signal preprocessing on the electrocardiogram signal and the heart sound signal to determine the preprocessed electrocardiogram signal and the preprocessed heart sound signal, the signal preprocessing module is specifically configured to: Perform band-pass filtering processing and baseline drift elimination processing on the electrocardiogram signal to determine a first electrocardiogram signal; Perform discrete wavelet transform decomposition processing on the first electrocardiogram signal, extract and annotate key waveform features of the decomposed first electrocardiogram signal to determine the preprocessed electrocardiogram signal; Perform noise reduction processing on the heart sound signal based on wavelet transform to determine the preprocessed heart sound signal.

9. An electronic device, characterized in that, Include: A processor, a memory, and a bus, where the memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory through the bus. When the machine-readable instructions are run by the processor, the steps of the heart sound segmentation method according to any one of claims 1 to 6 are executed.

10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium. When the computer program is run by a processor, the steps of the heart sound segmentation method according to any one of claims 1 to 6 are executed.