Arrhythmia classification method for electrocardiosignal and apparatus, device and medium thereof
By using frequency adaptive normalization and topology transformation of the arrhythmia classification network model, combined with a width learning structure, and fusing periodic temporal features and topological features, the problem of insufficient classification accuracy of ECG signals in complex noise environments is solved, and high-precision arrhythmia classification is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JILIN UNIVERSITY
- Filing Date
- 2026-04-21
- Publication Date
- 2026-07-21
AI Technical Summary
Existing technologies lack sufficient accuracy in classifying and identifying arrhythmias in ECG signals under complex noise environments, and lack effective characterization of the periodic patterns and topological structures of ECG signals, making it difficult to adapt to complex signals under different patient and sampling conditions.
A cardiac arrhythmia classification network model is adopted, including a first feature extraction branch, a second feature extraction branch, a feature fusion module, and a width learning system. By performing frequency adaptive normalization, period detection, and topological transformation on the electrocardiogram signal, and combining the width learning structure, the periodic temporal features and topological features are fused to achieve multi-scale representation.
It significantly improves the accuracy of arrhythmia classification and recognition in complex noisy environments, and enhances the robustness and generalization ability of the model.
Smart Images

Figure CN122087563B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent recognition and classification technology of electrocardiogram (ECG) signals, and in particular to a method, apparatus, device, and medium for classifying arrhythmias in ECG signals. Background Technology
[0002] Electrocardiogram (ECG) signals are important physiological signals reflecting the electrical activity of the heart and are widely used in the clinical diagnosis of arrhythmias, myocardial ischemia, and other heart diseases. With the rapid development of wearable devices, mobile healthcare, and remote monitoring technologies, the automated analysis and recognition of massive ECG signals has become an important research direction in intelligent healthcare. How to achieve high-precision automatic arrhythmia recognition under different signal-to-noise ratios and complex interference conditions is currently a research hotspot in the field of intelligent ECG analysis.
[0003] Currently, methods for classifying arrhythmias in ECG signals mainly fall into two categories: traditional machine learning methods and deep learning methods. Traditional methods typically rely on feature extraction processes designed with expert experience, such as time-domain statistical features, frequency-domain power spectrum features, wavelet decomposition coefficients, RR interval change rate, and morphological parameters. Subsequently, classification algorithms such as Support Vector Machine (SVM), K-Nearest Neighbors (KNN), and Random Forest (RF) are used to distinguish different types of arrhythmias. Although these methods are relatively simple to implement, they are highly dependent on the selection and quality of manually chosen features, sensitive to noise, and have weak generalization performance, making them difficult to adapt to complex signals from different patients and under different sampling conditions. In recent years, deep learning methods have made significant progress in ECG signal recognition. Convolutional Neural Networks (CNNs) can automatically extract spatial local features of ECG waveforms, Recurrent Neural Networks (RNNs) and their variants (such as LSTM and GRU) can capture long-term and short-term dependencies in time series, while Temporal Convolutional Networks (TCNs) perform well in extracting multi-scale temporal features. These methods have achieved high classification accuracy on public databases (such as the MIT-BIH Arrhythmia Database). However, in practical applications, ECG signals are often subject to various noise interferences, including baseline drift, electrode motion artifacts (EMI), and electromyographic interference (EMG). These noises are non-stationary and nonlinear, which can distort the temporal features learned by the model, thus significantly reducing classification performance and robustness. Therefore, how to further improve the accuracy of arrhythmia classification and recognition of ECG signals in complex noisy environments is a pressing technical problem that needs to be solved. Summary of the Invention
[0004] This application aims to address at least one of the technical problems existing in the prior art. To this end, this application proposes a method, apparatus, device, and medium for classifying arrhythmias in electrocardiogram (ECG) signals, which can improve the accuracy of arrhythmia classification and identification in complex noise environments.
[0005] In a first aspect, embodiments of this application provide a method for classifying arrhythmias in electrocardiogram signals, including: An arrhythmia classification network model is obtained by training a model based on a target signal dataset. The arrhythmia classification network model includes: a first feature extraction branch, a second feature extraction branch, a feature fusion module, and a width learning system. The target signal dataset is obtained by adding muscle artifact noise of different noise levels to normal electrocardiogram signals. The acquired first ECG signal dataset to be tested is preprocessed to obtain a second ECG signal dataset; wherein, the second ECG signal dataset includes multiple target ECG signals; After inputting the second electrocardiogram (ECG) signal dataset into the arrhythmia classification network model, the first feature extraction branch is used to perform first feature extraction processing on the second ECG signal dataset to obtain target periodic time features; simultaneously, the second feature extraction branch is used to perform second feature extraction processing on the second ECG signal dataset to obtain topological features. The feature fusion module combines the target periodic temporal features and the topological features to obtain a fused feature. The fused features are classified and identified using the width learning system to obtain the arrhythmia classification and identification results.
[0006] Secondly, embodiments of this application provide an arrhythmia classification device for electrocardiogram signals, including at least one processor and a memory for communicatively connecting to the at least one processor; the memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to perform the arrhythmia classification method for electrocardiogram signals as described in any of the embodiments of the first aspect.
[0007] Thirdly, embodiments of this application provide an electronic device including a cardiac arrhythmia classification device for electrocardiogram signals as described in the second aspect embodiment.
[0008] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions for causing a computer to perform the arrhythmia classification method for electrocardiogram signals as described in any of the embodiments of the first aspect.
[0009] This application embodiment includes the following steps: In the process of classifying arrhythmias in electrocardiogram (ECG) signals, firstly, an arrhythmia classification network model is obtained by training a target signal dataset; wherein, the arrhythmia classification network model includes: a first feature extraction branch, a second feature extraction branch, a feature fusion module, and a width learning system; the target signal dataset is obtained by adding muscle artifact noise of different noise levels to normal ECG signals; secondly, the acquired first ECG signal dataset to be tested is preprocessed to obtain a second ECG signal dataset; wherein, the second ECG signal dataset includes multiple target ECG signals; then, after inputting the second ECG signal dataset into the arrhythmia classification network model, the first feature extraction branch performs first feature extraction processing on the second ECG signal dataset to obtain target periodic temporal features; simultaneously, the second feature extraction branch performs second feature extraction processing on the second ECG signal dataset to obtain topological features; then, the feature fusion module concatenates and fuses the target periodic temporal features and the topological features to obtain fused features; finally, the width learning system performs classification and recognition processing on the fused features to obtain the arrhythmia classification and recognition result. In the process of identifying labeled and noisy ECG signal datasets using an arrhythmia classification network model, multi-scale representation of complex ECG signals is achieved by fusing topological features and target periodic temporal features. Simultaneously, the combination of a wide learning structure effectively enhances the model's robustness and generalization ability, significantly improving the recognition accuracy under multi-level noise conditions. In other words, it can improve the accuracy of arrhythmia classification and recognition of ECG signals in complex noise environments. That is to say, the embodiments of this application can improve the accuracy of arrhythmia classification and recognition of ECG signals in complex noise environments.
[0010] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the description and the accompanying drawings. Attached Figure Description
[0011] Figure 1 This is a flowchart illustrating a method for classifying arrhythmias in electrocardiogram signals according to an embodiment of this application. Figure 2 This is a schematic diagram of the training process using a topological periodic fusion model provided in one embodiment of this application; Figure 3 This is a schematic diagram of the specific process of frequency adaptive normalization processing provided in one embodiment of this application; Figure 4 This is a schematic diagram of the specific process of periodic detection processing provided in one embodiment of this application; Figure 5This is a schematic diagram illustrating the specific process of extracting topological features according to an embodiment of this application; Figure 6 This is a schematic diagram of electrocardiogram signal classification based on a width learning system provided in one embodiment of this application; Figure 7 This is a schematic diagram of the hardware structure of a cardiac arrhythmia classification device for electrocardiogram signals provided in one embodiment of this application. Detailed Implementation
[0012] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments.
[0013] It should be noted that although a logical order is shown in the flowcharts in this application, in some cases, the steps shown or described may be performed in a different order than that shown in the flowcharts. In the description of this application, "several" means one or more, and "more" means two or more. The terms "first" and "second" are used only to distinguish technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of technical features indicated, or implicitly indicating the order in which the technical features are indicated.
[0014] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0015] Currently, methods for classifying arrhythmias in ECG signals mainly fall into two categories: traditional machine learning methods and deep learning methods. Traditional methods typically rely on feature extraction processes designed with expert experience, such as time-domain statistical features, frequency-domain power spectrum features, wavelet decomposition coefficients, RR interval change rate, and morphological parameters. Subsequently, classification algorithms such as Support Vector Machine (SVM), K-Nearest Neighbors (KNN), and Random Forest (RF) are used to distinguish different types of arrhythmias. Although these methods are relatively simple to implement, they are highly dependent on the selection and quality of manually chosen features, sensitive to noise, and have weak generalization performance, making them difficult to adapt to complex signals from different patients and under different sampling conditions. In recent years, deep learning methods have made significant progress in ECG signal recognition. Convolutional Neural Networks (CNNs) can automatically extract spatial local features of ECG waveforms, Recurrent Neural Networks (RNNs) and their variants (such as LSTM and GRU) can capture long-term and short-term dependencies in time series, while Temporal Convolutional Networks (TCNs) perform well in extracting multi-scale temporal features. These methods have achieved high classification accuracy on public databases (such as the MIT-BIH Arrhythmia Database). However, in practical applications, ECG signals are often subject to various noise interferences, including baseline drift, electrode motion artifacts (EMI), and electromyographic interference (EMG). These noises are non-stationary and nonlinear, which can distort the temporal features learned by the model, thereby significantly reducing classification performance and robustness.
[0016] In summary, the existing technologies still have the following shortcomings: (1) Under strong noise or low signal-to-noise ratio conditions, the time-series feature extraction module is easily affected by artifacts, resulting in a significant decrease in recognition accuracy; (2) There is a lack of joint characterization of the periodicity and topology of ECG signals, making it impossible to fully utilize the dynamic change information between different ECG cycles; (3) Existing methods have not established an efficient feature fusion mechanism, making it difficult to achieve effective coordination between time-series, periodic and topological features.
[0017] Based on this, this application provides a method for classifying arrhythmias in electrocardiogram (ECG) signals, a device for classifying arrhythmias in ECG signals, an electronic device, and a computer-readable storage medium, relating to the field of intelligent ECG signal recognition and classification technology, which can improve the accuracy of arrhythmia classification and recognition of ECG signals in complex noise environments.
[0018] The embodiments of this application will be further described below with reference to the accompanying drawings.
[0019] Firstly, such as Figure 1 As shown, the arrhythmia classification method for ECG signals may include, but is not limited to, steps S100 to S500.
[0020] Step S100: Based on the target signal dataset, a cardiac arrhythmia classification network model is obtained through model training; wherein, the cardiac arrhythmia classification network model includes: a first feature extraction branch, a second feature extraction branch, a feature fusion module, and a width learning system; the target signal dataset is obtained by adding muscle artifact noise of different noise levels to normal electrocardiogram signals.
[0021] Step S200: Perform data preprocessing on the acquired first ECG signal dataset to be tested to obtain a second ECG signal dataset; wherein, the second ECG signal dataset includes multiple target ECG signals.
[0022] Step S300: After inputting the second ECG signal dataset into the arrhythmia classification network model, the first feature extraction branch is used to perform first feature extraction processing on the second ECG signal dataset to obtain the target periodic time features; at the same time, the second feature extraction branch is used to perform second feature extraction processing on the second ECG signal dataset to obtain topological features.
[0023] Step S400: The target periodic time features and topological features are spliced and fused together by the feature fusion module to obtain the fused features.
[0024] Step S500: The fused features are classified and identified using a width learning system to obtain the arrhythmia classification and identification results.
[0025] Through steps S100 to S500, the embodiments of this application include: in the process of classifying arrhythmias in electrocardiogram (ECG) signals, firstly, an arrhythmia classification network model is obtained based on a target signal dataset through model training; wherein, the arrhythmia classification network model includes: a first feature extraction branch, a second feature extraction branch, a feature fusion module, and a width learning system; the target signal dataset is obtained by adding muscle artifact noise of different noise levels to normal ECG signals; secondly, the acquired first ECG signal dataset to be tested is preprocessed to obtain a second ECG signal dataset; wherein, the second... The ECG signal dataset includes multiple target ECG signals. Next, a second ECG signal dataset is input into the arrhythmia classification network model. Through a first feature extraction branch, the second ECG signal dataset undergoes first feature extraction processing to obtain target periodic temporal features. Simultaneously, through a second feature extraction branch, the second ECG signal dataset undergoes second feature extraction processing to obtain topological features. Then, through a feature fusion module, the target periodic temporal features and topological features are concatenated and fused to obtain fused features. Finally, through a width learning system, the fused features are classified and recognized to obtain the arrhythmia classification and recognition result. In the process of recognizing labeled and noisy ECG signal datasets through the arrhythmia classification network model, the fusion of topological features and target periodic temporal features achieves multi-scale representation of complex ECG signals. Simultaneously, the combination of a width learning structure effectively enhances the model's robustness and generalization ability, significantly improving the recognition accuracy under multi-level noise conditions, i.e., it can improve the arrhythmia classification and recognition accuracy of ECG signals in complex noise environments. Therefore, the embodiments of this application can improve the arrhythmia classification and recognition accuracy of ECG signals in complex noise environments.
[0026] Further, steps S100 to S500 of the embodiments of this application will be described as follows.
[0027] Understandably, before using the arrhythmia classification network model to identify electrocardiogram signals, it is necessary to train the model to obtain the arrhythmia classification network model.
[0028] According to some embodiments of this application, step S110 is further described, wherein the arrhythmia classification network model is obtained by model training based on the target signal dataset, including but not limited to steps S111 to S113.
[0029] Step S111: Divide the obtained target signal dataset into a training set and a test set.
[0030] In this step, muscle artifact noise of different levels, ranging from -6dB to 24dB, is added to all collected normal ECG signals, and the signals are labeled according to the arrhythmia categories of different heartbeats to obtain the target signal dataset. Then, the target signal dataset is divided into training and testing sets to lay the data foundation for subsequent model training.
[0031] Step S112: Input the training set into the topological periodic fusion model for training to obtain the arrhythmia classification network model.
[0032] In this step, a pre-defined topological periodic fusion model is used to train all training sets to obtain an arrhythmia classification network model.
[0033] like Figure 2 As shown, the topological periodic fusion model includes a first feature extraction branch, a second feature extraction branch, and a width learning system. The first feature extraction branch is used for frequency adaptive normalization and period detection, while the second feature extraction branch is used for topological transformation. The specific process of training the topological periodic fusion model by inputting the training set is as follows: the training set sample data is input into the two branches respectively. The first feature extraction branch first performs frequency adaptive normalization, adaptively normalizing the training set sample data according to the frequency characteristics to adapt to subsequent processing. The normalized training set sample data enters the period detection step to obtain the target periodic temporal features. The second feature extraction branch performs topological transformation on the training set sample data to obtain topological features. The target periodic temporal features and topological features obtained from the two branches are concatenated and fused before being input into the width learning system, finally outputting the cardiovascular disease classification result. After multiple iterations of training, an arrhythmia classification network model is obtained.
[0034] Step S113: Input the test set into the arrhythmia classification network model for testing and verification, and determine the final arrhythmia classification network model.
[0035] In this step, the performance of the arrhythmia classification network model is tested and verified using a test set to obtain the final arrhythmia classification network model for application.
[0036] Through steps S111 to S113, an arrhythmia classification network model is trained to facilitate the application of the arrhythmia classification network model to classify and identify arrhythmias in electrocardiogram signals.
[0037] The arrhythmia classification network model includes: a first feature extraction branch, a second feature extraction branch, a feature fusion module, and a width learning system; the first feature extraction branch includes: a frequency adaptive normalization module, a period detection module, a time block module, and a fully connected layer; the second feature extraction branch includes: a topology transformation module; the width learning system includes: a feature node layer and an enhancement node layer.
[0038] According to some embodiments of this application, step S200 is further described. Step S200: Data preprocessing is performed on the acquired first ECG signal dataset to be tested to obtain a second ECG signal dataset, including but not limited to steps S210 to S230.
[0039] Step S210: Label the initial ECG signals according to the arrhythmia categories using classification labels to obtain labeled ECG signals.
[0040] Specifically, the classification labels mentioned in step S210 and step S111 above include: non-ectopic heartbeats; supraventricular ectopic heartbeats; ventricular ectopic heartbeats; fused heartbeats; unknown heartbeats; one of the classification labels is used to label the signals, thereby realizing the classification of various types of electrocardiogram signals.
[0041] Step S220: Add muscle artifact noise of different noise levels to each labeled ECG signal to obtain multiple noisy ECG signals.
[0042] Step S230: Combine multiple noisy target ECG signals into a second ECG signal dataset.
[0043] In this step, the second ECG signal dataset includes multiple target ECG signals.
[0044] Data preprocessing is completed through steps S210 to S230 to facilitate subsequent identification.
[0045] According to some embodiments of this application, step S300 is further described, wherein the target periodic time features are obtained by performing a first feature extraction process on the second electrocardiogram signal dataset through a first feature extraction branch, including but not limited to steps S310 to S340.
[0046] Step S310: The target ECG signal in the second ECG signal dataset is subjected to frequency adaptive normalization processing through the frequency adaptive normalization module to obtain the normalized ECG signal.
[0047] In this step, frequency adaptive normalization processing is implemented through a frequency adaptive normalization module. This module is used to perform local frequency normalization processing on the input signal, and suppresses non-stationarity through adaptive filtering and frequency band normalization mechanisms, thereby improving the stability of feature extraction.
[0048] Step S320: The normalized electrocardiogram signal is processed by the period detection module to obtain multiple period segments, and the multiple period segments are rearranged in two dimensions to obtain rearranged signals.
[0049] According to some embodiments of this application, step S320 is further described, wherein the normalized electrocardiogram signal is subjected to period detection processing to obtain multiple period segments, and the multiple period segments are subjected to two-dimensional rearrangement processing to obtain rearranged signals, including but not limited to steps S321 to S323.
[0050] Step S321: Determine the dominant cycle length of the normalized ECG signal based on the autocorrelation function or peak detection method.
[0051] Step S322: Divide the normalized ECG signal into multiple cycle segments according to the dominant cycle length.
[0052] Step S323: Perform two-dimensional rearrangement of each periodic segment according to the time dimension and the feature dimension to obtain the rearranged signal of the two-dimensional matrix structure.
[0053] It is understandable that, through steps S321 to S323, the normalized ECG signal is divided into K period segments (i.e., sub-period segments) based on the dominant period length, and the K period segments are rearranged based on the time dimension and feature dimension to obtain a rearranged signal with a two-dimensional matrix structure, so as to facilitate subsequent time-series feature extraction.
[0054] Step S330: The time block module is used to extract the time sequence features of the rearranged signal to obtain the sub-time sequence features of each period segment.
[0055] Specifically, in this step, the temporal feature extraction process refers to multi-scale convolution operation. The time block module performs multi-scale convolution operation on the rearranged signal after two-dimensional rearrangement to extract the local and global temporal features of the electrocardiogram signal.
[0056] Step S340: The sub-temporal features of each period segment are weighted and fused through a cross-period aggregation mechanism, and the target period temporal features are obtained after passing through a fully connected layer.
[0057] Specifically, the cross-period aggregation mechanism is used to weightedly fuse sub-temporal features from different period segments. The fused output is then transformed through a fully connected layer to obtain the target periodic temporal features. It is understandable that the weights used in the weighted fusion process can be dynamically adjusted based on the correlation or energy distribution between the sub-temporal features of each period segment.
[0058] The target periodic time series features are obtained through steps S310 to S340, laying the data foundation for subsequent feature fusion.
[0059] Combination Figure 3 Here is an example to illustrate the specific steps and flow of frequency adaptive normalization processing in step S310.
[0060] Step S301: Input the data to be processed. In the model training phase, the data to be processed refers to the training set data; in the model application phase, the data to be processed refers to the actual signal to be measured (i.e., the second electrocardiogram signal data).
[0061] Step S302: Perform time-domain normalization. Specifically, perform time-domain normalization on the data to be processed using Z-score normalization. The calculation formula is as follows: ; in, This represents the input data to be processed. This represents the mean of the training set samples. This represents the standard deviation of the training set samples.
[0062] Step S303: Perform Fourier transform. Specifically, the normalized signal obtained in step S302 is transformed from the time domain to the frequency domain using discrete Fourier transform to obtain the frequency domain signal.
[0063] Step S304: Perform frequency channel attention processing. Specifically, apply a channel attention mechanism to each frequency channel of the frequency domain signal. The formula for calculating the attention weight of each channel is as follows: ; Attention weight Signals corresponding to the frequency channel Multiplying them together yields the weighted frequency domain signal, calculated using the following formula: .
[0064] Step S305: Perform frequency domain weighted filtering. Specifically, the signal after attention processing in the frequency channel (i.e., the weighted frequency domain signal) is weighted and filtered to obtain the weighted filtered signal. The intensity of each frequency component is further adjusted to suppress noise and irrelevant frequencies and highlight key frequency characteristics.
[0065] Step S306: Perform inverse Fourier transform. Specifically, the inverse Fourier transform is used to convert the weighted and filtered signal from the frequency domain back to the time domain to obtain the time domain signal.
[0066] Step S307: Output. That is, output the time-domain normalized ECG signal obtained in step S306.
[0067] Combination Figure 4 Here is an example to illustrate the specific steps and flow of the periodic detection process in step S320.
[0068] Step S401: Input frequency domain adaptive normalization output sample. Specifically, the adaptive normalization output sample refers to the normalized electrocardiogram signal.
[0069] Step S402: Perform periodicity detection. Specifically, perform periodicity detection on the adaptively normalized output samples and output the K detected periodicity parameters. .
[0070] Step S403: Split into K branches. The frequency domain adaptive normalized output samples are split into K parallel processing branches. Each branch Corresponding to a cycle Furthermore, the data within the branch represents the sample within the period. The set of subsequences under constraints (i.e., periodic segments).
[0071] Step S404: Perform two-dimensional rearrangement based on each periodic segment. (This involves) rearranging the branches... The one-dimensional data (i.e., periodic segments) within the data are rearranged in two dimensions to transform into a two-dimensional matrix structure.
[0072] Step S405: Feature extraction using a temporal convolutional neural network. Specifically, a temporal convolutional neural network is used to perform feature extraction on the two-dimensional rearranged data.
[0073] Step S406: Perform feature mapping. Specifically, adjust the dimensions of the output of the temporal convolutional neural network to obtain the branch's periodicity. Feature mapping under .
[0074] Step S407: Cross-period aggregation. Map the feature maps of the K branch outputs. Aggregation is performed to fuse information from multiple periodic scales, thereby obtaining the target periodic temporal features.
[0075] Step S408: Output.
[0076] According to some embodiments of this application, the second feature extraction branch includes a topology transformation module. Further explanation of step S300: The second feature extraction branch performs second feature extraction processing on the second electrocardiogram signal dataset to obtain topological features, including but not limited to steps S350 to S370.
[0077] Step S350: Perform time-delay embedding processing on the target ECG signal in the second ECG signal dataset through the topology transformation module to construct a d-dimensional phase space point cloud.
[0078] Step S360: Calculate homology groups based on d-dimensional phase space point clouds at different thresholds to obtain persistent bar charts.
[0079] Step S370: Perform persistent homology analysis on the persistent bar chart, extract the Betti curve, analyze the Betti curve to obtain multiple statistical parameters, and obtain topological features; among them, the topological features are used to characterize the morphological complexity and cyclic topology of the electrocardiogram signal.
[0080] The topological features are obtained through steps S350 to S370, laying the data foundation for subsequent feature fusion.
[0081] Combination Figure 5 This further explains the specific process steps for extracting topological features in this application.
[0082] Step S501: Input the data to be processed. During the model training phase, the data to be processed refers to the training set. During the model application phase, the data to be processed refers to the actual acquired ECG signals to be measured. Step S502: Perform time-delay embedding. Determine the embedding dimension m and delay time using the autocorrelation function of the target ECG signal. The embedded sequence X can be represented as a A matrix of rows and m columns, where the first row is the first column. Behavior .
[0083] Step S503: Generate a persistent coherence map. Construct a Vitoris-Lipps complex from the time-delayed embedded ECG signal, specifically, for different scale parameters. Centered on each data point, Draw spheres with a radius of 1. When the intersection of two spheres is non-empty, add an edge between the corresponding points; when the intersection of three spheres is non-empty, form a triangular face between the corresponding points, and so on. Calculate homology groups of different dimensions to generate a persistent homology graph.
[0084] Step S504: Extract the Betti curve and calculate various statistics of the Betti curve. Specifically, extract the Betti curve from the results of persistent cohomology and calculate various statistics of the Betti curve.
[0085] Step S505: Generate topological features. Specifically, the calculated statistics are combined into a feature vector to obtain the topological features.
[0086] It is understandable that the target periodic time series features are obtained through steps S310 to S340. Meanwhile, topological features are obtained through steps S350 to S370. Next, step S400 is performed to extract the target periodic time series features. and topological features The splicing and fusion process yields the fused feature F, which is then used for subsequent classification and recognition processing.
[0087] According to some embodiments of this application, in conjunction with Figure 6 As shown, the width learning system includes a feature node layer and an enhancement node layer. Further explanation of step S500: Step S500 involves using the width learning system to classify and identify the fused features to obtain arrhythmia classification and identification results, including but not limited to steps S510 to S540.
[0088] Step S510: Through the feature node layer, the input fused features are linearly mapped based on the preset first mapping relationship calculation formula to obtain the mapped feature nodes.
[0089] Specifically, the preset first mapping relationship calculation formula refers to the mapping relationship calculation formula between the input layer and feature nodes. In this step, feature nodes and enhancement nodes are determined, and the mapping relationship calculation formula between the input layer and feature nodes is as follows: ; in, and Here, the weights and biases are randomly set, and F represents the fused feature. For sparse autoencoders, For the first mapping Group feature nodes.
[0090] Step S520: By enhancing the node layer, the enhanced nodes are obtained by calculating the mapped feature nodes based on the preset second mapping relationship calculation formula.
[0091] Specifically, the preset second mapping relationship calculation formula refers to the calculation formula for the mapping relationship between feature nodes and enhancement nodes. Specifically, the calculation formula for the mapping relationship between feature nodes and enhancement nodes is: ; in, and The weights and biases are set randomly, respectively. For all feature nodes, It is a non-linear activation function. For the first mapping Group enhancement nodes.
[0092] Step S530: Concatenate the mapped feature nodes and enhancement nodes to form an extended matrix.
[0093] Specifically, the extended matrix is composed of feature nodes and enhancement nodes. . Step S540: Obtain the output weights by performing pseudo-inverse calculation based on the extended matrix, and multiply the output weights by the extended matrix to obtain the output arrhythmia classification and recognition results.
[0094] In this step, specifically, the objective function is constructed based on the extended matrix, and the formula is as follows: Find the optimal solution to the above objective function to obtain the output weights (i.e., connection weights): ;in, The identity matrix is used; finally, the output of the cardiac arrhythmia classification network model is obtained. .
[0095] In summary, to address the issues of insufficient feature extraction and inadequate noise resistance in current ECG arrhythmia intelligent recognition technologies, this application provides an arrhythmia classification method under multi-level noise conditions based on a topological periodic fusion network. This method can achieve multi-scale representation of complex ECG signals by fusing topological morphological features and periodic temporal features. At the same time, by combining a wide learning structure, it effectively enhances the robustness and generalization ability of the model, significantly improving the recognition accuracy under multi-level noise conditions.
[0096] like Figure 7 As shown, the present invention also provides a device for classifying arrhythmias in electrocardiogram signals, comprising: The processor 701 can be implemented using a general-purpose central processing unit (CPU), microprocessor, application specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory 702 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 702 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 702 and is called and executed by the processor 701 to execute the arrhythmia classification method for electrocardiogram signals according to the embodiments of this application. The input / output interface 703 is used to implement information input and output; The communication interface 704 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 705 transmits information between various components of the device (e.g., processor 701, memory 702, input / output interface 703, and communication interface 704); The processor 701, memory 702, input / output interface 703, and communication interface 704 are connected to each other within the device via bus 705.
[0097] This application also provides an electronic device, including the above-described arrhythmia classification device for electrocardiogram signals.
[0098] This application embodiment also provides a storage medium, which is a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the above-described method for classifying arrhythmias in electrocardiogram signals.
[0099] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof. The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separate, and may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0100] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically include computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0101] The above provides a detailed description of the preferred embodiments of this application. However, this application is not limited to the above-described embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of this application. All such equivalent modifications or substitutions are included within the scope defined by this application.
Claims
1. A method for classifying arrhythmias in electrocardiogram signals, characterized in that, include: An arrhythmia classification network model is obtained by training a model based on a target signal dataset. The arrhythmia classification network model includes: a first feature extraction branch, a second feature extraction branch, a feature fusion module, and a width learning system. The target signal dataset is obtained by adding muscle artifact noise of different noise levels to normal electrocardiogram signals. The acquired first ECG signal dataset to be tested is preprocessed to obtain a second ECG signal dataset; wherein, the second ECG signal dataset includes multiple target ECG signals; After inputting the second electrocardiogram (ECG) signal dataset into the arrhythmia classification network model, the first feature extraction branch is used to perform first feature extraction processing on the second ECG signal dataset to obtain target periodic time features; simultaneously, the second feature extraction branch is used to perform second feature extraction processing on the second ECG signal dataset to obtain topological features. The feature fusion module combines the target periodic temporal features and the topological features to obtain a fused feature. The fused features are classified and identified using the width learning system to obtain the arrhythmia classification and identification results.
2. The method for classifying arrhythmias in electrocardiogram signals according to claim 1, characterized in that, The first feature extraction branch includes: a frequency adaptive normalization module, a period detection module, a time block module, and a fully connected layer; The step of performing a first feature extraction process on the second electrocardiogram signal dataset through the first feature extraction branch to obtain the target periodic time features includes: The frequency adaptive normalization module performs frequency adaptive normalization processing on the target ECG signal in the second ECG signal dataset to obtain a normalized ECG signal. The normalized electrocardiogram signal is processed by the period detection module to obtain multiple period segments, and the multiple period segments are rearranged in two dimensions to obtain rearranged signals. The time block module is used to extract the temporal features of the rearranged signal to obtain the sub-temporal features of each periodic segment. The sub-temporal features of each periodic segment are weighted and fused through a cross-period aggregation mechanism, and the target periodic temporal features are obtained after passing through the fully connected layer.
3. The method for classifying arrhythmias in electrocardiogram signals according to claim 2, characterized in that, The process of performing periodic detection processing on the normalized electrocardiogram signal to obtain multiple periodic segments, and then performing two-dimensional rearrangement processing on the multiple periodic segments to obtain a rearranged signal, includes: The dominant cycle length of the normalized electrocardiogram signal is determined based on the autocorrelation function or peak detection method. The normalized electrocardiogram signal is divided into multiple cycle segments according to the dominant cycle length; Each periodic segment is rearranged in two dimensions according to the time dimension and the feature dimension to obtain the rearranged signal with a two-dimensional matrix structure.
4. The method for classifying arrhythmias in electrocardiogram signals according to claim 1, characterized in that, The second feature extraction branch includes: a topology transformation module; The step of performing a second feature extraction process on the second ECG signal dataset through the second feature extraction branch to obtain topological features includes: The target electrocardiogram (ECG) signal in the second ECG signal dataset is subjected to time-delay embedding processing by the topology transformation module to construct a d-dimensional phase space point cloud. Based on the d-dimensional phase space point cloud, homology groups are calculated under different thresholds to obtain persistent bar charts; Persistent homology analysis is performed on the persistent bar chart to extract the Betti curve. The Betti curve is analyzed to obtain multiple statistical parameters, and the topological features are obtained. The topological features are used to characterize the morphological complexity and cyclic topology of the electrocardiogram signal.
5. The method for classifying arrhythmias in electrocardiogram signals according to claim 1, characterized in that, The width learning system includes: a feature node layer and an enhancement node layer; The process of classifying and recognizing the fused features through the width learning system to obtain the arrhythmia classification and recognition result includes: Through the feature node layer, the input fused features are linearly mapped based on a preset first mapping relationship calculation formula to obtain the mapped feature nodes; Through the enhanced node layer, enhanced nodes are obtained by calculating the mapped feature nodes based on a preset second mapping relationship calculation formula; The mapped feature nodes and the enhanced nodes are concatenated to form an extended matrix; The output weights are obtained by performing pseudo-inverse calculation based on the extended matrix, and the output weights are multiplied by the extended matrix to obtain the output arrhythmia classification and identification result.
6. The method for classifying arrhythmias in electrocardiogram signals according to claim 1, characterized in that, The first ECG signal dataset includes multiple initial ECG signals; The process of preprocessing the acquired first ECG signal dataset to obtain a second ECG signal dataset includes: The initial electrocardiogram (ECG) signals are labeled with classification tags according to the arrhythmia categories of each arrhythmia signal to obtain labeled ECG signals. Muscle artifact noise of different noise levels was added to each of the labeled ECG signals to obtain multiple noisy ECG signals. The multiple sets of the noisy target electrocardiogram signals are combined into the second electrocardiogram signal dataset.
7. The method for classifying arrhythmias in electrocardiogram signals according to claim 1, characterized in that, The arrhythmia classification network model obtained by training the target signal dataset includes: The obtained target signal dataset is divided into a training set and a test set; The training set is input into the topological periodic fusion model for training to obtain the arrhythmia classification network model. The test set is input into the arrhythmia classification network model for testing and verification, and the final arrhythmia classification network model is determined.
8. A device for classifying arrhythmias from electrocardiogram signals, characterized in that, It includes at least one processor and a memory for communicatively connecting to the at least one processor; the memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to perform the arrhythmia classification method for electrocardiogram signals as described in any one of claims 1 to 7.
9. An electronic device, characterized in that, Includes the arrhythmia classification device for electrocardiogram signals as described in claim 8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer to perform the arrhythmia classification method for electrocardiogram signals as described in any one of claims 1 to 7.