A heart rate variability signal denoising method based on Markov chain

By using the weighted Markov chain prediction method to determine the sample sequence length and the number of classifications, the adaptability and real-time performance issues of heart rate variability signal denoising technology are solved. This enables rapid denoising and personalized parameter setting for the heart rate variability signal detection system, improving detection efficiency and system adaptability.

CN116049631BActive Publication Date: 2026-03-31重庆外语外事学院
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-09
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing heart rate variability signal denoising technologies suffer from poor adaptability, complex algorithms, and unstable performance, making it difficult to meet users' requirements for mobility, convenience, and real-time performance, and affecting the performance of heart rate variability signal acquisition and processing equipment.

Method used

The weighted Markov chain prediction method is used to denoise the heart rate variability signal. By calculating the relationship between the sample sequence length (N) and the number of classifications (k) and the prediction accuracy (q), the values ​​of N and k are determined. The weighted Markov chain prediction method is used to predict the interval where the R wave peak point is located in the heart rate variability signal, and interference signals are automatically filtered out.

Benefits of technology

It improves the anti-interference performance and detection efficiency of the heart rate variability signal detection system, making it suitable for fields such as personal physiological data collection, medical monitoring, scientific research, telemedicine and health management. It achieves rapid noise reduction and personalized parameter settings, thereby improving the user's work efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure SMS_24
    Figure SMS_24
  • Figure HDA0003933270090000011
    Figure HDA0003933270090000011
  • Figure HDA0003933270090000021
    Figure HDA0003933270090000021
Patent Text Reader

Abstract

The present application belongs to the technical field of human heart rate variability signal recognition, and particularly relates to a heart rate variability signal denoising method based on Markov chain. The present application firstly uses Markov chain prediction method to analyze and calculate sample sequence, obtains the relationship between sample sequence length (N) and classification number (k) and prediction accuracy (q), then compromises the accuracy of prediction state and the accuracy of data according to the requirements of actual application, so as to determine the values of N and k, and uses the two parameters in the human heart rate variability signal (HRV) detection system, so as to improve the anti-interference performance and detection efficiency of the system. The present application belongs to the statistical method, breaks through the limitations of the existing detection system, such as weak anti-interference ability, inflexible parameter setting and low real-time performance, and can improve the work efficiency of the user; not only expands the denoising way of the heart rate variability signal detection system, but also enriches the application field of Markov chain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of human heart rate variability signal recognition technology, and particularly relates to a heart rate variability signal denoising method based on Markov chains. Background Technology

[0002] Heart rate variability (HRV), also known as heart rate fluctuation, is a series of data consisting of fluctuations in the RR interval of successive heartbeats. It reflects the differences and changes in successive heartbeat cycles. This signal is generally obtained by detecting and extracting the R-wave interval from the electrocardiogram (ECG) signal.

[0003] Currently, methods for denoising heart rate variability (HRV) signals generally include differential thresholding, template matching, neural networks, and wavelet transform. While differential thresholding is relatively simple in principle, its denoising effect is far from ideal. Template matching, a mechanical matching method using pre-set templates, is inefficient in adapting to varying detection scenarios. Wavelet transform is overly complex, and the "black box" nature and large data volume requirements of neural networks significantly reduce their adaptability to HRV signal processing.

[0004] Existing heart rate variability signal denoising technologies suffer from disadvantages such as weak adaptability, complex algorithms, and unstable performance, making it difficult to meet users' requirements for mobility, convenience, and real-time performance, and seriously affecting the performance of heart rate variability signal acquisition and processing equipment. Summary of the Invention

[0005] To address the aforementioned problems, this invention utilizes a weighted Markov chain prediction method to denoise human heart rate variability (HRV) signals. First, the Markov chain prediction method is used to analyze and calculate the sample sequence, obtaining the relationship between the sample sequence length (N), the number of classifications (k), and the prediction accuracy (q). Then, based on the requirements of practical applications, a trade-off is made between the accuracy of the prediction state and the precision of the data to determine the values ​​of N and k. These two parameters are then applied to the human heart rate variability (HRV) signal detection system, thereby improving the system's anti-interference performance and detection efficiency.

[0006] The technical solution of this invention is as follows:

[0007] A method for denoising heart rate variability signals based on Markov chains includes the following steps:

[0008] S1. Input the heart rate variability signal, select a segment of interference-free data as sample data, and calculate the statistical results of the relationship between the Markov chain prediction accuracy, sample data length and number of classifications based on the sample data.

[0009] S2. Based on the set target and combined with the relational statistics, determine the sample sequence and the number of categories, thereby initializing the parameters of the Markov chain;

[0010] S3. The weighted Markov chain prediction method is used to predict the interval where the R wave peak point is located in the heart rate variability signal, so as to remove the interference signal in the signal.

[0011] The above method constitutes the overall technical solution of this invention. It should be noted that, in this method, because Markov chains are used for prediction, the time complexity of the program increases sharply with the increase of the sample length N and the number of categories k, resulting in a longer execution time for the corresponding code. Furthermore, N and k have a significant impact on the prediction accuracy q (note: q is the accuracy of the Markov chain prediction within the data interval, not the accuracy of the data itself), especially k, which has a very large impact on q. Therefore, the values ​​of N and k need to be selected based on the actual situation. If the system has high real-time requirements but the processor's computing power is limited, N and k should not be chosen too large, but rather as small as possible. This ensures faster calculation of the interval containing noisy data points. However, this speed improvement comes at a cost: reduced discernibility of the prediction results, because the predicted interval becomes larger, reducing the accuracy of noise removal. Furthermore, observations of heart rate variability signals collected from different individuals revealed that the relationships between N and k and q are not entirely identical for each person. The trends of N and q exhibit randomness, while k and q generally show similar trends, but with variations. Even for the same individual, sample data collected at different times show different relationships. This is primarily due to the complex and variable nature of heart rate variability signals. Therefore, in practical applications, individual selection must be made based on specific circumstances.

[0012] To determine the values ​​of N and k, a simple and effective method is as follows: Suppose M sample data were collected in the first step, then N samples were selected from the M sample data, and k was set to calculate q, for example:

[0013] First, set k=4, then set N=20, and calculate q;

[0014] Let N=21, then calculate q;

[0015] Let N=22, then calculate q;

[0016] Let N=23, then calculate q;

[0017] Let N=24, then calculate q;

[0018] Let N=199, then calculate q;

[0019] Let N=200, then calculate q;

[0020] Therefore, we obtain a series of N values ​​for q when k=4; then, setting k=5, we let N vary from 20 to 200, repeating the above process by changing the value of k. Finally, we obtain a three-dimensional relationship graph between q, N, and k. This graph clearly shows the relationship between the three. Subsequent steps to set the parameters N and k of the Markov chain are based on observing and selecting from this graph. Therefore, subsequent steps require determining N and k based on the statistical results obtained in S1, making the solution of this invention highly flexible, which is not available in traditional technologies.

[0021] Furthermore, the relational statistics are used to demonstrate the nonlinear change in the Markov chain prediction accuracy as the sample data length and the number of classifications change, and the relational statistics are correlated with the source of the sample data.

[0022] Furthermore, the relationship statistics results are obtained as follows: a segment of data is selected in the sample data using a sliding window, and the data within the sliding window is used as the initial value. The prediction accuracy of the first data immediately following the sliding window is calculated and verified. Then, initial values ​​are taken sequentially and the accuracy is verified. This process is repeated to calculate the prediction accuracy of all data points corresponding to different cut lengths and number of categories in the sample, thereby obtaining the relationship statistics results of the prediction accuracy. The relationship statistics results are displayed in the form of a chart.

[0023] Furthermore, the set target refers to the real-time requirements and fault tolerance requirements in heart rate variability signal detection.

[0024] Furthermore, in S3, the weighted Markov chain prediction method is used to predict the interval where the R wave peak point is located in the heart rate variability signal. Specifically, the suspicious data points appearing in the heart rate variability signal are calculated to obtain the state space with the highest probability of the suspicious data points. Suspicious data points are identified by judging whether they are within the range of the state space. Data within the range of the state space are normal data points.

[0025] Furthermore, the definition of a suspicious data point is to determine whether the input data is less than min(z), where z is the state space. If so, the input data at this time is defined as a suspicious data point.

[0026] Furthermore, the obtained suspicious data points are accumulated to obtain the cumulative value of all suspicious data points over a period of time, which serves as the basis for Markov chain prediction.

[0027] Furthermore, after a suspicious data point appears, if the input data is greater than min(z), the accumulated value is added to the peak interval values ​​within the state space before and after the data point. At this position, two possible peak data combinations are obtained. The Markov chain prediction method is used to distinguish between the two sets of data, and the one with the highest probability is taken as the prediction result.

[0028] The beneficial effects of this invention are:

[0029] This paper presents a method and measures for denoising a heart rate variability (HRV) signal detection system, which is particularly suitable for fields such as personal physiological data collection, medical monitoring, scientific research, telemedicine, and health management. Users can import HRV data into this system and flexibly set Markov chain parameters according to a personalized relational scale. The system can then automatically filter out noisy data points and output results for subsequent HRV data analysis, achieving the goal of rapid denoising.

[0030] This invention belongs to the statistical method and overcomes the limitations of existing detection systems, such as weak anti-interference ability, inflexible parameter setting, and low real-time performance, thereby improving the user's work efficiency. It not only expands the denoising methods of heart rate variability signal detection systems, but also enriches the application fields of Markov chains. Attached Figure Description

[0031] Figure 1 This is a schematic diagram of an ECG signal with false peak interference.

[0032] Figure 2 This is a flowchart of the method for determining suspicious data points in the present invention.

[0033] Figure 3 This is a graph showing the relationship between prediction accuracy and the number of samples and categories.

[0034] Figure 4 This relates the prediction accuracy to the number of samples.

[0035] Figure 5 To illustrate the relationship between prediction accuracy and the number of categories. Detailed Implementation

[0036] The technical solution of the present invention will now be described in detail with reference to the accompanying drawings.

[0037] like Figure 1 As shown, when detecting human electrocardiogram (ECG) signals, limb movement or other interference inevitably distorts the ECG signal, causing several interfering peaks (hereinafter referred to as "false peaks") to appear between the normal R waves. When false peaks appear in the ECG signal, the corresponding heart rate variability signal may show distortion points. To improve the performance of the detection system, it is essential to process the distorted data. Figure 1In the diagram, when the ECG waveform is normal, such as segment t[i-2] in the figure, the system can easily identify the correct R-wave peak point, thus obtaining the correct R-wave interval; when the peak value of the false peak does not exceed the threshold k0, such as the interference wave in segment t[i-1] in the figure... It has no impact on the detection; the R-wave interval t[i-1] can still be accurately detected. However, when the peak value of the false wave exceeds the threshold k0, such as segment t[i] in the figure, the correct R-wave interval t[i] cannot be read, and instead, the incorrect false wave interval is read. , , and .

[0038] The method of the present invention is used to automatically remove false peak values ​​in ECG signals that exceed the threshold. When a suspicious data point appears in the HRV signal, the weighted Markov chain prediction method is used to calculate the state space of the data point with the highest probability. If the data point is not within the range of this state space, it is discarded; otherwise, it is considered a normal data point.

[0039] Considering that false peaks usually appear consecutively, the first false peak is used as the trigger signal during detection. When a false peak is detected outside the state space, it is immediately filtered out, and the decision-making procedure is triggered. The decision-making procedure's logic is as follows:

[0040] (1) Record the number j of false peaks outside the state space within interval t[i], and sum all interval values: ;

[0041] (2) The values ​​of the interpeak interval within the state space before and after the false peak are respectively added to the peak interval values ​​within the state space, thus yielding two possible combinations of peak data at that position.

[0042] (3) Use the Markov chain prediction method to judge the two sets of data and select the one with the highest probability.

[0043] In particular, when there is only one peak in the state space, regardless of whether it is consistent with the measured value, there is no need to make any further judgments; it can be directly regarded as the R-wave peak.

[0044] Markov chain prediction is based on predicting the next state from the current state. Therefore, the method of this invention first requires setting the parameters of the Markov chain. Specifically, the method involves: first, obtaining a sufficiently large set of heart rate variability data, and selecting a continuous set of data points without spurious peak interference as a sample sequence; if there is no real-time detection requirement (such as 24-hour Holter monitoring), a segment of interference-free data can be directly selected from the measured data as a sample; then, a segment of data is selected on the sample using a sliding window, with the data within the sliding window as the initial value, and the prediction accuracy of the first data immediately following the sliding window is calculated and verified; this process is repeated sequentially, taking initial values ​​and verifying the accuracy; and so on, calculating the prediction accuracy of all data points corresponding to different cut lengths and number of classifications in the sample, thus obtaining a statistical graph or table showing the relationship between prediction accuracy; finally, this statistical graph or table is applied to the denoising stage of the detection system, and the parameters of the Markov chain are set according to the accuracy and precision requirements. To meet the system's anti-interference performance and detection efficiency, this invention uses the selection of sample data from measured data as an example. This method allows for rapid setting of personalized parameters in different situations, exhibiting strong mobility and flexibility.

[0045] In practical applications, the values ​​of the number of categories (k) and the number of samples (N) have a significant impact on the prediction accuracy (q), but this impact is not linear. k has a large influence on prediction accuracy, while q decreases rapidly as k increases. N has some influence on prediction accuracy, but this influence is significantly constrained by k, exhibiting different trends in different scenarios (different populations, different health conditions, or different data detection times, etc.). Given that the position of the true peak of the ECG R wave within the false peak is not fixed, and the interfered HRV data is the sum of a series of smaller time segments, the real-time requirements, accuracy, or error tolerance requirements of the application should be determined first. Then, the parameters of the Markov chain should be set according to the relationship scale between accuracy (q) and the number of categories (k) and the number of samples (N). After setting the parameters of the Markov chain, the specific method for determining suspicious data points is as follows: Figure 2 As shown, it specifically includes:

[0046] (1) Initialization: Determine the number of samples N and initial values, state space z, and number of state classifications k according to the real-time requirements and fault tolerance of the application. Set the suspicious peak flag p_x=0.

[0047] (2) Read the peak data and store it in B, then determine whether it is less than the minimum value in the state space, i.e., B. <min(z);

[0048] (3) If the above judgment is true, then put the suspicious peak into accumulator A, and set p_x=1, then return to (2) to continue reading the next data; otherwise, put it into the queue: D[N+2]~D[4]<== D[N+1]~D[3]; D[3]<== D[2]; D[2]<== D[1]; D[1]<== B;

[0049] (4) Determine if p_x is 0. If it is, return to (2) and continue reading the next data; otherwise, proceed to (5).

[0050] (5) Add the data in A to the data items before and after it respectively, determine which situation satisfies the constraints of the state space, select the one that satisfies the constraint and enter (6) to evaluate the state. If none of them are satisfied, return to (2) to continue taking data.

[0051] (6) Call the Markov chain prediction program and determine whether the suspicious data point is a reliable data point based on the prediction state result; if it is, keep it, otherwise discard it.

[0052] (7) Record the result and return to (2) to continue reading the next data.

[0053] right Figure 2 The time complexity (O) of the process was tested, and the results showed that the number of categories (k) and the number of samples (N) have a significant impact on the time complexity (O): the values ​​of k and N have a significant impact on the execution time. When k and N vary within a small range, the execution time is only a few milliseconds to tens of milliseconds, while when k and N are large, the execution time is hundreds of milliseconds to several seconds. Therefore, in practical applications, the parameter settings need to consider the real-time requirements of the specific scenario. Since the samples obtained under different collection conditions (different users, different health states, different collection times, etc.) are different, the relational statistical graphs or tables have personalized characteristics. To more intuitively display the effect of such statistical graphs, such as 3- Figure 5 The diagram shows the relationship obtained by processing the weighted Markov chain method proposed in this invention using a 10.3-minute HRV signal from a healthy 34-year-old male.

[0054] This invention utilizes a weighted Markov chain prediction method to predict the interval containing the R-wave peak point, thereby improving the identification accuracy. The steps of the weighted Markov chain prediction method are as follows:

[0055] First, obtain the relationship graph through the samples. Assume the total length of the samples is 200, and the maximum number of categories is 10 and the minimum is 2.

[0056] Let N = 50, 80, 110, 140, 170; let k = 2, 4, 6, 8, 10; (that is, N has 5 possible values, and k has 5 possible values)

[0057] To obtain the relationship graph, the total number of calculations using the weighted Markov chain is: (200-50)*5+(200-80)*5+(200-110)*5+(200-140)*5+(200-170)*5=2250 times;

[0058] After obtaining the relationship graph through calculation, the values ​​of N and k are selected as needed, and then prediction is performed:

[0059] (1) Let the R-wave interval sample sequence be x[n], and the number of data points be N. Calculate the average value of x[n]. and mean square deviation The optimal split point and classification interval for the sample sequence are found using ordered clustering. This step requires plotting the loss function. With the number of categories The relationship curve graph, taking the turning point The value is used as the optimal number of categories for the state interval. The calculation formula is as follows:

[0060]

[0061] Where i and j are the starting and ending variable values ​​of a certain class G; As an ordered variable, the values ​​of the sample sequence x[n] are used in the calculation; Let G be the mean variable of class G.

[0062] (2) Determine the state value of each R-wave interval data in sample x[n] based on the classification interval;

[0063] (3) This step involves performing a Mahalanobis test on the R-wave interval sample sequence x[n]. This is done by calculating the statistic. Then look up the table to determine. Let... The frequency of state values ​​i to j in the sample sequence; Indicates the probability of a one-step transition. Let the marginal probability be... The calculation formula is:

[0064]

[0065] (4) Calculate the autocorrelation coefficients of each order for the R-wave interval sample sequence. and Markov chain weights with corresponding step sizes The calculation formula is:

[0066]

[0067] in, For sequence The i-th data; Let be the weights of the Markov chain with the k-th step size.

[0068] (5) Based on the state values ​​of each R-wave interval, obtain the state transition probability matrix for each step length;

[0069] (6) Calculate the probability of each possible state of x[n+1], and take the state with the highest probability as the predicted state.

[0070] To improve the adaptability of the detection system, the initial data used for prediction is updated by sliding along with the position of the data points. Therefore, when calculating the probability of any peak point state interval, a set of predetermined sequences preceding that data is always used as the initial data, and a weighted sum is performed by combining the corresponding transition probability matrix and the weights of Markov chains with different lengths to obtain the predicted probability.

Claims

1. A method for denoising heart rate variability signal based on Markov chain, characterized in that, The method comprises the following steps: S1, inputting a heart rate variability signal, selecting a section of non-interference data as sample data, and calculating a Markov chain prediction accuracy rate and a correlation system calculation result of sample data length and classification number based on the sample data; S2, determining a sample sequence and a classification number based on a set target and in combination with the correlation system calculation result, so as to initialize and set parameters of the Markov chain; the set target refers to real-time requirement and fault tolerance requirement in heart rate variability signal detection; S3, using a weighted Markov chain prediction method to predict an interval where an R wave peak point is located in the heart rate variability signal, so as to remove interference signals in the signal; In S3, the weighted Markov chain prediction method is used to predict the interval where the R wave peak point is located in the heart rate variability signal, specifically, suspicious data points appearing in the heart rate variability signal are calculated to obtain a state space of a maximum probability of the suspicious data points, and the suspicious data points are identified by judging whether the suspicious data points are within the range of the state space, and data within the range of the state space is normal data points; The obtained suspicious data points are accumulated to obtain an accumulated value of all suspicious data points in a period of time as basic data for Markov chain prediction; After the suspicious data points appear, if the input data is greater than min(z), the accumulated value is added to the wave peak interval values before and after the data within the state space, two possible wave peak data combinations are obtained at the position, the two data combinations are discriminated by using the Markov chain prediction method, and the one with the maximum probability is taken as the prediction result; The definition of the suspicious data points is that whether the input data is less than min(z) is judged, (z) is a state space, if yes, the input data at this time is defined as a suspicious data point.

2. The method for denoising heart rate variability signal based on Markov chain according to claim 1, characterized in that, The correlation system calculation result is used to show a nonlinear change process of the Markov chain prediction accuracy rate when the sample data length and the classification number change, and the correlation system calculation result has relevance with the sample data source.

3. The method for denoising heart rate variability signal based on Markov chain according to claim 2, characterized in that, The correlation system calculation result is obtained in the following manner: a section of data is selected in a sliding window manner on the sample data, the data in the sliding window is taken as an initial value, the prediction accuracy rate of the first data immediately after the sliding window is calculated and verified; the initial value is taken in turn and the accuracy rate is verified; By analogy, the prediction accuracy rates of all data points in the sample under different interception lengths and classification numbers are calculated, so that the correlation system calculation result of the prediction accuracy rate is obtained, and the correlation system calculation result is displayed in a form of a chart.

Citation Information

Patent Citations

  • Mobile phone bad use behavior risk early warning system based on heart rate variability index

    CN113261929A

  • Method of biomedical signal analysis including improved automatic segmentation

    US20100056939A1