Electrocardiosignal classification method and device

Through a bidirectional neural network-based method, combining spatial feature networks and physiological feature networks, the feature extraction and fusion of electrocardiogram signal sequences is solved, and the problem of insufficient classification accuracy of the central central electrical signal and the neglected lead interaction relationship is achieved, and higher classification accuracy is achieved.

CN119848657APending Publication Date: 2025-04-18JUYI TECH SHANGHAI CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411868830.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

The prior art lacks accuracy in electrocardiogram classification and ignores the interaction between the leads, resulting in poor recognition of transconductor abnormality analysis.

Method used

Using a bidirectional neural network-based method, multiple groups of lead characteristics are obtained by characteristicizing the acquired electrocardiogram signal sequence by leading type. Then, these features are inputted to the spatial feature network trained based on the lead structure adjacency graph and the physiological feature network trained based on the cardiac physiological structure data to obtain the spatial structural association and physiological connection association of the lead features. Feature fusion is performed through the gating mechanism, and classification prediction is performed using a multi-layer fully connected network.

Benefits of technology

It improves the accuracy of electrocardiogram classification, comprehensively considers the influence of the spatial structure and physiological connection of the lead, and enhances the comprehensiveness of the basis for classification judgment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119848657A_ABST
    Figure CN119848657A_ABST
Patent Text Reader

Abstract

The invention discloses an electrocardiosignal classification method and device, and relates to the field of electrocardiogram analysis, and the electrocardiosignal classification method comprises the following steps: based on a bidirectional neural network, characterizing an acquired electrocardiosignal sequence according to a lead type to obtain a plurality of groups of lead features; inputting the multiple groups of lead features into a spatial feature network to obtain a first spatial feature, and inputting the multiple groups of lead features into a physiological feature network to obtain a first physiological feature; the spatial feature network is obtained by training a graph neural network based on a lead structure adjacency graph; the lead structure adjacency graph is generated by presetting multiple groups of training lead features; the physiological feature network is obtained by training a graph neural network based on heart physiological structure data; the spatial feature network and the physiological feature network are optimized based on comparative learning; based on a gating mechanism, performing feature fusion on the first spatial feature and the first physiological feature to obtain a first fusion feature; and based on a multi-layer full-connection network, performing classification prediction on the first fusion feature to obtain a classification result of the electrocardiosignal sequence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electrocardiogram analysis, and in particular to an electrocardiogram signal classification method and device. Background Art

[0002] Traditional ECG analysis methods mainly rely on manual analysis and judgment to obtain diagnostic results. Limited by the professional level and experience of doctors, manual analysis and judgment are very inefficient in large-scale ECG screening or complex ECG diagnosis scenarios, and due to the influence of individual differences, the diagnostic consistency is not high. Existing automated ECG analysis methods, including machine learning classifiers and end-to-end models based on deep learning, usually only extract features based on a single scale when performing ECG analysis, making it difficult to fully capture the abnormalities of global rhythm and local waveform changes in ECG signals, so the accuracy of ECG signal classification needs to be improved; at the same time, these methods generally process leads in a single lead or multiple leads independently, ignoring the interaction between leads, resulting in poor analysis and identification of cross-lead abnormalities in the model, and the accuracy of ECG signal classification needs to be improved. Therefore, how to improve the accuracy of ECG signal classification is still a problem that needs to be solved urgently in existing technologies. Summary of the invention

[0003] The present application provides an electrocardiogram signal classification method and device to solve the technical problem of insufficient accuracy in electrocardiogram signal classification in the prior art.

[0004] According to a first aspect of an embodiment of the present application, there is provided an electrocardiogram signal classification method, comprising:

[0005] Based on the bidirectional neural network, the collected ECG signal sequence is characterized according to the lead type to obtain multiple groups of lead features;

[0006] Inputting the multiple groups of lead features into a spatial feature network to obtain a first spatial feature, and inputting the multiple groups of lead features into a physiological feature network to obtain a first physiological feature; wherein the spatial feature network is obtained by training a graph neural network based on a lead structure adjacency graph; the lead structure adjacency graph is generated by presetting multiple groups of training lead features; the physiological feature network is obtained by training a graph neural network based on cardiac physiological structure data; and both the spatial feature network and the physiological feature network are optimized based on contrastive learning;

[0007] Based on a gating mechanism, feature fusion is performed on the first spatial feature and the first physiological feature to obtain a first fused feature;

[0008] Based on a multi-layer fully connected network, the first fusion feature is classified and predicted to obtain a classification result of the electrocardiogram signal sequence.

[0009] The present application first obtains multiple groups of lead features according to the lead type and based on the characterization of the collected ECG signal sequence by a bidirectional feature network, and then inputs the spatial feature network trained based on the lead structure adjacency graph and the physiological feature network trained based on the cardiac physiological structure data to obtain the first spatial feature and the first physiological feature. The spatial structure association and the physiological connection association of the multiple groups of lead features are respectively obtained through the spatial feature network and the physiological feature network, and the influence of the spatial structure of the lead and the physiological connection of the lead in the process of ECG signal classification and judgment are respectively considered, thereby improving the comprehensiveness of the basis for ECG signal classification and judgment, thereby improving the accuracy of ECG signal classification; then based on the gating mechanism, the first spatial feature and the first physiological feature are feature fused, which can associate the spatial structure and the physiological connection of the lead feature correspondingly and fuse them interactively, and obtain the first fused feature that more comprehensively represents the ECG signal sequence, thereby improving the accuracy of the classification result when performing classification prediction based on a multi-layer fully connected network.

[0010] In certain embodiments of the present application, the bidirectional neural network is used to characterize the collected ECG signal sequence according to the lead type to obtain multiple groups of lead features, specifically including:

[0011] Performing noise filtering on the ECG signal sequence to obtain multiple groups of filtered ECG signals;

[0012] Based on a bidirectional neural network, characterizing the multiple groups of filtered ECG signals to obtain multiple groups of beat features;

[0013] According to the lead type, the multiple groups of beat features are classified to obtain multiple groups of lead features.

[0014] This application first performs noise filtering on the ECG signal sequence to obtain multiple groups of filtered ECG signals, then characterizes them based on a bidirectional neural network to obtain multiple groups of beat signals, and then classifies them according to the lead type to obtain multiple groups of lead features. Noise filtering can ensure the purity of the data, and then improve the quality of the multiple groups of beat signals obtained after characterization, thereby improving the quality of the obtained lead features.

[0015] In certain embodiments of the present application, the lead structure adjacency graph is generated by presetting multiple sets of training lead features, specifically including:

[0016] Based on the lead potential waveform and according to a supervised learning classification algorithm, an adjacency graph between the preset multiple groups of training lead features is constructed to obtain a lead structure adjacency graph.

[0017] This application is based on the lead potential waveform and combines it with a supervised learning classification algorithm to construct a lead structure adjacency graph, which can obtain the spatial structural correlation of multiple groups of training lead features in the potential waveform. It takes into account the influence of the spatial structure of the potential waveform in the process of ECG signal classification and judgment, improves the comprehensiveness of the basis for ECG signal classification and judgment, and thus improves the accuracy of ECG signal classification.

[0018] In certain embodiments of the present application, the spatial feature network and the physiological feature network are both optimized based on contrastive learning, specifically including:

[0019] The loss function of the contrastive learning is specifically:

[0020]

[0021] in, are the feature representations of the i-th sample in the spatial feature network and the physiological feature network respectively; h j is the positive sample set of the spatial feature network And the positive sample set of the physiological feature network The jth sample, h k is the negative sample set of the spatial feature network And negative sample set of physiological feature network is the kth sample of ; sim(·,··) is the similarity calculation function; τ is the temperature parameter.

[0022] The present application is optimized through comparative learning of the spatial feature network and the physiological feature network, which can ensure the simultaneous training of the spatial feature network and the physiological feature network, thereby enhancing the generalization ability of the two feature networks, so that the obtained first spatial feature and the first physiological feature are more suitable for the current ECG signal to be classified, thereby improving the accuracy when classifying ECG signals.

[0023] In certain embodiments of the present application, the gating mechanism is used to perform feature fusion on the first spatial feature and the first physiological feature to obtain a first fused feature, specifically including:

[0024] Performing a linear transformation and activation on the first spatial feature to obtain a second spatial feature, and performing a linear transformation and activation on the first physiological feature to obtain a second physiological feature;

[0025] fusing the first spatial feature with the second physiological feature to obtain a first fused sub-feature, and fusing the first physiological feature with the second spatial feature to obtain a second fused sub-feature;

[0026] The first fusion sub-feature and the second fusion sub-feature are concatenated to obtain a concatenated fusion feature, and based on a feedforward neural network, a first fusion feature corresponding to the concatenated fusion feature is obtained.

[0027] The present application first processes the first spatial feature and the first physiological feature respectively to obtain the second spatial feature and the second physiological feature, and then fuses and splices them respectively to obtain the spliced ​​fusion feature, which can correlate and interactively fuse the spatial structure features and physiological connection features of the leads corresponding to the ECG signal, thereby representing the ECG signal more comprehensively and improving the accuracy in ECG signal classification and prediction.

[0028] In certain embodiments of the present application, the classification prediction of the first fusion feature based on the multi-layer fully connected network to obtain the classification result of the electrocardiogram signal sequence specifically includes:

[0029] The multi-layer fully connected network is optimized based on the cross entropy loss; wherein the cross entropy loss is specifically:

[0030]

[0031] Among them, y c is the true value of the probability of the cth category, is the probability prediction value of the cth category predicted by the multi-layer fully connected network, and K is the number of categories.

[0032] According to a second aspect of the embodiments of the present application, there is provided an electrocardiogram signal classification device, comprising a signal characterization module, a feature update module, a feature fusion module and a feature prediction module;

[0033] The signal characterization module is used to characterize the collected ECG signal sequence based on the bidirectional neural network and the lead type to obtain multiple groups of lead features;

[0034] The feature updating module is used to input the multiple groups of lead features into the spatial feature network to obtain a first spatial feature, and input the multiple groups of lead features into the physiological feature network to obtain a first physiological feature; wherein the spatial feature network is obtained by training the graph neural network based on the lead structure adjacency graph; the lead structure adjacency graph is generated by presetting multiple groups of training lead features; the physiological feature network is obtained by training the graph neural network based on cardiac physiological structure data; and both the spatial feature network and the physiological feature network are optimized based on contrastive learning;

[0035] The feature fusion module is used to perform feature fusion on the first spatial feature and the first physiological feature based on a gating mechanism to obtain a first fused feature;

[0036] The feature prediction module is used to perform classification prediction on the first fusion feature based on a multi-layer fully connected network to obtain a classification result of the electrocardiogram signal sequence.

[0037] In certain embodiments of the present application, the signal characterization module includes a noise filtering unit, a signal characterization unit, and a feature classification unit;

[0038] The noise filtering unit is used to perform noise filtering on the ECG signal sequence to obtain multiple groups of filtered ECG signals;

[0039] The signal characterization unit is used to characterize the multiple groups of filtered ECG signals based on a bidirectional neural network to obtain multiple groups of beat features;

[0040] The feature classification unit is used to classify the multiple groups of beat features according to lead types to obtain multiple groups of lead features.

[0041] In certain embodiments of the present application, the lead structure adjacency graph is generated by presetting multiple sets of training lead features, specifically including:

[0042] Based on the lead potential waveform and according to a supervised learning classification algorithm, an adjacency graph between the preset multiple groups of training lead features is constructed to obtain a lead structure adjacency graph.

[0043] In certain embodiments of the present application, the spatial feature network and the physiological feature network are both optimized based on contrastive learning, specifically including:

[0044] The loss function of the contrastive learning is specifically:

[0045]

[0046] in, are the feature representations of the i-th sample in the spatial feature network and the physiological feature network respectively; h j is the positive sample set of the spatial feature network And the positive sample set of the physiological feature network The jth sample, h k is the negative sample set of the spatial feature network And negative sample set of physiological feature network is the kth sample of ; sim(·,··) is the similarity calculation function; τ is the temperature parameter.

[0047] In certain embodiments of the present application, the feature fusion module includes a feature processing unit, a feature fusion unit and a splicing and fusion unit;

[0048] The feature processing unit is used to perform linear transformation and activation on the first spatial feature to obtain a second spatial feature, and to perform linear transformation and activation on the first physiological feature to obtain a second physiological feature;

[0049] The feature fusion unit is used to fuse the first spatial feature and the second physiological feature to obtain a first fused sub-feature, and to fuse the first physiological feature and the second spatial feature to obtain a second fused sub-feature;

[0050] The splicing and fusion unit is used to splice the first fusion sub-feature and the second fusion sub-feature to obtain a spliced ​​fusion feature, and obtain a first fusion feature corresponding to the spliced ​​fusion feature based on a feedforward neural network.

[0051] In certain embodiments of the present application, the feature prediction module is used to perform classification prediction on the first fusion feature based on a multi-layer fully connected network to obtain the classification result of the electrocardiogram signal sequence, specifically including:

[0052] The multi-layer fully connected network is optimized based on the cross entropy loss; wherein the cross entropy loss is specifically:

[0053]

[0054] Among them, y c is the true value of the probability of the cth category, is the probability prediction value of the cth category predicted by the multi-layer fully connected network, and K is the number of categories.

[0055] The present application first obtains multiple groups of lead features according to the lead type and based on the characterization of the collected ECG signal sequence by a bidirectional feature network, and then inputs the spatial feature network trained based on the lead structure adjacency graph and the physiological feature network trained based on the cardiac physiological structure data to obtain the first spatial feature and the first physiological feature. The spatial structure association and the physiological connection association of the multiple groups of lead features are respectively obtained through the spatial feature network and the physiological feature network, and the influence of the spatial structure of the lead and the physiological connection of the lead in the process of ECG signal classification and judgment are respectively considered, thereby improving the comprehensiveness of the basis for ECG signal classification and judgment, thereby improving the accuracy of ECG signal classification; then based on the gating mechanism, the first spatial feature and the first physiological feature are feature fused, which can associate the spatial structure and the physiological connection of the lead feature correspondingly and fuse them interactively, and obtain the first fused feature that more comprehensively represents the ECG signal sequence, thereby improving the accuracy of the classification result when performing classification prediction based on a multi-layer fully connected network. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 : A flowchart of an electrocardiogram signal classification method shown in certain embodiments of the present application;

[0057] Figure 2 : A schematic diagram of an architecture for classifying electrocardiogram signals shown in certain embodiments of the present application;

[0058] Figure 3 : A module structure diagram of an electrocardiogram signal classification device shown in certain embodiments of the present application. DETAILED DESCRIPTION

[0059] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals represent the same or similar elements or elements having the same or similar functions from beginning to end. The embodiments described below in conjunction with the accompanying drawings are exemplary and are only used to explain some embodiments of the present application, and should not be construed as limitations on the embodiments of the present application. Based on the embodiments shown in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0060] In the description of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, unless otherwise clearly and specifically defined, "multiple" and "several" mean two or more.

[0061] Traditional ECG analysis methods rely on manual analysis and judgment. In large-scale ECG screening scenarios or complex ECG diagnosis scenarios, manual efficiency is very low, and due to individual differences, the diagnostic consistency is not high. When performing ECG analysis, automated ECG analysis methods usually only extract features based on a single scale, which makes it difficult to fully capture ECG signal abnormalities, and thus the accuracy of ECG signal classification needs to be improved; at the same time, automated ECG analysis methods generally process leads in ECGs as single leads or multiple leads independently, ignoring the interaction between leads, resulting in poor analysis and identification of cross-lead abnormalities by the model, and the accuracy of ECG signal classification needs to be improved. Therefore, how to improve the accuracy of ECG signal classification is still a problem that needs to be solved urgently in existing technologies.

[0062] Based on the above technical background, please refer to Figure 1 The present application embodiment provides an electrocardiogram signal classification method, including steps S101 to S104, each of which is as follows:

[0063] Step S101: Based on a bidirectional neural network, characterize the collected ECG signal sequence according to the lead type to obtain multiple groups of lead features.

[0064] In certain embodiments of the present application, the bidirectional neural network is used to characterize the collected ECG signal sequence according to the lead type to obtain multiple groups of lead features, specifically including:

[0065] Performing noise filtering on the ECG signal sequence to obtain multiple groups of filtered ECG signals;

[0066] Based on a bidirectional neural network, characterizing the multiple groups of filtered ECG signals to obtain multiple groups of beat features;

[0067] According to the lead type, the multiple groups of beat features are classified to obtain multiple groups of lead features.

[0068] In some embodiments of the present application, after performing noise filtering on the ECG signal sequence to obtain multiple groups of filtered ECG signals, the method further includes:

[0069] Based on the sampling frequency of the electrocardiogram signal sequence, the multiple groups of filtered electrocardiogram signals are normalized to update the multiple groups of filtered electrocardiogram signals.

[0070] In certain embodiments of the present application, the multiple groups of filtered ECG signals are characterized based on a bidirectional neural network to obtain multiple groups of beat features, specifically:

[0071] According to the heart beat cycle, the multiple groups of filtered ECG signals are divided to obtain multiple groups of ECG beat signals;

[0072] Based on a bidirectional neural network, the multiple groups of electrocardiogram beat signals are characterized to obtain multiple groups of beat features.

[0073] Specifically, when the multiple groups of filtered ECG signals are divided according to the heart beat cycle to obtain multiple groups of ECG beat signals, it is necessary to first locate the R wave of each group of filtered ECG signals, and determine the heart beat cycle of each group of filtered ECG signals based on the R wave, and then divide them to obtain multiple groups of ECG beat signals.

[0074] Specifically, when the multiple groups of ECG beat signals are characterized based on a bidirectional neural network to obtain multiple groups of beat features, the bidirectional neural network will perform time series modeling on each group of ECG beat signals to obtain corresponding beat features through characterization.

[0075] In certain embodiments of the present application, the implementation of the bidirectional neural network includes but is not limited to a bidirectional GRU network, a bidirectional LSTM network, a bidirectional RNN network or a Transformer model, and the preferred implementation is a bidirectional GRU network.

[0076] This application first performs noise filtering on the ECG signal sequence to obtain multiple groups of filtered ECG signals, then characterizes them based on a bidirectional neural network to obtain multiple groups of beat signals, and then classifies them according to the lead type to obtain multiple groups of lead features. Noise filtering can ensure the purity of the data, and then improve the quality of the multiple groups of beat signals obtained after characterization, thereby improving the quality of the obtained lead features.

[0077] Step S102: Input the multiple groups of lead features into the spatial feature network to obtain a first spatial feature, and input the multiple groups of lead features into the physiological feature network to obtain a first physiological feature; wherein the spatial feature network is obtained by training the graph neural network based on the lead structure adjacency graph; the lead structure adjacency graph is generated by presetting multiple groups of training lead features; the physiological feature network is obtained by training the graph neural network based on cardiac physiological structure data; and both the spatial feature network and the physiological feature network are optimized based on contrastive learning.

[0078] In certain embodiments of the present application, the embodiments of the graph neural network include but are not limited to graph convolutional networks GCN and graph attention networks GAT, and the preferred embodiment is the graph attention network GAT.

[0079] In certain embodiments of the present application, the lead structure adjacency graph is generated by presetting multiple sets of training lead features, specifically including:

[0080] Based on the lead potential waveform and according to a supervised learning classification algorithm, an adjacency graph between the preset multiple groups of training lead features is constructed to obtain a lead structure adjacency graph.

[0081] In certain embodiments of the present application, the preferred implementation of the supervised learning classification algorithm is the K-nearest neighbor algorithm and its improved algorithm.

[0082] In certain embodiments of the present application, based on the lead potential waveform, according to the supervised learning classification algorithm, an adjacency graph between the preset multiple groups of training lead features is constructed to obtain a lead structure adjacency graph, specifically:

[0083] Based on the lead potential waveform, the distance between each set of training lead features and other training lead features is calculated to obtain multiple sets of adjacent distance lists;

[0084] According to a preset adjacency number threshold, the plurality of groups of adjacency distance lists are screened and updated, and when screening, the adjacency distances in the plurality of groups of adjacency distance lists whose sequence numbers in non-decreasing order do not exceed the preset adjacency number threshold are selected to obtain a plurality of groups of updated distance lists;

[0085] According to the multiple groups of updated distance lists and the corresponding training lead features, an adjacency graph between the preset multiple groups of training lead features is constructed to obtain a lead structure adjacency graph.

[0086] This application is based on the lead potential waveform and combines it with a supervised learning classification algorithm to construct a lead structure adjacency graph, which can obtain the spatial structural correlation of multiple groups of training lead features in the potential waveform. It takes into account the influence of the spatial structure of the potential waveform in the process of ECG signal classification and judgment, improves the comprehensiveness of the basis for ECG signal classification and judgment, and thus improves the accuracy of ECG signal classification.

[0087] In certain embodiments of the present application, the spatial feature network and the physiological feature network are both optimized based on contrastive learning, specifically including:

[0088] The loss function of the contrastive learning is specifically:

[0089]

[0090] in, are the feature representations of the i-th sample in the spatial feature network and the physiological feature network respectively; h j is the positive sample set of the spatial feature network And the positive sample set of the physiological feature network The jth sample, h k is the negative sample set of the spatial feature network And negative sample set of physiological feature network The kth sample of ; sin(·,··) is the similarity calculation function; τ is the temperature parameter.

[0091] It should be understood that the temperature parameter τ described in this application is a hyperparameter used to control the distribution of positive and negative samples in contrastive learning. It is a commonly used hyperparameter for training in the field of neural network models, so it will not be further expanded here.

[0092] The present application is optimized through comparative learning of the spatial feature network and the physiological feature network, which can ensure the simultaneous training of the spatial feature network and the physiological feature network, thereby enhancing the generalization ability of the two feature networks, so that the obtained first spatial feature and the first physiological feature are more suitable for the current ECG signal to be classified, thereby improving the accuracy when classifying ECG signals.

[0093] Step S103: Based on the gating mechanism, the first spatial feature and the first physiological feature are fused to obtain a first fused feature.

[0094] In certain embodiments of the present application, the gating mechanism is used to perform feature fusion on the first spatial feature and the first physiological feature to obtain a first fused feature, specifically including:

[0095] Performing a linear transformation and activation on the first spatial feature to obtain a second spatial feature, and performing a linear transformation and activation on the first physiological feature to obtain a second physiological feature;

[0096] fusing the first spatial feature with the second physiological feature to obtain a first fused sub-feature, and fusing the first physiological feature with the second spatial feature to obtain a second fused sub-feature;

[0097] The first fusion sub-feature and the second fusion sub-feature are concatenated to obtain a concatenated fusion feature, and based on a feedforward neural network, a first fusion feature corresponding to the concatenated fusion feature is obtained.

[0098] In certain embodiments of the present application, the first spatial feature and the second physiological feature are fused to obtain a first fused sub-feature, and the first physiological feature and the second spatial feature are fused to obtain a second fused sub-feature, specifically:

[0099] Performing vector dot multiplication on the first spatial feature and the second physiological feature to obtain a first fusion sub-feature;

[0100] Perform vector dot multiplication on the first physiological feature and the second spatial feature to obtain a second fusion sub-feature.

[0101] In certain embodiments of the present application, the feedforward neural network includes but is not limited to a deep neural network DNN, a convolutional neural network CNN, a gated recurrent unit GRU, a long short-term memory network LSTM and a perceptron, and a preferred embodiment is the gated recurrent unit GRU.

[0102] The present application first processes the first spatial feature and the first physiological feature respectively to obtain the second spatial feature and the second physiological feature, and then fuses and splices them respectively to obtain the spliced ​​fusion feature, which can correlate and interactively fuse the spatial structure features and physiological connection features of the leads corresponding to the ECG signal, thereby representing the ECG signal more comprehensively and improving the accuracy in ECG signal classification and prediction.

[0103] Step S104: Based on a multi-layer fully connected network, classify and predict the first fusion feature to obtain a classification result of the electrocardiogram signal sequence.

[0104] In certain embodiments of the present application, the classification prediction of the first fusion feature based on the multi-layer fully connected network to obtain the classification result of the electrocardiogram signal sequence specifically includes:

[0105] The multi-layer fully connected network is optimized based on the cross entropy loss; wherein the cross entropy loss is specifically:

[0106]

[0107] Among them, y c is the true value of the probability of the cth category, is the probability prediction value of the cth category predicted by the multi-layer fully connected network, and K is the number of categories.

[0108] In certain embodiments of this application, see Figure 2 , is a schematic diagram of an architecture for ECG signal classification based on steps S101 to S104. Among them, "raw ECG data" refers to the collected ECG signal sequence; "data preprocessing" and "feature extraction" refer to step S101, "bidirectional GRU" is an implementation form of bidirectional neural network, "Beat-level embedding" refers to beat features, and "lead-level embedding" refers to lead features; "graph attention network" is an implementation form of graph neural network; "readout" means graph aggregation feature acquisition, that is, obtaining the first spatial feature and the first physiological feature; "PReLU" and "sigmoid" are both activation layers; "classification layer" is a multi-layer fully connected network. Specifically, in the "data preprocessing" of step S101, the heart beat cycle is determined according to the R wave in the "raw ECG data", and then a single heart beat (i.e., "beat") is obtained; in step S103, the specific method of linearly transforming and activating the first spatial feature and the first physiological feature is: the input feature is passed through a linear layer, a PReLU layer, a linear layer, and a sigmoid layer.

[0109] The present application first obtains multiple groups of lead features according to the lead type and based on the characterization of the collected ECG signal sequence by a bidirectional feature network, and then inputs the spatial feature network trained based on the lead structure adjacency graph and the physiological feature network trained based on the cardiac physiological structure data to obtain the first spatial feature and the first physiological feature. The spatial structure association and the physiological connection association of the multiple groups of lead features are respectively obtained through the spatial feature network and the physiological feature network, and the influence of the spatial structure of the lead and the physiological connection of the lead in the process of ECG signal classification and judgment are respectively considered, thereby improving the comprehensiveness of the basis for ECG signal classification and judgment, thereby improving the accuracy of ECG signal classification; then based on the gating mechanism, the first spatial feature and the first physiological feature are feature fused, which can associate the spatial structure and the physiological connection of the lead feature correspondingly and fuse them interactively, and obtain the first fused feature that more comprehensively represents the ECG signal sequence, thereby improving the accuracy of the classification result when performing classification prediction based on a multi-layer fully connected network.

[0110] Corresponding to the previous method, see Figure 3 , the embodiment of the present application provides an electrocardiogram signal classification device, including a signal characterization module 310, a feature update module 320, a feature fusion module 330 and a feature prediction module 340;

[0111] The signal characterization module 310 is used to characterize the collected ECG signal sequence according to the lead type based on a bidirectional neural network to obtain multiple groups of lead features;

[0112] The feature updating module 320 is used to input the multiple groups of lead features into the spatial feature network to obtain a first spatial feature, and input the multiple groups of lead features into the physiological feature network to obtain a first physiological feature; wherein the spatial feature network is obtained by training the graph neural network based on the lead structure adjacency graph; the lead structure adjacency graph is generated by presetting multiple groups of training lead features; the physiological feature network is obtained by training the graph neural network based on cardiac physiological structure data; and both the spatial feature network and the physiological feature network are optimized based on contrastive learning;

[0113] The feature fusion module 330 is used to perform feature fusion on the first spatial feature and the first physiological feature based on a gating mechanism to obtain a first fused feature;

[0114] The feature prediction module 340 is used to perform classification prediction on the first fusion feature based on a multi-layer fully connected network to obtain a classification result of the electrocardiogram signal sequence.

[0115] In certain embodiments of the present application, the signal characterization module 310 includes a noise filtering unit, a signal characterization unit, and a feature classification unit;

[0116] The noise filtering unit is used to perform noise filtering on the ECG signal sequence to obtain multiple groups of filtered ECG signals;

[0117] The signal characterization unit is used to characterize the multiple groups of filtered ECG signals based on a bidirectional neural network to obtain multiple groups of beat features;

[0118] The feature classification unit is used to classify the multiple groups of beat features according to lead types to obtain multiple groups of lead features.

[0119] In certain embodiments of the present application, the lead structure adjacency graph is generated by presetting multiple sets of training lead features, specifically including:

[0120] Based on the lead potential waveform and according to a supervised learning classification algorithm, an adjacency graph between the preset multiple groups of training lead features is constructed to obtain a lead structure adjacency graph.

[0121] In certain embodiments of the present application, the spatial feature network and the physiological feature network are both optimized based on contrastive learning, specifically including:

[0122] The loss function of the contrastive learning is specifically:

[0123]

[0124] in, are the feature representations of the i-th sample in the spatial feature network and the physiological feature network respectively; h j is the positive sample set of the spatial feature network And the positive sample set of the physiological feature network The jth sample, h k is the negative sample set of the spatial feature network And negative sample set of physiological feature network is the kth sample of ; sim(·,··) is the similarity calculation function; τ is the temperature parameter.

[0125] In some embodiments of the present application, the feature fusion module 330 includes a feature processing unit, a feature fusion unit, and a splicing and fusion unit;

[0126] The feature processing unit is used to perform linear transformation and activation on the first spatial feature to obtain a second spatial feature, and to perform linear transformation and activation on the first physiological feature to obtain a second physiological feature;

[0127] The feature fusion unit is used to fuse the first spatial feature and the second physiological feature to obtain a first fused sub-feature, and to fuse the first physiological feature and the second spatial feature to obtain a second fused sub-feature;

[0128] The splicing and fusion unit is used to splice the first fusion sub-feature and the second fusion sub-feature to obtain a spliced ​​fusion feature, and obtain a first fusion feature corresponding to the spliced ​​fusion feature based on a feedforward neural network.

[0129] In some embodiments of the present application, the feature prediction module 340 is used to perform classification prediction on the first fusion feature based on a multi-layer fully connected network to obtain the classification result of the electrocardiogram signal sequence, specifically including:

[0130] The multi-layer fully connected network is optimized based on the cross entropy loss; wherein the cross entropy loss is specifically:

[0131]

[0132] Among them, y c is the true value of the probability of the cth category, is the probability prediction value of the cth category predicted by the multi-layer fully connected network, and K is the number of categories.

[0133] The present application first obtains multiple groups of lead features according to the lead type and based on the characterization of the collected ECG signal sequence by a bidirectional feature network, and then inputs the spatial feature network trained based on the lead structure adjacency graph and the physiological feature network trained based on the cardiac physiological structure data to obtain the first spatial feature and the first physiological feature. The spatial structure association and the physiological connection association of the multiple groups of lead features are respectively obtained through the spatial feature network and the physiological feature network, and the influence of the spatial structure of the lead and the physiological connection of the lead in the process of ECG signal classification and judgment are respectively considered, thereby improving the comprehensiveness of the basis for ECG signal classification and judgment, thereby improving the accuracy of ECG signal classification; then based on the gating mechanism, the first spatial feature and the first physiological feature are feature fused, which can associate the spatial structure and the physiological connection of the lead feature correspondingly and fuse them interactively, and obtain the first fused feature that more comprehensively represents the ECG signal sequence, thereby improving the accuracy of the classification result when performing classification prediction based on a multi-layer fully connected network.

[0134] It should be understood that the device provided in the embodiments of the present application corresponds to the aforementioned method, and an ECG signal classification device provided in the embodiments of the present application can implement an ECG signal classification method provided in any embodiment of the present application.

[0135] Adaptively, the embodiments of the present application also provide a computer device and a computer-readable storage medium.

[0136] The computer device comprises: a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor;

[0137] Wherein, when the processor executes the computer program, an electrocardiogram signal classification method of the present application is implemented.

[0138] The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute an electrocardiogram signal classification method of the present application.

[0139] The above are some implementation methods of the present application, and the purpose, technical scheme and beneficial effects of the present application are further described in detail. It should be clear that the above-mentioned partial implementation methods of the present application cannot be understood as limiting the present application. It is particularly pointed out that for those skilled in the art, any changes, modifications, equivalent substitutions and variations made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A method for classifying electrocardiogram signals, characterized in that: include: Based on the bidirectional neural network, the collected ECG signal sequence is characterized according to the lead type to obtain multiple groups of lead features; Inputting the multiple groups of lead features into a spatial feature network to obtain a first spatial feature, and inputting the multiple groups of lead features into a physiological feature network to obtain a first physiological feature; wherein the spatial feature network is obtained by training a graph neural network based on a lead structure adjacency graph; the lead structure adjacency graph is generated by presetting multiple groups of training lead features; the physiological feature network is obtained by training a graph neural network based on cardiac physiological structure data; and both the spatial feature network and the physiological feature network are optimized based on contrastive learning; Based on a gating mechanism, feature fusion is performed on the first spatial feature and the first physiological feature to obtain a first fused feature; Based on a multi-layer fully connected network, the first fusion feature is classified and predicted to obtain a classification result of the electrocardiogram signal sequence.

2. The electrocardiogram signal classification method according to claim 1, characterized in that: The method is based on a bidirectional neural network and characterizes the collected ECG signal sequence according to the lead type to obtain multiple groups of lead features, specifically including: Performing noise filtering on the ECG signal sequence to obtain multiple groups of filtered ECG signals; Based on a bidirectional neural network, characterizing the multiple groups of filtered ECG signals to obtain multiple groups of beat features; According to the lead type, the multiple groups of beat features are classified to obtain multiple groups of lead features.

3. The electrocardiogram signal classification method according to claim 1, characterized in that: The lead structure adjacency graph is generated by presetting multiple sets of training lead features, specifically including: Based on the lead potential waveform and according to a supervised learning classification algorithm, an adjacency graph between the preset multiple groups of training lead features is constructed to obtain a lead structure adjacency graph.

4. The electrocardiogram signal classification method according to claim 1, characterized in that: The spatial feature network and the physiological feature network are both optimized based on contrastive learning, specifically including: The loss function of the contrastive learning is specifically: in, are the feature representations of the i-th sample in the spatial feature network and the physiological feature network respectively; h j is the positive sample set of the spatial feature network And the positive sample set of the physiological feature network The jth sample, h k is the negative sample set of the spatial feature network And negative sample set of physiological feature network is the kth sample of ; sim(·,··) is the similarity calculation function; τ is the temperature parameter.

5. The electrocardiogram signal classification method according to claim 1, characterized in that: The fusing the first spatial feature and the first physiological feature based on the gating mechanism to obtain a first fused feature specifically includes: Performing a linear transformation and activation on the first spatial feature to obtain a second spatial feature, and performing a linear transformation and activation on the first physiological feature to obtain a second physiological feature; fusing the first spatial feature with the second physiological feature to obtain a first fused sub-feature, and fusing the first physiological feature with the second spatial feature to obtain a second fused sub-feature; The first fusion sub-feature and the second fusion sub-feature are concatenated to obtain a concatenated fusion feature, and based on a feedforward neural network, a first fusion feature corresponding to the concatenated fusion feature is obtained.

6. The electrocardiogram signal classification method according to claim 1, characterized in that: The method of performing classification prediction on the first fusion feature based on a multi-layer fully connected network to obtain a classification result of the electrocardiogram signal sequence specifically includes: The multi-layer fully connected network is optimized based on the cross entropy loss; wherein the cross entropy loss is specifically: Among them, y c is the true probability value of the c-th category, is the probability prediction value of the cth category predicted by the multi-layer fully connected network, and K is the number of categories.

7. An electrocardiogram signal classification device, characterized in that: It includes a signal characterization module, a feature updating module, a feature fusion module and a feature prediction module; The signal characterization module is used to characterize the collected ECG signal sequence based on the bidirectional neural network and the lead type to obtain multiple groups of lead features; The feature updating module is used to input the multiple groups of lead features into the spatial feature network to obtain a first spatial feature, and input the multiple groups of lead features into the physiological feature network to obtain a first physiological feature; wherein the spatial feature network is obtained by training the graph neural network based on the lead structure adjacency graph; the lead structure adjacency graph is generated by presetting multiple groups of training lead features; the physiological feature network is obtained by training the graph neural network based on cardiac physiological structure data; and both the spatial feature network and the physiological feature network are optimized based on contrastive learning; The feature fusion module is used to perform feature fusion on the first spatial feature and the first physiological feature based on a gating mechanism to obtain a first fused feature; The feature prediction module is used to perform classification prediction on the first fusion feature based on a multi-layer fully connected network to obtain a classification result of the electrocardiogram signal sequence.

8. The electrocardiogram signal classification device according to claim 7, characterized in that: The signal characterization module includes a noise filtering unit, a signal characterization unit and a feature classification unit; The noise filtering unit is used to perform noise filtering on the ECG signal sequence to obtain multiple groups of filtered ECG signals; The signal characterization unit is used to characterize the multiple groups of filtered ECG signals based on a bidirectional neural network to obtain multiple groups of beat features; The feature classification unit is used to classify the multiple groups of beat features according to lead types to obtain multiple groups of lead features.

9. The electrocardiogram signal classification device according to claim 7, characterized in that: The lead structure adjacency graph is generated by presetting multiple sets of training lead features, specifically including: Based on the lead potential waveform and according to a supervised learning classification algorithm, an adjacency graph between the preset multiple groups of training lead features is constructed to obtain a lead structure adjacency graph.

10. The electrocardiogram signal classification device according to claim 7, characterized in that: The spatial feature network and the physiological feature network are both optimized based on contrastive learning, specifically including: The loss function of the contrastive learning is specifically: in, Respectively i The feature representation of samples in the spatial feature network and physiological feature network; h j is the positive sample set of the spatial feature network And the positive sample set of the physiological feature network The jth sample, h k is the negative sample set of the spatial feature network And negative sample set of physiological feature network is the kth sample of ; sim(·,··) is the similarity calculation function; τ is the temperature parameter.

11. The electrocardiogram signal classification device according to claim 7, characterized in that: The feature fusion module includes a feature processing unit, a feature fusion unit and a splicing and fusion unit; The feature processing unit is used to perform linear transformation and activation on the first spatial feature to obtain a second spatial feature, and to perform linear transformation and activation on the first physiological feature to obtain a second physiological feature; The feature fusion unit is used to fuse the first spatial feature and the second physiological feature to obtain a first fused sub-feature, and to fuse the first physiological feature and the second spatial feature to obtain a second fused sub-feature; The splicing and fusion unit is used to splice the first fusion sub-feature and the second fusion sub-feature to obtain a spliced ​​fusion feature, and obtain a first fusion feature corresponding to the spliced ​​fusion feature based on a feedforward neural network.

12. The electrocardiogram signal classification device according to claim 7, characterized in that: The feature prediction module is used to perform classification prediction on the first fusion feature based on a multi-layer fully connected network to obtain the classification result of the electrocardiogram signal sequence, specifically including: The multi-layer fully connected network is optimized based on the cross entropy loss; wherein the cross entropy loss is specifically: Among them, y c is the true probability value of the c-th category, is the probability prediction value of the cth category predicted by the multi-layer fully connected network, and K is the number of categories.