Pre-excitation electrocardiogram recognition and classification method based on double-view statistical interleaving network
By employing a dual-view statistical interleaved network method, the problems of low accuracy and poor noise resistance in the automatic classification of pre-excitation electrocardiograms are solved, achieving accurate identification and classification of pre-excitation electrocardiograms, which is suitable for auxiliary diagnosis in hospital environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANJING UNIV OF INFORMATION SCI & TECH
- Filing Date
- 2026-01-20
- Publication Date
- 2026-04-28
AI Technical Summary
Existing technologies for automatic classification of pre-excitation electrocardiograms suffer from low recognition accuracy, poor noise resistance, and insufficient data reliability. In particular, they are difficult to accurately locate and target atrioventricular bypass in patient-to-patient experiments.
A method based on dual-view statistical interleaving network is adopted to generate a two-dimensional representation of electrocardiogram (ECG) signals by preprocessing, reshaping, and short-time Fourier transform. Features are extracted using principal component analysis and independent component analysis, and decision values are evaluated by linear support vector machine to achieve the identification and classification of pre-excitation ECGs.
It achieves accurate identification and classification of pre-excitation electrocardiograms, maintaining high accuracy, especially in extremely imbalanced patient populations. It is noise resistant, suitable for auxiliary pre-excitation diagnosis in hospital environments, and the dataset covers different populations with strong generalization ability.
Smart Images

Figure CN121937787A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of biomedical signal processing and intelligent recognition, and in particular to a method for recognition and classification of pre-excitation electrocardiograms based on dual-view statistical interleaving networks. Background Technology
[0002] Long-term Wolff-Parkinson-White (WPW) syndrome can lead to serious arrhythmias, making timely diagnosis and treatment crucial. WPW syndrome often causes a series of changes on the electrocardiogram (ECG), known as pre-excitation ECG. In normal ECG signal conduction, the electrical signal originates from the sinoatrial node, travels through the atrioventricular node to the ventricles, ensuring a regular heartbeat. However, in patients with WPW syndrome, due to the atrioventricular bypass, the electrical signal can prematurely excite the ventricles via this shortcut, leading to abnormal ventricular depolarization sequence and subsequently triggering various arrhythmias.
[0003] To date, researchers have conducted a series of studies on automatic classification methods for pre-excitation ECGs. In 2024, Liu et al. (Liu, Liong-Rung, et al. "An Arrhythmia classification approach via deep learning using single-lead ECG without QRS wave detection." Heliyon 10.5 (2024).) designed a one-dimensional convolutional neural network for automatic identification of pre-excitation ECGs. This method collected only 916 ECG segments as samples and did not employ cross-validation, further reducing the reliability of the algorithm's performance. Based on in-patient experiments, its identification effect on pre-excitation patients not included in the experiments has not yet been verified. Subsequently, Huang et al. (Huang, Yangcheng, et al. "ECG classification based on guided attention mechanism." Computer Methods and Programs in Biomedicine 257 (2024): 108454.) successfully identified pre-excitation electrocardiograms (ECGs) through inter-patient experiments, achieving a recall rate of 74.77%, a precision rate of 92.91%, and an F1 score of 82.43%. However, neither of the aforementioned studies addressed the classification of pre-excitation ECGs, resulting in the inability to accurately locate atrioventricular bypass (AP) pathways, thus hindering the development of targeted intervention programs. Although Khalaph et al. (Khalaph, Moneeb, et al. "A novel ECG algorithm for accurate localization of manifest accessory pathways in both children and adults: SMART-WPW." Heart Rhythm (2025).) achieved an accuracy of 97% in atrioventricular accessory pathway localization, they did not use ECG data from non-excited ECG patients for their experiments. Therefore, their method's ability to identify excited ECG patients when processing massive amounts of data remains unverified. This method, which extracts morphological features from different leads step-by-step, is sensitive to noise and signal quality. The multi-step extraction process involves numerous benchmark detections and waveform segmentation, which can easily lead to error accumulation in complex environments such as low-quality signal processing. Furthermore, due to the limited patient sample size and lack of cross-validation, the results are insufficient in terms of reliability and reproducibility. Summary of the Invention
[0004] Purpose of the invention: To address the above problems, the purpose of this invention is to provide a method for identifying and classifying pre-excitation electrocardiograms based on dual-view statistical interleaving networks.
[0005] Technical solution: The pre-excitation electrocardiogram recognition and classification method based on dual-view statistical interleaving network of the present invention includes the following steps:
[0006] Step 1: Preprocess the electrocardiogram (ECG) signal by cutting the long-term ECG signal into a single cycle and converting it into a standardized ECG signal;
[0007] Step 2: The standardized electrocardiogram signal is converted into two two-dimensional representations from two different perspectives through reshaping operation and short-time Fourier transform, respectively.
[0008] Step 3: Use the first fine-grained scanning layer to segment the two-dimensional representation from different viewpoints to obtain the local region of the first stage;
[0009] Step 4: Extract features from the local region of the first stage through a dual-view convolution stage to generate a preliminary feature matrix;
[0010] Step 5: Use the second fine-grained scanning layer to segment the preliminary feature matrix to obtain the second-stage local region;
[0011] Step 6: Extract features from the local features of the second stage through an interleaved convolutional stage with independent component convolutional layers and principal component convolutional layers to generate the final feature matrix;
[0012] Step 7: Integrate all feature matrices through a fully connected layer to generate the final statistical histogram feature vector;
[0013] Step 8: Evaluate the decision values of the generated statistical histogram feature vectors using a linear support vector machine.
[0014] Further, step 2 includes:
[0015] In the first branch, the standardized electrocardiogram signal is segmented into Divide into equal parts and then reassemble them into The matrix is used to obtain the electrocardiogram conversion matrix, denoted as ECM;
[0016] In the second branch, the standardized electrocardiogram signal is subjected to a short-time Fourier transform to generate a two-dimensional time-frequency spectrum, represented as follows:
[0017] ,
[0018] in, Represents the short-time Fourier transform. Represents standardized electrocardiogram signals. Represents the integral variable. Represents the real number field. It is a window function. At the moment the window is at its center, the length of the window is... The overlap rate is ; Represents the imaginary unit. Indicates angular frequency;
[0019] Two-dimensional time spectrum diagram is of Matrix, for this Before matrix removal row element, get a The time-frequency matrix is denoted as TFSs.
[0020] Furthermore, step 3 includes:
[0021] The first The lead-to-lead ECG conversion matrix and time-frequency matrix are respectively expressed as follows: and , ,in These represent the total number of ECM and TFS, respectively. This indicates the row number of the electrocardiogram conversion matrix and the time-frequency matrix. Indicates the number of columns in the electrocardiogram conversion matrix and the time-frequency matrix;
[0022] Scan using windows separately and Obtain image patches;
[0023] The image patches were then mean-corrected and reshaped into vector form, generating block vectors respectively. and ,in Indicates the size of the image patch;
[0024] Then, the ECM samples to be processed are generated by concatenating the block vectors. and TFS samples ECM samples The matrix form is TFS samples The matrix form is ;
[0025] The electrocardiogram conversion matrix and the total matrix of the video spectrogram are denoted as follows: , .
[0026] Furthermore, step 4 includes:
[0027] In the first branch, build Each principal component analysis filter is calculated. The principal component analysis filter parameters are calculated using the following formula:
[0028] ,
[0029] Among them, matrix It is a dataset The covariance matrix, Used to calculate the covariance matrix The former The eigenvectors corresponding to the largest eigenvalues This indicates mapping the feature vector to the previous one. A matrix, where PCA represents principal component analysis;
[0030] pass Principal component analysis filters extract features from the ECM matrix to obtain the first preliminary feature, which is represented as follows:
[0031] ,
[0032] in, Indicates the first The first feature block of the output feature block after ECM is filtered by principal component analysis. Each feature block In the i-th ECM, the first... * Input feature blocks, where * denotes convolution operation;
[0033] In the second branch, based on the covariance matrix Characteristic equation Extract the eigenvalue matrix C and the eigenvector matrix M;
[0034] The whitening matrix is calculated using the following formula:
[0035] ,
[0036] in, Indicates inclusion covariance matrix before The eigenvalue matrix with the largest eigenvalue. Indicates inclusion with the preceding The first eigenvalues corresponding to the largest eigenvalues The eigenvector matrix of eigenvectors;
[0037] Whitening matrix The orthogonal matrix B is obtained by estimation;
[0038] Following the principle of statistical independence, the source data S is estimated using the unmixing matrix D, and the calculation formula is as follows:
[0039] ,
[0040] The unmixing matrix D is calculated by multiplying the orthogonal matrix B and the eigenvalue matrix C, i.e., D = BC.
[0041] Build Each independent component analysis filter is calculated. The parameters of the independent component analysis filter are calculated using the following formula:
[0042] ,
[0043] Wherein, ICA stands for Independent Component Analysis;
[0044] pass Each independent component analysis filter extracts features from the matrix TFS, yielding a second preliminary feature, expressed as:
[0045] ,
[0046] in, Indicates the first The first TFS Input feature block.
[0047] Furthermore, step 5 includes:
[0048] Using window scanning and Image patches are generated, and then the image patches are mean-corrected and reshaped into vector form, resulting in block vectors. and block vectors ;
[0049] Then, through vector concatenation, the local image patches are sequentially concatenated into matrices, denoted as follows:
[0050] ,
[0051] ,
[0052] The second-stage electrocardiogram conversion matrix to be processed is obtained. ;
[0053] according to , and This will yield the second stage TFS to be processed. .
[0054] Furthermore, step 6 includes:
[0055] In the first branch, principal component analysis is used through functions and To each and PCA filter and Extract;
[0056] Next, regarding the first One TFS, PCA filter and Two components of the original data respectively and Convolution operations are performed to obtain the principal component analysis results. and , respectively represented as:
[0057] ,
[0058] ,
[0059] In the second branch, independent component analysis is used through functions. and , respectively and ICA filter and Extract;
[0060] Next, regarding the first One TFS, ICA filter and respectively with and Convolution operations are performed to obtain the independent component analysis results. and , respectively represented as:
[0061] ,
[0062] .
[0063] Furthermore, step 7 includes:
[0064] feature matrix , , and Convert to decimal matrix The conversion formula is:
[0065] ,
[0066] in, The function will return all elements in the feature matrix Convert to 0 or 1, the specific conversion method is expressed as:
[0067] ,
[0068] It is the middle decimal encoding matrix, which contains all Obtained by performing block histogram statistics and splicing ;
[0069] Next, using a size of The window with an overlap rate For decimal matrices The blocks are divided to obtain T blocks. ;
[0070] Then, all the first Secondary electrocardiogram All data were processed using the histogram statistical function hist(), and the corresponding relationships are as follows: ,in Indicates the first The feature vectors of the electrocardiograms are used as the feature vectors of the final statistical histogram.
[0071] Further, step 1 includes:
[0072] Acquire electrocardiogram signals and locate the R wave. Using the R point as a reference point, take the left side... [Sampling points, taken on the right side] Each sampling point is integrated into a sample that includes point R. A single-cycle electrocardiogram at each sampling point; among which It is a natural number, and ;
[0073] The minimum-maximum normalization method is used to normalize the amplitude range of each electrocardiogram to between 0 and 1, resulting in a standardized electrocardiogram signal. The formula is as follows:
[0074] ,
[0075] in, This represents the value of the sampling point in the electrocardiogram cycle. and These represent the minimum and maximum values of the sampling points within the period, respectively.
[0076] Beneficial effects: Compared with the prior art, the significant advantages of this invention are:
[0077] 1. This invention successfully identifies pre-excitation electrocardiograms and accurately classifies type A and type B pre-excitation electrocardiograms, thereby effectively realizing the identification of pre-excitation electrocardiograms; in the process of identification and classification, it achieves an excellent accuracy rate of over 95%, and still shows excellent performance even in patient experiments with extremely unbalanced patient groups;
[0078] 2. This invention integrates time domain, time spectrum, and interleaving statistical features to construct a deep information extraction framework, effectively extracting dual-view interleaving statistical features, significantly improving the performance of abnormal electrocardiogram recognition, demonstrating excellent anti-imbalance and anti-noise capabilities, and greatly improving accuracy and F1 score;
[0079] 3. This invention verifies the effectiveness of the method through comprehensive experiments, and conducts multi-dimensional experimental research, covering inter-patient and intra-patient comparison experiments, K-fold cross-validation, pre-excitation ECG recognition experiments, pre-excitation ECG classification experiments, and noisy ECG classification experiments, to ensure its potential to assist in the diagnosis of pre-excitation in a hospital environment.
[0080] 4. The datasets used are from a wide range of sources, covering different groups of people, with high data quality and strong generalization ability;
[0081] 5. It helps in the identification and classification of leads in pre-excitation electrocardiograms. This invention shows that in a standard 12-lead electrocardiogram, lead V1 has the most ideal classification effect on the left and right atrial and ventricular valve annulus by comprehensively evaluating various indicators.
[0082] 6. When the signal-to-noise ratio is 12dB, the accuracy of the present invention in classifying electrocardiograms with power line interference and baseline drift in the inter-patient paradigm is approximately 94%. Attached Figure Description
[0083] Figure 1 This is a flowchart illustrating the overall process of the method of the present invention.
[0084] Figure 2 Example of an electrocardiogram for lead V1;
[0085] Figure 3 The comparison results between group A2 and group B2 are based on the original data and the TVSI-Net model;
[0086] Figure 4 Example of an electrocardiogram containing power frequency noise and Gaussian noise;
[0087] Figure 5 This is the accuracy curve of electrocardiogram classification under multiple types and levels of noise environments according to the present invention;
[0088] Figure 6 An example of ECG for baseline drift;
[0089] Figure 7Histograms showing the distribution of baseline drift on electrocardiograms at different signal-to-noise ratios;
[0090] Figure 8 This invention demonstrates the classification accuracy between the original electrocardiogram and the baseline-drifted electrocardiogram. Detailed Implementation
[0091] The embodiments of the present invention will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the present invention and not intended to limit the scope of the invention. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the embodiments of the present invention, and not all structures.
[0092] In the following description, specific details such as target system architecture and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of this application with unnecessary detail.
[0093] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0094] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0095] Furthermore, in the description of this application and the appended claims, the terms "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0096] References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include the target features, structures, or characteristics described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized.
[0097] The flowchart of the pre-excitation electrocardiogram recognition and classification method based on dual-view statistical interleaving network described in this embodiment is as follows: Figure 1 As shown, the method includes the following steps:
[0098] Step 1: Preprocess the electrocardiogram (ECG) signal by cutting the long-term ECG signal into a single cycle and converting it into a standardized ECG signal.
[0099] Further, step 1 includes:
[0100] Acquire electrocardiogram signals and locate the R wave. Using the R point as a reference point, take the left side... One sampling point, taken on the right. Each sampling point is integrated into a sample that includes point R. A single-cycle electrocardiogram at each sampling point; among which It is a natural number, and ;
[0101] The minimum-maximum normalization method is used to normalize the amplitude range of each electrocardiogram to between 0 and 1, resulting in a standardized electrocardiogram signal. The formula is as follows:
[0102] ,
[0103] in, This represents the value of the sampling point in the electrocardiogram cycle. and These represent the minimum and maximum values of the sampling points within the period, respectively.
[0104] In one example, the classic real-time QRS wave detection algorithm (Pan-Tompkins algorithm) can be used to locate the R point in the electrocardiogram (ECG) signal. Subsequently, ECG segmentation is performed, integrating the R point and its 199 left and 200 right sampling points into a single-cycle ECG signal. To eliminate temporal differences between ECGs, a minimum-maximum normalization method is used to normalize the amplitude range of each ECG to between 0 and 1.
[0105] Step 2: The standardized electrocardiogram signal is converted into two two-dimensional representations from different perspectives through reshaping operation and short-time Fourier transform, respectively.
[0106] Further, step 2 includes:
[0107] In the first branch, the standardized electrocardiogram signal is segmented into Divide into equal parts and then reassemble them into The matrix is used to obtain the electrocardiogram conversion matrix, denoted as ECM;
[0108] In the second branch, the standardized electrocardiogram signal is subjected to a short-time Fourier transform to generate a two-dimensional time-frequency spectrum, represented as follows:
[0109] ,
[0110] in, Represents the short-time Fourier transform. Represents standardized electrocardiogram signals. Represents the integral variable. Represents the real number field. It is a window function. At the moment the window is at its center, the length of the window is... The overlap rate is ; Represents the imaginary unit. Indicates angular frequency;
[0111] Two-dimensional time spectrum diagram is of Matrix, for this Before matrix removal row element, get a The time-frequency matrix is denoted as TFSs.
[0112] In one example, to improve the feature extraction capability of the subsequent network, the electrocardiogram (ECG) signal is converted into a matrix from two dimensions. To ensure the integrity of the matrixed ECG information, the ECG data containing 400 sampling points is divided into 20 equal parts and then reassembled into a 20×20 matrix, which is denoted as the ECG transformation matrix (ECM).
[0113] Short-time Fourier transform (SFT) is implemented by converting the electrocardiogram (ECG) signal into a time-frequency spectrum. The process involves two steps: first, the ECG signal is divided into multiple short-time windows; then, a Fourier transform is performed on each short-time window to generate a two-dimensional time-frequency spectrum. This spectrum visually represents the amplitude and phase changes of the signal in both the time and frequency domains. A Hamming window is used, with a length of [missing information]. The overlap rate is To ensure that the extracted time-frequency matrix and the electrocardiogram transformation matrix have the same size, firstly... and We set the values to 39 and 20 respectively, thus obtaining a 39×20 STFT matrix. Since this matrix is symmetric about the middle row in the vertical direction, we remove the first 19 rows to eliminate redundant information. Finally, we obtain a 20×20 matrix, denoted as the time-frequency matrix. The two different two-dimensional representations obtained are the time-frequency matrix and the electrocardiogram transformation matrix.
[0114] Step 3: Use the first fine-grained scanning layer to segment the two-dimensional representations from different perspectives to obtain the local region of the first stage.
[0115] Furthermore, step 3 includes:
[0116] The first The lead-to-lead ECG conversion matrix and time-frequency matrix are respectively expressed as follows: and , ,in These represent the total number of ECM and TFS, respectively. This indicates the row number of the electrocardiogram conversion matrix and the time-frequency matrix. Indicates the number of columns in the electrocardiogram conversion matrix and the time-frequency matrix;
[0117] Using a 3×3 window, scan with a step size of 1. and Obtain image patches;
[0118] The image patches were then mean-corrected and reshaped into vector form, generating block vectors respectively. and ,in Indicates the size of the image patch;
[0119] Then, the ECM samples to be processed are generated by concatenating the block vectors. and TFS samples ECM samples The matrix form is TFS samples The matrix form is ;
[0120] The electrocardiogram conversion matrix and the total matrix of the video spectrogram are denoted as follows: , .
[0121] Step 4: Extract features from the local region of the first stage through a dual-view convolution stage to generate a preliminary feature matrix.
[0122] By constructing a dual-view convolutional stage that includes Independent Component Analysis (ICA) convolutional layers and Principal Component Analysis (PCA) convolutional layers, the... and The data is processed to obtain the feature blocks for the first stage. The core objective of principal component analysis is to select a set of uncorrelated variables that can effectively extract key discriminative information from the original data. Independent component analysis can extract independent source components from the electrocardiogram matrix through unmixing operations.
[0123] Furthermore, step 4 includes:
[0124] In the first branch, build Each principal component analysis filter is calculated. The principal component analysis filter parameters are calculated using the following formula:
[0125] ,
[0126] Among them, matrix It is a dataset The covariance matrix, Used to calculate the covariance matrix The former The eigenvectors corresponding to the largest eigenvalues This indicates mapping the feature vector to the previous one. A matrix, where PCA represents principal component analysis;
[0127] pass Principal component analysis filters extract features from the ECM matrix to obtain the first preliminary feature, which is represented as follows:
[0128] ,
[0129] in, Indicates the first The first feature block of the output feature block after ECM is filtered by principal component analysis. Each feature block In the i-th ECM, the first... * Input feature blocks, where * denotes convolution operation;
[0130] In the second branch, based on the covariance matrix Characteristic equation Extract the eigenvalue matrix C and the eigenvector matrix M;
[0131] The whitening matrix is calculated using the following formula:
[0132] ,
[0133] in, Indicates inclusion covariance matrix before The eigenvalue matrix with the largest eigenvalue. Indicates inclusion with the preceding The first eigenvalues corresponding to the largest eigenvalues The eigenvector matrix of eigenvectors;
[0134] Whitening matrix The orthogonal matrix B is obtained by estimation;
[0135] Following the principle of statistical independence, the source data S is estimated using the unmixing matrix D, and the calculation formula is as follows:
[0136] ,
[0137] The unmixing matrix D is calculated by multiplying the orthogonal matrix B and the eigenvalue matrix C, i.e., D = BC.
[0138] Build Each independent component analysis filter is calculated. The parameters of the independent component analysis filter are calculated using the following formula:
[0139] ,
[0140] Wherein, ICA stands for Independent Component Analysis; It is the total number of blocks;
[0141] pass Each independent component analysis filter extracts features from the matrix TFS, yielding a second preliminary feature, expressed as:
[0142] ,
[0143] in, Indicates the first The first TFS Input feature block.
[0144] Step 5: Use the second fine-grained scanning layer to segment the preliminary feature matrix to obtain the second-stage local region.
[0145] Furthermore, step 5 includes:
[0146] Scan with a 3×3 window and a step size of 1. and Image patches are generated, and then the image patches are mean-corrected and reshaped into vector form, resulting in block vectors. and block vectors ;
[0147] Then, through vector concatenation, the local image patches are sequentially concatenated into matrices, denoted as follows:
[0148] ,
[0149] ,
[0150] The second-stage electrocardiogram conversion matrix to be processed is obtained. ;
[0151] according to , and This will yield the second stage TFS to be processed. .
[0152] Step 6: Extract features from the local features of the second stage through an interleaved convolutional stage with independent component convolutional layers and principal component convolutional layers to generate the final feature matrix;
[0153] Furthermore, step 6 includes:
[0154] In the first branch, principal component analysis is used through functions and To each and PCA filter and Extract;
[0155] Next, regarding the first One TFS, PCA filter and Two components of the original data respectively and Convolution operations are performed to obtain the principal component analysis results. and , respectively represented as:
[0156] ,
[0157] ,
[0158] In the second branch, independent component analysis is used through functions. and , respectively and ICA filter and Extract;
[0159] Next, regarding the first One TFS, ICA filter and respectively with and Convolution operations are performed to obtain the independent component analysis results. and , respectively represented as:
[0160] ,
[0161] .
[0162] Step 7: Integrate all feature matrices through a fully connected layer to generate the final statistical histogram feature vector.
[0163] Furthermore, step 7 includes:
[0164] feature matrix , , and Convert to decimal matrix The conversion formula is:
[0165] ,
[0166] in, The function will return all elements in the feature matrix Convert to 0 or 1, the specific conversion method is expressed as:
[0167] ,
[0168] It is the middle decimal encoding matrix, which contains all Obtained by performing block histogram statistics and splicing ;
[0169] Next, using a size of The window with an overlap rate For decimal matrices The blocks are divided to obtain T blocks. ;
[0170] Then, all the first Secondary electrocardiogram All data were processed using the histogram statistical function hist(), and the corresponding relationships are as follows: ,in Indicates the first The feature vectors of the electrocardiograms are used as the feature vectors of the final statistical histogram.
[0171] Step 8: Evaluate the decision values of the generated statistical histogram feature vectors using a linear support vector machine (LSVM).
[0172] Due to eigenvectors Due to its sparsity and high dimensionality, the Support Vector Machine (SVM) with a linear kernel can quickly and efficiently process high-dimensional feature vectors. Histogram statistics are performed on all ECG cycle data points, and the function... Convert the raw electrocardiogram signal into a fixed-length feature vector. The LSVM model takes input features as input. The decision value is calculated using vectors. This decision value represents the distance and direction from the sample point to the classification hyperplane. The class to which the sample belongs is determined based on the sign and magnitude of the decision value.
[0173] To further illustrate the effectiveness and superiority of the method described in this invention, performance was verified using MATLAB 2023 software. The ECG dataset used was retrospectively collected from 2009 subjects at a medical school, including a control group with non-pre-excitation ECGs and patients with type A and type B pre-excitation ECGs. The experimental data covered 1404 healthy subjects, 259 type A patients, and 346 type B patients. In inter-patient experiments, the method of this invention achieved an overall accuracy of 95.21% in the classification of pre-excitation ECGs. This method integrates time-domain, time-spectral, and interleaved statistical features to construct a deep information extraction framework, effectively extracting dual-view interleaved statistical features, significantly improving the performance of abnormal ECG identification, and demonstrating excellent robustness to data imbalance and multi-level, multi-type noise. Its effectiveness was evaluated through multi-dimensional experiments, including inter-patient and intra-patient comparative experiments, to ensure that the method has the potential to assist in the diagnosis of pre-excitation ECGs. The dataset is from a wide range of sources, covering different populations, with high data quality and strong generalization ability. After comprehensive evaluation, it was found that lead V1 in the standard 12-lead electrocardiogram (ECG) showed the best classification performance for the left and right atrioventricular valve annulus. To verify the experimental performance, datasets A and B were constructed based on intra-patient and inter-patient paradigms, respectively. In the intra-patient paradigm, a portion of the ECG data from each patient was used as the training set, and the remaining data was used as the test set to verify the method's ability to monitor ECGs of specific individuals and achieve personalized diagnosis. The A group constructed in this invention includes groups A1 and A2. Group A1 contains non-pre-excitation ECGs and pre-excitation ECGs, while group A2 contains non-pre-excitation ECGs, type A, and type B pre-excitation ECGs, respectively, to verify the recognition and classification performance of pre-excitation ECGs. In the inter-patient paradigm, ECG data from a portion of patients were used as the training set, and the remainder as the test set to verify the method's generalization ability to data from patients without access to the test set. Test sets B1 and B2 were constructed to evaluate the recognition and classification performance of pre-excitation ECGs, respectively.
[0174] Figure 2 The following are examples of electrocardiograms (ECGs) in lead V1 according to the present invention. Figure (a) shows a non-pre-excitation ECG, Figure (b) shows an example of a type A pre-excitation ECG, and Figure (c) shows an example of a type B pre-excitation ECG. As can be seen from the figures, the ECG manifestations of the non-pre-excitation ECG case are significantly different from those of the type A pre-excitation ECG, but the difference from the type B pre-excitation ECG pattern is only negligible. Table 1 shows the optimal parameters of the method proposed in this invention.
[0175] Table 1 Optimal parameters of the method described in this invention
[0176]
[0177] Tables 2 and 3 present the identification results of non-pre-excited ECGs and pre-excited ECGs, respectively, in in-patient experiments. Among all 12-lead ECGs, lead V1 ECGs showed the most significant changes during pre-excitation. Therefore, the performance of the algorithm in identifying and classifying pre-excited ECGs was primarily evaluated by analyzing lead V1 ECGs. Table 2 shows that all ECGs were correctly classified. Table 3 shows that only 0.13% of ECGs were misclassified. Specifically, the identification accuracy of non-pre-excited ECGs reached 100%, and the identification accuracy of type A and type B pre-excited ECGs was as high as 99.48%. Furthermore, the precision (PPV), specificity (SPE), and F1 score for all categories exceeded 99.5%. In conclusion, these results demonstrate that the proposed method can accurately identify and classify pre-excited ECGs in in-patient experiments.
[0178] Table 2. Classification effect of the present invention on non-pre-excitation and pre-excitation electrocardiograms in patients.
[0179]
[0180] Table 3. Classification effect of the present invention on non-pre-excitation electrocardiograms, type A and type B pre-excitation electrocardiograms in patients.
[0181]
[0182] Tables 4 and 5 present the experimental results of classifying unexcited and excited ECGs in a cross-patient trial, as well as the identification results of excited ECGs. Table 4 shows that 95.61% of the ECGs were correctly identified, with a misclassification rate of only 4.39%. Regarding the classification of excited ECGs, the effective identification rate reached 92.78%, with accuracy (PPV) and specificity (SPE) reaching 95.71% and 97.38%, respectively. From the F1 score, the identification rates of both unexcited and excited ECGs exceeded 94%. These results indicate that the proposed method can effectively distinguish excited ECGs in mixed ECGs in a cross-patient trial.
[0183] Table 4. Classification effect of the present invention on non-pre-excitation and pre-excitation electrocardiograms among patients.
[0184]
[0185] As shown in Table 5, the overall accuracy (OA) reached 95.21%. For the identification of type A pre-excitation ECGs, the recall rate (SEN), precision rate (PPV), and F1 score were 93.19%, 94.05%, and 93.62%, respectively. For the identification of type B pre-excitation ECGs, although... Figure 2The waveforms of the unexcited ECG and the type B excitation ECG are relatively similar, but the PPV and F1 score still reach 95.34% and 92.18%, respectively. In addition, the specificity (SPE) of both type A and type B excitation ECGs exceeds 98%.
[0186] In summary, the method described in this invention performs excellently in pre-excitation electrocardiogram classification in cross-patient experiments.
[0187] Table 5. Classification effect of the present invention on non-pre-excitation electrocardiograms, type A and type B pre-excitation electrocardiograms among patients.
[0188]
[0189] The method described in this invention is referred to as the TVSI-Net model. Figure 3 The t-SNE visualization results of the decision values of the TVSI-Net model and the original data are presented. Figure (a) is a scatter plot based on the original data of group A2, Figure (b) is a scatter plot based on the TVSI-Net of group A2, Figure (c) is a scatter plot based on the original data of group B2, and Figure (d) is a scatter plot based on the TVSI-Net of group B2. Figures (a) and (c) show that there is significant overlap in the decision values of pre-excitation ECGs in both intra-patient and inter-patient experiments, with most samples failing to form independent clusters. In contrast, Figures (b) and (d) show that the samples exhibit good clustering effects under non-pre-excitation ECG, type A, and type B pre-excitation ECG conditions. Although some overlap still exists in the inter-patient experiments, the separation is significantly improved compared to Figure (c). These t-SNE visualization results demonstrate the significant advantages of the method described in this invention for the identification and classification of pre-excitation ECGs.
[0190] Figure 4 , Figure 5 The results of the performance test of the method described in this invention in processing multi-type, multi-level noise electrocardiogram waves are presented. Figure 4 The following are the ECG waveforms of lead V1 with the addition of a 50Hz random initial phase sine function and power frequency interference and Gaussian noise generated by the awgn function in Matlab 2023. In Figures (a), (b), (c), (d), and (e), power frequency noise with a signal-to-noise ratio (SNR) of ∞dB, 30dB, 24dB, 18dB, and 12dB is added, respectively. In Figures (f), (g), (h), (i), and (j), Gaussian noise with an SNR of ∞dB, 30dB, 24dB, 18dB, and 12dB is added, respectively. Figure 5Figure 1 shows the accuracy curves of electrocardiogram (ECG) classification under various types and levels of noise environments according to this invention. Figure 2 shows the classification results of ECGs containing power frequency noise in groups A1-2 and B1-2, and Figure 3 shows the classification accuracy of ECGs containing Gaussian noise in groups A1-2 and B1-2. Figure 4 As shown in Figures (a) to (e), when the signal-to-noise ratio is 12 dB, although the ECG waveform is severely affected by power frequency noise, from... Figure 5 It can be seen that recognition accuracy rates of 100%, 99.01%, 95.04%, and 94.73% were achieved in groups A1-2 and B1-2, respectively, only slightly lower than the classification accuracy rate of noise-free ECG waves. For Gaussian noise ECG waves, the waveform became difficult to identify when the SNR dropped to 18dB. When the SNR further dropped to 12dB, the ECG waveform features could no longer be distinguished by the naked eye. However, as... Figure 5 As shown in (b), when the SNR drops to 12 dB, the recognition accuracy of groups A1 and A2 is almost unaffected, indicating that Gaussian noise has minimal impact on the pre-excitation ECG recognition and classification performance of the method described in this invention in patient experiments. When the Gaussian noise content in the ECG increases, the accuracy of groups B1-B2 decreases significantly. However, at an SNR of 12 dB, the method still maintains approximately 80% accuracy. In summary, the method described in this invention exhibits a certain degree of robustness to noise and demonstrates superior resistance to power frequency noise interference compared to Gaussian noise.
[0191] Figure 6 Example of an ECG signal with baseline drift. Figure 7 The histograms show the distribution of baseline drift on electrocardiograms at different signal-to-noise ratios. Figure 8 The classification accuracy of this invention between the original electrocardiogram and the baseline drift electrocardiogram is [not specified]. Figure 8 The baseline drift in the data was generated using a sine function in Matlab 2023b. The signal-to-noise ratio (SNR) values for each ECG were randomly distributed within the range of [-10, 17]. Figure 8 It can be seen that in all experimental groups, the difference in accuracy between distinguishing the original ECG signal and the baseline-drifted ECG signal is less than 1%. In particular, in groups A1 and A2, the classification accuracy of the original ECG signal and the noisy ECG signal is extremely close.
[0192] This invention provides a method for identifying and classifying pre-excitation electrocardiograms based on a dual-view statistical interleaving network. Many methods and approaches exist for implementing this technical solution; the above description is merely a preferred embodiment of the invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this invention, and these improvements and modifications should also be considered within the scope of protection of this invention. All components not explicitly stated in this embodiment can be implemented using existing technologies.
Claims
1. A method for identifying and classifying pre-excitation electrocardiograms based on dual-view statistical interleaving networks, characterized in that, Includes the following steps: Step 1: Preprocess the electrocardiogram (ECG) signal by cutting the long-term ECG signal into a single cycle and converting it into a standardized ECG signal; Step 2: The standardized electrocardiogram signal is converted into two two-dimensional representations from two different perspectives through reshaping operation and short-time Fourier transform, respectively. Step 3: Use the first fine-grained scanning layer to segment the two-dimensional representation from different viewpoints to obtain the local region of the first stage; Step 4: Extract features from the local region of the first stage through a dual-view convolution stage to generate a preliminary feature matrix; Step 5: Use the second fine-grained scanning layer to segment the preliminary feature matrix to obtain the second-stage local region; Step 6: Extract features from the local features of the second stage through an interleaved convolutional stage with independent component convolutional layers and principal component convolutional layers to generate the final feature matrix; Step 7: Integrate all feature matrices through a fully connected layer to generate the final statistical histogram feature vector; Step 8: Evaluate the decision values of the generated statistical histogram feature vectors using a linear support vector machine.
2. The method for identifying and classifying pre-excitation electrocardiograms based on dual-view statistical interleaving networks according to claim 1, characterized in that, Step 2 includes: In the first branch, the standardized electrocardiogram signal is segmented into Divide into equal parts and then reassemble them into The matrix is used to obtain the electrocardiogram conversion matrix, denoted as ECM; In the second branch, the standardized electrocardiogram signal is subjected to a short-time Fourier transform to generate a two-dimensional time-frequency spectrum, represented as follows: , in, Represents the short-time Fourier transform. Represents standardized electrocardiogram signals. Represents the integral variable. Represents the real number field. It is a window function. At the moment the window is at its center, the length of the window is... The overlap rate is ; Represents the imaginary unit. Indicates angular frequency; Two-dimensional time spectrum diagram is of Matrix, for this Before matrix removal row element, get a The time-frequency matrix is denoted as TFSs.
3. The method for identifying and classifying pre-excitation electrocardiograms based on dual-view statistical interleaving networks according to claim 2, characterized in that, Step 3 includes: The first The lead-to-cardiogram conversion matrix and time-frequency matrix are respectively expressed as follows: and , ,in These represent the total number of ECM and TFS, respectively. This indicates the row number of the electrocardiogram conversion matrix and the time-frequency matrix. Indicates the number of columns in the electrocardiogram conversion matrix and the time-frequency matrix; Scan using windows separately and Obtain image patches; The image patches were then mean-corrected and reshaped into vector form, generating block vectors respectively. and ,in Indicates the size of the image patch; Then, the ECM samples to be processed are generated by concatenating the block vectors. and TFS samples ECM samples The matrix form is TFS samples The matrix form is ; The electrocardiogram conversion matrix and the total matrix of the video spectrogram are denoted as follows: , .
4. The pre-excitation electrocardiogram recognition and classification method based on dual-view statistical interleaving network according to claim 3, characterized in that, Step 4 includes: In the first branch, build Each principal component analysis filter is calculated. The principal component analysis filter parameters are calculated using the following formula: , Among them, matrix It is a dataset The covariance matrix, Used to calculate the covariance matrix The former The eigenvectors corresponding to the largest eigenvalues This indicates mapping the feature vector to the previous one. A matrix, where PCA represents principal component analysis; pass Principal component analysis filters extract features from the ECM matrix to obtain the first preliminary feature, which is represented as follows: , in, Indicates the first The first feature block of the output feature block after ECM is filtered by principal component analysis. Each feature block In the i-th ECM, the first... * Input feature blocks, where * indicates convolution operation; In the second branch, based on the covariance matrix Characteristic equation Extract the eigenvalue matrix C and the eigenvector matrix M; The whitening matrix is calculated using the following formula: , in, Indicates inclusion covariance matrix before The eigenvalue matrix with the largest eigenvalue. Indicates inclusion with the preceding The first eigenvalues corresponding to the largest eigenvalues The eigenvector matrix of eigenvectors; Whitening matrix The orthogonal matrix B is obtained by estimation; Following the principle of statistical independence, the source data S is estimated using the unmixing matrix D, and the calculation formula is as follows: , The unmixing matrix D is calculated by multiplying the orthogonal matrix B and the eigenvalue matrix C, i.e., D = BC. Build Each independent component analysis filter is calculated. The parameters of the independent component analysis filter are calculated using the following formula: , Wherein, ICA stands for Independent Component Analysis; pass Each independent component analysis filter extracts features from the matrix TFS, yielding a second preliminary feature, expressed as: , in, Indicates the first The first TFS Input feature block.
5. The pre-excitation electrocardiogram recognition and classification method based on dual-view statistical interleaving network according to claim 4, characterized in that, Step 5 includes: Using window scanning and Image patches are generated, and then the image patches are mean-corrected and reshaped into vector form, resulting in block vectors. and block vectors ; Then, through vector concatenation, the local image patches are sequentially concatenated into matrices, denoted as follows: , , The second-stage electrocardiogram conversion matrix to be processed is obtained. ; according to , and This will yield the second stage TFS to be processed. .
6. The pre-excitation electrocardiogram recognition and classification method based on dual-view statistical interleaving network according to claim 5, characterized in that, Step 6 includes: In the first branch, principal component analysis is used through functions and To each and PCA filter and Extract; Next, regarding the first One TFS, PCA filter and Two components of the original data respectively and Convolution operations are performed to obtain the principal component analysis results. and , respectively represented as: , , In the second branch, independent component analysis is used through functions. and , respectively and ICA filter and Extract; Next, regarding the first One TFS, ICA filter and respectively with and Convolution operations are performed to obtain the independent component analysis results. and , respectively represented as: , 。 7. The method for identifying and classifying pre-excitation electrocardiograms based on dual-view statistical interleaving networks according to claim 6, characterized in that, Step 7 includes: feature matrix , , and Convert to decimal matrix The conversion formula is: , in, The function will return all elements in the feature matrix Convert to 0 or 1, the specific conversion method is expressed as: , It is the middle decimal encoding matrix, which contains all Obtained by performing block histogram statistics and splicing ; Next, using a size of The window with an overlap rate For decimal matrices The blocks are divided to obtain T blocks. ; Then, all the first Secondary electrocardiogram All data were processed using the histogram statistical function hist(), and the corresponding relationships are as follows: ,in Indicates the first The feature vectors of the electrocardiograms are used as the feature vectors of the final statistical histogram.
8. The method for identifying and classifying pre-excitation electrocardiograms based on dual-view statistical interleaving networks according to any one of claims 1 to 7, characterized in that, Step 1 includes: Acquire electrocardiogram signals and locate the R wave. Using the R point as a reference point, take the left side... [Sampling points, taken on the right side] Each sampling point is integrated into a sample that includes point R. A single-cycle electrocardiogram at each sampling point; among which It is a natural number, and ; The minimum-maximum normalization method is used to normalize the amplitude range of each electrocardiogram to between 0 and 1, resulting in a standardized electrocardiogram signal. The formula is as follows: , in, This represents the value of the sampling point in the electrocardiogram cycle. and These represent the minimum and maximum values of the sampling points within the period, respectively.