Wearable real-time quality assessment method for electrocardiogram based on multi-scale complex network
By decomposing and extracting features from electrocardiogram (ECG) signals using a multi-scale complex network method and combining it with a machine learning classifier, the problems of noise interference and false alarms in ECG signal quality assessment of wearable devices are solved, achieving efficient and accurate signal quality assessment and cardiovascular disease diagnosis.
Patent Information
- Application Number
- CN202210955614.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-10
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2042-08-10
AI Technical Summary
Existing ECG signal quality assessment methods suffer from noise interference, frequent false alarms, and inaccurate classification results in wearable devices, making it difficult to efficiently and quickly assess signal quality in different leads and scenarios.
A multi-scale complex network approach is adopted, which involves signal decomposition, construction of complex networks, calculation of multi-layer feature matrices and normalization processing, and combination with machine learning classifiers to classify the quality level of electrocardiogram signals, including time-frequency analysis such as Fourier transform and wavelet transform, and construction of visual complex networks.
It enables efficient real-time quality assessment of electrocardiogram signals, improves the accuracy and stability of signal classification, reduces false alarms, and enhances the accuracy of cardiovascular disease diagnosis.
Smart Images

Figure CN115392297B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of signal detection and medical electronics, in particular to a wearable real-time quality evaluation method for electrocardiogram based on multi-scale complex network, which is suitable for mobile medical treatment, sports monitoring and medical monitoring fields. BACKGROUND
[0002] In 1842, French scientist Matteucci first discovered the electrical activity of the heart; in 1872, Muirhead recorded the electrical signal of the heart fluctuation; in 1885, Dutch physiologist W. Einthoven first recorded the electrocardiogram from the body surface, thus opening the history of electrocardiogram recording. Electrocardiogram (ECG) is one of the most commonly used clinical examinations for cardiovascular diseases, which helps to diagnose arrhythmia, myocardial ischemia, myocardial infarction, atrial fibrillation and cardiac pacing conditions, etc. by recording the normal electrical activity of the human heart, and has a wide range of applications. At the same time, electrocardiogram signal has also become one of the important means for clinical detection of cardiovascular diseases.
[0003] In recent years, due to the increase of clinical false alarms caused by some electrocardiogram signals with very low reference value, electrocardiogram signal quality evaluation has become a research hotspot for many scholars. At present, most electrocardiogram signal quality evaluation methods use quality evaluation indexes based on time domain, frequency domain, nonlinear domain and waveform morphology, combined with machine learning classifiers to divide the quality level, and the division result is usually divided into acceptable (which can be used for clinical diagnosis) and unacceptable (which has no reference value for clinical diagnosis). At the same time, in the process of clinical diagnosis, a large amount of noise including baseline drift, muscle artifact and power frequency interference will be generated when the electrocardiogram signal is collected by wearable devices, which will lead to the electrocardiogram signal without clinical reference value, and even produce false alarms, increasing the workload of medical personnel. Therefore, we need to divide the quality level of the signal collected by wearable electrocardiogram devices, and remove meaningless signals, which can not only reduce false alarms, but also improve the accuracy of subsequent cardiovascular disease diagnosis. Most of the existing electrocardiogram signal quality evaluation methods use the way of setting feature quality indicators for classification, and there are usually problems such as too complex or poor generalization ability in the implementation process for different leads and different scenes. Therefore, it is very important to design an efficient and fast wearable real-time electrocardiogram signal quality evaluation algorithm. SUMMARY
[0004] TECHNICAL PROBLEM
[0005] This invention provides a wearable real-time ECG quality assessment method based on multi-scale complex networks. By decomposing the signal, mapping the complex network, calculating the features of the multi-layer complex network and constructing a feature matrix, normalizing each feature, and classifying the ECG signal using a machine learning classifier to determine the signal quality level, it is possible to perform real-time and efficient ECG signal quality assessment.
[0006] Technical solution:
[0007] To achieve the above objectives, the present invention adopts the following technical solution: a wearable real-time ECG quality assessment method based on multi-scale complex networks, comprising the following steps:
[0008] S1, through signal decomposition, decomposes the original short-time signal into cardiac electronic band signals;
[0009] S2, constructing a complex network of electronic frequency band signals at each layer;
[0010] S3, calculate the feature vectors of each layer of the complex network. The feature vectors include at least the average path length, graph link density, number of self-loops, average node degree, average node proximity centrality, feature vector centrality, transitivity, marginality, graph energy, average node clustering coefficient, and longest and shortest paths between nodes.
[0011] S4, construct a feature matrix from the feature vectors in step S3, and normalize each feature vector;
[0012] S5 uses a machine learning classifier to classify ECG signals, categorizing signal quality into good, relatively good, and poor.
[0013] As an improvement of the present invention, in step S1, the original short-time ECG signal is decomposed into multiple sub-frequency bands by time-frequency analysis. The time-frequency analysis methods include Fourier transform, wavelet transform, empirical mode decomposition, and Hilbert transform. The original short-time ECG signal is decomposed into multiple different sub-frequency bands by different decomposition methods.
[0014] As an improvement to the present invention, step S2, which involves constructing a visual complex network of the electronic frequency band signals of each layer, includes the following steps:
[0015] 1) such as Figure 2 As shown, the histogram in the upper half of the figure represents a time series, and the height of the bars represents the numerical value. The points in the connection diagram in the lower half of the figure correspond to the data points in the histogram, and the lines connecting the points represent the visible lines of the data in the histogram.
[0016] 2) The visible lines of connection between data points in a time series must meet the visibility criterion: X = {x i} i=1,...,nFor a time series with n data points, any two data points (t a ,x a ) and (t b ,x b ) in the time series are visible to each other, if t a i b satisfy:
[0017]
[0018] 3) The visible graph complex network has the following characteristics: (1) each point is connected to at least its left and right neighbors; (2) the network is undirected; (3) the visibility is unchanged after the coordinate scales of the horizontal and vertical axes are changed or after affine transformation. In this way, the time series can be mapped into a visible graph complex network, and the network inherits the characteristics of the time series.
[0019] As an improvement of the present application, the average path length in step S3 is defined as the average value of the distance between any two nodes in a network with N nodes, and the calculation formula is: where d ij represents the number of edges of the shortest path between connected nodes i and j, referred to as the distance between nodes i and j, and N represents the number of nodes in the network.
[0020] As an improvement of the present application, the calculation formula of the graph link density in step S3 is: where N edge is the number of edges in the graph, and N node is the number of nodes.
[0021] As an improvement of the present application, the calculation formula of the number of self-loops in step S3 is selfLoops = ∑diag(M), where M is the adjacency matrix mapped by the sub-signal.
[0022] As an improvement of the present application, the calculation formula of the node average degree in step S3 is: where n represents the number of nodes, and m represents the number of visible lines in the network.
[0023] As an improvement of the present application, the calculation formula of the node closeness centrality in step S3 reflects the closeness between a node and other nodes in the network, and is: where dis(i,j) represents the distance between nodes i and j, and g is the number of neighbor nodes connected to node i; the calculation formula of the average node closeness centrality is: where N represents the number of nodes in the network.
[0024] As an improvement of the present application, the centrality of the feature vector in step S3 is a feature of measuring the importance of the node, the importance of a node depends on the number of its neighbor nodes (i.e. the degree of the node) and the importance of its neighbor nodes, and the calculation formula is: where c is a proportional constant, a ij = 1 if and only if node i is connected to j, otherwise 0, x i represents the importance of node i.
[0025] As an improvement of the present application, the calculation formula of the transitivity in step S3 is: F(adj) = trace(adj 3 ) / 6, where adj is the adjacency matrix, trace(adj) is the sum of the diagonal elements of the matrix, G(adj) is the number of connected triples in the graph, and F(adj) is the number of triangles in the graph.
[0026] As an improvement of the present application, the calculation formula of the edge degree in step S3 is: sMetric = ∑deg(i) × deg(j), sMetric represents the sum of the product of the degrees of any two connected nodes in the graph, and deg() represents the degree of the node, which is the number of other nodes connected to the node, i.e. the number of adjacent edges possessed by the node.
[0027] As an improvement of the present application, the graph energy in step S3 is the sum of the absolute values of the eigenvalues of the adjacency matrix corresponding to the complex network, and the calculation formula is: where λ i is the absolute value of the real part of the eigenvalue of the adjacency matrix.
[0028] As an improvement of the present application, the average node clustering coefficient in step S3 is the average of the clustering coefficients of all nodes, and the clustering coefficient of node i is the ratio of the actual number of edges between k i nodes connected to node i to the maximum number of edges that can exist, i.e. the visible lines. The calculation formula is: where C i represents the clustering coefficient of node i, and E i represents the actual number of edges between k i nodes connected to node i, and the calculation formula of the average node clustering coefficient is: where C i represents the clustering coefficient of node i, and N represents the number of nodes in the network.
[0029] As an improvement of the present application, the longest shortest path between nodes in step S3 is the maximum distance from a node to all other nodes in the complex network, and the calculation formula is: where dij represents the shortest path from node i to node j, that is, the distance from node i to node j.
[0030] As an improvement of the present application, the feature vector normalization method formula in step S4 is: feature=(f-min(f)) / (max(f)-min(f)), wherein feature represents the normalized feature, and f represents the original feature.
[0031] Advantages:
[0032] 1. The short-time ECG signal can be decomposed into multiple sub-band signals through time-frequency analysis, the time dynamics information of different frequency bands is calculated, the obtained feature information is more comprehensive, and the classification accuracy is improved.
[0033] 2. The complex network is a method for describing the interaction and relationship between individuals in a complex system, and the complex network is used as a means for extracting signal time dynamics features, the signal features are quantified from the perspective of the complex network, the structure and elements of the signal are better reflected, and better signal evaluation performance is obtained.
[0034] 3. A multi-layer complex network is constructed, a multi-layer network feature matrix is extracted, and the information of multiple frequency band ECG signals is used as classification features, so that the stability of the network is improved. BRIEF DESCRIPTION OF DRAWINGS
[0035] Figure 1 is a flowchart of the wearable real-time ECG quality evaluation method based on a multi-scale complex network according to the present application;
[0036] Figure 2 is a schematic diagram of the principle of constructing a visual graph complex network according to the present application;
[0037] Figure 3 is a flowchart of embodiment 1 according to the present application;
[0038] Figure 4 is a flowchart of embodiment 2 according to the present application. DETAILED DESCRIPTION
[0039] The present application will be described in more detail below with reference to the accompanying drawings and embodiments. Figure 1 All signal analysis and processing of the present application are analyzed by using a fixed analysis window of 2s.
[0040] Embodiment 1
[0041] Figure 3 An embodiment of the wearable real-time ECG quality evaluation method based on a multi-scale complex network is shown, which includes the following steps:
[0042] S1, decompose the original short-time signal into heart electronic frequency band signals by signal decomposition, the embodiment uses wavelet 'bior' to decompose and reconstruct the signal, and decomposes the short-time heart electronic signal into four sub-band signals of 0-0.8 Hz, 0.8-25 Hz, 25-50 Hz and 50-200 Hz;
[0043] S2, construct a fast natural visual graph complex network of each layer heart electronic frequency band signal, including the following steps: connecting a visual line between data points in the time sequence of the heart electronic signal in different frequency bands according to a visual criterion, the visual criterion: any two data points (t a ,x a ) and (t b ,x b ) in the time sequence are mutually visible, then wherein t a <t i <t b satisfy:
[0044]
[0045] wherein X={x i} i=1,...,n represents a time sequence with n data points.
[0046] S3, calculate the characteristic vector of each layer complex network, including average path length, graph link density, self-loop number, node average degree, node average closeness centrality, characteristic vector centrality, transitivity, edge degree, graph energy, average node clustering coefficient and the longest and shortest path between nodes;
[0047] wherein the average path length is the average value of the distance between any two nodes, and the calculation formula is:
[0048] wherein N represents the number of nodes, corresponding to the length of the time sequence; d ij represents the number of edges of the shortest path between connected nodes i and j in the network, referred to as the distance between nodes i and j.
[0049] wherein the calculation formula of the graph link density is:
[0050] wherein N edge is the number of edges in the graph, and N node is the number of nodes.
[0051] wherein the calculation formula of the self-loop number is:
[0052] selfLoops =∑diag(M), wherein M represents an adjacency matrix mapped by wavelet transform to decompose the original electrocardio signal into multi-layer sub-band signals, and diag represents the sum of diagonal elements of the matrix.
[0053] wherein the formula for calculating the average degree of nodes is:
[0054] wherein n represents the number of nodes, and m represents the number of visible lines in the network.
[0055] wherein the formula for calculating the closeness centrality of nodes is:
[0056] wherein dis(i,j) represents the distance between nodes i and j, and g is the number of neighbor nodes connected to node i.
[0057] wherein the formula for calculating the average closeness centrality of nodes is:
[0058] wherein N represents the number of nodes in the network.
[0059] wherein the formula for calculating the eigenvector centrality is:
[0060] wherein c is a proportional constant, and a ij =1 if and only if nodes i and j are connected, otherwise 0, and x i represents the importance of node i.
[0061] wherein the formula for calculating the transitivity is:
[0062]
[0063] F(adj) = trace(adj 3 ) / 6, wherein adj is an adjacency matrix, trace(adj) is the sum of diagonal elements of the matrix, G(adj) is the number of connected triples in the graph, and F(adj) is the number of triangles in the graph.
[0064] wherein the formula for calculating the edge degree is:
[0065] sMetric =∑deg(i)×deg(j), wherein sMetric represents the sum of the product of the degrees of any two connected nodes in the graph, deg(node) represents the degree of the node, and the number of other nodes connected to the node, i.e. the number of adjacent edges possessed by the node.
[0066] wherein the formula for calculating the graph energy is:
[0067] wherein λ iis the absolute value of the real part of the eigenvalues of the adjacency matrix.
[0068] The formula for calculating the node clustering coefficient is as follows:
[0069] Where C i E represents the clustering coefficient of node i. i Represents the k connected to node i. i The actual number of edges between nodes.
[0070] The formula for calculating the average node clustering coefficient is:
[0071] Where C i Let represent the clustering coefficient of node i, and N represent the number of nodes in the network.
[0072] The formula for calculating the longest and shortest path between nodes is:
[0073] Where d ij This represents the shortest path from node i to node j, which is the distance between node i and node j.
[0074] S4, construct feature vector matrices for each layer of features from step S3, and perform feature normalization on each feature. Each layer of features includes at least:
[0075] [L,link,selfLoops,averageDegree,averageC,C E [C,sMetric,E,averageClo,dist]
[0076] The normalization method is: subtract the minimum value from each feature vector and divide by the range;
[0077] S5. The feature matrices of each layer in step S4 are used to classify the electrocardiogram signals and divide the signal quality levels using a random forest classifier.
[0078] Example 2
[0079] Figure 4 An embodiment of a wearable real-time ECG quality assessment method based on multi-scale complex networks is shown, including the following steps:
[0080] S1, the original short-time signal is decomposed into ECG frequency band signals through signal decomposition. In this embodiment, Fourier transform is used to decompose and reconstruct the signal, decomposing the short-time ECG signal into four sub-frequency band signals: 0-0.8Hz, 0.8-25Hz, 25-50Hz, and 50-200Hz.
[0081] S2, Constructing the recurrence complex network of each layer of the EFB signal. The recurrence plot structure is intuitive and can show the unique pattern caused by typical dynamic behavior, which is suitable for the analysis of non-stationary signals. The construction of the recurrence plot includes the following steps: for a d-dimensional system, the state of the orbit at two time points, Whether the recurrence occurs or not can be represented by a black dot or a white dot on a two-dimensional square. A black dot represents the orbit approaching at two time points, and the recurrence phenomenon occurs; a white dot represents the orbit moving away at two time points. The mathematical formula of the recurrence plot is: Where represents the state vector of the orbit, ε represents the adjacency distance, ||·|| represents the Euclidean distance measure, and φ(·) represents the Heaviside function.
[0082] The recurrence complex network is obtained directly from the recurrence matrix of the traditional recurrence plot. The adjacency matrix of the network is defined as: i,j A i,j = R i,j - δ i,j , where δ i,j represents the Kronecker function, and R i,j represents the recurrence matrix of the recurrence plot. The nodes in the recurrence complex network correspond to the state vectors in the phase space, and the edges correspond to the recurrence phenomenon of the state vectors.
[0083] S3, Calculate the eigenvectors of each layer of the recurrence network, including the average path length, the graph link density, the number of self-loops, the average degree of nodes, the average closeness centrality of nodes, the eigenvector centrality, the transitivity, the edge degree, the graph energy, the average node clustering coefficient, and the longest and shortest path between nodes;
[0084] Where the average path length is the average value of the distance between any two nodes, and the calculation formula is:
[0085] Where N represents the number of nodes, corresponding to the length of the time series; d ij represents the number of edges between connected nodes i and j in the network, which is called the distance between nodes i and j.
[0086] Where the graph link density calculation formula is:
[0087] Where N edge is the number of edges in the graph, and N node is the number of nodes.
[0088] Where the number of self-loops calculation formula is:
[0089] selfLoops =∑diag(M), where M represents the adjacency matrix mapped by wavelet transform to decompose the original ECG signal into multi-layer sub-band signals, diag represents the sum of diagonal elements of the matrix.
[0090] where the formula for calculating the average degree of nodes is:
[0091] where n represents the number of nodes, and m represents the number of visible lines in the network.
[0092] where the formula for calculating the closeness centrality of nodes is:
[0093] where dis(i,j) represents the distance between nodes i and j, and g is the number of neighbor nodes connected to node i.
[0094] where the formula for calculating the average node closeness centrality is:
[0095] where N represents the number of nodes in the network.
[0096] where the formula for calculating the eigenvector centrality is:
[0097] where c is a proportionality constant, and a ij =1 if and only if nodes i and j are connected, otherwise 0, x i represents the importance of node i.
[0098] where the formula for calculating the transitivity is:
[0099]
[0100] F(adj) = trace(adj 3 ) / 6, where adj is the adjacency matrix, trace(adj) is the sum of diagonal elements of the matrix, G(adj) is the number of connected triples in the graph, and F(adj) is the number of triangles in the graph.
[0101] where the formula for calculating the edge degree is:
[0102] sMetric =∑deg(i)×deg(j), where sMetric represents the sum of the product of the degrees of any two connected nodes in the graph, deg(node) represents the degree of the node, which is the number of other nodes connected to the node, i.e., the number of adjacent edges the node has.
[0103] where the formula for calculating the graph energy is:
[0104] where λ iThe absolute value of the real part of the eigenvalue of the adjacency matrix.
[0105] The node clustering coefficient is calculated according to the following formula:
[0106] The average node clustering coefficient is calculated according to the following formula: i The average node clustering coefficient is calculated according to the following formula: i The average node clustering coefficient is calculated according to the following formula: i The average node clustering coefficient is calculated according to the following formula:
[0107] The average node clustering coefficient is calculated according to the following formula:
[0108] The average node clustering coefficient is calculated according to the following formula: i The average node clustering coefficient is calculated according to the following formula:
[0109] The average node clustering coefficient is calculated according to the following formula:
[0110] The average node clustering coefficient is calculated according to the following formula: ij The average node clustering coefficient is calculated according to the following formula:
[0111] S4, the feature vector matrix of each layer feature in step S3 is constructed, and each feature is normalized, and each layer feature at least includes:
[0112] [L, link, selfLoops, averageDegree, averageC, C E , sMetric, E, averageClo, dist]
[0113] The normalization method is: each feature vector is subtracted by the minimum value and divided by the range;
[0114] S5, the layer feature matrix in step S4 is classified by the SVM classifier to classify the electrocardio signal and divide the signal quality level.
[0115] The technical means disclosed in the scheme of the present application is not limited to the technical means disclosed in the above-mentioned embodiments, and also includes the technical solutions composed of any combination of the above technical features. It should be noted that for ordinary skilled persons in the art, without departing from the principles of the present application, some improvements and refinements can be made, and these improvements and refinements are also considered within the protection scope of the present application.
Claims
1. A wearable real-time ECG quality assessment method based on multi-scale complex networks, characterized in that, Includes the following steps: S1 decomposes the original short-time signal into four cardiac frequency bands: 0-0.8Hz, 0.8-25Hz, 25-50Hz, and 50-200Hz. S2, constructing a complex network of electronic frequency band signals at each layer; S3, calculate the feature vector of each complex network, wherein the feature vector includes at least the average path length, graph link density, number of self-loops, average node degree, average node proximity centrality, feature vector centrality, transitivity, marginality, graph energy, average node clustering coefficient, and longest and shortest paths between nodes. The formula for calculating the average path length is: Where d ij The number of edges in the shortest path connecting nodes i and j in the network is called the distance between nodes i and j, and N represents the number of nodes in the network. The formula for calculating the graphic link density is: Where N edge N represents the number of visible lines of sight in the network. node The number of nodes; The formula for calculating the number of self-circulation cycles is: selfLoops = ∑diag(M), Where M is the adjacency matrix generated by mapping the sub-signals to the visible network; The formula for calculating the average degree of nodes in step S3 is as follows: Where n represents the number of nodes, and m represents the number of visible lines of sight in the network; The formula for calculating the node proximity centrality is: Where dis(i,j) represents the distance between nodes i and j, and g is the number of neighboring nodes connected to node i. The formula for calculating the average node proximity centrality is: Where N represents the number of nodes in the network; The formula for calculating the centrality of the eigenvector is: Where c is a proportionality constant, a ij =1 if and only if node i is connected to j, otherwise 0, x i Indicate the importance of node i; The transitivity calculation formula is as follows: F(adj)=trace(adj 3 ) / 6, Where adj is the adjacency matrix, trace(adj) is the sum of the diagonal elements of the matrix, G(adj) is the number of connected triples in the graph, and F(adj) is the number of triangles in the graph; The formula for calculating the edge degree is: sMetric=∑deg(i)×deg(j), sMetric represents the sum of the products of the degrees of any two connected nodes in the graph, and deg() represents the degree of a node, which is the number of other nodes connected to that node, i.e., the number of neighboring edges that the node has. The formula for calculating the energy of the graph is: Where λ i is the absolute value of the real part of the eigenvalues of the adjacency matrix; The formula for calculating the node clustering coefficient is as follows: Where C i E represents the clustering coefficient of node i. i Represents the k connected to node i. i The actual number of edges between nodes The formula for calculating the average node clustering coefficient is: Where C i represents the clustering coefficient of node i, and N represents the number of nodes in the network; The formula for calculating the longest and shortest path between nodes is as follows: Where d ij This represents the shortest path from node i to node j, which is the distance between node i and node j. S4, construct a feature matrix from the feature vectors of each layer in step S3, and normalize each feature vector; S5 uses a machine learning classifier to classify the feature matrix and categorize the signal quality into good, relatively good, and poor levels.
2. The wearable ECG real-time quality assessment method based on multi-scale complex networks according to claim 1, characterized in that, In step S1, the original electrocardiogram signal is decomposed into multiple sub-frequency band signals through time-frequency analysis.
3. The wearable ECG real-time quality assessment method based on multi-scale complex networks according to claim 1, characterized in that, In step S2, a complex network of electrocardiogram frequency band signals of each layer is constructed, mapping the electrocardiogram signal into a multi-layer complex network, and the network inherits the time dynamic characteristics of the original short-time electrocardiogram signal.
4. The wearable ECG real-time quality assessment method based on multi-scale complex networks according to claim 1, characterized in that, The feature vector normalization method in step S4 is as follows: feature=(f-min(f)) / (max(f)-min(f)), Where feature represents the normalized feature and f represents the original feature.
Citation Information
Patent Citations
Real-time quality assessment feedback method for wearable ECG acquisition
CN109117769A
Arrhythmia classification algorithm of C-LSTM for physiological parameter monitoring
CN113397555A