A method for detecting ventricular premature beat based on poincare feature wavelet complex network
By constructing a complex network of intra-beat characteristic wavelets and combining detrending processing and symbolic dynamics coding, the problem of noise influence in automatic ECG signal analysis was solved, and accurate detection of premature ventricular contractions in long-term ECG signals was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-07
- Publication Date
- 2026-03-27
AI Technical Summary
Existing automatic ECG signal analysis technologies are susceptible to noise in long-term ECG data, have poor robustness, and are difficult to accurately identify arrhythmias such as premature ventricular contractions.
A method based on intra-beat feature wavelet complex network is adopted. Through detrending processing and symbolic dynamics encoding, a complex network is constructed to extract the topological features of the electrocardiogram signal, and machine learning is combined to detect ventricular premature beats.
It improves the accuracy and robustness of ECG signal classification, reduces sensitivity to noise, and enhances the precision of arrhythmia detection.
Smart Images

Figure CN116269248B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to a kind of electrocardiosignal processing technology, belongs to long-term electrocardiogram monitoring equipment, medical monitoring technical field, specifically related to a kind of based on the characteristic wavelet complex network of intrapatient room early detection method of premature beat. BACKGROUND
[0002] Heart as the vital organ of human body, heart disease can significantly affect physical and mental health of human body.According to "China Cardiovascular Health and Disease Report 2021", cardiovascular disease accounts for the first place in the disease death composition ratio of Chinese urban and rural residents, and is in the stage of continuous growth.At present, there are about 20 million patients with arrhythmia in China, and its incidence rate shows a trend of increasing year by year.Long-term arrhythmia can increase the risk of death, and early detection of heart abnormalities combined with appropriate treatment can help improve the recovery rate of patients.Premature ventricular contractions (PVCs) is one of the most common types of arrhythmia, which is often seen in coronary heart disease, cardiomyopathy and rheumatic heart disease and other diseases.Long-term frequent premature ventricular contractions in patients with severe organic heart disease can cause angina, hypotension or heart failure.
[0003] Electrocardiogram is a tool widely used for diagnosing heart-related diseases, which contains a large amount of physiological and pathological information reflecting the state of each part of the heart, and through which abnormality caused by cardiovascular disease can be detected.Long-term dynamic electrocardiogram monitoring can capture occasional and short-term electrocardiogram abnormalities that are not easily found by routine examination, and determine the type, frequency and risk degree of arrhythmia, etc.However, due to the huge amount of long-term electrocardiogram data, it greatly increases the burden of doctors.With the continuous progress of electrocardiosignal automatic analysis technology, the function of electrocardiosignal pre-recognition greatly reduces the workload of doctors and helps medical staff to find abnormal phenomena of arrhythmia in time.Currently, the electrocardiosignal features used in arrhythmia detection algorithm include QRS wave width, R wave height and width, RR interval and other heartbeat waveform features, or nonlinear features extracted by high-order statistics.This kind of manually extracted features has strong interpretability, but the detection rate is easily affected by noise and has poor robustness, which needs to be solved urgently. SUMMARY
[0004] TECHNICAL PROBLEM
[0005] To solve the above problems, the application provides a ventricular premature beat detection method based on intrabeat feature wavelet complex network and application, which is used for realizing long-term, noise-resistant and accurate electrocardio signal classification, effectively improving the accuracy of electrocardio signal automatic analysis and assisting doctors in diagnosis.
[0006] Technical scheme
[0007] To achieve the above object, the application adopts the following technical scheme: a ventricular premature beat detection method based on intrabeat feature wavelet complex network and application, comprising the following steps:
[0008] S1, electrocardio signal preprocessing, including denoising processing and QRS detection;
[0009] S2, heart beat segmentation, taking the R wave as a reference point, the preprocessed electrocardio signal is cut into heart beat signals with a fixed length window size forward and backward respectively; intrabeat wavelet segmentation, each segment of electrocardio signal is divided into 8 electrocardio sampling point sequences;
[0010] S3, calculating the features of each segment of electrocardio sampling point sequence in the intrabeat;
[0011] S4, feature detrending processing, which is used to eliminate the regional difference of features in different states in long-term electrocardio data; and feature small wavelet processing, which is used to eliminate the interference of feature value fluctuation on subsequent coding;
[0012] S5, symbolic dynamics coding, which is used to code the intrabeat feature sequence by symbolic dynamics to form a coding sequence for subsequent analysis;
[0013] S6, constructing intrabeat feature wavelet complex network, mapping the intrabeat feature coding sequence into a complex network;
[0014] S7, calculating the feature parameters of the complex network, which can be edge degree, graph energy, self-loop number, node average degree, cycle number of size 3, cycle number of size 4, graph link density, average node closeness centrality and average node clustering coefficient of the complex network;
[0015] S8, using the extracted electrocardio features, training a premature beat / non-premature beat classification model based on machine learning method.
[0016] As an improvement of the present invention, in step S1, an FIR low-pass filter is used to extract baseline drift and remove baseline drift from the original signal; then an FFT band-pass filter is used to filter the signal after removing baseline drift. For QRS detection in ECG signal preprocessing, the Pan-Tompkins method is used to detect the QRS wave and obtain the R wave position.
[0017] As an improvement of the present invention, in step S2, the heartbeat segmentation performs heartbeat segmentation on the ECG signal after noise reduction, and truncates forward by 0.1s with the R wave position as the reference point to ensure that the complete QRS wave is captured, and truncates backward by 0.4s to retain the complete T wave while avoiding capturing the next heartbeat.
[0018] As an improvement of the present invention, in step S2, the nth segment of the extracted ECG signal is divided into 8 sub-wavelengths according to the waveform, including the pre- and post-P wave segments (bounded by the P wave peak), the PR interval, the QR wave and RS wave segments (bounded by the R wave peak) in the QRS complex, the ST interval, and the pre- and post-T wave segments (bounded by the T wave peak), denoted in chronological order as follows: Let i be the sequence of ECG sampling points within the nth heartbeat, where 1≤i≤8.
[0019] As an improvement of the present invention, in step S3, the characteristics of each segment of the ECG sampling point sequence within the heartbeat are calculated. Morphological features such as peak-to-peak value, skewness, and crease can be selected, or statistical features such as mean and standard deviation can be selected, denoted as... Let be the feature of the sequence of ECG sampling points in the i-th segment within the n-th heartbeat, where 1≤i≤8.
[0020] As an improvement of the present invention, in step S4, the feature values of the i-th segment of the ECG sampling point sequence of the n-th heartbeat are... Perform detrending processing and calculate the mean of local features. (with current eigenvalue) The corresponding heartbeat number n is selected from the feature values of the corresponding sampling point sequence within one heartbeat, one step forward and one step backward. Calculate the local feature mean of the sampling point sequence corresponding to the current heartbeat using three consecutive feature values. ), with the current eigenvalue Subtract local feature mean As eigenvalues The value of is calculated using the following formula: Where 1≤i≤8.
[0021] As an improvement of the present invention, in step S4, the value obtained after piecewise function mapping is used to remove the feature value of the i-th segment of the ECG sampling point sequence of the nth heartbeat. Disturbances caused by minute fluctuations. Calculation of local feature mean. Local feature standard deviation (with current eigenvalue) The feature values of the corresponding sampling point sequence within one heart beat are extracted from the corresponding heart beat index n, both forward and backward. Calculate the local feature mean of the sampling point sequence corresponding to the current heartbeat using three consecutive feature values. and local feature standard deviation When the eigenvalue With local mean The distance is less than or equal to the local standard deviation. When, corresponding eigenvalue Take as local mean Size; when eigenvalues The distance from the local mean is greater than the local standard deviation. When, corresponding eigenvalue The above process can be understood as the eigenvalues being mapped through a piecewise function and then taking values, such as... Figure 2 As shown, the calculation formula is: Where 1≤i≤8.
[0022] As an improvement of the present invention, in step S5, symbolic dynamics is used to analyze the internal feature sequence of the nth heartbeat. Encoding transforms the original single-valued features into a sequence of symbols containing only a finite number of values. This coarse-grained process reduces the noise sensitivity of signal analysis. The encoding process uses finite-length symbols to encode the feature sequence. Forming a coding sequence For subsequent analysis, Let be the feature encoding value of the i-th segment of the ECG sampling sequence within the n-th heartbeat, where 1 ≤ i ≤ 8. For a given feature value sequence of length L... It can be converted into a symbol sequence using the following formula. The calculation formula is as follows: Where l represents the symbol set length, typically chosen between 2 and 6; {X i} (1≤i≤l-1) is the set of threshold values.
[0023] As an improvement of the present invention, in step S6, a complex network of internal features of the heartbeat is constructed, and the internal feature encoding sequence of the nth heartbeat is... The mapping is to a complex network. First, the encoded sequence is mapped according to length m. Perform partitioning and take a series of embedding vectors in Then, each z i is mapped to a sequence pattern S i = {s1, s2,..., s m}, where s j ∈ {1, 2,..., m} (1≤j≤m) and all have When there are same values in z i , the sequence number is determined by the order of appearance, satisfying Therefore, a series of embedding vectors is mapped to a series of sequence pattern sequences The set of all different sequence patterns included in the series of sequence pattern sequences is denoted as set The next step is to construct a complex network, and each different sequence pattern in set corresponds to a node in the network, and the order of edges depends on the order of appearance in the sequence pattern sequence , and the edge between two nodes represents that the sequence pattern is adjacent in .
[0024] As an improvement of the present application, the edge degree calculation formula in step S7 is: sMetric = ∑deg(N i ) × deg(N j ); sMetric represents the sum of the product of the degrees of any two connected nodes in the complex network; deg(N i ) represents the degree of node i, which is the number of nodes connected to the node and also the number of adjacent edges possessed by the node.
[0025] As an improvement of the present application, the graph energy calculation formula in step S7 is: Where λ i represents the eigenvalue of the adjacency matrix of the complex network; |λ i | represents the absolute value of the eigenvalue, i.e., the absolute value of the real component part; N adj represents the number of eigenvalues of the adjacency matrix of the complex network.
[0026] As an improvement of the present application, the self-loop number calculation formula in step S7 is: selfLoops = ∑diag(adj); where adj is the adjacency matrix of the complex network; diag(adj) is the diagonal element of the adjacency matrix.
[0027] As an improvement of the present application, the node average degree calculation formula in step S7 is: Where N edge is the number of edges in the complex network; N nodesThe number of nodes in the complex network.
[0028] As an improvement of the present application, the formula for calculating the number of cycles of size 3 in the network in step S7 is: cycles3 = trace(adj 3 ) / 6; wherein adj is the adjacency matrix of the complex network; and trace(adj 3 ) is the sum of the diagonal elements of the third power of the adjacency matrix.
[0029] As an improvement of the present application, the formula for calculating the number of cycles of size 4 in the network in step S7 is: cycles4 = [trace(adj 4 )-2N edge -4ConnTriples(adj)-8cycles3(adj)] / 8; wherein adj is the adjacency matrix of the complex network; trace(adj 4 ) is the sum of the diagonal elements of the fourth power of the adjacency matrix; N edge is the number of edges in the complex network; and ConnTriples(adj) is the number of connected three-node subgraphs in the complex network.
[0030] As an improvement of the present application, the formula for calculating the graph link density in step S7 is: wherein N edge is the number of edges in the complex network; and N nodes is the number of nodes in the complex network.
[0031] As an improvement of the present application, the formula for calculating the node closeness centrality in step S7 is: wherein dis(N i ,N j ) represents the distance between nodes i and j; and k represents the number of neighbor nodes connected to node i. Thus, the formula for calculating the average node closeness centrality is: wherein Closeness(N i ) represents the node closeness centrality of node i; and N nodes represents the number of nodes in the complex network.
[0032] As an improvement of the present application, the formula for calculating the node clustering coefficient in step S7 is: wherein clustCoeff i represents the clustering coefficient of node i; deg(N i ) represents the degree of node i, i.e. the number of nodes connected to the node; and E i represents the actual number of edges between the deg(N i ) other nodes connected to node i. Thus, the formula for calculating the average node clustering coefficient is: where clustCoeff i denotes the clustering coefficient of node i; N nodes denotes the number of nodes in the complex network.
[0033] Advantages:
[0034] 1. The feature de-trending processing of the application eliminates the regional differences of long-term electrocardiosignal features in different states, and also solves the problem of decreased classification accuracy caused by the differences of electrocardiosignal features due to individual differences.
[0035] 2. The feature de-minor fluctuation processing of the application eliminates the influence of minor fluctuations on subsequent feature coding. Symbol dynamics coding of the features is a coarse-grained process, which improves the anti-noise ability of signal analysis and improves the accuracy of feature classification.
[0036] 3. The complex network highlights the topological structure of the interaction relationship between elements, and is more likely to highlight the global features of the structure. From the new perspective of the complex network, the process of the features changing with time in a heartbeat cycle is mapped to the complex network topology, the dynamic characteristics of the feature sequence inside the heartbeat are deeply understood, the effective and essential electrocardiosignal features are extracted, and the detection accuracy is improved. BRIEF DESCRIPTION OF DRAWINGS
[0037] Figure 1 Fig. 1 is a flowchart of a ventricular premature beat detection method based on intra-beat feature subwave complex network according to the application.
[0038] Figure 2 Fig. 4 is a schematic diagram of the piecewise function in step S4.
[0039] Figure 3 Fig. 5 is a schematic diagram of the principle of constructing the intra-beat subwave complex network.
[0040] Figure 4 Fig. 6 is a flowchart of embodiment 1.
[0041] Figure 5 Fig. 7 is a flowchart of embodiment 2. DETAILED DESCRIPTION
[0042] Examples according to the content contained in the claims
[0043] Embodiment 1:
[0044] Figure 4 An embodiment of a ventricular premature beat detection method and application based on intra-beat feature subwave complex network is shown, which comprises the following steps:
[0045] S1. An FIR low-pass filter is used to extract baseline drift and remove it from the original signal; then an FFT band-pass filter is used to filter the baseline-drift-removed signal. The Pan-Tompkins method is used for QRS wave detection to obtain the R-wave position.
[0046] S2, the denoised ECG signal is segmented into heartbeat segments. A 0.1s segment is taken forward from the R wave position to ensure a complete QRS complex is captured, and a 0.4s segment is taken backward to preserve the complete T wave while avoiding capturing the next heartbeat. Each segment is then further divided into eight equal ECG sampling point sequences, including the pre- and post-P wave segments (defined by the P wave peak), the PR interval, the QR and RS waves (defined by the R wave peak) within the QRS complex, the ST interval, and the pre- and post-T wave segments (defined by the T wave peak). These are chronologically labeled as follows: Let i be the sequence of ECG sampling points within the nth heartbeat, where 1≤i≤8.
[0047] S3 calculates the features of each ECG sampling point sequence within the heartbeat. The extracted features include sample entropy SampEn, peak-to-peak value PP, and mean value.
[0048] For the i-th sampling point sequence within the nth heartbeat The calculation process of its sample entropy SampEn is as follows: First, a vector sequence X of dimension n is formed according to the index. n (1),...,X n (N-n+1), X n (p) represents the n consecutive x values starting from the p-th point, where
[0049] X n (p)={x(p),x(p+1),...,x(p+n-1)},1≤p≤N-n+1. X n (p) and X n The distance between (q) is defined as the absolute value of the maximum difference among their corresponding elements. For a given X n (p), Statistics X n (p) and X n The number of q (1≤q≤Nn, q≠p) whose distance between (q) is less than or equal to r, denoted as B. p For 1≤p≤Nn, define Increase the dimension to n+1 and calculate X. n+1 (p) and X n+1 The number of pairs of terms (q) (1≤q≤Nn,q≠p) whose distance is less than or equal to r, denoted as A. p .definition Therefore, the formula for calculating sample entropy is:
[0050] For the i-th sampling point sequence within the nth heartbeat The calculation process for its peak-to-peak value PP is as follows: record the maximum value in the sequence. and minimum value The formula for calculating peak-to-peak value is:
[0051] For the i-th sampling point sequence within the nth heartbeat The formula for calculating its mean is:
[0052] S4, perform detrending processing on the above single-value features respectively. Using... This represents a single-valued feature of the i-th segment of the ECG sampling sequence for the nth heartbeat. First, the local feature mean is calculated. (with current eigenvalue) The corresponding heartbeat number n is selected from the feature values of the corresponding sampling point sequence within one heartbeat, one step forward and one step backward. Calculate the local feature mean of the sampling point sequence corresponding to the current heartbeat using three consecutive feature values. ), with the current eigenvalue Subtract local feature mean As eigenvalues The value of is calculated using the following formula: Where 1≤i≤8:
[0053] Secondly, the above single-valued features are subjected to small fluctuation removal processing. Using... Let represent a single-value feature of the i-th segment of the ECG sampling sequence for the nth heartbeat above, and calculate the local feature mean. Local feature standard deviation (with current eigenvalue) The feature values of the corresponding sampling point sequence within one heart beat are extracted from the corresponding heart beat index n, both forward and backward. Calculate the local feature mean of the sampling point sequence corresponding to the current heartbeat using three consecutive feature values. and local feature standard deviation When the eigenvalue With local mean The distance is less than or equal to the local standard deviation. When, corresponding eigenvalue Take as local mean Size; when eigenvalues The distance from the local mean is greater than the local standard deviation. When, corresponding eigenvalue The above process can be understood as the eigenvalues being mapped through a piecewise function and then taking values, such as...Figure 2 The calculation formula is shown in the following formula (3) : Wherein, 1≤i≤8.
[0054] S5, encode the above single value feature by using symbolic dynamics. The above n-th heartbeat i-th ECG sampling point sequence of a single value feature is represented by The static coding method is used. For a given data length L of the feature value sequence The maximum value And the minimum value Let The threshold value is The feature sequence is converted into a symbol sequence The formula is shown in the following formula (4) : Wherein, 1≤i≤8, and the set of the threshold value is
[0055]
[0056] S6, construct the intra-beat feature wavelet complex network, and divide the coding sequence According to the length m=4, and take a series of embedding vectors Wherein Then, each z i is mapped to a sequence of ordinal numbers S i ={s1,s2,s3,s4}, wherein s j ∈{1,2,3,4}(1≤j≤4) and All have When there are the same values in z i , the ordinal number is determined by the order of appearance, and satisfies Therefore, a series of embedding vectors are mapped to a series of ordinal pattern sequences The set of all different ordinal patterns included in the series of ordinal pattern sequences is recorded as set The next step is to construct a complex network, and each different ordinal pattern in set corresponds to a node in the network, and the order of the network edges depends on the order of appearance in the ordinal pattern sequence The edges between two nodes represent that the ordinal pattern is adjacent in , and the above process is shown in Figure 3 .
[0057] S7, calculate the feature parameters of the complex network, including the graph energy of the complex network, the number of self-loops, the average degree of nodes, the number of cycles of size 3, the graph link density, the average node closeness centrality, and the average node clustering coefficient.
[0058] The formula for calculating graph energy is:
[0059] λ i |λ represents the eigenvalues of the adjacency matrix of a complex network; i | represents the absolute value of the eigenvalue, that is, the absolute value of the real component; N adj This represents the number of eigenvalues in the adjacency matrix of a complex network.
[0060] The formula for calculating the number of self-circulations is:
[0061] selfLoops = ∑diag(adj); adj is the adjacency matrix of the complex network; diag(adj) is the diagonal element of the adjacency matrix.
[0062] The formula for calculating the average degree of a node is:
[0063] N edge N represents the number of edges in a complex network. nodes The number of nodes in a complex network.
[0064] The formula for calculating the number of loops of size 3 in the network is:
[0065] cycles3 = trace(adj 3 ) / 6; adj is the adjacency matrix of the complex network; trace(adj 3 ) is the sum of the diagonal elements of the cube of the adjacency matrix.
[0066] The formula for calculating the graphic link density is:
[0067] N edge N represents the number of edges in a complex network. nodes The number of nodes in a complex network.
[0068] The formula for calculating node proximity centrality is:
[0069] dis(N i N j Let represent the distance between nodes i and j; k represents the number of neighboring nodes connected to node i. Therefore, the formula for calculating the average node proximity centrality is:
[0070] Closeness (N) i ) indicates the node proximity centrality of node i; N nodes This indicates the number of nodes in a complex network.
[0071] wherein the node clustering coefficient calculation formula is:
[0072] clustCoeff i represents the clustering coefficient of node i; deg(N i ) represents the degree of node i, that is, the number of nodes connected to the node; E i represents the actual number of edges between the deg(N i ) other nodes connected to node i. Therefore, the average node clustering coefficient calculation formula is:
[0073] clustCoeff i represents the clustering coefficient of node i; N nodes represents the number of nodes in the complex network.
[0074] S8, a one-dimensional feature vector is generated as an input parameter by using 21 electrocardio features corresponding to the current heartbeat, and the electrocardio signal is classified by using an SVM classifier, and the result is classified into a normal heartbeat or a premature ventricular contraction heartbeat.
[0075] Embodiment 2:
[0076] Figure 5 An embodiment of a premature ventricular contraction detection method and application based on intra-beat feature subwave complex network is shown, which comprises the following steps:
[0077] S1, a FIR low-pass filter is used to extract baseline drift and remove baseline drift in the original signal; then an FFT band-pass filter is used to filter the signal after removing the baseline drift. The Pan-Tompkins method is used for QRS wave detection to obtain the R wave position.
[0078] S2, the electrocardio signal after noise removal is segmented by heartbeats, and the R wave position is taken as the reference point to intercept 0.1s forward to ensure that the complete QRS wave is intercepted, and 0.4s length is intercepted backward to retain the complete T wave while avoiding the next heartbeat. The above-mentioned each segment of electrocardio signal is further divided into 8 electrocardio sampling point sequences, including the P wave front and rear segments, PR interval, QR wave and RS wave in the QRS complex, ST interval, and T wave front and rear segments divided by the P wave peak, which are recorded in time sequence as is the i-th electrocardio sampling point sequence in the n-th heartbeat, wherein 1≤i≤8.
[0079] S3, the features of each electrocardio sampling point sequence in the heartbeat are calculated, and the extracted features include sample entropy SampEn, peak-to-peak value P-P, energy En, mean value mean, standard deviation std, and root mean square rms.
[0080] For the i-th segment of sample point sequence in the n-th heart beat The calculation process of its sample entropy SampEn is as follows: first, a group of vector sequences with dimension n is composed according to the sequence number X n (1),...,X n (N-n+1), X n (p) represents the value of n consecutive x starting from the p-th point, wherein
[0081] X n (p) = {x(p), x(p+1),..., x(p+n-1)}, 1≤p≤N-n+1. X n (p) and X n (q) between the distance definition is the absolute value of the maximum difference in corresponding elements. For a given X n (p), the number of q (1≤q≤N-n, q≠p) between X n (p) and X n (q) is calculated, and is recorded as B p . For 1≤p≤N-n, define Increase the dimension to n+1, calculate the number of X n+1 (p) and X n+1 (q) (1≤q≤N-n, q≠p) between the distance is less than or equal to r, and is recorded as A p . Define Therefore, the sample entropy calculation formula is
[0082] For the i-th segment of sample point sequence in the n-th heart beat The calculation process of its peak-to-peak value P-P is as follows: record the maximum value and the minimum value The peak-to-peak value calculation formula is
[0083] For the i-th segment of sample point sequence in the n-th heart beat Its energy En calculation formula is:
[0084] For the i-th segment of sample point sequence in the n-th heart beat Its average value mean calculation formula is:
[0085] For the i-th segment of sample point sequence in the n-th heart beat Its standard deviation std calculation formula is:
[0086] For the i-th segment of sample point sequence in the n-th heart beat The formula for calculating its root mean square (RMS) is:
[0087] S4, firstly, detrend processing is performed on the above individual features. Using... Let represent a single-value feature of the i-th segment of the ECG sampling sequence for the nth heartbeat above, and calculate the local feature mean. (with current eigenvalue) The corresponding heartbeat number n is selected from the feature values of the corresponding sampling point sequence within one heartbeat, one step forward and one step backward. Calculate the local feature mean of the sampling point sequence corresponding to the current heartbeat using three consecutive feature values. ), with the current eigenvalue Subtract local feature mean As eigenvalues The calculation formula is as follows: Where 1≤i≤8:
[0088] Secondly, the above single-valued features are subjected to small fluctuation removal processing. Using... Let represent a single-value feature of the i-th segment of the ECG sampling sequence for the nth heartbeat above, and calculate the local feature mean. Local feature standard deviation (with current eigenvalue) The feature values of the corresponding sampling point sequence within one heart beat are extracted from the corresponding heart beat index n, both forward and backward. Calculate the local feature mean of the sampling point sequence corresponding to the current heartbeat using three consecutive feature values. and local feature standard deviation When the eigenvalue With local mean The distance is less than or equal to the local standard deviation. When, corresponding eigenvalue Take as local mean Size; when eigenvalues The distance from the local mean is greater than the local standard deviation. When, corresponding eigenvalue The above process can be understood as the eigenvalues being mapped through a piecewise function and then assigned values, the calculation formula of which is: Where 1≤i≤8.
[0089] S5 uses symbolic dynamics to encode the above single-valued features. To represent a single-valued feature of the i-th segment of the ECG sampling sequence for the nth heartbeat, a dynamic encoding method is used. For a given feature value sequence of length L... Calculate its standard deviation σ nThen the difference sequence is obtained Where The difference sequence is converted into a symbol sequence with the threshold value of ±σ n ,±1.5σ n The formula is:
[0090] S6, the complex network of wavelet features is constructed, the coding sequence is divided according to the length m=3, and a series of embedding vectors are taken, where Then, each z i is mapped to a sequence of ordinal numbers S i ={s1,s2,s3}, where s j ∈{1,2,3}(1≤j≤3) and All have When there are the same values in z i , the ordinal number is determined by the order of appearance, satisfying Therefore, a series of embedding vectors are mapped to a series of ordinal pattern sequences All different ordinal patterns included in the series of ordinal pattern sequences are collected into a set Next, a complex network is constructed, each different ordinal pattern in the set corresponds to a node in the network, and the order of the edges depends on the order of appearance in the ordinal pattern sequence The edges between two nodes represent that the ordinal pattern is adjacent in .
[0091] S7, the characteristic parameters of the complex network are calculated, including the graph energy of the complex network, the number of self-loops, the average degree of nodes, the number of cycles of size 3, the graph link density, the average node closeness centrality, and the average node clustering coefficient.
[0092] The formula for calculating the graph energy is:
[0093] λ i represents the eigenvalue of the adjacency matrix of the complex network; |λ i | represents the absolute value of the eigenvalue, i.e., the absolute value of the real component part; N adj represents the number of eigenvalues of the adjacency matrix of the complex network.
[0094] The formula for calculating the number of self-loops is:
[0095] selfLoops =∑diag(adj); adj is the adjacency matrix of the complex network; diag(adj) is the diagonal elements of the adjacency matrix.
[0096] where the average node degree is calculated by:
[0097] N edge is the number of edges in the complex network; N nodes is the number of nodes in the complex network.
[0098] where the number of cycles of size 3 in the network is calculated by:
[0099] cycles3 = trace(adj 3 ) / 6; adj is the adjacency matrix of the complex network; trace(adj 3 ) is the sum of the diagonal elements of the cube of the adjacency matrix.
[0100] where the node closeness centrality is calculated by:
[0101] dis(N i ,N j ) represents the distance between nodes i and j; k represents the number of neighbor nodes connected to node i. Therefore, the average node closeness centrality is calculated by:
[0102] Closeness(N i ) represents the node closeness centrality of node i; N nodes represents the number of nodes in the complex network.
[0103] where the node clustering coefficient is calculated by:
[0104] clustCoeff i represents the clustering coefficient of node i; deg(N i ) represents the degree of node i, i.e., the number of nodes connected to the node; E i represents the actual number of edges between the deg(N i ) other nodes connected to node i. Therefore, the average node clustering coefficient is calculated by:
[0105] clustCoeff i represents the clustering coefficient of node i; N nodes represents the number of nodes in the complex network.
[0106] S8, respectively, calculate the mutual information value of 42 heartbeat features of the current heartbeat and heartbeat label to select features, and finally select the first 15 heartbeat features with the largest mutual information value for subsequent heartbeat classification. The calculation process of mutual information is as follows: the mutual information value calculation formula between any two variables X and Y is
[0107]
[0108] Where p i is the probability that X takes the value x i p i =P(X=x i ), p j is the probability that Y takes the value y j p j =P(Y=y j ), p ij is the probability that X takes the value x i and Y takes the value y j p ij =P(X=x i ,Y=y j ), and the above formula is 1≤i,j≤n.
[0109] S9, generate a two-dimensional matrix as an input parameter by respectively taking 15 heartbeat features corresponding to 1 heartbeat forward and backward from the current heartbeat, train by using a two-dimensional convolution network (2D-CNN), and classify the result into normal heartbeat or premature ventricular contraction heartbeat.
Claims
1. A method for detecting ventricular premature beat based on poincare feature wavelet complex network, characterized in that, The method comprises the following steps: S1, electrocardiosignal preprocessing, including denoising processing and QRS detection; S2, heartbeat segmentation, taking the R wave as a reference point, the preprocessed electrocardiosignal is cut into heartbeat signals with a fixed length window size forward and backward respectively; the internal wavelet segmentation of the heartbeat is performed, and each segment of the electrocardiosignal is segmented into 8 electrocardiosampling point sequences according to the wavelet; S3, calculating the features of each segment of the electrocardiosampling point sequence in the heartbeat; S4, feature detrending processing, which is used to eliminate the regional differences of the features in the long-term electrocardiosignal under different states; and feature small wave elimination processing, which is used to eliminate the interference of the fluctuation of the feature values on subsequent coding; S5, symbolic dynamics coding, which uses symbolic dynamics to code the internal feature sequence of the heartbeat to form a coding sequence for subsequent analysis; S6, constructing an intra-beat feature wavelet complex network, which maps the intra-beat feature coding sequence into a complex network; S7, calculating the feature parameters of the complex network, the feature parameters being edge degree, graph energy, self-loop number, node average degree, 3-size cycle number, 4-size cycle number, graph link density, average node closeness centrality and average node clustering coefficient of the complex network; S8, using the electrocardiosignal features extracted in step S7, training a premature beat / non-premature beat classification model based on a machine learning method; The step S4, using the segmented function mapping value to remove the n-th heartbeat i segment ECG sampling point sequence of the characteristic value f i n (1≤i≤8) micro wave interference; calculate local feature mean Local feature standard deviation The current characteristic value f i n The corresponding heartbeat sequence number n respectively forward, backward intercept 1 heartbeat internal corresponding sampling point sequence of the characteristic value f i n-1 ,f i n+1 , the local feature mean of the current heartbeat corresponding sampling point sequence is calculated with the continuous 3 characteristic values And local feature standard deviation When the characteristic value f i n The distance from the local mean Is less than or equal to the local standard deviation , the corresponding characteristic value f i n Take the local mean Size; when the characteristic value f i n The distance from the local mean is greater than the local standard deviation , the corresponding characteristic value f i n Invariable; the above process is the value of the characteristic value after mapping by the segmented function, the formula is as follows, wherein 1≤i≤8: In step S7, the edge degree calculation formula is: sMetric = ∑ deg(N i ) x deg(N j ), sMetric represents the sum of the product of the degrees of any two connected nodes in the complex network; deg(N i ) denotes the degree of node i, which is the number of nodes connected to the node i, and also the number of adjacent edges owned by the node i; The graph energy calculation formula is: where λ i denotes the eigenvalues of the adjacency matrix of the complex network; |λ i denotes the absolute value of the eigenvalues, i.e. the absolute value of the real component part; N adj denotes the number of eigenvalues of the adjacency matrix of the complex network; The self-loop number calculation formula is: selfLoops = ∑diag(adj), Where adj is the adjacency matrix of the complex network; diag(adj) is the diagonal element of the adjacency matrix; The node average degree calculation formula is: where N edge is the number of edges in the complex network; N nodes is the number of nodes in the complex network; The 3-size cycle number calculation formula is: cycles3 = trace(adj 3 ) / 6, where adj is the adjacency matrix of the complex network; trace(adj 3 ) is the sum of the diagonal elements of the third power of the adjacency matrix; The 4-size cycle number calculation formula in the network is: cycles4 = [trace(adj 4 )-2N edge -4ConnTriples(adj)-8cycles3(adj)] / 8, where adj is the adjacency matrix of the complex network; trace(adj 4 ) is the sum of the diagonal elements of the fourth power of the adjacency matrix; N edge is the number of edges in the complex network; ConnTriples(adj) is the number of connected triadic subgraphs in the complex network; The graph link density calculation formula is: where N edge is the number of edges in the complex network; N nodes is the number of nodes in the complex network; The node closeness centrality calculation formula is: where dis(N i ,N j ) denotes the distance between nodes i and j; k represents the number of neighbor nodes connected to node i; therefore, the formula for calculating the average node closeness centrality is: where dis(N i ,N j ) denotes the distance between nodes i and j; k represents the number of neighbor nodes connected to node i; therefore, the formula for calculating the average node closeness centrality is: where Closeness(N i ) denotes the node closeness centrality of node i; N nodes denotes the number of nodes in the complex network; The node clustering coefficient calculation formula is: where clustCoeff i represents the clustering coefficient of node i; deg(N i ) represents the degree of node i, i.e., the number of nodes connected to the node; E i represents the actual number of edges between the deg(N i ) other nodes connected to node i; thus, the average node clustering coefficient is calculated as follows: where clustCoeff i represents the clustering coefficient of node i; N nodes represents the number of nodes in the complex network.
2. The method of claim 1, wherein, In step S1, the denoising processing of the electrocardiosignal preprocessing uses a FIR low-pass filter to extract the baseline drift and remove the baseline drift in the original signal; then an FFT band-pass filter is used to filter the signal after removing the baseline drift; the QRS detection of the electrocardiosignal preprocessing uses the Pan-Tompkins method to detect the R wave position.
3. The method of claim 1, wherein, In step S2, the heartbeat segmentation cuts the electrocardiosignal after denoising processing into heartbeats, taking the R wave position as a reference point, cutting 0.1s forward to ensure that the complete QRS wave is cut, and cutting 0.4s backward to retain the complete T wave while avoiding cutting the next heartbeat.
4. The method of claim 1, wherein, In the step S2, the heartbeat internal wavelet segmentation is to segment the above-mentioned intercepted n-th heartbeat internal electrocardio signal into 8 segments according to the waveform, including the P-wave front segment and the P-wave rear segment with the P-wave peak as the boundary, the PR interval, the QR wave and the RS wave in the QRS complex with the R-wave peak as the boundary, the ST interval, the T-wave front segment and the T-wave rear segment with the T-wave peak as the boundary, and recorded in time sequence as is the i-th segment electrocardio sampling point sequence in the n-th heartbeat internal, wherein 1≤i≤8.
5. The method of claim 1, wherein, In the step S3, the features of each segment of the electrocardio sample point sequence in the heart beat are calculated, and the morphological features such as peak-to-peak value, skewness, kurtosis, or the statistical features such as mean value, standard deviation are selected, denoted as f i n is the feature of the i-th segment of the electrocardio sample point sequence in the n-th heart beat, wherein 1≤i≤8.
6. The method of claim 1, wherein, The step S4 is to perform detrending processing on the feature value f i n (1≤i≤8) of the i-th sampling point sequence of the n-th heartbeat, and calculate the local feature mean value The current feature value f i n The feature value f i n-1 of the corresponding sampling point sequence in the n-1th and n+1th heartbeats is selected respectively, and the feature value f i n+1 of the corresponding sampling point sequence in the n-2th and n+2th heartbeats is selected respectively. The local feature mean value of the current heartbeat corresponding sampling point sequence is calculated by using the continuous three feature values i n The local feature mean value is subtracted from the current feature value f as the value of the feature value f i n , and the formula is as follows, wherein 1≤i≤8:
7. The method of claim 1, wherein, In the step S5, the symbol dynamics is used to the internal characteristic sequence of the n th heartbeat Encoding the original single-value feature into a symbol sequence containing only limited values is a coarse-grained process, which reduces the noise sensitivity of signal analysis; the encoding process uses a limited length symbol to convert the feature sequence to form an encoded sequence for subsequent analysis, is the feature encoding value of the i th segment of the ECG sampling point sequence in the n th heartbeat, wherein 1≤i≤8; for a given data length L feature value sequence {f i n}(1≤i≤8), it is converted into a symbol sequence by the following formula The formula is as follows: where l denotes the length of the symbol set, selected between 2 and 6;{X i (1≤i≤l-1) is a set of threshold values.
8. The method of claim 1, wherein, In step S6, a complex network for the internal features of heartbeats is constructed, and the internal feature encoding sequence of the nth heartbeat is used. Mapping to a complex network; first, according to the length m, the encoded sequence is... Perform partitioning and take a series of embedding vectors in Then, for each z i Mapped to an ordinal pattern S i ={s1,s2,...,s m }, where satisfying and All When z i When identical values exist in a set, the ordinal number is determined by the order in which they appear, satisfying the condition that... Therefore, a series of embedding vectors Mapped to a series of ordinal pattern sequences This series of ordinal pattern sequences The set of all distinct ordinal patterns included in the set is denoted as the set. The next step is to build complex networks and aggregate... Each distinct ordinal pattern corresponds to a node in the network, and the order of network edges depends on the sequence of ordinal patterns. The order in which they appear, and the edge between two nodes indicates that the ordinal pattern appears in the sequence. The inside are adjacent.
Citation Information
Patent Citations
Method for realizing sudden death risk prediction on mini dynamic electrocardiogram monitoring equipment
CN106073765A
Ventricular premature beat recognition method, recognition system and electronic equipment
CN108903935A