[go: up one dir, main page]

CN115062655A - Multi-lead electrocardiosignal analysis method and multi-lead myocardial infarction analysis system - Google Patents

Multi-lead electrocardiosignal analysis method and multi-lead myocardial infarction analysis system Download PDF

Info

Publication number
CN115062655A
CN115062655A CN202210657092.5A CN202210657092A CN115062655A CN 115062655 A CN115062655 A CN 115062655A CN 202210657092 A CN202210657092 A CN 202210657092A CN 115062655 A CN115062655 A CN 115062655A
Authority
CN
China
Prior art keywords
module
lead
fusion
myocardial infarction
data
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.)
Withdrawn
Application number
CN202210657092.5A
Other languages
Chinese (zh)
Inventor
刘通
魏树鸿
臧睦君
柳婵娟
周树森
王庆军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yantai New And Old Kinetic Energy Conversion Research Institute And Yantai Demonstration Base For Transfer And Transformation Of Scientific And Technological Achievements
Original Assignee
Yantai New And Old Kinetic Energy Conversion Research Institute And Yantai Demonstration Base For Transfer And Transformation Of Scientific And Technological Achievements
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Yantai New And Old Kinetic Energy Conversion Research Institute And Yantai Demonstration Base For Transfer And Transformation Of Scientific And Technological Achievements filed Critical Yantai New And Old Kinetic Energy Conversion Research Institute And Yantai Demonstration Base For Transfer And Transformation Of Scientific And Technological Achievements
Priority to CN202210657092.5A priority Critical patent/CN115062655A/en
Publication of CN115062655A publication Critical patent/CN115062655A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/318Heart-related electrical modalities, e.g. electrocardiography [ECG]
    • A61B5/346Analysis of electrocardiograms
    • A61B5/349Detecting specific parameters of the electrocardiograph cycle
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7271Specific aspects of physiological measurement analysis
    • A61B5/7282Event detection, e.g. detecting unique waveforms indicative of a medical condition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H10/00ICT specially adapted for the handling or processing of patient-related medical or healthcare data
    • G16H10/60ICT specially adapted for the handling or processing of patient-related medical or healthcare data for patient-specific data, e.g. for electronic patient records
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H50/00ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics
    • G16H50/20ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics for computer-aided diagnosis, e.g. based on medical expert systems
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H50/00ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics
    • G16H50/30ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics for calculating health indices; for individual health risk assessment

Landscapes

  • Health & Medical Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Medical Informatics (AREA)
  • Public Health (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Pathology (AREA)
  • Physics & Mathematics (AREA)
  • Molecular Biology (AREA)
  • Data Mining & Analysis (AREA)
  • Cardiology (AREA)
  • Epidemiology (AREA)
  • Primary Health Care (AREA)
  • Biophysics (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Surgery (AREA)
  • Animal Behavior & Ethology (AREA)
  • Veterinary Medicine (AREA)
  • Artificial Intelligence (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Evolutionary Computation (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physiology (AREA)
  • Psychiatry (AREA)
  • Signal Processing (AREA)
  • Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)

Abstract

The invention relates to the technical field of electrocardiosignal analysis, and particularly discloses a multi-lead electrocardiosignal analysis method. Firstly, setting system parameters and autonomously generating a neural network; performing multi-mode fusion processing on the signal characteristics of each lead by a cross-attention mechanism aiming at the generated neural network to realize the characteristic enrichment of the multi-lead electrocardiosignals on clinical detection, and performing connection extraction on the time domain characteristics of the electrocardiosignals by a self-attention mechanism; and inputting the fusion characteristics obtained by combining the cross-attack mechanism and the self-attack mechanism into a convolutional neural network to obtain the confidence coefficient of predicting the electrocardiosignal as myocardial infarction. The invention also comprises a multi-lead myocardial infarction analysis system based on the method.

Description

Multi-lead electrocardiosignal analysis method and multi-lead myocardial infarction analysis system
Technical Field
The invention belongs to the technical field of electrocardiosignal analysis, and particularly relates to a multi-lead electrocardiosignal analysis method and a multi-lead myocardial infarction analysis system.
Background
When the electrocardiogram of the patient with myocardial infarction is detected, in order to make the diagnosis result more accurate, the multi-lead electrocardiogram is mostly used for clinical diagnosis of the disease condition of the patient. The patient is generally clinically subjected to 18-lead or 12-lead electrocardiosignal acquisition. With the development of computer technology, methods for detecting electrocardiosignals by using digital signal processing means or machine learning means are increasingly widely used. Especially for myocardial infarction, because myocardial infarction has the characteristics of sudden onset of disease, high death rate and capability of saving the life of a patient by timely rescue, the monitoring of the electrocardiosignals by using the computer technology can effectively help the myocardial infarction patient to monitor the heart health condition of the patient, and can help a doctor to have more accurate criteria in clinical diagnosis, thereby effectively improving the diagnosis efficiency and accuracy of the doctor.
In the automatic detection of cardiac electrical signals, the myocardial infarction detection systems used in clinic at present have the following: and finally, carrying out weighted mean according to the discrimination result of each lead to obtain a final result. The method does not consider the interference degree of noise on each lead in the acquisition process, and whether one or more leads fall off; the method has the advantages that the convolutional neural network is used for carrying out multi-mode fusion on the electrocardiosignals, the method is good in robustness and high in accuracy, but the convolutional neural network cannot pay attention to the temporal front-to-back relation of the electrocardiosignals. In the field of natural language processing, the attention mechanism in the transform can effectively make close context relations in words, sentences, paragraphs and articles. Meanwhile, many models such as vison transformers and swin transformers which process digital images by using a force-of-attention mechanism in the transformers also achieve detection and recognition accuracy exceeding that of many convolutional neural network-based detection and recognition accuracy in the image field. Therefore, building a system which can intelligently fuse the characteristics of each lead and can be distinguished according to a cross-attention mechanism and a self-attention mechanism in a transducer can be very helpful for diagnosing pathological signals of multi-lead ECG signals.
Disclosure of Invention
Aiming at the defects existing in the prior art, the invention provides a multi-lead electrocardiosignal analysis method and a multi-lead myocardial infarction analysis system, and aims to construct an attention fusion module combining a cross-attack mechanism and a self-attack mechanism, input the characteristics output by the module into a convolutional neural network to analyze the form of the myocardial infarction of a plurality of leads electrocardiogram and finally obtain the prediction probability of the multi-lead electrocardiosignal as the myocardial infarction.
The specific technical scheme is as follows:
one of the purposes of the invention is to provide a multi-lead electrocardiosignal analysis method, which comprises the following steps:
s1, setting parameters of a system, and autonomously generating a neural network structure capable of realizing set conditions according to the set number N of leads and a set training data set; wherein N is a positive integer;
s2, aiming at the generated neural network, performing multi-mode fusion processing on the signal characteristics of each lead through a cross-attention mechanism, thereby realizing the characteristic enrichment of the multi-lead electrocardiosignals on clinical detection; in particular, during multimodal fusion processing, attention weights may be reduced for certain lead or leads of low quality cardiac electrical signals;
s3, connecting and extracting time domain characteristics of the electrocardiosignals according to a self-attention mechanism;
and S4, inputting the fusion characteristics of the cross-attention mechanism and the self-attention mechanism after combination into a convolutional neural network, training the generated neural network through a set training data set, and identifying the electrocardiosignals by using the trained neural network to obtain the confidence coefficient of predicting the electrocardiosignals as myocardial infarction. And performing alarm operation when the confidence coefficient of the predicted myocardial infarction is greater than a set threshold value.
Another objective of the present invention is to provide a multi-lead myocardial infarction analysis system, and in particular, to a multi-lead myocardial infarction analysis system including a convolution module and an attention fusion module, which includes a fusion system operation module, a data acquisition module, an ECG signal preprocessing module, a convolution module, an attention fusion module, and a data analysis module, as shown in fig. 1.
A) The fusion system operation module is used for setting system parameters by a system user and sending commands to other modules so as to realize the control of the system; the parameters include the number of leads N, a training data set, a system state and a data output format; the system states include a myocardial infarction analysis state and a neural network training state.
Further, the number of leads N is 12 or 18.
B) The data acquisition module acquires the electrocardiosignals through the multi-lead electrocardio acquisition equipment and finishes acquisition in a way of digitizing and storing the electrocardiosignals.
Further, when the number N of leads is 12, 6 limb leads (I, II, III, aVR, aVL, aVF) and 6 chest leads (V1-V6) are collected; when the number N of leads is 18, 6 limb leads (I, II, III, aVR, aVL, aVF), 6 chest leads (V1-V6), 3 right chest leads (V3R-V5R) and 3 left chest leads (V7-V9) are collected.
C) The ECG signal preprocessing module is used for preprocessing the data acquired by the data acquisition module or the downloaded data; the ECG signal preprocessing module depends on the system state of the fusion system operating module.
Further, in the ECG signal preprocessing module, when the system state is a neural network training state, reading the number of leads set by the fusion system operation module and detecting diseases; reading the electrocardiosignal data set with the label, specifically, reading the electrocardiosignal data set with the label by using a reading tool kit of a WFDB international standard pass electrocardiosignal database; reading R wave coordinate position information in the data set label information, and if the data does not have R wave marking information, filtering the original signal to obtain filtered data and unfiltered data which is not filtered; performing R wave detection on the filtered data; cutting unfiltered data according to R wave coordinates in the heart beat obtained by R wave detection or R wave coordinates in the read label; and outputting the data to a model training submodule of the convolution module and the attention fusion module.
Further, in the ECG signal preprocessing module, when the system state is the myocardial infarction analysis state, filtering the read multi-lead acquisition signal of the acquisition module; performing R wave detection on the electrocardiosignals subjected to filtering; cutting the electrocardiosignals through R wave coordinates in the heart beat obtained according to R wave detection; and outputting the data to a model detection submodule of the convolution module and the attention fusion module.
The filtering process preferably uses a butterworth low-pass filter to filter high-frequency noise such as power frequency interference noise, myoelectric noise and the like in the electrocardiosignal.
D) The convolution module and the attention fusion module are used for performing multi-mode fusion processing on the preprocessed electrocardiosignals and outputting the probability that the electrocardiosignals are myocardial infarction; when the fusion system operation module is set to be in a neural network training state, calling a model training submodule; when the fusion system operation module is set to be in a myocardial infarction analysis state, a model detection submodule is called;
further, the model training sub-module automatically generates an adaptive neural network according to the number N of leads set by the fusion system operation module; performing fusion processing on the electrocardiosignals of multiple leads by using a fusion module combining a cross-attention mechanism and a self-attention mechanism, performing interaction on the electrocardiosignals of all leads by using the cross-attention mechanism, and endowing cross-attention with the capability of selecting the quality of the electrocardiosignals of all leads and judging the importance of diseases by back propagation so as to realize the feature enrichment of the electrocardiosignals of multiple leads on clinical detection; searching the characteristics of the time sequence of the electrocardiosignals in the leads by using a self-attention mechanism, and connecting and extracting the characteristics of the time sequence of the electrocardiosignals; inputting the fusion characteristics obtained by the fusion module combining the cross-attention mechanism and the self-attention mechanism into a neural network, intercepting the fusion characteristics and inputting the intercepted fusion characteristics into the neural network to identify and position the morphological characteristics of the electrocardiosignals as the input length of the fusion module combining the cross-attention mechanism and the self-attention mechanism exceeds 128 and then puts higher requirements on the computing power of an operating machine; and calling the read data set to train the neural network, and storing the training parameters with the optimal effect.
Furthermore, the model detection submodule predicts the electrocardiosignals of each lead by calling the stored training parameters with the optimal effect and outputs the probability that the electrocardiosignals are myocardial infarction.
Further, the construction method of the neural network is CNN-LSTM.
E) And the data analysis module is used for receiving the prediction results from the convolution module and the attention fusion module, integrating and analyzing the prediction results of all heartbeats and outputting the confidence coefficient and the detection report of the whole electrocardiosignal as a myocardial infarction signal.
Specifically, the modules are connected and matched in the following way:
firstly, parameters of the system are set through the fusion system operation module, the number N of lead connections of electrocardiosignals worn by a patient is set, a data set which needs to be led in during model training is set, and the use state of the system is set to be a myocardial infarction analysis state or a neural network training state. The initial use can only be in the neural network training state.
When the system state is a neural network training state:
s1, downloading a data set of a disease to be detected in an international universal electrocardiogram standard database by a fusion system operation module; reading the data set by using a read data packet WFDB of an international universal electrocardiogram standard database under a python environment; or importing a data set with a set path by using the WFDB;
s2, inputting the read data set into an ECG signal preprocessing module; the ECG signal preprocessing module processes the read data and the label of the data set, reads the coordinates of the vertex of the R wave in the label, intercepts P points forward of the vertex of the R wave, intercepts Q points backward, intercepts the beat length L which is P + Q in each lead, and stores the beats of N leads with the length L into an N matrix;
s3, traversing the X cardiac beats in the data set, and repeating the process to obtain N X L electrocardiosignal data of the X cardiac beats; storing the data of each heart beat according to a vector to obtain an array of X N L;
s4, processing the labels of the data set, traversing X heartbeats in the data set, reading whether each heart beat is a sick heart beat, setting the sick heart beat as 1 and setting the normal heart beat as 0; performing one-hot processing on the label to be set to 0 or 1; correspondingly storing the processed heart beats and the tags to form a data set D;
s5, dividing the data set D into a training set, an inter-group test set and an intra-group test set according to the patient, wherein the dividing ratio is 7: 2: 1;
s6, calling a torch in a python deep neural network universal tool library Pythrch at the convolution module and the attention fusion module to introduce the multiheadAttention function;
s7, setting a lead inner fusion layer in a model training submodule in the convolution module and the attention fusion module, setting a lead inner fusion layer, using a normal layer function, a linear layer function, an activation layer function, a MultiheadAttention function and a dropout layer, and combining the functions;
s8, setting a fusion layer between leads, and setting a cycle with N cycle times according to the number N of leads set by the fusion system operation module; in circulation, each lead is input into an in-lead fusion submodule, and the output results of the N fusion layers are input into an inter-lead attention layer; firstly, a normal layer function is placed in an inter-lead attention layer, then the normal layer function is input into a multilead attention function, and then an activation function, a linear layer and a normal layer follow, as shown in figure 2;
s9, training parameters of the convolution module and the attention fusion module, and testing the accuracy rate of the modules in and among groups; inputting a data set D into a model, performing iterative computation on the model by using a training set, performing iterative update on the model by taking a minimized cost function as a target, and calculating the inter-group accuracy and the intra-group accuracy of the model by using an intra-group test set and an inter-group test set after each training period is finished;
s10, when the loss function is gradually reduced to be smaller in the reduction trend and the overall loss function presents a convergence state, saving a h5 file as a model parameter and a json file as a model structure; comparing the two-dimensional predicted value corresponding to the test set sample with the label model of the test set sample to check whether the classification is correct, and calculating the accuracy according to the correct proportion of the two-dimensional predicted value to the whole test set sample; reading the model structure and the optimal training parameters into a model detection submodule of a convolution module and an attention fusion module;
specifically, each data in the data set is read successively in the training process, heart beat data of N leads are read simultaneously each time, a batch of read data is formed, and the read data is read into a trained model;
s11, stopping model parameter iteration when the cost function is attenuated to a state that no obvious descending trend exists in a plurality of training periods continuously; the user is asked by the system operation module whether to enter a myocardial infarction analysis state.
When the system state is a myocardial infarction analysis state:
s1, reading an electrocardiosignal with a lead number N by using a data acquisition module;
s2, inputting the acquired N-lead electrocardiosignals into an ECG signal preprocessing module, and removing power frequency interference, myoelectricity noise, wearing falling-off noise and the like of each lead by using a Butterworth low-pass filter. And performing R wave detection on the de-noised data. Outputting R wave vertex coordinates of each lead, and carrying out mean value processing on R wave coordinate data of the same position of each lead to obtain R wave vertex coordinates of N lead electrocardiosignals;
s3, traversing the detected R wave vertex coordinates, forward intercepting P points of the R wave vertex, and backward intercepting Q points, wherein the intercepting heart beat length in each lead is L ═ P + Q;
s4, traversing the detected R-wave coordinates, forward intercepting P points from the top point of the R-wave, backward intercepting Q points, wherein the length of the intercepted heartbeat in each lead is L-P + Q, and inputting heartbeats of N leads into a MODEL to obtain a two-dimensional predicted value; storing heartbeats of N leads with the length of L into an N-L matrix;
s5, reading the obtained matrix batch into a model detection submodule in a convolution module and attention fusion module to obtain a 2N L matrix; inputting the obtained matrix into a data analysis module; the data analysis module processes the data, and judges the heart beat of which the matrix value on the first N x L is larger than that on the second N x L as a myocardial infarction signal, otherwise, the heart beat is a normal signal; and generating an analysis report which is judged as the position coordinate of the myocardial infarction according to the obtained result.
The invention also provides a multi-lead myocardial infarction analysis device which comprises the multi-lead myocardial infarction analysis system.
The invention has the following beneficial effects:
(1) compared with the prior art, the cross-attention mechanism and the self-attention mechanism in the transform are combined to perform attention fusion on the multi-lead electrocardiosignals, and the multi-lead myocardial infarction analysis system comprising the convolution module and the attention fusion module is innovatively provided. The system is used for fusing the morphological characteristics of multi-lead electrocardiosignals, emphasizes the lead fusion weight which is helpful for electrocardiogram detection through training, and reduces the lead fusion weight which is poor in electrocardiogram quality, high in noise or not helpful for electrocardiogram detection.
(2) Compared with the prior art, the invention can adjust the lead number of the input electrocardiosignals according to the system operation module, and can be applied to electrocardiosignal acquisition systems with different lead numbers. Because the number of leads of the monitored electrocardiograms required by different patient groups is different, the electrocardiosignals without limiting the number of leads can be detected, and one detection system is compatible with more types of electrocardio acquisition equipment. By limiting the scale of the model, automatically downloading the data set and adjusting the acquisition lead number of the electrocardiosignals, the system is compatible with the electrocardiosignals with uncertain lead number.
(3) Compared with the prior art, the invention can independently download the international universal data set or import and use the self-built data set of the hospital through the operation module of the fusion system. The network parameters are trained by themselves through the downloaded or imported data sets. The existing hospitals are provided with a plurality of electrocardio databases of the hospitals, and the detection purpose of the electrocardio databases is difficult to realize by using an international universal data set, so that a plurality of hospitals hope to use a large amount of self-established data sets in the hospitals to construct automatic detection equipment. The system can use the system operation module to import the hospital self-built data set, convert the data set into a data format which can be used by the model, and train data of each hospital to generate myocardial infarction analysis equipment which meets clinical requirements of the hospital.
Drawings
FIG. 1 is a schematic diagram of a multi-lead myocardial infarction analysis system of the present invention;
fig. 2 is a schematic structural diagram of a convolution module and an attention fusion module in the multi-lead myocardial infarction analysis system of the present invention.
Detailed Description
The principles and features of this invention are described below in conjunction with examples, which are set forth to illustrate, but are not to be construed to limit the scope of the invention.
Taking the number of leads N as 12, the initial use system as an example, includes the following steps:
firstly, parameter setting is carried out through a fusion system operation module, the number of leads is set to be 12, a training data set is an international traffic electrocardiogram data base PTB Diagnostic ECG Database (ptbdb), and a system state is a neural network training state. And downloading the PTB Diagnostic ECG Database (ptbdb) through the fusion system operation module.
The data and instructions for this database are disclosed on the Physionet org website known in the industry. The myocardial infarction database comprises 15 leads of electrocardiosignal data of 294 patients or volunteers, wherein the electrocardiosignal data comprises conventional 12 leads and 3 Frank leads, and only 12 leads of electrocardiosignal data are selected to train a convolution module and an attention fusion module.
Because the data set is not provided with the labeled R wave label, the R wave peak of the electrocardiosignals in the downloaded data set is detected, the electrocardiosignals are cut through the obtained R wave peak, 200 points are respectively taken before and after the simultaneous R wave in each lead to form 12 x 400 data, and the label in the data set is only distinguished by normal heart beating and myocardial infarction heart beating; setting the label of the myocardial infarction label as 1, setting the label of the healthy heart beat as 0, and carrying out one-hot processing on the labels.
And constructing network structures in the convolution module and the attention fusion module, reading 12 lead numbers set on the operation module of the fusion system, and connecting the set fusion cross sub-modules in a cycle with 12 cycle numbers by using a cycle operation. Specifically, the cross-annotation mechanism and self-annotation mechanism are combined to use the following structure:
the attribute layer is first declared to be the multiheadAttention function, with the parameters d _ model, n _ head, and dropout. And performing transposition operation on the input data, and inputting the transposed input data into an attribute layer, wherein attn _ mask is set to be null, and key _ padding _ mask is set to be null. Data output by the attention layer is input into the dropout _1 layer and added with original data, and data with the addition completed is input into the norm _1 layer. Then, the data sequentially passes through the wire layer _1, the activation layer _1, the dropout layer _2 and the wire layer _ 2. Inputting and storing the data passing through the flow, inputting the data into the dropout _3 layer, adding the data output by the dropout _3 layer and the stored data to pass through the norm _2 layer, and transposing the data passing through the norm _2 layer.
After completing the connection of 12 leads to an intra-lead attention function respectively, the 12 outputs are input to an inter-lead attention function in sequence, and the inter-lead attention function is built in sequence by using the following functions: the normal _3 layer function is then input to the multiheader authorization _2 function, followed by the activation function _2, the linear layer and the normal _4 layer. And (4) when the attention layer is built, importing the multiheadAttention function by using the torch in a python deep neural network universal tool library Pythrch.
The output of cross-attribute and self-attribute combination modules is input into a simple convolutional neural network, wherein the convolutional neural network comprises a one-dimensional convolutional layer conv1 connected with norm _3 behind, and then sequentially passes through an activation layer 2, an LSTM layer, a linear layer 3, a linear layer 4 and an activation layer 3 with an activation function of sigmoid.
Training the network structures in the convolution module and the attention fusion module, reading the completed data into the convolution module and the attention fusion module, and training the parameters of the model training submodule. 1000 batches were set, each batch sized to 256 samples. And updating and iterating the parameters of the model training submodule by using an adam optimizer through a minimized cost function, wherein the parameters of the model training submodule are updated every time the parameters of the model training submodule are updated and iterated. And stopping iteratively updating parameters of the model until the loss value and the accuracy between the label and the predicted value are converged. And inputting the parameters and the model structure which are trained into a model detection submodule.
And setting the system to be in a myocardial infarction analysis state by using the fusion system operation module. The data acquisition module is used for acquiring 12-lead electrocardiosignals, and the acquired 12-lead electrocardiosignals are input to the ECG signal preprocessing module. And a Butterworth low-pass filter is used for removing power frequency interference, myoelectric noise, wearing falling noise and other noises of each lead. And performing R wave detection on the de-noised data. And synthesizing the R wave vertex coordinates of the obtained electrocardiosignals of each lead. Traversing the obtained R wave coordinates, cutting 12 leads of electrocardiosignals at the same position, taking 150 points after the R wave front, simultaneously putting the 12 leads of the electrocardiosignals into an array, and putting all heart beat combinations after traversing into an array.
And reading the electrocardiosignals in batches, in which all the heartbeat data are stored, into a model detection submodule of the convolution module and the attention fusion module. The neural network of the convolution module and the attention fusion module comprises a fusion module used for cross-attention and self-attention, 12-lead electrocardiosignals are fused by using cross-attention, the electrocardiosignals on a time sequence are fused by using self-attention, and an output probability result is input to the data analysis module.
The data analysis module compares the probability of each beat being determined to be myocardial infarction with the probability of each beat being determined to be a normal beat. And if the probability judged to be normal is greater than the probability judged to be myocardial infarction, the heartbeat is a normal heartbeat, and if the probability judged to be normal is less than the probability judged to be myocardial infarction, the heartbeat is a myocardial infarction heartbeat. And marking the obtained heart beat position of the myocardial infarction in the whole electrocardiosignal in the electrocardiosignal. And drawing an electrocardiosignal scatter diagram through the RR interval of the electrocardiosignals, and marking the electrocardiosignals representing myocardial infarction as red points. And drawing the electrocardiosignals marking the myocardial infarction position and the RR scattergram marking the myocardial infarction into an analysis report. The analysis report states the proportion of the myocardial infarction heart beat to the whole electrocardiosignal, the R wave coordinate of the initial heart beat and the R wave coordinate of the final heart beat of the myocardial infarction signal section and the RR interval average value of the myocardial infarction signal section.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and should not be taken as limiting the scope of the present invention, which is intended to cover any modifications, equivalents, improvements, etc. within the spirit and scope of the present invention.

Claims (9)

1. A multi-lead electrocardiosignal analysis method is characterized by comprising the following steps:
s1, setting parameters of a system, and autonomously generating a neural network structure according to a set lead number N and a set training data set; wherein N is a positive integer;
s2, aiming at the generated neural network, performing multi-mode fusion processing on the signal characteristics of each lead through a cross-attention mechanism to realize the characteristic enrichment of the multi-lead electrocardiosignals on clinical detection;
s3, connecting and extracting time domain characteristics of the electrocardiosignals according to a self-attention mechanism;
and S4, inputting the fusion characteristics of the cross-attention mechanism and the self-attention mechanism after combination into a convolutional neural network, training the generated neural network through a set training data set, and using the trained neural network to obtain the confidence coefficient of predicting the electrocardiosignals as myocardial infarction.
2. A multi-lead myocardial infarction analysis system is characterized by comprising a fusion system operation module, a data acquisition module, an ECG signal preprocessing module, a convolution module, an attention fusion module and a data analysis module;
the fusion system operation module is used for setting parameters of the system and sending commands to other modules so as to realize the control of the system; the parameters comprise the number N of leads adapted by the system, a training data set, a system state and an output format of system data; the system state comprises a neural network training state and a myocardial infarction analysis state;
the data acquisition module acquires electrocardiosignals through multi-lead electrocardio acquisition equipment, and the acquisition is completed in a mode of digitizing and storing the electrocardiosignals;
the ECG signal preprocessing module is used for preprocessing the data acquired by the data acquisition module or the downloaded data; the ECG signal pre-processing module is dependent on a system state of the fusion system operating module;
the convolution module and the attention fusion module are used for performing multi-mode fusion processing on the preprocessed electrocardiosignals and outputting the probability that the electrocardiosignals are myocardial infarction; when the fusion system operation module is set to be in a neural network training state, calling a model training submodule; when the fusion system operation module is set to be in a myocardial infarction analysis state, a model detection submodule is called;
the data analysis module receives the prediction results from the convolution module and the attention fusion module, integrates and analyzes the prediction results of each heartbeat, and outputs the confidence coefficient and the detection report of the whole electrocardiosignal as a myocardial infarction signal.
3. The multi-lead myocardial infarction analysis system of claim 2, wherein the ECG signal preprocessing module, when the fusion system operation module is set to the neural network training state, reads the number of leads set by the fusion system operation module and detects a disease; reading an electrocardiosignal data set with a label; reading R wave coordinate position information in the data set label information, and if no R wave marking information exists in the data, filtering the original signal to obtain filtered data and unfiltered data which is not filtered; performing R wave detection on the filtered data; cutting unfiltered data according to R wave coordinates in the heart beat obtained by R wave detection or R wave coordinates in the read label; and outputting the data to a model training submodule of the convolution module and the attention fusion module.
4. The multi-lead myocardial infarction analysis system according to claim 2, wherein the ECG signal preprocessing module performs filtering processing on the read multi-lead acquisition signals of the acquisition module when the fusion system operation module is set to the myocardial infarction analysis state; performing R wave detection on the electrocardiosignals subjected to filtering; cutting the electrocardiosignal according to the R wave coordinate in the heart beat obtained by R wave detection; and outputting the data to a model detection submodule of the convolution module and the attention fusion module.
5. The multi-lead myocardial infarction analysis system of claim 4, wherein the filtering process of the ECG signal preprocessing module is to filter out high frequency components of the electrocardiosignal by using a low pass filter.
6. The multi-lead myocardial infarction analysis system of claim 2, wherein the model training sub-module is configured to automatically generate an adapted neural network according to the number of leads N set by the fusion system operation module; performing fusion processing on the electrocardiosignals of multiple leads by using a fusion module combining a cross-attention mechanism and a self-attention mechanism, performing interaction on the electrocardiosignals of all leads by using the cross-attention mechanism, and endowing the cross-attention mechanism with the capability of selecting the electrocardiosignal quality of each lead and judging the importance of diseases by back propagation so as to realize the feature enrichment of the electrocardiosignals of multiple leads on clinical detection; searching the characteristics of the time sequence of the electrocardiosignals in the leads by using a self-attention mechanism, and connecting and extracting the characteristics of the time sequence of the electrocardiosignals; inputting the fusion characteristics obtained by the fusion module combining the cross-attention mechanism and the self-attention mechanism into a neural network, and identifying and positioning the morphological characteristics of the electrocardiosignals; and calling the read data set to train the neural network, and storing the training parameters with the optimal effect.
7. The multi-lead myocardial infarction analysis system according to claim 2, wherein the model detection sub-module predicts the electrocardiographic signals of the leads by calling the stored training parameters with optimal effect, and outputs the probability that the electrocardiographic signals are myocardial infarction.
8. The multi-lead myocardial infarction analysis system of claim 2, wherein the neural network is constructed using CNN-LSTM.
9. A multi-lead myocardial infarction analysis apparatus comprising the multi-lead myocardial infarction analysis system according to any one of claims 2 to 8.
CN202210657092.5A 2022-06-10 2022-06-10 Multi-lead electrocardiosignal analysis method and multi-lead myocardial infarction analysis system Withdrawn CN115062655A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210657092.5A CN115062655A (en) 2022-06-10 2022-06-10 Multi-lead electrocardiosignal analysis method and multi-lead myocardial infarction analysis system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210657092.5A CN115062655A (en) 2022-06-10 2022-06-10 Multi-lead electrocardiosignal analysis method and multi-lead myocardial infarction analysis system

Publications (1)

Publication Number Publication Date
CN115062655A true CN115062655A (en) 2022-09-16

Family

ID=83199875

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210657092.5A Withdrawn CN115062655A (en) 2022-06-10 2022-06-10 Multi-lead electrocardiosignal analysis method and multi-lead myocardial infarction analysis system

Country Status (1)

Country Link
CN (1) CN115062655A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115670475A (en) * 2022-11-18 2023-02-03 深圳市联影高端医疗装备创新研究院 Myocardial infarction detection method, system, equipment and medium based on neural network
CN115844424A (en) * 2022-10-17 2023-03-28 北京大学 Sleep spindle wave grading identification method and system
CN117796817A (en) * 2024-02-29 2024-04-02 山东大学齐鲁医院 Method and system for rapid detection and early warning of acute myocardial infarction

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115844424A (en) * 2022-10-17 2023-03-28 北京大学 Sleep spindle wave grading identification method and system
CN115844424B (en) * 2022-10-17 2023-09-22 北京大学 A method and system for classifying sleep spindles
CN115670475A (en) * 2022-11-18 2023-02-03 深圳市联影高端医疗装备创新研究院 Myocardial infarction detection method, system, equipment and medium based on neural network
CN117796817A (en) * 2024-02-29 2024-04-02 山东大学齐鲁医院 Method and system for rapid detection and early warning of acute myocardial infarction
CN117796817B (en) * 2024-02-29 2024-08-02 山东大学齐鲁医院 A method and system for rapid detection and early warning of acute myocardial infarction

Similar Documents

Publication Publication Date Title
US11564612B2 (en) Automatic recognition and classification method for electrocardiogram heartbeat based on artificial intelligence
US10758139B2 (en) Automatic method to delineate or categorize an electrocardiogram
US12186086B2 (en) Systems and methods for reduced lead electrocardiogram diagnosis using deep neural networks and rule-based systems
Murugesan et al. Ecgnet: Deep network for arrhythmia classification
US11344243B2 (en) Artificial intelligence self-learning-based static electrocardiography analysis method and apparatus
De Chazal et al. A patient-adapting heartbeat classifier using ECG morphology and heartbeat interval features
De Chazal et al. Automatic classification of heartbeats using ECG morphology and heartbeat interval features
CN115062655A (en) Multi-lead electrocardiosignal analysis method and multi-lead myocardial infarction analysis system
CN111297349A (en) Machine learning-based heart rhythm classification system
EP3698709A1 (en) Electrocardiogram information processing method and electrocardiogram workstation system
KR20190114694A (en) Method for learning and analyzing time series data by using artificial intelligence
CN115470828A (en) Multi-lead electrocardiogram classification and recognition method based on convolution and self-attention mechanism
WO2021071646A1 (en) Systems and methods for electrocardiogram diagnosis using deep neural networks and rule-based systems
Yadav et al. Arrhythmia detection on ECG signal using neural network approach
CN113901893A (en) Recognition and classification of ECG signals based on multiple cascaded deep neural networks
CN115281688A (en) A multi-label detection system for cardiac hypertrophy based on multimodal deep learning
JP2023104885A (en) Electrocardiographic heart rate multi-type prediction method based on graph convolution
CN112842355A (en) Electrocardiosignal heart beat detection and identification method based on deep learning target detection
CN115153583A (en) A method and system for classification and recognition of ECG signals based on feature extraction
CN116172573A (en) Arrhythmia image classification method based on improved acceptance-ResNet-v 2
CN114469126B (en) Classification processing method and device for electrocardiographic data, storage medium and computer equipment
Kovalchuk et al. A novel feature vector for ECG classification using deep learning
Boya-Lara et al. Heartbeat Classification Using Energy Percentage Distribution with Wavelet Transform and PCA
Digumarthi et al. Recognition of Cardiac Arrhythmia using ECG signals and Bio-inspired AWPSO Algorithms
CN114098757B (en) ECG signal monitoring method based on quantum particle swarm optimization

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20220916