CN118161169A - Intelligent ECG detection method for coronary heart disease based on graph neural network - Google Patents
Intelligent ECG detection method for coronary heart disease based on graph neural network Download PDFInfo
- Publication number
- CN118161169A CN118161169A CN202410279309.2A CN202410279309A CN118161169A CN 118161169 A CN118161169 A CN 118161169A CN 202410279309 A CN202410279309 A CN 202410279309A CN 118161169 A CN118161169 A CN 118161169A
- Authority
- CN
- China
- Prior art keywords
- graph
- lead
- ecg
- neural network
- heart disease
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/24—Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
- A61B5/316—Modalities, i.e. specific diagnostic methods
- A61B5/318—Heart-related electrical modalities, e.g. electrocardiography [ECG]
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/72—Signal processing specially adapted for physiological signals or for diagnostic purposes
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/72—Signal processing specially adapted for physiological signals or for diagnostic purposes
- A61B5/7235—Details of waveform analysis
- A61B5/7264—Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems
- A61B5/7267—Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems involving training the classification device
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02A—TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
- Y02A90/00—Technologies having an indirect contribution to adaptation to climate change
- Y02A90/10—Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation
Landscapes
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Artificial Intelligence (AREA)
- Public Health (AREA)
- Molecular Biology (AREA)
- Veterinary Medicine (AREA)
- General Health & Medical Sciences (AREA)
- Biophysics (AREA)
- Pathology (AREA)
- Biomedical Technology (AREA)
- Heart & Thoracic Surgery (AREA)
- Medical Informatics (AREA)
- Animal Behavior & Ethology (AREA)
- Surgery (AREA)
- Signal Processing (AREA)
- Physiology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Psychiatry (AREA)
- Evolutionary Computation (AREA)
- Fuzzy Systems (AREA)
- Mathematical Physics (AREA)
- Cardiology (AREA)
- Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)
Abstract
本发明公开了一种基于图神经网络的冠心病ECG智能检测方法,包括以下步骤:获取临床数据集,将其脱敏后由专业医生在临床数据集上标注;对标注后的临床数据集进行预处理,提取临床数据中的原始信号,得到12导联ECG心电信号后进行降噪及标准化处理;基于改进的GCN网络构建诊断模型,以12导联ECG心电信号的各导联为节点,按生理空间关系加入拓扑连接构建ECG图,将该ECG图输入诊断模型进行训练并使用GNNExplain进行可解释性分析;根据诊断模型构建基于图神经网络和12导联ECG心电信号的冠心病检测系统。本方法能够同时关注到心电图中的时间特征与不同导联间的生理空间联系,有助于更好地捕捉到心脏活动的整体状态,减轻人工读图压力,使得筛查冠心病更有效率。
The present invention discloses a method for intelligent detection of ECG for coronary heart disease based on graph neural network, comprising the following steps: obtaining a clinical data set, desensitizing it and then having a professional doctor mark it on the clinical data set; preprocessing the marked clinical data set, extracting the original signal in the clinical data, obtaining a 12-lead ECG electrocardiogram signal, and then performing noise reduction and standardization processing; constructing a diagnostic model based on an improved GCN network, taking each lead of the 12-lead ECG electrocardiogram signal as a node, adding topological connections according to physiological spatial relationships to construct an ECG graph, inputting the ECG graph into the diagnostic model for training, and using GNNExplain for interpretability analysis; constructing a coronary heart disease detection system based on graph neural network and 12-lead ECG electrocardiogram according to the diagnostic model. This method can simultaneously focus on the time characteristics in the electrocardiogram and the physiological spatial connection between different leads, which helps to better capture the overall state of heart activity, reduce the pressure of manual reading of the graph, and make screening for coronary heart disease more efficient.
Description
技术领域Technical Field
本发明涉及智慧医疗技术领域,具体涉及基于图神经网络的冠心病ECG智能检测方法。The present invention relates to the field of smart medical technology, and in particular to a method for intelligent detection of ECG of coronary heart disease based on graph neural network.
背景技术Background technique
冠心病是指冠状动脉粥样硬化导致心肌缺血、缺氧而引起的心脏病,其根本发病原因在于动脉壁内脂肪或不健康胆固醇的持续积聚,最终造成动脉壁变窄和堵塞。心律失常、心绞痛和心肌梗死都是冠心病最常见的临床表现。冠心病不仅死亡率高,患者治愈出院后还存在复发风险,常因诊断不及时延误治疗,而引发急性心肌梗死甚至猝死,因此临床上对冠心病的早期发现、早期诊断和早期干预治疗对改善患者预后提高生存率至关重要。Coronary heart disease refers to a heart disease caused by myocardial ischemia and hypoxia due to coronary atherosclerosis. The root cause of the disease is the continuous accumulation of fat or unhealthy cholesterol in the arterial wall, which eventually causes the arterial wall to narrow and block. Arrhythmia, angina pectoris and myocardial infarction are the most common clinical manifestations of coronary heart disease. Coronary heart disease not only has a high mortality rate, but also has a risk of recurrence after the patient is cured and discharged from the hospital. It often causes acute myocardial infarction or even sudden death due to delayed treatment due to untimely diagnosis. Therefore, early detection, early diagnosis and early intervention treatment of coronary heart disease are crucial to improving patient prognosis and survival rate.
目前,明确冠脉病变的金标准是冠脉造影术,但是由于它是一种需要动脉穿刺的侵入性技术,检查成本较高且有辐射暴露风险,临床上更常用无创、便捷、经济的心电图诊断筛查冠心病。基于心电图的冠心病诊断方法通过检查心电图波形,依靠专家的长期经验和主观判断做出。然而,这些决策在一定程度上可以被自动化数据驱动的方法所支持和取代。At present, the gold standard for identifying coronary artery lesions is coronary angiography, but because it is an invasive technique that requires arterial puncture, the examination cost is high and there is a risk of radiation exposure. In clinical practice, non-invasive, convenient and economical electrocardiogram diagnosis is more commonly used to screen for coronary heart disease. The electrocardiogram-based diagnosis method of coronary heart disease is made by examining the electrocardiogram waveform and relying on the long-term experience and subjective judgment of experts. However, these decisions can be supported and replaced to a certain extent by automated data-driven methods.
基于深度学习的冠心病心电图诊断研究还处于探索阶段。在应用传统深度学习模型时,心电信号通常仅被视为排列在欧几里得空间中的同步信号。这些方法在分析心电图时,通常将心电信号作为通道级的简单排列处理,只关注信号的时间特征,而忽略了心电图中不同导联的生理空间联系,这些导联间的空间关系在生理上是至关重要的,它们对于冠心病的诊断具有实用价值。Research on ECG diagnosis of coronary heart disease based on deep learning is still in the exploratory stage. When applying traditional deep learning models, ECG signals are usually only regarded as synchronous signals arranged in Euclidean space. When analyzing ECGs, these methods usually treat ECG signals as simple channel-level arrangements, focusing only on the temporal characteristics of the signals, while ignoring the physiological spatial connections between different leads in the ECG. The spatial relationships between these leads are physiologically crucial and have practical value for the diagnosis of coronary heart disease.
发明内容Summary of the invention
本发明的目的在于,提出基于图神经网络的冠心病ECG智能检测方法,通过添加拓扑连接在非欧几里得数据中,使用图神经网络形式建模,得到生理空间关系,其能够更好地捕捉到心脏活动的整体状态,从而提升诊断准确率。The purpose of the present invention is to propose an intelligent ECG detection method for coronary heart disease based on graph neural network. By adding topological connections in non-Euclidean data and using graph neural network form to model, physiological spatial relationships are obtained, which can better capture the overall state of heart activity and thus improve the accuracy of diagnosis.
为实现上述目的,本发明提供了一种基于图神经网络的冠心病ECG智能检测方法,包括以下步骤:To achieve the above object, the present invention provides a method for intelligent detection of ECG for coronary heart disease based on graph neural network, comprising the following steps:
获取临床数据集,将其脱敏后由专业医生在临床数据集上标注,分为冠脉异常和冠脉正常;Obtain clinical data sets, desensitize them, and have professional doctors annotate them on the clinical data sets, dividing them into abnormal coronary arteries and normal coronary arteries;
对标注后的临床数据集进行预处理,提取临床数据中的原始信号,得到12导联ECG心电信号后进行降噪及标准化处理;Preprocess the annotated clinical data set, extract the original signal from the clinical data, obtain the 12-lead ECG signal, and then perform noise reduction and standardization processing;
基于改进的GCN网络构建诊断模型,以12导联ECG心电信号的各导联为节点,按生理空间关系加入拓扑连接构建ECG图,将该ECG图输入诊断模型进行训练并使用GNNExplain进行可解释性分析;A diagnostic model was constructed based on the improved GCN network. Each lead of the 12-lead ECG signal was used as a node. The ECG graph was constructed by adding topological connections according to the physiological spatial relationship. The ECG graph was input into the diagnostic model for training and GNNExplain was used for interpretability analysis.
根据诊断模型构建基于图神经网络和12导联ECG心电信号的冠心病检测系统。According to the diagnostic model, a coronary heart disease detection system based on graph neural network and 12-lead ECG signals was constructed.
进一步地,构建ECG图的具体方式为:Furthermore, the specific method of constructing the ECG graph is:
将12导联ECG心电信号划分为肢体导联区域和胸部导联区域,所述肢体导联区域包括肢体导联I、肢体导联II、肢体导联III、肢体增强导联aVR、肢体增强导联aVF、肢体增强导联aVL;所述胸部导联区域包括胸导联V1、胸导联V2、胸导联V3、胸导联V4、胸导联V5、胸导联V6,每个导联代表一个特定心脏区域的活动记录;The 12-lead ECG electrocardiogram signal is divided into a limb lead area and a chest lead area, wherein the limb lead area includes limb lead I, limb lead II, limb lead III, limb enhanced lead aVR, limb enhanced lead aVF, and limb enhanced lead aVL; the chest lead area includes chest lead V1, chest lead V2, chest lead V3, chest lead V4, chest lead V5, and chest lead V6, and each lead represents an activity record of a specific heart area;
将每个区域内的导联按生理空间关系连接,使用肢体导联I、肢体导联III、胸导联V1、胸导联V6将不同区域的导联连接在一起,实现区域之间的通信。The leads in each area are connected according to the physiological spatial relationship, and the leads in different areas are connected together using limb lead I, limb lead III, chest lead V1, and chest lead V6 to achieve communication between areas.
进一步地,所述诊断模型包括特征提取模块和图神经网络模块;Furthermore, the diagnostic model includes a feature extraction module and a graph neural network module;
所述特征提取模块包括长短期记忆网络,其将每个原始信号作为输入,获得导联级时域特征fb,并使用输出的特征向量初始化整个图网络中的节点;The feature extraction module includes a long short-term memory network, which takes each original signal as input, obtains the lead-level time domain feature fb, and uses the output feature vector to initialize the nodes in the entire graph network;
图神经网络模块通过图卷积和图池化操作实现,其包含一个3层的GCN模型,所述GCN模型通过聚合邻居节点的信息来更新每个节点的表示。The graph neural network module is implemented through graph convolution and graph pooling operations, which contains a 3-layer GCN model that updates the representation of each node by aggregating information from neighboring nodes.
进一步地,对于GCN模型中的第i层,它的下一层输出为:Furthermore, for the i-th layer in the GCN model, its next layer output is:
其中,Hi表示第i层的节点矩阵,A表示节点之间的邻接矩阵,D是度矩阵,为有自连接的邻接矩阵,I为单位矩阵,/>为/>的对角度矩阵,Wi表示第i层的权重矩阵,σ表示激活函数,该模块使用Relu函数作为激活函数。Among them, Hi represents the node matrix of the i-th layer, A represents the adjacency matrix between nodes, and D is the degree matrix. is the adjacency matrix with self-connection, I is the identity matrix, /> For/> The diagonal matrix of , Wi represents the weight matrix of the i-th layer, σ represents the activation function, and this module uses the Relu function as the activation function.
进一步地,图神经网络模块使用基于自注意力的TopK图池化机制,对图中每个节点学习出一个表示节点重要度评分score,基于这个分数的排序丢弃部分低分数的节点,将全图中的N个节点下采样至kN个节点;整个池化过程表示如下:Furthermore, the graph neural network module uses a self-attention-based TopK graph pooling mechanism to learn a score representing the importance of each node in the graph, and discards some nodes with low scores based on the ranking of this score, and downsamples the N nodes in the entire graph to kN nodes; the entire pooling process is expressed as follows:
idx=top-rank(score,kN)idx = top-rank(score,kN)
Ai+1=Ai(idx,idx)A i+1 =A i (idx,idx)
其中,Hi(idx,:)表示按照向量idx的值对新子图特征矩阵进行行切片,Ai(idx,idx)表示按照向量idx的值对新子图的邻接矩阵同时进行行切片与列切片;Among them, Hi (idx,:) means that the feature matrix of the new subgraph is sliced in rows according to the value of the vector idx, and Ai (idx,idx) means that the adjacency matrix of the new subgraph is sliced in rows and columns at the same time according to the value of the vector idx;
基于自注意力的节点重要度评分score如下:The node importance score based on self-attention is as follows:
其中X是图的输入特征,θatt是基于图的特征和拓扑结构的唯一参数。Where X is the input feature of the graph and θ att is the only parameter based on the features and topology of the graph.
更进一步地,图神经网络模块通过迭代执行图卷积和图池操作以生成多个新的子图,聚合子图中的所有节点表示并求和得到固定大小的图级特征fg。Furthermore, the graph neural network module iteratively performs graph convolution and graph pooling operations to generate multiple new subgraphs, aggregates all node representations in the subgraphs and sums them to obtain a fixed-size graph-level feature fg.
更进一步地,诊断模型聚合导联级时域特征fb和图级特征fg通过分类器进行分类,分类器使用Sigmoid函数对整图进行诊断标签的预测,将损失函数定义为标签上预测的交叉熵,输出的诊断结果分为两类,包括冠脉正常和冠脉异常;Furthermore, the diagnostic model aggregates the lead-level time-domain features fb and the image-level features fg through a classifier, which uses the Sigmoid function to predict the diagnostic label of the entire image, and defines the loss function as the cross entropy of the prediction on the label. The output diagnostic results are divided into two categories, including normal coronary artery and abnormal coronary artery;
sigmoid函数为:The sigmoid function is:
损失函数为:The loss function is:
其中N为训练样本的大小,M为类别数,Yij为基础真值,Pij为属于j类的预测概率。Where N is the size of the training sample, M is the number of categories, Yij is the ground truth, and Pij is the predicted probability of belonging to class j.
更进一步地,按患者patientID划分标注后的临床数据集,得到训练集、验证集和测试集;所述临床数据集中的冠脉正常数据标记为(1,0),冠脉异常数据标记为(0,1);将训练集输入诊断网络进行训练。Furthermore, the labeled clinical data set is divided according to the patient ID to obtain a training set, a validation set and a test set; the normal coronary artery data in the clinical data set is marked as (1,0), and the abnormal coronary artery data is marked as (0,1); the training set is input into the diagnostic network for training.
作为更进一步地,使用GNNExplain可视化解释诊断结果,具体为:GNNExplain将训练后的诊断模型和其预测结果作为输入,然后选择一个节点v,监测节点v上的一个子图的预测值以及该子图上更少特征的预测值,通过两者差值变化来提供基于子图或者特征的解释,使原图的预测与子图的预测之间的互信息MI最大化,用公式表达为:As a further step, GNNExplain is used to visualize and explain the diagnostic results. Specifically, GNNExplain takes the trained diagnostic model and its prediction results as input, then selects a node v, monitors the predicted value of a subgraph on node v and the predicted value of fewer features on the subgraph, and provides a subgraph or feature-based explanation through the difference between the two, so as to maximize the mutual information MI between the prediction of the original image and the prediction of the subgraph, which can be expressed as:
其中Gs和Xs为子图及其节点的特征,Y为预测标签分布,其熵H(Y)为常数。Where Gs and Xs are the features of the subgraph and its nodes, Y is the predicted label distribution, and its entropy H(Y) is a constant.
作为更进一步地,冠心病检测系统搭建方式为:As a further step, the coronary heart disease detection system is built as follows:
将诊断模型部署在服务器端,获取网页端电子病历,提取原始12导联ECG心电信号,对信号进行降噪、归一化处理;The diagnostic model is deployed on the server side, the electronic medical records on the web page are obtained, the original 12-lead ECG signal is extracted, and the signal is denoised and normalized;
预处理的临床数据转化为ECG图后输入训练后的诊断模型中进行冠心病检测,得到当前患者的诊断结果;The pre-processed clinical data is converted into ECG graphs and then input into the trained diagnostic model for coronary heart disease detection to obtain the current patient's diagnosis results;
诊断结果传递回前端系统,并在用户界面上可视化地解释每个诊断结果,展示当前分类结果的特征依据。The diagnosis results are transmitted back to the front-end system, and each diagnosis result is visually explained on the user interface, showing the feature basis of the current classification result.
本发明采用的以上技术方案,与现有技术相比,具有的优点是:本方法能够同时关注到心电图中的时间特征与不同导联间的生理空间联系,有助于更好地捕捉到心脏活动的整体状态,减轻人工读图压力,使得筛查冠心病更有效率,提高诊断置信度,为临床医生提供了更准确的诊断工具,从而节省医院资源、改善患者的心血管健康。Compared with the prior art, the above technical solution adopted by the present invention has the following advantages: the method can simultaneously focus on the time characteristics in the electrocardiogram and the physiological spatial connection between different leads, which helps to better capture the overall state of cardiac activity, reduce the pressure of manual reading of the image, make screening for coronary heart disease more efficient, improve diagnostic confidence, and provide clinicians with more accurate diagnostic tools, thereby saving hospital resources and improving patients' cardiovascular health.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
构成本申请的一部分的说明书附图用来提供对本申请的进一步理解,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。The drawings in the specification, which constitute a part of the present application, are used to provide further understanding of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute improper limitations on the present application.
图1是基于图神经网络的冠心病ECG智能检测方法流程示意图;FIG1 is a flow chart of a method for intelligent detection of ECG for coronary heart disease based on a graph neural network;
图2是诊断模型的结构示意图;Fig. 2 is a schematic diagram of the structure of the diagnosis model;
图3是ECG图的结构示意图;Fig. 3 is a schematic diagram of the structure of an ECG graph;
图4是GNNExplainer的结构示意图。FIG4 is a schematic diagram of the structure of GNNExplainer.
具体实施方法Specific implementation methods
下面结合附图与实施例对本公开作进一步说明。The present disclosure is further described below in conjunction with the accompanying drawings and embodiments.
应该指出,以下详细说明都是例示性的,旨在对本申请提供进一步的说明。除非另有指明,本文使用的所有技术和科学术语具有与本申请所属技术领域的普通技术人员通常理解的相同含义。It should be noted that the following detailed descriptions are illustrative and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present application belongs.
需要注意的是,这里所使用的术语仅是为了描述具体实施方式,而非意图限制根据本申请的示例性实施方式。如在这里所使用的,除非上下文另外明确指出,否则单数形式也意图包括复数形式,此外,还应当理解的是,当在本说明书中使用术语“包含”和/或“包括”时,其指明存在特征、步骤、操作、器件、组件和/或它们的组合。It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and/or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and/or combinations thereof.
需要注意的是,附图中的流程图和框图示出了根据本公开的各种实施例的方法和系统的可能实现的体系架构、功能和操作。应当注意,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,所述模块、程序段、或代码的一部分可以包括一个或多个用于实现各个实施例中所规定的逻辑功能的可执行指令。也应当注意,在有些作为备选的实现中,方框中所标注的功能也可以按照不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,或者它们有时也可以按照相反的顺序执行,这取决于所涉及的功能。同样应当注意的是,流程图和/或框图中的每个方框、以及流程图和/或框图中的方框的组合,可以使用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以使用专用硬件与计算机指令的组合来实现。It should be noted that the flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the methods and systems according to various embodiments of the present disclosure. It should be noted that each box in the flowchart or block diagram can represent a module, a program segment, or a part of a code, and the module, the program segment, or a part of the code may include one or more executable instructions for implementing the logical functions specified in the various embodiments. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, or they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the flowchart and/or block diagram, and the combination of boxes in the flowchart and/or block diagram can be implemented using a dedicated hardware-based system that performs a specified function or operation, or can be implemented using a combination of dedicated hardware and computer instructions.
实施例1Example 1
如图1所示,本实施例提供一种基于图神经网络的冠心病ECG智能检测方法,包括以下步骤:As shown in FIG1 , this embodiment provides a method for intelligent detection of ECG for coronary heart disease based on a graph neural network, comprising the following steps:
步骤1.获取临床数据集,将其脱敏后由专业医生在临床数据集上标注,分为冠脉异常和冠脉正常;Step 1. Obtain clinical data sets, desensitize them, and have professional doctors annotate them on the clinical data sets, dividing them into abnormal coronary arteries and normal coronary arteries;
具体的,临床数据为2756个XML格式的电子诊断报告,其中包括了采样频率为500Hz的1842位冠脉异常患者的1901个12导联心电记录和847位冠脉正常患者的855个12导联心电记录。Specifically, the clinical data consisted of 2756 electronic diagnostic reports in XML format, including 1901 12-lead ECG records of 1842 patients with abnormal coronary arteries and 855 12-lead ECG records of 847 patients with normal coronary arteries at a sampling frequency of 500 Hz.
步骤2.对标注后的临床数据集进行预处理,提取临床数据中的原始信号,得到12导联ECG心电信号后进行降噪及标准化处理;Step 2: Preprocess the annotated clinical data set, extract the original signal in the clinical data, obtain the 12-lead ECG signal, and then perform noise reduction and standardization;
具体的,标注后的临床数据集采用小波阈值去噪滤除线漂移等噪声;选择分解级别为6的db4小波函数进行小波分解,对小波分解的系数进行软阈值处理,最后通过小波重构得到降噪后的信号。使用最大最小归一化对临床数据进行标准化处理,将原始信号数据以线性化的方法转换到[0,1]范围,归一化公式如下:Specifically, the annotated clinical data set uses wavelet threshold denoising to filter out noise such as line drift; the db4 wavelet function with a decomposition level of 6 is selected for wavelet decomposition, and the coefficients of the wavelet decomposition are soft-thresholded, and finally the denoised signal is obtained through wavelet reconstruction. The clinical data is standardized using maximum and minimum normalization, and the original signal data is converted to the [0,1] range by a linear method. The normalization formula is as follows:
其中xmax为临床样本数据的最大值,xmin为临床样本数据的最小值。Where x max is the maximum value of the clinical sample data, and x min is the minimum value of the clinical sample data.
使用musexmlexport包提取出临床数据中的原始信号,并将临床数据转化为csv格式以备使用。The musexmlexport package was used to extract the raw signals from the clinical data and convert the clinical data into csv format for future use.
步骤3.基于改进的GCN网络构建诊断模型,如图2所示;以12导联ECG心电信号的各导联为节点,按生理空间关系加入拓扑连接构建ECG图,将该ECG图输入诊断模型进行训练并使用GNNExplain进行可解释性分析;Step 3. Build a diagnostic model based on the improved GCN network, as shown in Figure 2; take each lead of the 12-lead ECG signal as a node, add topological connections according to the physiological spatial relationship to build an ECG graph, input the ECG graph into the diagnostic model for training and use GNNExplain for interpretability analysis;
具体的,将12导联ECG心电信号按导联切分成12个单通道片段,并将这些片段转换为节点,将每个患者的心电图数据建模为一个ECG图,图中节点的特征是片段的时间序列,节点之间的空间连接是通过边来实现的。模型通过将各节点特征和连接关系进行学习处理,从而为整个图提供一个分类标签,表示当前患者的诊断结果。具体实现方式为:Specifically, the 12-lead ECG signal is divided into 12 single-channel segments according to the leads, and these segments are converted into nodes. The ECG data of each patient is modeled as an ECG graph. The characteristics of the nodes in the graph are the time series of the segments, and the spatial connection between nodes is achieved through edges. The model learns and processes the characteristics and connection relationships of each node to provide a classification label for the entire graph, indicating the diagnosis result of the current patient. The specific implementation method is:
步骤31:构建ECG图。心电信号通过记录放置于体表特定位置电极间的电位差,可以从不同的角度全面地显示心脏活动,其中12导联ECG信号包含3条肢体导联(I,II,III)、3条肢体增强导联(aVR,aVF,aVL)和6条胸导联(V1-V6),每个导联代表一个特定心脏区域的活动记录。所以根据电极的空间分布,可以将12个导联分为2个导联区域:肢体导联区域和胸部导联区域。将同一导联区域内的导联按生理空间关系连接,为了进行不同导联区域之间的信息交互,使用四条反映不同心脏区域的导联(肢体导联I、肢体导联III、胸导联V1、胸导联V6)连接在一起,实现导联区域之间的通信,连接方式如图3所示。Step 31: Construct an ECG graph. The ECG signal can comprehensively display the heart activity from different angles by recording the potential difference between electrodes placed at specific locations on the body surface. The 12-lead ECG signal includes 3 limb leads (I, II, III), 3 limb enhancement leads (aVR, aVF, aVL) and 6 chest leads (V1-V6), each of which represents the activity record of a specific heart region. Therefore, according to the spatial distribution of the electrodes, the 12 leads can be divided into 2 lead regions: the limb lead region and the chest lead region. The leads in the same lead region are connected according to the physiological spatial relationship. In order to exchange information between different lead regions, four leads reflecting different heart regions (limb lead I, limb lead III, chest lead V1, chest lead V6) are connected together to realize communication between lead regions. The connection method is shown in Figure 3.
步骤32:构建诊断模型,其包括特征提取模块和图神经网络模块;Step 32: construct a diagnostic model, which includes a feature extraction module and a graph neural network module;
特征提取模块主要由长短期记忆网络(Long Short-Term Memory,LSTM)构成,LSTM是一种循环神经网络(Recurrent Neural Network,RNN)的变体,通过引入称为“门”的结构来控制信息的流动,从而有效地捕捉和记忆长序列的依赖关系。由于其能够有效地处理长序列数据和捕捉时间依赖关系的能力,LSTM在心电信号分类任务中得到了广泛的应用。该模块将每个导联原始信号作为输入,获得导联级时域特征fb,并使用输出的特征向量初始化整个图网络中的节点。The feature extraction module is mainly composed of a long short-term memory network (LSTM), which is a variant of a recurrent neural network (RNN). It effectively captures and memorizes long sequence dependencies by introducing a structure called a "gate" to control the flow of information. Due to its ability to effectively process long sequence data and capture time dependencies, LSTM has been widely used in ECG signal classification tasks. This module takes each lead raw signal as input, obtains the lead-level time domain feature fb, and uses the output feature vector to initialize the nodes in the entire graph network.
图神经网络模块通过图卷积和图池化操作实现,其包含一个3层的GCN模型,GCN通过聚合邻居节点的信息来更新每个节点的表示。该模块使用基于自注意力的TopK图池化机制,在保留更多原始图的关键信息同时进行节点降采样,对图中每个节点学习出一个表示节点重要度的评分score,基于这个分数的排序丢弃一些低分数节点,将全图中的N个节点下采样至kN个节点;最后,通过迭代执行图卷积和图池操作以生成多个新的子图,聚合子图中的所有节点表示并求和得到固定大小(128)的图级特征fg。The graph neural network module is implemented through graph convolution and graph pooling operations, which contains a 3-layer GCN model. GCN updates the representation of each node by aggregating the information of neighboring nodes. This module uses a self-attention-based TopK graph pooling mechanism to downsample nodes while retaining more key information of the original graph. It learns a score representing the importance of each node in the graph, discards some low-score nodes based on the ranking of this score, and downsamples the N nodes in the full graph to kN nodes; finally, it iteratively performs graph convolution and graph pooling operations to generate multiple new subgraphs, aggregates all node representations in the subgraphs and sums them to obtain a fixed-size (128) graph-level feature fg.
诊断模型聚合fb和fg特征通过分类器进行分类。分类器使用Sigmoid函数对整图进行诊断标签的预测,将损失函数定义为标签上预测的交叉熵,输出的诊断结果分为两类,包括冠脉正常和冠脉异常。The diagnostic model aggregates the fb and fg features and classifies them through a classifier. The classifier uses the Sigmoid function to predict the diagnostic label of the entire image, defines the loss function as the cross entropy of the prediction on the label, and outputs two diagnostic results, including normal coronary artery and abnormal coronary artery.
步骤33:诊断模型。按患者patientID划分标注后的临床数据集,按7:2:1划分为训练集、验证集和测试集。所述临床数据集中的冠脉正常数据标记为(1,0),冠脉异常数据标记为(0,1);将处理后的数据输入上述诊断模型进行训练。具体步骤如下:Step 33: Diagnostic model. Divide the labeled clinical data set by patient ID into a training set, a validation set, and a test set at a ratio of 7:2:1. The normal coronary data in the clinical data set is marked as (1,0), and the abnormal coronary data is marked as (0,1); input the processed data into the above diagnostic model for training. The specific steps are as follows:
步骤331.将训练集数据送入诊断模型进行推理;Step 331. Send the training set data to the diagnostic model for reasoning;
步骤332.根据诊断模型的推理结果与真实的标签进行损失函数计算;Step 332: Calculate the loss function based on the inference result of the diagnostic model and the actual label;
步骤333.通过损失函数进行梯度反向传播,更新诊断模型权重,如果训练没有结束,则回到步骤1,如果训练结束,则到步骤4;Step 333. Perform gradient back propagation through the loss function to update the diagnostic model weights. If the training is not finished, return to step 1. If the training is finished, go to step 4.
步骤334.将已训练好的诊断模型应用于测试集,并得出分类指标。Step 334: Apply the trained diagnostic model to the test set and obtain classification indicators.
步骤34:可解释性分析。本发明使用GNNExplain的visualize_subgraph方法可视化解释诊断结果。GNNExplainer通过生成传递关键语义的掩码来捕获重要的输入特征,从而产生与原始预测相似的预测,它学习边缘和节点特征的软掩码,通过掩码优化来解释预测。具体如附图4所示。GNNExplainer的解释过程主要可以分为选择目标节点、构建扰动图、计算邻域重要性生成解释和可视化。在本发明的任务中,GNNExplainer将已经训练好的诊断模型和其预测结果作为输入,然后选择一个节点v,监测节点v上的一个子图的预测值以及该子图上更少特征的预测值,通过两者差值变化来提供基于子图或者特征的解释,使原图的预测与子图的预测之间的互信息MI最大化。Step 34: Interpretability analysis. The present invention uses the visualize_subgraph method of GNNExplain to visualize and explain the diagnostic results. GNNExplainer captures important input features by generating masks that convey key semantics, thereby producing predictions similar to the original predictions. It learns soft masks of edge and node features and explains predictions through mask optimization. As shown in Figure 4. The explanation process of GNNExplainer can be mainly divided into selecting target nodes, building perturbation graphs, calculating neighborhood importance to generate explanations and visualizations. In the task of the present invention, GNNExplainer takes the trained diagnostic model and its prediction results as input, then selects a node v, monitors the predicted value of a subgraph on the node v and the predicted value of fewer features on the subgraph, and provides a subgraph or feature-based explanation through the difference between the two, so as to maximize the mutual information MI between the prediction of the original image and the prediction of the subgraph.
步骤4.根据诊断模型构建基于图神经网络和12导联ECG心电信号的冠心病检测系统;Step 4. Construct a coronary heart disease detection system based on graph neural network and 12-lead ECG electrocardiogram signals according to the diagnostic model;
步骤41:搭建网页端检测平台:诊断模型部署在服务器端。接收到网页端的xml格式电子病历后,提取原始12导联ECG心电信号,对信号进行降噪、归一化处理,确保与训练时使用的数据格式一致;Step 41: Build a web-based detection platform: The diagnostic model is deployed on the server. After receiving the XML-formatted electronic medical record from the web-based end, extract the original 12-lead ECG signal, perform noise reduction and normalization on the signal to ensure that it is consistent with the data format used during training;
步骤42:诊断分类:预处理的临床数据转化为ECG图后输入训练后的诊断模型中进行冠心病检测,得到当前患者的诊断结果Step 42: Diagnostic classification: The pre-processed clinical data is converted into ECG graphs and then input into the trained diagnostic model for coronary heart disease detection to obtain the current patient's diagnosis result.
步骤43:结果可视化:诊断结果传递回前端系统,并在用户界面上可视化地解释每个诊断结果,展示当前分类结果的特征依据。Step 43: Result visualization: The diagnosis results are transmitted back to the front-end system, and each diagnosis result is visually explained on the user interface, showing the feature basis of the current classification result.
本领域技术人员应该明白,上述本公开的各模块或各步骤可以用通用的计算机装置来实现,可选地,它们可以用计算装置可执行的程序代码来实现,从而可以将它们存储在存储装置中由计算装置来执行,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。本公开不限制于任何特定的硬件和软件的结合。Those skilled in the art should understand that the modules or steps of the present disclosure can be implemented by a general-purpose computer device, or alternatively, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. The present disclosure is not limited to any specific combination of hardware and software.
以上所述仅为本申请的优选实施例而已,并不用于限制本申请,对于本领域的技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
上述虽然结合附图对本公开的具体实施方式进行了描述,但并非对本公开保护范围的限制,所属领域技术人员应该明白,在本公开的技术方案的基础上,本领域技术人员不需要付出创造性劳动即可做出的各种修改或变形仍在本公开的保护范围以内。Although the above describes the specific implementation methods of the present disclosure in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present disclosure. Technical personnel in the relevant field should understand that on the basis of the technical solution of the present disclosure, various modifications or variations that can be made by those skilled in the art without creative work are still within the scope of protection of the present disclosure.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410279309.2A CN118161169A (en) | 2024-03-12 | 2024-03-12 | Intelligent ECG detection method for coronary heart disease based on graph neural network |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410279309.2A CN118161169A (en) | 2024-03-12 | 2024-03-12 | Intelligent ECG detection method for coronary heart disease based on graph neural network |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN118161169A true CN118161169A (en) | 2024-06-11 |
Family
ID=91348029
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202410279309.2A Pending CN118161169A (en) | 2024-03-12 | 2024-03-12 | Intelligent ECG detection method for coronary heart disease based on graph neural network |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN118161169A (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119377648A (en) * | 2024-12-30 | 2025-01-28 | 中南大学 | A cardiac arrhythmia detection system based on graph neural network |
| CN119763809A (en) * | 2024-12-19 | 2025-04-04 | 南通大学 | A graph convolutional heart disease detection method integrating trust loss and decision reclassification |
| CN120126781A (en) * | 2025-03-04 | 2025-06-10 | 南京迈拓医药科技有限公司 | Health status assessment method based on real-time physiological signal feature extraction |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111700608A (en) * | 2020-07-24 | 2020-09-25 | 武汉中旗生物医疗电子有限公司 | Multi-classification method and device for electrocardiosignals |
| CN114209320A (en) * | 2021-11-17 | 2022-03-22 | 山东师范大学 | Depression patient electroencephalogram recognition system based on mutual graph information maximization |
| WO2022218685A1 (en) * | 2021-04-16 | 2022-10-20 | Siemens Aktiengesellschaft | Method and controller for generating a predictive maintenance alert |
| CN116959572A (en) * | 2023-08-02 | 2023-10-27 | 中南民族大学 | Breast cancer subtype classification method and system based on graph convolutional neural network |
| CN117668466A (en) * | 2023-12-20 | 2024-03-08 | 湖南大学 | Multi-lead ECG data processing method, device and medium based on graph comparison learning |
-
2024
- 2024-03-12 CN CN202410279309.2A patent/CN118161169A/en active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111700608A (en) * | 2020-07-24 | 2020-09-25 | 武汉中旗生物医疗电子有限公司 | Multi-classification method and device for electrocardiosignals |
| WO2022218685A1 (en) * | 2021-04-16 | 2022-10-20 | Siemens Aktiengesellschaft | Method and controller for generating a predictive maintenance alert |
| CN114209320A (en) * | 2021-11-17 | 2022-03-22 | 山东师范大学 | Depression patient electroencephalogram recognition system based on mutual graph information maximization |
| CN116959572A (en) * | 2023-08-02 | 2023-10-27 | 中南民族大学 | Breast cancer subtype classification method and system based on graph convolutional neural network |
| CN117668466A (en) * | 2023-12-20 | 2024-03-08 | 湖南大学 | Multi-lead ECG data processing method, device and medium based on graph comparison learning |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119763809A (en) * | 2024-12-19 | 2025-04-04 | 南通大学 | A graph convolutional heart disease detection method integrating trust loss and decision reclassification |
| CN119763809B (en) * | 2024-12-19 | 2025-10-10 | 南通大学 | Method for detecting picture convolution heart disease by fusing trust loss and decision reclassification |
| CN119377648A (en) * | 2024-12-30 | 2025-01-28 | 中南大学 | A cardiac arrhythmia detection system based on graph neural network |
| CN120126781A (en) * | 2025-03-04 | 2025-06-10 | 南京迈拓医药科技有限公司 | Health status assessment method based on real-time physiological signal feature extraction |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Murugesan et al. | Ecgnet: Deep network for arrhythmia classification | |
| CN118161169A (en) | Intelligent ECG detection method for coronary heart disease based on graph neural network | |
| US20210353203A1 (en) | Diagnostics for detection of ischemic heart disease | |
| CN111565633A (en) | Time series data learning and analyzing method using artificial intelligence | |
| Ullah et al. | An End‐to‐End Cardiac Arrhythmia Recognition Method with an Effective DenseNet Model on Imbalanced Datasets Using ECG Signal | |
| JP2023104885A (en) | ECG Heart Rate Multitype Prediction Method Based on Graph Convolution | |
| CN116864140A (en) | Intracardiac branch of academic or vocational study postoperative care monitoring data processing method and system thereof | |
| Al-Huseiny et al. | Diagnosis of arrhythmia based on ECG analysis using CNN | |
| Tong et al. | Locating abnormal heartbeats in ECG segments based on deep weakly supervised learning | |
| Raghukumar et al. | Enhancing Myocardial Infarction Diagnosis: Insights from ECG Image Analysis and Machine Learning | |
| EP4609315A1 (en) | Method for extracting information from multi-channel measurement data, measurement system for obtaining multi-channel measurement data | |
| CN116172573A (en) | Arrhythmia image classification method based on improved acceptance-ResNet-v 2 | |
| CN114711786A (en) | Electrocardiogram diagnosis method and device based on artificial rule enhanced neural network | |
| Sreeja et al. | A deep convolutional model for heart disease prediction based on ECG data with explainable AI | |
| CN110786847B (en) | Electrocardiogram signal library building method and analysis method | |
| JP2025022872A (en) | Apparatus and method for generating diagnostic labels - Patents.com | |
| Rahman et al. | Residual-attention deep learning model for atrial fibrillation detection from Holter recordings | |
| Vu et al. | Cardio Care: A Vision Transformer Cardiac Classification Based on Electrocardiogram Images and Signals | |
| RU2833175C1 (en) | Method for detecting cardiovascular diseases by ecg | |
| Soro et al. | Deep Cardiovascular Clinical Decision Support and Control System | |
| Demir et al. | Contribution to the Development of Intelligent Systems for Multi-Lead ECG Signal Classification Using Convolutional Neural Networks | |
| Ghosh et al. | A precise deep learning-based ECG arrhythmia classification scheme using deep bidirectional capsule network classifier | |
| Baygin et al. | Correction to: Automated facial expression recognition using exemplar hybrid deep feature generation technique | |
| Benmalek et al. | An Embedded IoT System for Real-Time ECG Diagnosis | |
| Rahman et al. | Automatic Arrhythmia Detection Using Deep Learning |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |