Heart rhythm abnormity detection method and system based on electrocardiogram feature extraction
Through multi-scale fractional differential and fractal analysis, combined with network decomposition and causality analysis, the spatiotemporal characteristics of the electrocardiogram are extracted, which solves the accuracy and interpretability problems of heart rhythm abnormality detection in the existing technology, and achieves efficient and accurate heart rhythm abnormality detection. Testing and Diagnosis.
Patent Information
- Application Number
- CN202410685336.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2024-09-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing abnormal heart rhythm detection methods rely on manual interpretation, which has low efficiency and poor accuracy. They also ignore the spatiotemporal structured information of the electrocardiogram signal, making it difficult to provide in-depth abnormal analysis and clinical guidance.
Using a method based on electrocardiogram feature extraction, through multi-scale fractional differential and fractal analysis, the spatiotemporal features of electrocardiogram are extracted, combined with network decomposition and causality analysis, to achieve abnormal heart rhythm detection.
It improves the accuracy and interpretability of abnormal heart rhythm detection, enables a more comprehensive understanding of the multi-scale complexity and underlying mechanisms of ECG signals, and provides more targeted diagnostic support.
Smart Images

Figure CN118648904A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electrocardiogram analysis and processing, and in particular to a method and system for detecting abnormal heart rhythm based on electrocardiogram feature extraction. Background Art
[0002] Abnormal heart rhythm refers to abnormal heart rhythm or arrhythmia, which is one of the common types of cardiovascular disease. Abnormal heart rhythm may cause symptoms such as palpitations, chest tightness, dizziness, fatigue, and even sudden death in severe cases. Therefore, timely and accurate detection and diagnosis of abnormal heart rhythm is crucial for the prevention and treatment of cardiovascular disease.
[0003] Traditional abnormal heart rhythm detection mainly relies on doctors' manual interpretation and analysis of electrocardiograms. However, the manual interpretation method has some limitations, requires high skills from doctors, and the interpretation results of different doctors may be different. At the same time, the efficiency of manual interpretation is low, and it is difficult to cope with massive electrocardiogram data, which limits the popularization and application of abnormal heart rhythm detection. In order to overcome the limitations of manual interpretation, automatic abnormal heart rhythm detection methods based on computers and artificial intelligence technologies are applied. However, most of the existing technologies regard electrocardiogram signals as one-dimensional time series, ignoring the structured information of electrocardiograms in time and space dimensions. This simplified signal representation may lead to the loss of important diagnostic clues and affect the accuracy of detection. At the same time, the existing methods mainly focus on the classification diagnosis of abnormal heart rhythm, lack of in-depth analysis of the abnormal mechanism and pathological process, and it is difficult to provide more targeted clinical guidance.
[0004] To sum up, in order to overcome the limitations of insufficient feature representation ability, poor interpretability, lack of spatiotemporal structured modeling, and lack of abnormal mechanism analysis, a method for detecting abnormal heart rhythm is needed that can fully mine the spatiotemporal characteristics of electrocardiogram signals, provide explainable abnormality analysis, and achieve efficient, accurate, and comprehensive abnormal heart rhythm detection and diagnosis. The present invention can solve the problems in the prior art. Summary of the invention
[0005] The embodiments of the present invention provide a method and system for detecting abnormal heart rhythm based on electrocardiogram feature extraction, which can solve the problems in the prior art.
[0006] According to a first aspect of the embodiments of the present invention,
[0007] A method for detecting abnormal heart rhythm based on electrocardiogram feature extraction is provided, comprising:
[0008] Collecting an electrocardiogram signal, performing multi-scale fractional-order differentiation on the electrocardiogram signal based on the fractional order generated by a preset sampling strategy to obtain a fractional-order differential signal, obtaining a corresponding box dimension by calculating the number of boxes required to cover the corresponding fractional-order differential signal, and determining an electrocardiogram fractal feature set;
[0009] Based on the predefined electrocardiogram categories, sample values corresponding to the classification features are respectively extracted, the sample values are merged and sorted, and the corresponding difference significance measure is calculated by determining the rank sum statistic, and the fractal features whose difference significance measure is less than the preset significance threshold are selected to determine the optimal feature set;
[0010] The electrocardiogram signal to be tested is input into the abnormal rhythm detection network, decomposed into signal segments, and based on the optimal feature set, a segment feature matrix is constructed and stacked into a high-dimensional tensor. The high-dimensional tensor is subjected to network decomposition, and the causal relationship is determined, and the abnormal score is calculated to obtain the abnormal rhythm detection result.
[0011] In an optional embodiment,
[0012] Based on the fractional order generated by the preset sampling strategy, the electrocardiogram signal is subjected to multi-scale fractional differentiation to obtain a fractional differential signal, and the corresponding box dimension is obtained by calculating the number of boxes required to cover the corresponding fractional differential signal, and the electrocardiogram fractal feature set is determined to include:
[0013] Based on the logarithmic interval sampling strategy, a set of fractional orders are generated;
[0014] According to each fractional order, performing multi-scale fractional differentiation on the electrocardiogram signal to calculate a fractional differential signal;
[0015] Based on the preset signal division length, the corresponding relationship between the signal division length and the number of boxes is determined by calculating the number of boxes required to cover the corresponding fractional-order differential signal, and based on the least squares method, the slope of the linear relationship between the signal division length and the number of boxes is fitted to obtain the box dimension corresponding to the fractional-order differential signal;
[0016] All the box dimensions are used to form a fractal dimension vector, and a set of electrocardiogram fractal features is determined.
[0017] In an optional embodiment,
[0018] According to each fractional order, the electrocardiogram signal is subjected to multi-scale fractional differentiation to calculate the fractional differential signal, and the formula is as follows:
[0019]
[0020] Among them, α(i) represents the i-th fractional order, T represents time, x(T) represents the electrocardiogram signal at time T, and D α(i) x(T) represents the fractional differential signal under the fractional order α(i), Γ represents the gamma function, n represents the smallest integer greater than α(i), t represents the integral variable, x (n) (t) represents the nth order derivative of the electrocardiogram signal x(T), (Tt) α(i)-n+1represents the integral kernel.
[0021] In an optional embodiment,
[0022] Based on the predefined electrocardiogram categories, sample values corresponding to the classification features are extracted respectively, the sample values are merged and sorted, and the corresponding difference significance measure is calculated by determining the rank sum statistic, and the fractal features whose difference significance measure is less than the preset significance threshold are selected, and the optimal feature set is determined to include:
[0023] Based on the predefined ECG categories, all samples are divided into sample groups, and the sample groups correspond to the ECG categories one by one. Based on each sample group, the corresponding sample value is extracted according to each fractal feature in the ECG fractal feature set;
[0024] Merging all the sample values into a sample value set, sorting the sample value set, and determining a sample rank;
[0025] Based on the sample ranks, the sample rank sum of each sample group is calculated, and the rank sum statistic is calculated by combining the total number of samples in each sample group;
[0026] Determine the chi-square distribution degrees of freedom based on the total number of electrocardiogram categories, and calculate the difference significance measure through the chi-square distribution cumulative distribution function based on the rank sum statistic and in combination with the chi-square distribution degrees of freedom;
[0027] Select fractal features whose difference significance measure is less than a preset significance threshold, construct a candidate feature set, sort the candidate feature set from small to large according to the difference significance measure, and determine the sorting sequence number;
[0028] Based on the order correction method, the difference significance measure is corrected in sequence through the total number of features of the candidate feature set, the difference significance measure and the sorting sequence number to determine the difference significance correction value;
[0029] The fractal features whose difference significance correction values are less than the preset significance threshold are selected to determine the optimal feature set.
[0030] In an optional embodiment,
[0031] Based on the sample rank, the sample rank sum of each sample group is calculated, and the rank sum statistic is calculated based on the total number of samples in each sample group. The formula is as follows:
[0032]
[0033] Among them, H represents the rank sum statistic, N represents the total number of samples, j represents the ECG category number, K represents the number of ECG categories, and R j represents the rank sum of all samples of category j, m j Represents the total number of samples of category j;
[0034] The significance measure of the difference is calculated by the chi-square cumulative distribution function, and its formula is as follows:
[0035]
[0036] Among them, p represents the difference significance measure, θ 2 represents the chi-square distribution parameter, CDF() represents the chi-square distribution cumulative distribution function;
[0037] The difference significance measures are corrected in turn to determine the difference significance correction value, which is as follows:
[0038] p c (k)=min((o-k+1)·p(k),1);
[0039] Among them, p c (k) represents the difference significance correction value, o represents the total number of features in the candidate feature set, and k represents the sorting order.
[0040] In an optional embodiment,
[0041] The electrocardiogram signal to be tested is input into the heart rhythm abnormality detection network, decomposed into signal segments, based on the optimal feature set, a segment feature matrix is constructed, stacked into a high-dimensional tensor, the high-dimensional tensor is subjected to network decomposition, and the causal relationship is determined, and the abnormality score is calculated, and the heart rhythm abnormality detection result is obtained, including:
[0042] Based on the preset segment length, the electrocardiogram signal to be tested is decomposed into signal segments, and based on the optimal feature set, segment features are extracted for each signal segment, a segment feature matrix is constructed, and the segment feature matrices corresponding to all signal segments are stacked into a high-dimensional tensor;
[0043] Through a tensor decomposition network, the high-dimensional tensor is approximately represented as a series of core tensor multiplications, and based on the core tensor, a low-rank representation corresponding to the high-dimensional tensor is determined;
[0044] Inputting the low-rank representation into a pre-built causal discovery algorithm, generating an optimal causal graph through greedy search, and determining the causal relationship in the low-rank representation;
[0045] Based on the causal relationship, the abnormal score of each factor is calculated, and based on the predetermined factor association, a plurality of corresponding abnormal scores are weighted combined and compared with the preset combination condition threshold to determine the abnormal heart rhythm result.
[0046] In an optional embodiment,
[0047] The low-rank representation is input into a pre-built causal discovery algorithm, and an optimal causal graph is generated through greedy search. The causal relationship in the low-rank representation is determined to include:
[0048] Converting the data corresponding to the low-rank representation into a two-dimensional matrix and inputting it into a causal discovery algorithm, wherein each row of the two-dimensional matrix represents a sample and each column represents a dimension of the low-rank representation;
[0049] Create an empty causal graph with the feature variables in the low-rank representation as nodes;
[0050] Based on the greedy search strategy, the causal graph structure is iteratively constructed. By simulating three operations, namely, adding relationship edges, deleting relationship edges, and reversing relationship edges, a causal graph score corresponding to each operation is generated. The operation with the highest causal graph score is selected to execute until a preset number of iterations is reached to generate an optimal causal graph. Based on the optimal causal graph, the causal relationship in the low-rank representation is determined.
[0051] According to a second aspect of the embodiments of the present invention,
[0052] Provided is a heart rhythm abnormality detection system based on electrocardiogram feature extraction, comprising:
[0053] The first unit is used to collect an electrocardiogram signal, perform multi-scale fractional-order differentiation on the electrocardiogram signal based on the fractional order generated by a preset sampling strategy to obtain a fractional-order differential signal, obtain a corresponding box dimension by calculating the number of boxes required to cover the corresponding fractional-order differential signal, and determine the electrocardiogram fractal feature set;
[0054] The second unit is used to extract sample values corresponding to the classification features based on predefined electrocardiogram categories, merge and sort the sample values, calculate the corresponding difference significance measure by determining the rank sum statistic, select the fractal features whose difference significance measure is less than a preset significance threshold, and determine the optimal feature set;
[0055] The third unit is used to input the electrocardiogram signal to be tested into the abnormal rhythm detection network, decompose it into signal segments, construct a segment feature matrix based on the optimal feature set, stack it into a high-dimensional tensor, perform network decomposition on the high-dimensional tensor, determine the causal relationship, calculate the abnormality score, and obtain the abnormal rhythm detection result.
[0056] According to a third aspect of the embodiments of the present invention,
[0057] An electronic device is provided, comprising:
[0058] processor;
[0059] a memory for storing processor-executable instructions;
[0060] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0061] A fourth aspect of the embodiments of the present invention is:
[0062] A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.
[0063] In the embodiment of the present invention, fractional calculus can be used to describe systems between integer orders, making modeling more flexible and precise, and more accurately characterizing the long-range correlation and multi-scale characteristics of the signal, providing richer information for analyzing the electrocardiogram signal; combined with the multi-scale fractional differential method, the dynamic characteristics of the signal at different time scales can be captured, and the fractional differential signal obtained by performing differential operations on the signal at different scales reflects the differential characteristics of the original electrocardiogram at different scales, which helps to characterize the multi-scale complexity of the electrocardiogram signal; by calculating fractal features such as the box dimension, the complexity and nonlinear characteristics of the electrocardiogram signal can be quantified, and the box dimension reflects the irregularity and complexity of the signal, which helps to understand the spatiotemporal dynamics of the electrocardiogram signal and explore the potential mechanism of electrocardiogram regulation; merging and sorting all the extracted fractal feature sample values helps to unify the data format, so that Feature sample values of different categories can be compared and analyzed under the same standard; by calculating the rank sum statistic, statistical analysis of fractal features of each category can effectively measure the feature differences between different categories and help identify features that show significant differences in different categories; by calculating the difference significance measure, the significant differences of each fractal feature in different categories can be quantified, which can intuitively reflect which features have significant differences between different categories and help to screen out key features; stacking the fragment feature matrix into a high-dimensional tensor retains the complex correlation information between signal fragments, and through network decomposition, the data dimension can be effectively reduced, redundant information can be reduced, and the most representative low-rank representation can be extracted; by performing causal relationship analysis on the low-rank representation, the causal relationship between different features in the electrocardiogram signal can be revealed, which is of great significance for understanding the potential mechanism and pathological characteristics of abnormal heart rhythm. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 A schematic diagram of a flow chart of a method for detecting abnormal heart rhythm based on electrocardiogram feature extraction according to an embodiment of the present invention;
[0065] Figure 2 The figure is a schematic diagram of the structure of an abnormal heart rhythm detection system based on electrocardiogram feature extraction according to an embodiment of the present invention. DETAILED DESCRIPTION
[0066] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0067] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0068] Figure 1 FIG. 1 is a flow chart of a method for detecting abnormal heart rhythm based on electrocardiogram feature extraction according to an embodiment of the present invention. Figure 1 As shown, the method includes:
[0069] S101. Collect an electrocardiogram signal, perform multi-scale fractional-order differentiation on the electrocardiogram signal based on the fractional order generated by a preset sampling strategy, obtain a fractional-order differential signal, obtain the corresponding box dimension by calculating the number of boxes required to cover the corresponding fractional-order differential signal, and determine the electrocardiogram fractal feature set;
[0070] The fractional order specifically refers to the case where the order of calculus is non-integer. Unlike classical integer-order calculus, fractional-order calculus allows the order of derivatives and integrals to be any real number. Fractional order provides the ability to describe systems between integer orders, making modeling more flexible and accurate. In the present invention, fractional order is used to characterize the long-range correlation and multi-scale characteristics of signals;
[0071] The multi-scale fractional-order differential specifically refers to a method of combining fractional-order differential with multi-scale analysis. By performing fractional-order differentials on signals at different scales, the dynamic characteristics of the signal at different time scales are captured. Specifically, for a given electrocardiogram signal, a set of fractional orders are first generated according to a preset sampling strategy, and then the signal is differentiated at each fractional order to obtain a set of fractional-order differential signals, which reflect the differential characteristics of the original electrocardiogram at different scales and help to characterize the multi-scale complexity of the electrocardiogram signal.
[0072] The number of boxes specifically refers to the number of boxes used to cover the fractional-order differential signal in the process of calculating the box dimension. Specifically, for each fractional-order differential signal, the time-amplitude plane where the fractional-order differential signal is located is divided into a series of boxes of equal size, and then the number of boxes required to completely cover the signal is counted. The size of the box usually decreases in power of 2 to form coverage at multiple scales. The changing trend of the number of boxes at different scales reflects the self-similarity and fractal characteristics of the fractional-order differential signal.
[0073] The box dimension is the capacity dimension, which specifically refers to an important indicator in fractal geometry that describes the complexity of a fractal body, describes the ability of an object to fill space, and reflects the self-similarity of an object at different scales. In the present invention, the box dimension of a signal can be estimated by calculating the relationship between the number of boxes required to cover a fractional differential signal and the box size. Specifically, for the number of boxes at different scales, the logarithm is taken and a linear fit is performed. The absolute value of the slope of the fitting line, the larger the box dimension, the higher the irregularity and complexity of the signal.
[0074] The ECG fractal features specifically refer to a series of quantitative indicators extracted from the ECG signal using fractal geometry and multi-scale analysis methods, which are used to characterize the nonlinear and multi-scale characteristics of the ECG signal. By performing fractional differentiation and box dimension calculation on the ECG, a set of characteristic values reflecting the complexity of the signal at different scales can be obtained, including box dimensions at different fractional orders, multi-scale box dimension spectra, etc. ECG fractal features help to quantify the spatiotemporal dynamics of ECG signals, explore the potential mechanisms of ECG regulation, and provide a new perspective for the detection and classification of arrhythmias.
[0075] In this embodiment, fractional calculus can be used to describe systems between integer orders, making modeling more flexible and accurate, and more accurately describing the long-range correlation and multi-scale characteristics of the signal, providing richer information for analyzing the electrocardiogram signal; combined with the multi-scale fractional differential method, the dynamic characteristics of the signal at different time scales can be captured. By performing differential operations on the signal at different scales, the obtained fractional differential signal reflects the differential characteristics of the original electrocardiogram at different scales, which helps to describe the multi-scale complexity of the electrocardiogram signal; by calculating fractal features such as the box dimension, the complexity and nonlinear characteristics of the electrocardiogram signal can be quantified. The box dimension reflects the irregularity and complexity of the signal, which helps to understand the spatiotemporal dynamics of the electrocardiogram signal and explore the potential mechanism of electrocardiogram regulation; the fractal characteristics of the electrocardiogram provide a new perspective to detect and classify arrhythmias. Through the analysis of fractal features, the characteristics of the electrocardiogram signal can be more comprehensively understood, providing a new basis and method for the detection and classification of arrhythmias;
[0076] In an optional embodiment, based on the fractional order generated by the preset sampling strategy, the electrocardiogram signal is subjected to multi-scale fractional differentiation to obtain a fractional differential signal, and the corresponding box dimension is obtained by calculating the number of boxes required to cover the corresponding fractional differential signal, and determining the electrocardiogram fractal feature set includes:
[0077] Based on the logarithmic interval sampling strategy, a set of fractional orders are generated;
[0078] According to each fractional order, performing multi-scale fractional differentiation on the electrocardiogram signal to calculate a fractional differential signal;
[0079] Based on the preset signal division length, the corresponding relationship between the signal division length and the number of boxes is determined by calculating the number of boxes required to cover the corresponding fractional-order differential signal, and based on the least squares method, the slope of the linear relationship between the signal division length and the number of boxes is fitted to obtain the box dimension corresponding to the fractional-order differential signal;
[0080] All the box dimensions are used to form a fractal dimension vector, and a set of electrocardiogram fractal features is determined.
[0081] Set the range of fractional order [q min ,q max ], determine the minimum and maximum order of sampling, set the number of samples N, and determine the number of fractional orders generated within a given range;
[0082] Based on the logarithmic interval sampling strategy, a set of fractional order numbers {q1,q2,...,q N}, where each q is represented by q i ,
[0083] For each generated fractional order q i , perform fractional order differentiation operation on the original electrocardiogram signal to obtain the corresponding fractional order differential signal;
[0084] Set a set of signal partition lengths {l1,l2,...,l m}, representing different scales used in the box dimension calculation, the following operations are performed for each fractional differential signal:
[0085] For one of the signal division length l j , divide the time-amplitude plane into l j × j Grid; Count the number of boxes N required to cover the fractional differential signal j , that is, the number of grids that the fractional differential signal passes through or falls on; the length of the recorded signal division l j And the corresponding number of boxes N j , get a set of data points
[0086]
[0087] For each fractional differential signal, a linear fit is performed on the data points based on the least squares method, and the absolute value of the slope of the fitting line is the box dimension D of the corresponding fractional differential signal. i .
[0088] The box dimensions of all fractional differential signals are combined into a vector D = [D1, D2, ..., D N ], called the fractal dimension vector. The fractal dimension vector D represents the fractal characteristics of the original ECG signal at different fractional orders, reflecting the multi-scale complexity of the signal.
[0089] The fractal dimension vector is used as the fractal feature of the electrocardiogram signal and is included in the electrocardiogram feature set. Preferably, the fractal dimension vector can be combined with other types of electrocardiogram features, such as time domain features, frequency domain features, etc., to form a more comprehensive electrocardiogram feature set.
[0090] In this embodiment, by adopting multi-scale fractional-order differentiation, the dynamic characteristics of the electrocardiogram signal can be better captured, because different fractional orders have different effects on the differentiation of the signal, which helps to fully understand the multi-scale complexity of the signal; by calculating the box dimension of the fractional-order differential signal, the irregularity and complexity of the signal can be more accurately quantified, providing a basis for subsequent analysis; the box dimensions of all fractional-order differential signals are combined into a vector to form a fractal dimension vector, which can be used as the fractal feature of the electrocardiogram signal, and can more comprehensively describe the multi-scale complexity of the signal, and provide richer feature information for subsequent arrhythmia detection and classification; the fractal dimension vector is used as the fractal feature of the electrocardiogram signal and included in the electrocardiogram feature set, which not only includes fractal features, but can also be combined with other types of electrocardiogram features to form a more comprehensive feature set, thereby improving the accuracy and robustness of arrhythmia detection and classification tasks.
[0091] In an optional embodiment, according to each fractional order, multi-scale fractional order differentiation is performed on the electrocardiogram signal to calculate the fractional order differential signal, and the formula is as follows:
[0092]
[0093] Among them, α(i) represents the i-th fractional order, T represents time, x(T) represents the electrocardiogram signal at time T, and D α(i) x(T) represents the fractional differential signal under the fractional order α(i), Γ represents the gamma function, n represents the smallest integer greater than α(i), t represents the integral variable, x (n) (t) represents the nth order derivative of the electrocardiogram signal x(T), (Tt)α(i)-n+1 represents the integral kernel.
[0094] The gamma function specifically refers to a special mathematical function, and its specific form is:
[0095] Γ(z)=∫0 ∞ t z-1 e -t dt;
[0096] The integral kernel specifically refers to a kernel function used to calculate fractional differentials. According to the relationship between the time variable T and the integral variable t, the n-th order derivative of the electrocardiogram signal is weightedly integrated to obtain a fractional differential signal, wherein α(i)-n+1 controls the weight distribution of the weighted integral and affects the response of the differential operation to the signal.
[0097] In this formula, the process of multi-scale fractional differentiation of ECG signals is described. First, the ECG signal is differentiated in time according to each fractional order to obtain a fractional differential signal. The differentiation process involves the nth-order derivative of the signal, where n is the smallest integer greater than the fractional order; in the differentiation process, the gamma function is used to process the differential kernel to ensure the accuracy and stability of the differentiation.
[0098] According to the formula, for each given fractional order, multi-scale fractional differential operations are performed on the electrocardiogram signal through integral operations, which can capture the differential characteristics of the signal at different time scales and help describe the multi-scale complexity of the signal; the gamma function is used in the calculation of fractional differentials to normalize the integral kernel of the fractional differentials to ensure that the differential results conform to the definition of fractional calculus; through multi-scale fractional differentials, the electrocardiogram signal can be analyzed and described in more detail, especially in the case of multi-scale dynamic changes, the characteristics of the signal can be captured more accurately, which helps to identify abnormal heart rhythms and other potential physiological states.
[0099] S102. Based on the predefined electrocardiogram categories, sample values corresponding to the classification features are extracted respectively, the sample values are merged and sorted, and the corresponding difference significance measure is calculated by determining the rank sum statistic, and the fractal features whose difference significance measure is less than the preset significance threshold are selected to determine the optimal feature set;
[0100] The rank sum statistic specifically refers to a non-parametric statistical method for comparing the differences between two independent samples. In the present invention, the rank sum statistic is often used to evaluate the significance of feature differences between different categories. Specifically, for a certain fractal feature, the sample values of the two categories are merged and sorted in order from small to large, and a rank is assigned to each sample value, that is, the position in the sorting, and the rank sum of the sample values of each category is calculated separately, that is, the sum of the ranks of all samples of the category; if the samples of the two categories come from the same distribution, then the rank sums of the samples of the two categories should be similar; conversely, if the sample distributions of the two categories are significantly different, the rank sums will be significantly different;
[0101] The difference significance measure specifically refers to a quantitative index of the difference between different categories of features, which is obtained by calculating the p-value of the rank sum statistic. The p-value represents the probability of observing the existing data or more extreme data when the null hypothesis (i.e., assuming that there is no difference between the two categories) is true. In the present invention, by calculating the difference significance measure of each fractal feature, the effectiveness of the corresponding fractal feature in distinguishing different electrocardiogram categories is evaluated. The smaller the difference significance measure, the more significant the difference between different categories of the feature, and the greater the contribution to electrocardiogram classification or abnormality detection.
[0102] In this embodiment, from the predefined electrocardiogram categories, the corresponding fractal feature sample values are accurately extracted for each category to ensure that the feature sample values of each category are accurately extracted, which is helpful for subsequent analysis and comparison; all the extracted fractal feature sample values are merged and sorted, which is helpful for unifying the data format so that the feature sample values of different categories can be compared and analyzed under the same standard; by calculating the rank sum statistic, the fractal features of each category are statistically analyzed, which can effectively measure the feature differences between different categories and help identify the features that show significant differences in different categories; by calculating the difference significance measure, the significant differences of each fractal feature in different categories are quantified, which can intuitively reflect which features have significant differences between different categories, which is helpful for screening out key features; fractal features whose difference significance measure is less than the preset significance threshold are selected, and the optimal feature set is determined to ensure that the screened features have high discrimination and statistical significance, thereby improving the accuracy of electrocardiogram classification and analysis
[0103] In an optional embodiment, based on predefined electrocardiogram categories, sample values corresponding to the classification features are extracted respectively, the sample values are merged and sorted, and the corresponding difference significance measure is calculated by determining the rank sum statistic, and the fractal features whose difference significance measure is less than a preset significance threshold are selected, and the optimal feature set is determined, including:
[0104] Based on the predefined ECG categories, all samples are divided into sample groups, and the sample groups correspond to the ECG categories one by one. Based on each sample group, the corresponding sample value is extracted according to each fractal feature in the ECG fractal feature set;
[0105] Merging all the sample values into a sample value set, sorting the sample value set, and determining a sample rank;
[0106] Based on the sample ranks, the sample rank sum of each sample group is calculated, and the rank sum statistic is calculated by combining the total number of samples in each sample group;
[0107] Determine the chi-square distribution degrees of freedom based on the total number of electrocardiogram categories, and calculate the difference significance measure through the chi-square distribution cumulative distribution function based on the rank sum statistic and in combination with the chi-square distribution degrees of freedom;
[0108] Select fractal features whose difference significance measure is less than a preset significance threshold, construct a candidate feature set, sort the candidate feature set from small to large according to the difference significance measure, and determine the sorting sequence number;
[0109] Based on the order correction method, the difference significance measure is corrected in sequence through the total number of features of the candidate feature set, the difference significance measure and the sorting sequence number to determine the difference significance correction value;
[0110] The fractal features whose difference significance correction values are less than the preset significance threshold are selected to determine the optimal feature set.
[0111] The chi-square distribution degrees of freedom specifically refer to the parameters used to describe the shape and position of the chi-square distribution, and determine the curve shape of the chi-square distribution. In the present invention, the chi-square distribution degrees of freedom are usually determined by the total number of electrocardiogram categories. Specifically, if there are k electrocardiogram categories, then the corresponding chi-square distribution degrees of freedom are k-1; for example, if the analyzed electrocardiogram includes three categories: normal, premature ventricular beats, and ventricular tachycardia, then the chi-square distribution degrees of freedom are 2. The choice of chi-square distribution degrees of freedom will affect the calculation and interpretation of subsequent significance measures;
[0112] The chi-square distribution cumulative distribution function is a probability calculation tool used to obtain the probability that a chi-square random variable is less than or equal to a certain value. In the present invention, the chi-square distribution cumulative probability corresponding to the rank sum statistic is calculated to obtain a difference significance measure, that is, a p-value. Specifically, according to the value of the rank sum statistic and the chi-square distribution degrees of freedom, the corresponding cumulative probability, that is, the significance level of the difference between the features in different categories, can be obtained by looking up the chi-square distribution table or using computing software; the smaller the cumulative probability, the more significant the difference between the features in different categories;
[0113] The order correction method specifically refers to a statistical method for controlling the error rate of multiple hypothesis tests. In the present invention, it is necessary to evaluate the difference significance of multiple features at the same time, which will lead to the problem of multiple comparisons, that is, as the number of tests increases, the probability of false positives will also increase; the order correction method controls the overall false discovery rate by adjusting the significance threshold of each feature; through order correction, while controlling the error rate, features that are truly significantly different can be selected to improve the reliability of feature selection;
[0114] According to the predefined ECG categories, all ECG samples are divided into corresponding sample groups. Each sample group corresponds to a specific ECG category, such as a normal group, a ventricular premature beat group, etc. For each sample group, the corresponding sample feature value is extracted according to each feature in the ECG fractal feature set, and the feature value data grouped by category is obtained.
[0115] The eigenvalue data of all sample groups are merged into a large sample value set, and the set is sorted to obtain the rank corresponding to each eigenvalue. For each sample group, the sum of the ranks of all sample eigenvalues in the sample group is calculated to obtain the rank sum statistic corresponding to the sample group, which reflects the position distribution of samples in each group in the population.
[0116] According to the total number of ECG categories, the chi-square distribution degrees of freedom were determined by subtracting 1 from the number of categories. The significance measure of the difference between different categories of each feature was calculated by the chi-square distribution cumulative distribution function using the rank sum statistic and the chi-square distribution degrees of freedom.
[0117] According to a preset significance threshold, such as 0.01, fractal features with a difference significance measure less than 0.01 are selected to construct a candidate feature set; the candidate feature set is sorted from small to large according to the difference significance measure to obtain a sorting number corresponding to each feature. The smaller the sorting number, the more significant the difference of the feature.
[0118] In order to control the error rate of multiple hypothesis testing, the difference significance measure of the candidate features is corrected by using the order correction method, preferably the Holm-Bonferroni correction. When correcting, the total number of features, the original difference significance measure and the sorting order of the candidate feature set need to be considered. Through correction, the corrected significance measure of each candidate feature, that is, the difference significance correction value, is obtained;
[0119] According to the preset significance threshold, fractal features whose difference significance correction value is less than the threshold are selected to construct the optimal feature set. The features that still have significant differences after order correction are further screened out from the candidate features to obtain the final feature subset.
[0120] In this embodiment, for each sample group, the rank sum of all sample feature values in the sample group is calculated to obtain the rank sum statistic corresponding to the sample group, which reflects the position distribution of each group of samples in the population and helps to compare the feature distribution differences of different categories; according to the total number of electrocardiogram categories, the degrees of freedom of the chi-square distribution are determined, and the significance measure of the difference between each feature in different categories is calculated by using the rank sum statistic and the degrees of freedom through the chi-square distribution cumulative distribution function, so as to quantify the degree of difference between the features in different categories and provide a basis for feature screening; fractal features whose difference significance measure is less than a preset threshold are selected to construct a candidate feature set, and are sorted according to the difference significance measure, so as to screen out the features that are most likely to distinguish different categories, and sort the significance to facilitate subsequent analysis; the difference significance measure of the candidate features is corrected using the order correction method to control the error rate of multiple hypothesis testing, ensure that the features finally selected are statistically reliably significant, and reduce the possibility of false positives; according to the corrected significance measure, features less than the preset threshold are selected to construct the optimal feature set, so as to ensure that the features finally selected are both statistically significant and effectively distinguish samples of different categories.
[0121] In an optional embodiment, based on the sample rank, the sample rank sum of each sample group is calculated, and the rank sum statistic is calculated in combination with the total number of samples in each sample group, and the formula is as follows:
[0122]
[0123] Among them, H represents the rank sum statistic, N represents the total number of samples, j represents the ECG category number, K represents the number of ECG categories, and R j represents the rank sum of all samples of category j, m j Represents the total number of samples of category j;
[0124] The significance measure of the difference is calculated by the chi-square cumulative distribution function, and its formula is as follows:
[0125]
[0126] Among them, p represents the difference significance measure, θ 2 represents the chi-square distribution parameter, CDF() represents the chi-square distribution cumulative distribution function;
[0127] The difference significance measures are corrected in turn to determine the difference significance correction value, which is as follows:
[0128] pc(k)=min((o-k+1)·p(k), 1);
[0129] Among them, p c (k) represents the difference significance correction value, o represents the total number of features in the candidate feature set, and k represents the sorting order.
[0130] According to the formula, by calculating the rank sum statistic and the difference significance measure, the degree of difference between the electrocardiogram signal features in different categories can be quantified, thereby improving the accuracy of feature analysis; by utilizing the significance measure and correction method, the most discriminative features can be screened out from a large number of features, thereby helping to improve the performance of the classification model; through difference significance correction, the error rate caused by multiple tests can be effectively controlled, thereby ensuring that the features finally selected are statistically reliable; the selected optimal feature set has high significance and discriminative ability, thereby effectively improving the robustness and accuracy of the electrocardiogram classification and arrhythmia detection model.
[0131] S103. Input the electrocardiogram signal to be tested into the abnormal rhythm detection network, decompose it into signal segments, construct a segment feature matrix based on the optimal feature set, stack it into a high-dimensional tensor, perform network decomposition on the high-dimensional tensor, determine the causal relationship, calculate the abnormality score, and obtain the abnormal rhythm detection result.
[0132] The segment feature matrix specifically refers to a two-dimensional array for representing the features of the ECG signal segments. In the present invention, the complete ECG signal is decomposed into multiple short-time segments, and the corresponding features are extracted for each segment. Each row of the segment feature matrix corresponds to an ECG segment, and each column corresponds to a feature dimension. For example, if the ECG signal is decomposed into 100 segments, and 10 features are extracted from each segment, then the dimension of the corresponding segment feature matrix is 100×10. The segment feature matrix provides a compact and efficient way to organize and represent the feature information of the ECG segment, which is convenient for subsequent abnormality detection and analysis.
[0133] The high-dimensional tensor is an extended multidimensional array, which can be regarded as a high-dimensional generalization of vectors and matrices. In the present invention, the segment feature matrices of multiple electrocardiogram signals are stacked into a high-dimensional tensor to capture the association and interaction information between different signals. For example, if there are 10 electrocardiogram signals to be tested, each signal has a 100×10 segment feature matrix, and the dimension of the high-dimensional tensor obtained after stacking is 10×100×10. High-dimensional tensors provide a unified framework to represent and analyze the feature information of multiple electrocardiogram signals, which helps to explore potential patterns and abnormalities between signals;
[0134] In this embodiment, by decomposing the electrocardiogram signal to be tested into multiple signal segments, the local temporal characteristics of the electrocardiogram signal can be captured, which is helpful for more detailed analysis and detection of abnormal heart rhythm; the segment feature matrix is stacked into a high-dimensional tensor, and the complex correlation information between the signal segments is retained. Through network decomposition, the data dimension can be effectively reduced, redundant information can be reduced, and the most representative low-rank representation can be extracted; by performing causal relationship analysis on the low-rank representation, the causal relationship between different features in the electrocardiogram signal can be revealed, which is of great significance for understanding the potential mechanism and pathological characteristics of abnormal heart rhythm; by calculating the abnormality score between the low-rank representations, the degree of abnormality of each signal segment can be quantified, providing a basis for further abnormal heart rhythm detection.
[0135] In an optional embodiment, the electrocardiogram signal to be tested is input into the heart rhythm abnormality detection network, decomposed into signal segments, based on the optimal feature set, a segment feature matrix is constructed, stacked into a high-dimensional tensor, the high-dimensional tensor is subjected to network decomposition, and the causal relationship is determined, and the abnormality score is calculated, and the heart rhythm abnormality detection result is obtained, including:
[0136] Based on the preset segment length, the electrocardiogram signal to be tested is decomposed into signal segments, and based on the optimal feature set, segment features are extracted for each signal segment, a segment feature matrix is constructed, and the segment feature matrices corresponding to all signal segments are stacked into a high-dimensional tensor;
[0137] Through a tensor decomposition network, the high-dimensional tensor is approximately represented as a series of core tensor multiplications, and based on the core tensor, a low-rank representation corresponding to the high-dimensional tensor is determined;
[0138] Inputting the low-rank representation into a pre-built causal discovery algorithm, generating an optimal causal graph through greedy search, and determining the causal relationship in the low-rank representation;
[0139] Based on the causal relationship, the abnormal score of each factor is calculated, and based on the predetermined factor association, a plurality of corresponding abnormal scores are weighted combined and compared with the preset combination condition threshold to determine the abnormal heart rhythm result.
[0140] The tensor decomposition network specifically refers to a tensor decomposition method based on deep learning, which approximates high-dimensional tensors through multi-layer neural networks, realizes low-rank representation of tensors, automatically learns and optimizes the decomposition structure of tensors, and captures potential patterns and associated information in tensors. In the present invention, a tensor decomposition network is used to decompose high-dimensional electrocardiogram segment feature tensors to obtain compact and expressive low-rank representations, which provide a basis for subsequent anomaly detection and causal analysis;
[0141] The core tensor specifically refers to a set of low-rank tensors learned by the tensor decomposition network, which approximate the original high-dimensional tensor by multiplication. Each core tensor corresponds to a potential pattern or component in the high-dimensional tensor, reflecting the potential structure and associated information of the tensor in different dimensions. By optimizing the core tensor, the tensor decomposition network can capture the essential characteristics and inherent laws in the high-dimensional tensor and realize the low-rank representation of the tensor. In the present invention, the core tensor provides a compact and expressive way to characterize the inherent structure and dynamic changes of the feature tensor of the electrocardiogram segment;
[0142] The low-rank representation specifically refers to approximating a high-dimensional tensor as a number of low-rank tensors, namely the multiplication form of a core tensor. The core tensor learned by the tensor decomposition network compresses the original high-dimensional tensor into a low-dimensional subspace to obtain a low-rank representation. The low-rank representation can capture the main patterns and trends of the tensor while filtering out noise and redundant information, providing a compact and robust tensor representation. The low-rank representation helps reduce the complexity of the data, highlighting the essential patterns of the ECG segment features, and providing a simplified and optimized data basis for subsequent anomaly detection and causal analysis.
[0143] The greedy search specifically refers to a heuristic optimization algorithm, which is often used in causal relationship discovery and causal graph construction. In the causal discovery algorithm, the greedy search searches for the optimal causal graph structure by gradually adding or deleting causal edges. Specifically, the algorithm evaluates the impact of adding or deleting causal edges on model performance at each step, and selects the operation that can maximize the model performance until the stopping condition is reached. Greedy search approaches the global optimal solution through local optimal decisions, and in practice can usually obtain a satisfactory causal graph structure at a lower computational cost.
[0144] According to the preset segment length, such as 1 second, 2 seconds, etc., the ECG signal to be tested is decomposed into multiple signal segments. For each signal segment, the corresponding segment features, such as time domain features, frequency domain features, nonlinear features, etc., are extracted based on the optimal feature set. The extracted segment features will form a segment feature matrix, in which each row corresponds to a segment and each column corresponds to a feature dimension. This process is repeated for all signal segments to obtain multiple segment feature matrices.
[0145] The fragment feature matrices corresponding to all signal fragments are stacked into a high-dimensional tensor to integrate the feature information of different fragments, which is convenient for subsequent joint analysis and anomaly detection. The stacked high-dimensional tensor will contain the representation of multiple signal fragments in different feature dimensions, reflecting the association and interaction between the fragments.
[0146] Use tensor decomposition network to decompose and learn low-rank representation of constructed high-dimensional tensors. Tensor decomposition network approximates high-dimensional tensors through multi-layer neural networks and learns a set of core tensors to approximate the original tensor through multiplication. The network training process adjusts the network parameters by optimizing the reconstruction error so that the learned core tensor can capture the potential pattern and structural information of the tensor to the greatest extent;
[0147] Based on the trained tensor decomposition network, the high-dimensional tensor is mapped to a low-dimensional subspace to obtain its low-rank representation. Specifically, by multiplying the learned core tensor and approximating it with the high-dimensional tensor, a low-rank approximate representation of the tensor can be obtained.
[0148] The low-rank representation is input into the pre-built causal discovery algorithm, and the optimal causal graph is generated through greedy search. Specifically, the algorithm will gradually add or delete causal edges in the low-rank representation, evaluate the impact of each operation on the model performance, and select the operation that can maximize the performance. Through iterative optimization, an optimal causal graph structure is finally obtained to characterize the causal dependency between the factors in the low-rank representation. Based on the discovered causal relationship, the anomaly score of each factor is calculated, where the anomaly score reflects the degree to which each factor deviates from the normal pattern and can be used to measure its abnormality. Common anomaly score calculation methods include reconstruction error, Mahalanobis distance, likelihood ratio, etc. By setting an appropriate threshold, it is possible to determine whether each factor has an abnormality based on the anomaly score;
[0149] According to the predetermined factor association, the abnormal scores of multiple related factors are weighted and combined to obtain a comprehensive abnormal index. The comprehensive abnormal index is compared with the preset combined condition threshold. If it exceeds the threshold, it is judged as abnormal heart rhythm; otherwise, it is judged as normal heart rhythm.
[0150] In this embodiment, the fragment feature matrices are stacked into high-dimensional tensors, and the feature information of different fragments is integrated together to facilitate subsequent joint analysis and anomaly detection, which can capture the complex correlation and interaction between signal fragments and help to analyze the electrocardiogram signal more comprehensively; a tensor decomposition network is used to decompose the high-dimensional tensor and learn low-rank representations, and the high-dimensional tensor is approximated by a multi-layer neural network. The learned core tensor can capture potential patterns and structural information, optimize reconstruction errors, and improve the accuracy and robustness of the model; the high-dimensional tensor is mapped to a low-dimensional subspace to obtain its low-rank representation, which effectively reduces the dimension and redundant information of the data, retains the most representative feature information, and provides a concise and effective data representation for subsequent causal analysis; the low-rank representation is input into the causal discovery algorithm, and the optimal causal graph is generated through greedy search, which can characterize the causal dependency relationship between various factors in the low-rank representation. This helps to understand the causal relationship between different ECG features and provide deeper theoretical support for abnormal rhythm detection; by calculating the abnormal score of each factor, it is possible to quantify the degree to which each factor deviates from the normal pattern, provide specific measurement standards, and ensure the scientific nature and accuracy of abnormality detection; according to the predetermined factor correlation relationship, the abnormal scores of multiple related factors are weighted and combined to obtain a comprehensive abnormality indicator. The comprehensive evaluation method improves the overall accuracy and reliability of abnormality detection.
[0151] In an optional embodiment, the low-rank representation is input into a pre-built causal discovery algorithm, and an optimal causal graph is generated through greedy search. Determining the causal relationship in the low-rank representation includes:
[0152] Converting the data corresponding to the low-rank representation into a two-dimensional matrix and inputting it into a causal discovery algorithm, wherein each row of the two-dimensional matrix represents a sample and each column represents a dimension of the low-rank representation;
[0153] Create an empty causal graph with the feature variables in the low-rank representation as nodes;
[0154] Based on the greedy search strategy, the causal graph structure is iteratively constructed. By simulating three operations, namely, adding relationship edges, deleting relationship edges, and reversing relationship edges, a causal graph score corresponding to each operation is generated. The operation with the highest causal graph score is selected to execute until a preset number of iterations is reached to generate an optimal causal graph. Based on the optimal causal graph, the causal relationship in the low-rank representation is determined.
[0155] Convert the data corresponding to the low-rank representation into a two-dimensional matrix form for easy input into the causal discovery algorithm. Specifically, take each sample of the low-rank representation as a row of the two-dimensional matrix, and take each dimension as a column of the two-dimensional matrix to obtain an N×M two-dimensional matrix, where N represents the number of samples and M represents the number of dimensions of the low-rank representation; use the feature variables in the low-rank representation as nodes to create an empty causal graph. Specifically, create a corresponding node for each feature variable, and combine these nodes to form an initial causal graph structure. In the initial state, the causal graph does not contain any edges, indicating that there is no confirmed causal relationship between the feature variables;
[0156] Based on the greedy search strategy, the causal graph structure is constructed iteratively. Specifically, in each iteration, the algorithm searches for the optimal causal graph structure by simulating three operations: first, adding a relationship edge. Based on the current causal graph, it tries to add a directed edge between two nodes that are not directly connected, indicating that one of the nodes is the cause of the other node; second, deleting a relationship edge. Based on the current causal graph, it tries to delete an existing directed edge, indicating that the causal relationship between the two nodes does not hold; third, reversing a relationship edge. Based on the current causal graph, it tries to reverse the direction of an existing directed edge, indicating that the relationship between cause and effect has been reversed;
[0157] For each operation, the algorithm generates a corresponding new causal graph and calculates the score of the causal graph. The scoring function is determined based on the log-likelihood method and is used to measure the fit between the causal graph and the data. The algorithm compares the scores of the causal graphs generated by different operations, selects the operation with the highest score as the optimal operation for the current iteration, and updates the causal graph structure.
[0158] The greedy search strategy is repeatedly executed until the preset conditions are met, the algorithm terminates the search process and obtains the final optimal causal graph, where the preset conditions include reaching the preset number of iterations, or the causal graph score before and after continuous iterations has not changed significantly, such as presetting a significant threshold, and if it is less than the significant threshold, it is considered that there is no significant change. As the number of iterations increases, the algorithm will gradually optimize the causal graph structure to continuously improve the degree of fit;
[0159] Based on the optimal causal graph, the causal relationship in the low-rank representation is determined. For example, if there is a directed edge from node A to node B, it means that feature variable A is the cause of feature variable B, that is, the value of A will affect or determine the value of B. By systematically analyzing all directed edges in the optimal causal graph, a complete causal relationship graph between each feature variable in the low-rank representation can be obtained.
[0160] In this embodiment, an initial causal graph is created with feature variables as nodes to ensure that all variables have corresponding representations. The initial causal graph is empty, indicating that there is no preset causal relationship, which provides a neutral starting point for the subsequent discovery of causal relationships and avoids the influence of prior bias; based on the greedy search strategy, iteratively add, delete and reverse relationship edges, gradually optimize the causal graph structure, ensure that the construction of the causal graph structure is gradual and optimized, and can dynamically adjust and improve the causal relationship, improve the accuracy and reliability of causal analysis; calculate the score of the causal graph by the log-likelihood method to measure the degree of fit between the causal graph and the data. The introduction of the scoring function enables each operation to have a clear evaluation standard, ensuring the scientificity and objectivity of selecting the optimal operation in the iterative process.
[0161] Figure 2 FIG. 1 is a schematic diagram of the structure of a cardiac rhythm abnormality detection system based on electrocardiogram feature extraction according to an embodiment of the present invention. Figure 2 As shown, the system comprises:
[0162] The first unit is used to collect an electrocardiogram signal, perform multi-scale fractional-order differentiation on the electrocardiogram signal based on the fractional order generated by a preset sampling strategy to obtain a fractional-order differential signal, obtain a corresponding box dimension by calculating the number of boxes required to cover the corresponding fractional-order differential signal, and determine the electrocardiogram fractal feature set;
[0163] The second unit is used to extract sample values corresponding to the classification features based on predefined electrocardiogram categories, merge and sort the sample values, calculate the corresponding difference significance measure by determining the rank sum statistic, select the fractal features whose difference significance measure is less than a preset significance threshold, and determine the optimal feature set;
[0164] The third unit is used to input the electrocardiogram signal to be tested into the abnormal rhythm detection network, decompose it into signal segments, construct a segment feature matrix based on the optimal feature set, stack it into a high-dimensional tensor, perform network decomposition on the high-dimensional tensor, determine the causal relationship, calculate the abnormality score, and obtain the abnormal rhythm detection result.
[0165] According to a third aspect of the embodiments of the present invention,
[0166] An electronic device is provided, comprising:
[0167] processor;
[0168] a memory for storing processor-executable instructions;
[0169] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0170] A fourth aspect of the embodiments of the present invention is:
[0171] A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.
[0172] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.
[0173] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for detecting abnormal heart rhythm based on electrocardiogram feature extraction, characterized in that: include: Collecting an electrocardiogram signal, performing multi-scale fractional-order differentiation on the electrocardiogram signal based on the fractional order generated by a preset sampling strategy to obtain a fractional-order differential signal, obtaining a corresponding box dimension by calculating the number of boxes required to cover the corresponding fractional-order differential signal, and determining an electrocardiogram fractal feature set; Based on the predefined electrocardiogram categories, sample values corresponding to the classification features are respectively extracted, the sample values are merged and sorted, and the corresponding difference significance measure is calculated by determining the rank sum statistic, and the fractal features whose difference significance measure is less than the preset significance threshold are selected to determine the optimal feature set; The electrocardiogram signal to be tested is input into the abnormal rhythm detection network, decomposed into signal segments, and based on the optimal feature set, a segment feature matrix is constructed and stacked into a high-dimensional tensor. The high-dimensional tensor is subjected to network decomposition, and the causal relationship is determined, and the abnormal score is calculated to obtain the abnormal rhythm detection result.
2. The method according to claim 1, characterized in that: Based on the fractional order generated by the preset sampling strategy, the electrocardiogram signal is subjected to multi-scale fractional differentiation to obtain a fractional differential signal, and the corresponding box dimension is obtained by calculating the number of boxes required to cover the corresponding fractional differential signal, and the electrocardiogram fractal feature set is determined to include: Based on the logarithmic interval sampling strategy, a set of fractional orders are generated; According to each fractional order, performing multi-scale fractional differentiation on the electrocardiogram signal to calculate a fractional differential signal; Based on the preset signal division length, the corresponding relationship between the signal division length and the number of boxes is determined by calculating the number of boxes required to cover the corresponding fractional-order differential signal, and based on the least squares method, the slope of the linear relationship between the signal division length and the number of boxes is fitted to obtain the box dimension corresponding to the fractional-order differential signal; All the box dimensions are used to form a fractal dimension vector, and a set of electrocardiogram fractal features is determined.
3. The method according to claim 2, characterized in that According to each fractional order, the electrocardiogram signal is subjected to multi-scale fractional differentiation to calculate the fractional differential signal, and the formula is as follows: Among them, α(i) represents the i-th fractional order, T represents time, x(T) represents the electrocardiogram signal at time T, and D α(i) x(T) represents the fractional differential signal under the fractional order α(i), Γ represents the gamma function, n represents the smallest integer greater than α(i), t represents the integral variable, x (n) (t) represents the nth order derivative of the electrocardiogram signal x(T), (Tt) α(i)-n+1 represents the integral kernel.
4. The method according to claim 1, characterized in that Based on the predefined electrocardiogram categories, sample values corresponding to the classification features are extracted respectively, the sample values are merged and sorted, and the corresponding difference significance measure is calculated by determining the rank sum statistic, and the fractal features whose difference significance measure is less than the preset significance threshold are selected, and the optimal feature set is determined to include: Based on the predefined ECG categories, all samples are divided into sample groups, and the sample groups correspond to the ECG categories one by one. Based on each sample group, the corresponding sample value is extracted according to each fractal feature in the ECG fractal feature set; Merging all the sample values into a sample value set, sorting the sample value set, and determining a sample rank; Based on the sample ranks, the sample rank sum of each sample group is calculated, and the rank sum statistic is calculated by combining the total number of samples in each sample group; Determine the chi-square distribution degrees of freedom based on the total number of electrocardiogram categories, and calculate the difference significance measure through the chi-square distribution cumulative distribution function based on the rank sum statistic and in combination with the chi-square distribution degrees of freedom; Select fractal features whose difference significance measure is less than a preset significance threshold, construct a candidate feature set, sort the candidate feature set from small to large according to the difference significance measure, and determine the sorting sequence number; Based on the order correction method, the difference significance measure is corrected in sequence through the total number of features of the candidate feature set, the difference significance measure and the sorting sequence number to determine the difference significance correction value; The fractal features whose difference significance correction values are less than the preset significance threshold are selected to determine the optimal feature set.
5. The method according to claim 4, characterized in that Based on the sample rank, the sample rank sum of each sample group is calculated, and the rank sum statistic is calculated based on the total number of samples in each sample group. The formula is as follows: Among them, H represents the rank sum statistic, N represents the total number of samples, j represents the ECG category number, K represents the number of ECG categories, and R j represents the rank sum of all samples of category j, m j Represents the total number of samples of category j; The significance measure of the difference is calculated by the chi-square cumulative distribution function, and its formula is as follows: Among them, p represents the difference significance measure, θ 2 represents the chi-square distribution parameter, CDF() represents the chi-square distribution cumulative distribution function; The difference significance measures are corrected in turn to determine the difference significance correction value, which is as follows: on c (k)=min((o-k+1)·p(k),1; Among them, p c (k) represents the difference significance correction value, o represents the total number of features in the candidate feature set, and k represents the sorting order.
6. The method according to claim 1, characterized in that The electrocardiogram signal to be tested is input into the heart rhythm abnormality detection network, decomposed into signal segments, based on the optimal feature set, a segment feature matrix is constructed, stacked into a high-dimensional tensor, the high-dimensional tensor is subjected to network decomposition, and the causal relationship is determined, and the abnormality score is calculated, and the heart rhythm abnormality detection result is obtained, including: Based on the preset segment length, the electrocardiogram signal to be tested is decomposed into signal segments, and based on the optimal feature set, segment features are extracted for each signal segment, a segment feature matrix is constructed, and the segment feature matrices corresponding to all signal segments are stacked into a high-dimensional tensor; Through a tensor decomposition network, the high-dimensional tensor is approximately represented as a series of core tensor multiplications, and based on the core tensor, a low-rank representation corresponding to the high-dimensional tensor is determined; Inputting the low-rank representation into a pre-built causal discovery algorithm, generating an optimal causal graph through greedy search, and determining the causal relationship in the low-rank representation; Based on the causal relationship, the abnormal score of each factor is calculated, and based on the predetermined factor association, a plurality of corresponding abnormal scores are weighted combined and compared with the preset combination condition threshold to determine the abnormal heart rhythm result.
7. The method according to claim 6, characterized in that The low-rank representation is input into a pre-built causal discovery algorithm, and an optimal causal graph is generated through greedy search. The causal relationship in the low-rank representation is determined to include: Converting the data corresponding to the low-rank representation into a two-dimensional matrix and inputting it into a causal discovery algorithm, wherein each row of the two-dimensional matrix represents a sample and each column represents a dimension of the low-rank representation; Create an empty causal graph with the feature variables in the low-rank representation as nodes; Based on the greedy search strategy, the causal graph structure is iteratively constructed. By simulating three operations, namely, adding relationship edges, deleting relationship edges, and reversing relationship edges, a causal graph score corresponding to each operation is generated. The operation with the highest causal graph score is selected to execute until a preset number of iterations is reached to generate an optimal causal graph. Based on the optimal causal graph, the causal relationship in the low-rank representation is determined.
8. A cardiac rhythm abnormality detection system based on electrocardiogram feature extraction, used to implement the method according to any one of claims 1 to 7, characterized in that: include: The first unit is used to collect an electrocardiogram signal, perform multi-scale fractional-order differentiation on the electrocardiogram signal based on the fractional order generated by a preset sampling strategy to obtain a fractional-order differential signal, obtain a corresponding box dimension by calculating the number of boxes required to cover the corresponding fractional-order differential signal, and determine the electrocardiogram fractal feature set; The second unit is used to extract sample values corresponding to the classification features based on predefined electrocardiogram categories, merge and sort the sample values, calculate the corresponding difference significance measure by determining the rank sum statistic, select the fractal features whose difference significance measure is less than a preset significance threshold, and determine the optimal feature set; The third unit is used to input the electrocardiogram signal to be tested into the abnormal rhythm detection network, decompose it into signal segments, construct a segment feature matrix based on the optimal feature set, stack it into a high-dimensional tensor, perform network decomposition on the high-dimensional tensor, determine the causal relationship, calculate the abnormality score, and obtain the abnormal rhythm detection result.
9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method described in any one of claims 1 to 7.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Electrocardiosignal visualization enhancement method and system, electronic equipment and medium
CN119157551A
