Auxiliary myocardial infarction verification method based on layered multi-scale features and attention mechanism

By introducing hierarchical multi-scale features and attention mechanisms in ECG assisted verification, combined with feature analysis within and between leads, the problem that existing methods fail to fully characterize the relationship between ECG is solved, and the auxiliary verification of myocardial infarction is significantly improved accuracy and robustness.

CN118948296APending Publication Date: 2024-11-15ZHENGZHOU UNIVERSITY OF LIGHT INDUSTRY
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411000473.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-25
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

The existing intelligent assisted verification method for myocardial infarction based on ECG has failed to fully characterize the waveform morphological information in the lead of ECG and the importance relationship between the leads, which has affected the accuracy and robustness of assisted verification of myocardial infarction.

Method used

The myocardial infarction assisted verification method based on hierarchical multi-scale features and attention mechanism is adopted to characterize the characteristics of the network fusion of different scales and levels through the intra-lead morphological information, and the importance relationship between the leads is analyzed using Transformer's self-attention module. , generate a category probability distribution to assist in verification.

Benefits of technology

It improves the accuracy and robustness of assisted verification of myocardial infarction, and can capture and utilize the characteristics of electrocardiogram more comprehensively, and is especially suitable for assisting verification of the onset of myocardial infarction and the lesion site.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118948296A_ABST
    Figure CN118948296A_ABST
Patent Text Reader

Abstract

The invention discloses a myocardial infarction auxiliary verification method based on layered multi-scale features and an attention mechanism. The myocardial infarction auxiliary verification method sequentially comprises the following steps that A, multi-lead electrocardiosignals of a patient are obtained and converted into single-lead electrocardiosignals; b, the single-lead electrocardiosignals are preprocessed, and preprocessed multi-lead electrocardiosignals are obtained; c, constructing and training a myocardial infarction auxiliary screening model based on layered multi-scale features and an attention mechanism; and D, carrying out auxiliary verification on the preprocessed multi-lead electrocardiosignals obtained in the step B by utilizing a result output by the model. According to the method, the defect that an existing myocardial infarction screening method based on an electrocardiogram does not fully consider the waveform form information in electrocardiogram leads and the importance relation between the leads can be effectively overcome, and therefore the accuracy and robustness of myocardial infarction auxiliary verification are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of auxiliary verification of myocardial infarction (MI) diagnosis results, and in particular to an MI auxiliary verification method based on hierarchical multi-scale features and an attention mechanism. Background Art

[0002] Myocardial infarction (MI) is myocardial ischemia and hypoxic necrosis caused by coronary artery blood flow obstruction, which poses a serious threat to the patient's health. The diagnosis of myocardial infarction mainly relies on methods such as electrocardiogram, blood biochemical indicators and coronary angiography. Among them, coronary angiography is the gold standard for the diagnosis of myocardial infarction, but it is an invasive examination. The electrocardiogram has the advantages of being simple, fast and non-invasive, and is widely used in intelligent auxiliary diagnosis of myocardial infarction. The changes in different leads of the electrocardiogram corresponding to myocardial infarction at different infarction lesion sites are reflected as changes in the relationship between leads; the morphological changes of the QRS wave and ST-T segment in each lead of the electrocardiogram corresponding to different myocardial infarction onset periods are reflected as the morphological information of the bands within the leads.

[0003] The invention patent No. 202311351742.4, "Myocardial Infarction Auxiliary Verification Method and System Combining Knowledge Graph and Self-clustering", discloses the following technical features: including the following steps: A: Acquire multi-lead ECG signals and determine the entities of ECG data; B: Acquire medical record text data and identify the entities, entity attributes and entity relationships of the medical record text; C: Establish a case relationship graph network based on the entities of ECG data and medical record text; D: Reduce the dimension of the nodes in the case relationship graph network into a unified node representation vector; E: Reduce the dimension of the node representation vector again to obtain the reduced dimension features of the node; F: Determine new symptoms related to myocardial infarction through a density-based self-clustering algorithm; G: Auxiliary verification of the diagnosis results based on new symptoms related to myocardial infarction. The present invention can provide doctors with clinical auxiliary decision-making and auxiliary verification of diagnosis results.

[0004] The above technology uses the acquired multi-lead ECG data to determine the heartbeat morphology through a heartbeat morphology recognition model, and finally obtains the entities of the multi-lead ECG data; and uses the acquired electronic medical record text data to identify the entities and corresponding attributes in the medical record text through a conditional random field model based on a convolutional neural network and a bidirectional long short-term memory network; then, based on the entities of the acquired multi-lead ECG data, the entities of the medical record text and the corresponding attributes, and the entity relationships, they are linked to the ontology structure of the knowledge graph to form a case relationship graph network; then, a low-dimensional representation vector of the patient case node is obtained through a graph embedding algorithm, and finally, new symptoms related to myocardial infarction are discovered by combining t-distributed random neighborhood embedding and density clustering algorithms.

[0005] However, the existing ECG-based intelligent auxiliary verification methods for myocardial infarction are not based on the logic and strategy of doctors diagnosing myocardial infarction, and ignore the representation of the waveform morphology information in each lead of the myocardial infarction ECG and the importance relationship between leads, which affects the accuracy and robustness of myocardial infarction auxiliary verification. Therefore, a new method that can fully characterize the relationship between the ECG leads and leads of myocardial infarction is urgently needed to improve the accuracy of myocardial infarction auxiliary verification. Summary of the invention

[0006] The purpose of the present invention is to provide a myocardial infarction auxiliary verification method based on hierarchical multi-scale features and attention mechanism, which can effectively solve the defect that the existing electrocardiogram-based myocardial infarction screening method does not fully consider the waveform morphology information within the electrocardiogram lead and the importance relationship between the leads, thereby improving the accuracy and robustness of myocardial infarction auxiliary verification.

[0007] The present invention adopts the following technical solutions:

[0008] A myocardial infarction auxiliary verification method based on hierarchical multi-scale features and attention mechanism comprises the following steps in sequence:

[0009] A: Obtain the patient's multi-lead ECG signals and convert them into a corresponding number of single-lead ECG signals;

[0010] B: Preprocess the single-lead ECG signals respectively to obtain ECG signals with baseline interference and noise interference removed, and finally obtain the preprocessed multi-lead ECG signals;

[0011] C: Construct and train a myocardial infarction auxiliary screening model based on hierarchical multi-scale features and attention mechanism; the myocardial infarction auxiliary screening model based on hierarchical multi-scale features and attention mechanism includes a lead-in morphological information representation network based on hierarchical multi-scale features, an inter-lead weight importance analysis network based on attention mechanism, and an auxiliary screening output layer;

[0012] D: The preprocessed multi-lead ECG signal obtained in step B is input into the trained myocardial infarction auxiliary screening model based on hierarchical multi-scale features and attention mechanism, and the output results of the above model are used for auxiliary verification.

[0013] The multi-lead ECG signal is a 12-lead ECG signal.

[0014] In the step C, the intra-lead morphological information representation network based on hierarchical multi-scale features is used to fuse features of different scales and levels of the electrocardiogram, comprehensively characterizing the pattern changes of pathological Q waves, ST segments and T wave morphologies of the electrocardiogram of myocardial infarction, as well as the global pattern changes of QRS waves and ST-T segments; the inter-lead weight importance analysis network based on the attention mechanism is used to focus on abnormal morphologies and potential lesion areas in the electrocardiogram of myocardial infarction, and assign different importance weights to different leads; the auxiliary screening output layer is used to map the output of the inter-lead weight importance analysis network based on the attention mechanism into a probability distribution of categories to perform the verification task of myocardial infarction.

[0015] In the step C, the intra-lead morphological information representation network based on hierarchical multi-scale features includes an input transformation unit and a plurality of intra-lead feature branch units; the input transformation unit is used to perform dimensional transformation on the multi-lead ECG signal, convert it into a corresponding number of single-lead ECG signals, and input them into the corresponding intra-lead feature branch units respectively; the intra-lead feature branch unit is used to obtain and output the morphological information features in the corresponding single-lead ECG signal, and to combine the morphological information features in the single-lead ECG signal output by each intra-lead feature branch unit, and finally obtain fusion features of different scales and levels in the multi-lead ECG signal.

[0016] The intra-lead morphological information representation network based on hierarchical multi-scale features includes an input transformation unit and 12 intra-lead feature branch units; the input transformation unit transforms the dimension of the preprocessed 12-lead ECG signal and converts it into 12 single-lead ECG signals, which are respectively input into the 12 intra-lead feature branch units; the preprocessed 12-lead ECG signal is A, and the dimension is (12, points), where points is the number of sampling points of each lead ECG signal; after passing through the input transformation unit, 12 single-lead ECG signals are output, namely A1, A2, ..., A 12 , the dimension of single-lead ECG signals is (1, points); the structure of feature branch units in each lead is the same, consisting of an input layer, three hierarchical multi-scale residual blocks and a global average pooling layer; each feature branch unit in the lead processes the corresponding single-lead ECG signal respectively, and finally obtains the corresponding morphological information features; finally, all the obtained morphological information features are spliced ​​to obtain the fusion features B of different scales and levels in the multi-lead ECG signals.

[0017] The lead-to-lead weight importance analysis network based on the attention mechanism focuses on abnormal and potentially diseased areas in the myocardial infarction electrocardiogram through a Transformer-based self-attention module, assigns different importance weights to different leads, and analyzes the relationship between leads; the Transformer-based self-attention module takes the fused feature B as input to generate a vector R containing the mutual relationship and global features between the myocardial infarction electrocardiogram leads, and the dimension of the vector R is the same as that of the fused feature B.

[0018] The self-attention module first performs a linear transformation on the fused feature B to generate a query vector Q, a key vector K, and a value vector V respectively;

[0019] Where Q = W q H t +b q , K=W k H t +b k , V=W v H t +b v ; W q , W k and W v Respectively represent the weight matrices corresponding to the query vector Q, key vector K and value vector V; b q 、b k and b v They represent the biases corresponding to the query vector Q, key vector K, and value vector V respectively;

[0020] Then, the self-attention module calculates the attention score score(Q,K) based on the query vector Q and the key vector K. score(Q,K)=Q·K T , where T represents the transposed symbol in the matrix;

[0021] Then, the self-attention module converts the attention score score(Q,K) into an attention weight distribution through the Softmax function to obtain the query vector Q i Key vector K j The attention weight a ij , Where i represents the i-th query vector, j represents the j-th key vector, and T1 represents the total number of key vectors;

[0022] Afterwards, the self-attention module uses the attention weight a ij Perform a weighted summation on the value vector V and obtain the corresponding attention output: Where k represents the kth value vector, and T2 represents the total number of value vectors;

[0023] Finally, the self-attention module transforms the attention output linearly and finally obtains the output vector R of the Transformer-based self-attention module.

[0024] The auxiliary screening output layer includes a flattening module and a Softmax module. The flattening module transforms the dimension of the output vector R of the self-attention module, and then obtains the probability of the corresponding category label through the Softmax module.

[0025] In the step C, according to the constructed myocardial infarction auxiliary screening model based on hierarchical multi-scale features and attention mechanism, a cross entropy loss function is designed and the Adam optimizer is used to train the myocardial infarction auxiliary screening model.

[0026] In the lead characteristic branch unit:

[0027] The input layer is used to transform the dimension of single-lead ECG signals;

[0028] The first hierarchical multi-scale residual block contains three one-dimensional convolutional layers, three normalization layers, three linear correction unit layers and one dilated convolutional layer; the second hierarchical multi-scale residual block contains three one-dimensional convolutional layers, three normalization layers, three linear correction unit layers, one dilated convolutional layer and the first residual fusion block; the third hierarchical multi-scale residual block contains three one-dimensional convolutional layers, three normalization layers, three linear correction unit layers, one dilated convolutional layer and the second residual fusion block; the output of the third hierarchical multi-scale residual block is subjected to a global average pooling layer to obtain the morphological information features of the output of the feature branch unit within the lead.

[0029] The present invention can make full use of the important features of myocardial infarction, such as the width, amplitude and morphological changes of the QRS wave of the electrocardiogram, ST segment elevation or depression, and changes in T wave morphology and amplitude, etc.; it uses the intra-lead morphological information representation network based on hierarchical multi-scale features to effectively integrate the features of the electrocardiogram at different scales and levels, and can comprehensively characterize the subtle pattern changes of the pathological Q wave, ST segment and T wave morphology of the electrocardiogram of myocardial infarction, as well as the global pattern changes of the QRS wave and ST-T segment, so as to more effectively assist in the verification of myocardial infarction.

[0030] The Transformer-based self-attention module specially designed in the present invention can help the model focus on abnormal and potential pathological areas in the myocardial infarction electrocardiogram, such as ST segment elevation or abnormal T wave morphology. The intra-lead morphological information representation network based on hierarchical multi-scale features is used to characterize the changes in the QRS wave and ST-T segment morphological information in each lead of the myocardial infarction electrocardiogram; the Transformer-based self-attention module can accurately obtain the importance weight of the myocardial infarction electrocardiogram between leads, and combine the intra-lead electrocardiogram at different scales and levels, and the importance weights of the key QRS wave and ST-T segment of the electrocardiogram between leads, which can more comprehensively and accurately capture and utilize various features of the electrocardiogram, which is particularly suitable for auxiliary verification of the onset period of myocardial infarction and the location of infarction lesions. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION

[0032] The present invention is described in detail below with reference to the accompanying drawings and embodiments:

[0033] like Figure 1 As shown, the myocardial infarction auxiliary verification method based on hierarchical multi-scale features and attention mechanism of the present invention comprises the following steps:

[0034] A: Obtain the patient's multi-lead ECG signals and convert them into a corresponding number of single-lead ECG signals;

[0035] In the present invention, the ECG signal acquisition module can be used to acquire the patient's 12-lead ECG signals, and the acquired 12-lead ECG signals are converted into 12 single-lead ECG signals, which are input into the ECG signal preprocessing module for preprocessing;

[0036] In this embodiment, the ECG signal acquisition module includes an ECG signal acquisition sensor, an isolation circuit, an amplification circuit, a filtering circuit, a signal conversion circuit, and a signal separation module in sequence. When collecting the patient's 12-lead ECG signals, the patient's 12-lead ECG signals are first collected by the ECG signal acquisition sensor, and the 12-lead ECG signals are conditioned by the isolation circuit, the amplification circuit, and the filtering circuit in sequence, and then the analog signals are converted into digital signals by the signal conversion circuit, i.e., the analog / digital conversion circuit, and finally, the 12-lead ECG digital signals are separated into 12 single-lead ECG signals by the signal separation module and input into the ECG signal preprocessing module.

[0037] B: Preprocess the single-lead ECG signals respectively to obtain ECG signals with baseline interference and noise interference removed, and finally obtain the preprocessed multi-lead ECG signals;

[0038] In the present invention, the ECG signal preprocessing module can be used to preprocess the input 12 single-lead ECG signals respectively to obtain ECG signals with baseline interference and noise interference removed; finally, the preprocessed 12-lead ECG signals are obtained;

[0039] In this embodiment, discrete wavelet transform and third-order Butterworth bandpass filter can be used to remove baseline interference and noise interference. When preprocessing the input single-lead ECG signal, discrete wavelet transform based on db6 wavelet is used to remove baseline interference, and a third-order Butterworth bandpass filter of 0.5Hz to 40Hz is used to remove high-frequency and low-frequency noise, and finally an ECG signal with baseline interference and noise interference removed is obtained. After preprocessing the input 12 single-lead ECG signals in turn according to the above steps, the preprocessed 12-lead ECG signal is obtained.

[0040] C: Construct and train a myocardial infarction auxiliary screening model based on hierarchical multi-scale features and attention mechanism; the myocardial infarction auxiliary screening model based on hierarchical multi-scale features and attention mechanism includes a lead-in morphological information representation network based on hierarchical multi-scale features, an inter-lead weight importance analysis network based on attention mechanism, and an auxiliary screening output layer;

[0041] Among them, the intra-lead morphological information representation network based on hierarchical multi-scale features is used to fuse features of different scales and levels of the ECG, comprehensively characterizing the pattern changes of pathological Q waves, ST segments and T wave morphologies in the ECG of myocardial infarction, as well as the global pattern changes of QRS waves and ST-T segments; the inter-lead weight importance analysis network based on the attention mechanism is used to focus on abnormal morphologies and potential lesion areas in the ECG of myocardial infarction, and assign different importance weights to different leads; the auxiliary screening output layer is used to map the output of the inter-lead weight importance analysis network based on the attention mechanism into the probability distribution of categories for the verification task of myocardial infarction.

[0042] In the present invention, the intra-lead morphological information representation network based on hierarchical multi-scale features includes an input transformation unit and a plurality of intra-lead feature branch units; the input transformation unit is used to transform the dimensions of the multi-lead ECG signal, convert it into a corresponding number of single-lead ECG signals, and input them into the corresponding intra-lead feature branch units respectively; the intra-lead feature branch unit is used to obtain and output the morphological information features in the corresponding single-lead ECG signal, and to combine the morphological information features in the single-lead ECG signal output by each intra-lead feature branch unit, and finally obtain the fusion features of different scales and levels in the multi-lead ECG signal;

[0043] In this embodiment, the intra-lead morphological information representation network based on hierarchical multi-scale features includes an input transformation unit and 12 intra-lead feature branch units;

[0044] The input transformation unit transforms the dimension of the preprocessed 12-lead ECG signal into 12 single-lead ECG signals, which are input into the branch units based on the 12 leads respectively; the preprocessed 12-lead ECG signal is A, with a dimension of (12, points), where points is the number of sampling points of each lead ECG signal, and the value is 1000; after passing through the input transformation unit, 12 single-lead ECG signals are output, namely A1, A2, ..., A 12 , the dimension of single-lead ECG signal is (1, points);

[0045] The structure of the feature branch unit in each lead is the same, consisting of an input layer, three hierarchical multi-scale residual blocks, and a global average pooling layer.

[0046] Among them, the input layer is used to transform the dimension of the single-lead ECG signal;

[0047] The first hierarchical multi-scale residual block includes three one-dimensional convolutional layers, three normalization layers, three linear correction unit layers and one dilated convolutional layer; the ECG signal after dimensional transformation is sequentially passed through the first one-dimensional convolutional layer, the first normalization layer and the first linear correction unit layer to obtain the first one-dimensional convolutional feature C1; the one-dimensional convolutional feature C1 is passed through the second one-dimensional convolutional layer, the second normalization layer and the second linear correction unit layer to obtain the second one-dimensional convolutional feature D1; the one-dimensional convolutional feature D1 is passed through the first dilated convolutional layer to obtain the first dilated convolutional feature E1; the dilated convolutional feature E1 is passed through the third one-dimensional convolutional layer, the third normalization layer and the third linear correction unit layer to obtain the output F1 of the first hierarchical multi-scale residual block;

[0048] Among them, the number of the first one-dimensional convolutional layer, the second one-dimensional convolutional layer, the first hole convolutional layer and the third one-dimensional convolutional layer are 2, 4, 8 and 16 respectively, the size of the convolution kernel is 3×1, and the hole rate corresponding to the first hole convolutional layer is 3;

[0049] The second hierarchical multi-scale residual block includes three one-dimensional convolutional layers, three normalization layers, three linear correction unit layers, a hole convolution layer and a first residual fusion block; the first lead ECG signal after dimensional transformation is sequentially subjected to the fourth one-dimensional convolutional layer, the fourth normalization layer and the fourth linear correction unit layer to obtain the fourth one-dimensional convolutional feature G1; the one-dimensional convolutional feature G1 is subjected to the fifth one-dimensional convolutional layer, the fifth normalization layer and the fifth linear correction unit layer to obtain the fifth one-dimensional convolutional feature H1; the one-dimensional convolutional feature H1 is subjected to the second hole convolutional layer to obtain the second hole convolutional feature I1; the hole convolution feature I1 and the output F1 of the first hierarchical multi-scale residual block are subjected to residual fusion and addition operation by the first residual fusion block to obtain the output J1 of the first residual fusion block; the output J1 of the first residual fusion block is subjected to the sixth one-dimensional convolutional layer, the sixth normalization layer and the sixth linear correction unit layer to obtain the output K1 of the second hierarchical multi-scale residual block;

[0050] Among them, the number of the fourth one-dimensional convolutional layer, the fifth one-dimensional convolutional layer, the second dilated convolutional layer and the sixth one-dimensional convolutional layer are 4, 8, 16 and 32 respectively, the size of the convolution kernel is 5×1, and the dilation rate corresponding to the second dilated convolutional layer is 5.

[0051] The third hierarchical multi-scale residual block includes three one-dimensional convolutional layers, three normalization layers, three linear correction unit layers, one dilated convolutional layer and the second residual fusion block; the first lead ECG signal after dimensional transformation is sequentially subjected to the seventh one-dimensional convolutional layer, the seventh normalization layer and the seventh linear correction unit layer to obtain the seventh one-dimensional convolutional feature L1; the one-dimensional convolutional feature L1 is subjected to the eighth one-dimensional convolutional layer, the eighth normalization layer and the eighth linear correction unit layer to obtain the eighth one-dimensional convolutional feature M1; the one-dimensional convolutional feature M1 is subjected to the third dilated convolutional layer to obtain the third dilated convolutional feature N1; the dilated convolutional feature N1 and the output K1 of the second hierarchical multi-scale residual block are subjected to residual fusion and addition operation through the second residual fusion block to obtain the output O1 of the second residual fusion block; the output O1 of the second residual fusion block is subjected to the ninth one-dimensional convolutional layer, the ninth normalization layer and the ninth linear correction unit layer to obtain the output P1 of the third hierarchical multi-scale residual block, which is the output of the feature branch unit in the first lead.

[0052] Among them, the number of the seventh one-dimensional convolutional layer, the eighth one-dimensional convolutional layer, the third hole convolutional layer and the ninth one-dimensional convolutional layer are 8, 16, 32 and 64 respectively, the size of the convolution kernel is 7×1, and the hole rate corresponding to the third hole convolutional layer is 7;

[0053] The output P1 of the third hierarchical multi-scale residual block is subjected to a global average pooling layer to obtain the morphological information feature Q1 output by the feature branch unit in the first lead.

[0054] In the present invention, each lead feature branch unit processes the corresponding single-lead ECG signal respectively, and finally obtains the corresponding morphological information features Q1 to Q 12 ; Finally, the morphological information features Q1 to Q 12 The output of the intra-lead morphological information representation network based on hierarchical multi-scale features is obtained by splicing, that is, the fused feature B of different scales and levels in the multi-lead ECG signal; the dimension of the fused feature B is (12, numbers), where numbers represents the number of the ninth one-dimensional convolutional layer.

[0055] In the present invention, the lead-to-lead weight importance analysis network based on the attention mechanism focuses on abnormal and potential pathological areas in the electrocardiogram of myocardial infarction, such as ST segment elevation or abnormal T wave morphology, through a Transformer-based self-attention module, assigns different importance weights to different leads, and analyzes the relationship between leads.

[0056] In this embodiment, the self-attention module based on Transformer takes the fused feature B as input to generate a vector R containing the mutual relationship between the electrocardiogram leads of myocardial infarction and the global features. The dimension of vector R is the same as that of the fused feature B, both of which are (12, numbers), and the number of heads of the multi-head attention mechanism is 4.

[0057] In this embodiment, the self-attention module first performs a linear transformation on the fused feature B to generate a query vector Q, a key vector K, and a value vector V respectively;

[0058] Where Q = W q H t +b q , K=W k H t +b k , V=W v H t +b v ; W q , W k and W v Respectively represent the weight matrices corresponding to the query vector Q, key vector K and value vector V; b q 、b k and b v They represent the biases corresponding to the query vector Q, key vector K, and value vector V respectively;

[0059] Then, the self-attention module calculates the attention score score(Q,K) based on the query vector Q and the key vector K. score(Q,K)=Q·K T , where T represents the transposed symbol in the matrix;

[0060] Then, the self-attention module converts the attention score score(Q,K) into an attention weight distribution through the Softmax function to obtain the query vector Q i Key vector K j The attention weight a ij , Where i represents the i-th query vector, j represents the j-th key vector, and T1 represents the total number of key vectors;

[0061] Afterwards, the self-attention module uses the attention weight a ij Perform a weighted summation on the value vector V and obtain the corresponding attention output: Where k represents the kth value vector, T2 represents the total number of value vectors. The final attention output is the weighted sum of all value vectors.

[0062] Finally, the self-attention module transforms the attention output linearly, and finally obtains the output vector R of the Transformer-based self-attention module;

[0063] In the present invention, the auxiliary screening output layer includes a flattening module and a Softmax module. The flattening module transforms the dimension of the output vector R of the self-attention module into (12×numbers, 1), and then obtains the probability of the corresponding category label through the Softmax module.

[0064] In the present invention, the constructed myocardial infarction auxiliary screening model based on hierarchical multi-scale features and attention mechanism can be trained according to ECG data samples of different myocardial infarction lesion types.

[0065] For example, the types of ECG data samples include normal, inferior wall myocardial infarction, anterior wall myocardial infarction, anterior septal myocardial infarction, extensive anterior wall myocardial infarction and high lateral wall myocardial infarction, a total of 6 categories. There are 1,000 ECG data samples in each category, a total of 6,000 ECG data, of which 80% of the data are training sets and 20% of the data are test sets.

[0066] According to the constructed myocardial infarction auxiliary screening model based on hierarchical multi-scale features and attention mechanism, the cross entropy loss function is designed and the Adam optimizer is used to train the myocardial infarction auxiliary screening model. The maximum number of model training rounds is 500. When the loss value on the training set no longer decreases, the training is stopped, and finally the trained myocardial infarction auxiliary screening model based on hierarchical multi-scale features and attention mechanism is obtained.

[0067] D: The preprocessed multi-lead ECG signal obtained in step B is input into the trained myocardial infarction auxiliary screening model based on hierarchical multi-scale features and attention mechanism, and the output results of the above model are used for auxiliary verification.

[0068] In the present invention, the preprocessed 12-lead ECG signal is input into the trained myocardial infarction auxiliary screening model based on hierarchical multi-scale features and attention mechanism, and finally the verification results are output, such as normal, inferior wall myocardial infarction, anterior wall myocardial infarction, anterior septal wall myocardial infarction, extensive anterior wall myocardial infarction or high lateral wall myocardial infarction.

[0069] The present invention can make full use of the important features of myocardial infarction, such as the width, amplitude and morphological changes of the QRS wave of the electrocardiogram, ST segment elevation or depression, and changes in T wave morphology and amplitude, etc.; it uses the intra-lead morphological information representation network based on hierarchical multi-scale features to effectively integrate the features of the electrocardiogram at different scales and levels, and can comprehensively characterize the subtle pattern changes of the pathological Q wave, ST segment and T wave morphology of the electrocardiogram of myocardial infarction, as well as the global pattern changes of the QRS wave and ST-T segment, so as to more effectively assist in the verification of myocardial infarction.

[0070] The Transformer-based self-attention module specially designed in the present invention can help the model focus on abnormal and potential pathological areas in the myocardial infarction electrocardiogram, such as ST segment elevation or abnormal T wave morphology. The intra-lead morphological information representation network based on hierarchical multi-scale features is used to characterize the changes in the QRS wave and ST-T segment morphological information in each lead of the myocardial infarction electrocardiogram; the Transformer-based self-attention module can accurately obtain the importance weight of the myocardial infarction electrocardiogram between leads, and combine the intra-lead electrocardiogram at different scales and levels, and the importance weights of the key QRS wave and ST-T segment of the electrocardiogram between leads, which can more comprehensively and accurately capture and utilize various features of the electrocardiogram, which is particularly suitable for auxiliary verification of the onset period of myocardial infarction and the location of infarction lesions.

Claims

1. A myocardial infarction auxiliary verification method based on hierarchical multi-scale features and attention mechanism, It is characterized in that The following steps are included in sequence: A: Obtain the patient's multi-lead ECG signals and convert them into a corresponding number of single-lead ECG signals; B: Preprocess the single-lead ECG signals respectively to obtain ECG signals with baseline interference and noise interference removed, and finally obtain the preprocessed multi-lead ECG signals; C: Construct and train a myocardial infarction auxiliary screening model based on hierarchical multi-scale features and attention mechanism; the myocardial infarction auxiliary screening model based on hierarchical multi-scale features and attention mechanism includes a lead-in morphological information representation network based on hierarchical multi-scale features, an inter-lead weight importance analysis network based on attention mechanism, and an auxiliary screening output layer; D: The preprocessed multi-lead ECG signal obtained in step B is input into the trained myocardial infarction auxiliary screening model based on hierarchical multi-scale features and attention mechanism, and the output results of the above model are used for auxiliary verification.

2. The myocardial infarction auxiliary verification method based on hierarchical multi-scale features and attention mechanism according to claim 1, Features: The multi-lead ECG signal is a 12-lead ECG signal.

3. The myocardial infarction auxiliary verification method based on hierarchical multi-scale features and attention mechanism according to claim 1, Features: In the step C, the intra-lead morphological information representation network based on hierarchical multi-scale features is used to fuse features of different scales and levels of the electrocardiogram, comprehensively characterizing the pattern changes of pathological Q waves, ST segments and T wave morphologies of the electrocardiogram of myocardial infarction, as well as the global pattern changes of QRS waves and ST-T segments; the inter-lead weight importance analysis network based on the attention mechanism is used to focus on abnormal morphologies and potential lesion areas in the electrocardiogram of myocardial infarction, and assign different importance weights to different leads; the auxiliary screening output layer is used to map the output of the inter-lead weight importance analysis network based on the attention mechanism into the probability distribution of categories, so as to perform the verification task of myocardial infarction.

4. The myocardial infarction auxiliary verification method based on hierarchical multi-scale features and attention mechanism according to claim 1, Features: In the step C, the intra-lead morphological information representation network based on hierarchical multi-scale features includes an input transformation unit and a plurality of intra-lead feature branch units; the input transformation unit is used to perform dimensional transformation on the multi-lead ECG signal, convert it into a corresponding number of single-lead ECG signals, and input them into the corresponding intra-lead feature branch units respectively; The intra-lead feature branch unit is used to obtain and output the morphological information features in the corresponding single-lead ECG signal, and to combine the morphological information features in the single-lead ECG signal output by each intra-lead feature branch unit, and finally obtain the fusion features of different scales and levels in the multi-lead ECG signal.

5. The myocardial infarction auxiliary verification method based on hierarchical multi-scale features and attention mechanism according to claim 2, Features: The intra-lead morphological information representation network based on hierarchical multi-scale features includes an input transformation unit and 12 intra-lead feature branch units; The input transformation unit transforms the dimension of the preprocessed 12-lead ECG signal into 12 single-lead ECG signals, which are input into the branch units based on the 12 leads respectively; the preprocessed 12-lead ECG signal is A, with a dimension of (12, points), where points is the number of sampling points of each lead ECG signal; after passing through the input transformation unit, 12 single-lead ECG signals are output, namely A 1 , A 2 ,……,A 12 , the dimension of single-lead ECG signals is (1, points); the structure of feature branch units in each lead is the same, consisting of an input layer, three hierarchical multi-scale residual blocks and a global average pooling layer; each feature branch unit in the lead processes the corresponding single-lead ECG signal respectively, and finally obtains the corresponding morphological information features; finally, all the obtained morphological information features are spliced ​​to obtain the fusion features B of different scales and levels in the multi-lead ECG signals.

6. The myocardial infarction auxiliary verification method based on hierarchical multi-scale features and attention mechanism according to claim 1, Features: The lead-to-lead weight importance analysis network based on the attention mechanism focuses on abnormal and potentially diseased areas in the myocardial infarction electrocardiogram through a Transformer-based self-attention module, assigns different importance weights to different leads, and analyzes the relationship between leads; the Transformer-based self-attention module takes the fused feature B as input to generate a vector R containing the mutual relationship and global features between the myocardial infarction electrocardiogram leads, and the dimension of the vector R is the same as the fused feature B.

7. The myocardial infarction auxiliary verification method based on hierarchical multi-scale features and attention mechanism according to claim 6, Features: The self-attention module first performs a linear transformation on the fused feature B to generate a query vector Q, a key vector K, and a value vector V respectively; Where Q = W q H t +b q , K=W k H t +b k , V=W v H t +b v ; W q , W k and W v Respectively represent the weight matrices corresponding to the query vector Q, key vector K and value vector V; b q 、b k and b v They represent the biases corresponding to the query vector Q, key vector K, and value vector V respectively; Then, the self-attention module calculates the attention score score(Q,K) based on the query vector Q and the key vector K. score(Q,K)=Q·K T , where T represents the transposed symbol in the matrix; Then, the self-attention module converts the attention score score(Q,K) into an attention weight distribution through the Softmax function to obtain the query vector Q i Key vector K j The attention weight a ij , Where i represents the i-th query vector, j represents the j-th key vector, and T1 represents the total number of key vectors; Afterwards, the self-attention module uses the attention weight a ij Perform a weighted summation on the value vector V and obtain the corresponding attention output: Where k represents the kth value vector, and T2 represents the total number of value vectors; Finally, the self-attention module transforms the attention output linearly and finally obtains the output vector R of the Transformer-based self-attention module.

8. The myocardial infarction auxiliary verification method based on hierarchical multi-scale features and attention mechanism according to claim 1, Features: The auxiliary screening output layer includes a flattening module and a Softmax module. The flattening module transforms the dimension of the output vector R of the self-attention module, and then obtains the probability of the corresponding category label through the Softmax module.

9. The myocardial infarction auxiliary verification method based on hierarchical multi-scale features and attention mechanism according to claim 1, Features: In the step C, according to the constructed myocardial infarction auxiliary screening model based on hierarchical multi-scale features and attention mechanism, a cross entropy loss function is designed and the Adam optimizer is used to train the myocardial infarction auxiliary screening model.

10. The myocardial infarction auxiliary verification method based on hierarchical multi-scale features and attention mechanism according to claim 5, Features: In the lead characteristic branch unit: The input layer is used to transform the dimension of single-lead ECG signals; The first hierarchical multi-scale residual block contains three one-dimensional convolutional layers, three normalization layers, three linear rectification unit layers and one dilated convolutional layer; the second hierarchical multi-scale residual block contains three one-dimensional convolutional layers, three normalization layers, three linear rectification unit layers, one dilated convolutional layer and the first residual fusion block; The third hierarchical multi-scale residual block contains three one-dimensional convolutional layers, three normalization layers, three linear correction unit layers, one hole convolution layer and the second residual fusion block; the output of the third hierarchical multi-scale residual block is subjected to a global average pooling layer to obtain the morphological information characteristics of the output of the feature branch unit within the lead.

Citation Information

Cited By

  • Myocardial infarction positioning method, device, equipment and medium

    CN121943336A