Method and device for extracting space-time joint features of 12-lead electrocardiogram

By using a three-path parallel modeling method, the spatiotemporal joint features of 12-lead electrocardiograms are extracted, which solves the problem of insufficient accuracy in myocardial infarction localization and achieves more efficient localization of myocardial infarction area and solving of inverse electrocardiogram problems.

CN122004883APending Publication Date: 2026-05-12PEKING UNIVERSITY THIRD HOSPITAL (THE THIRD CLINICAL MEDICAL SCHOOL OF PEKING UNIVERSITY)
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
PEKING UNIVERSITY THIRD HOSPITAL (THE THIRD CLINICAL MEDICAL SCHOOL OF PEKING UNIVERSITY)
Filing Date
2026-01-30
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

The existing 12-lead electrocardiogram technology has insufficient accuracy in locating myocardial infarction, mainly due to insufficient mining of effective information, lack of compression of redundant information, and coarse fusion of multi-dimensional information, resulting in poor stability in solving inverse problems.

Method used

A three-path parallel modeling approach is adopted, which involves obtaining raw signal preprocessing, preliminary feature mapping, parallel feature extraction and dimension alignment, extracting temporal dimension, lead space and global convolutional features, and generating spatiotemporal joint features.

Benefits of technology

It improves the accuracy of ventricular surface potential reconstruction and the localization accuracy of myocardial infarction area, meeting the needs of solving inverse electrocardiogram problems in clinical practice.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122004883A_ABST
    Figure CN122004883A_ABST
Patent Text Reader

Abstract

The invention provides a method for extracting spatio-temporal joint features of a 12-lead electrocardiogram. The method comprises the following steps: acquiring an original signal of the 12-lead electrocardiogram, and preprocessing the original signal to obtain an input matrix; performing preliminary feature mapping on the input matrix to generate consistent input features; performing parallel feature extraction on the consistent input features to obtain time dimension features, lead space features and global convolution features; and carrying out dimension alignment and fusion on the time dimension feature, the lead space feature and the global convolution feature to generate a spatio-temporal joint feature. According to the method, effective information is comprehensively mined from three dimensions of time evolution, lead space and global form through three-path parallel extraction, redundancy is compressed and key features are highlighted in combination with dimension alignment and a refined fusion strategy, the integrity and robustness of feature expression can be effectively improved, and the application requirements of clinical inverse electrocardio problem solving and precise diagnosis and treatment are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of biomedical signal processing technology, specifically to a method and apparatus for extracting spatiotemporal combined features of a 12-lead electrocardiogram. Background Technology

[0002] Myocardial infarction, a serious cardiovascular emergency threatening human life and health, requires precise localization of the infarct area. This is a core prerequisite for clinical risk stratification, revascularization strategy formulation, and arrhythmia ablation protocol design, directly impacting treatment outcomes and patient prognosis. Among current clinical diagnostic techniques, late gadolinium-enhanced cardiac magnetic resonance imaging (LGE-CMR) can visually present the morphology and extent of the infarct scar and is currently the main method for assessing myocardial infarction. However, it is limited by drawbacks such as high examination costs, strict requirements on patients' breath-holding ability, the need for contrast agent injection, and potential impact on renal function, making it difficult to use as a routine screening or bedside rapid assessment tool.

[0003] In comparison, the standard 12-lead electrocardiogram (ECG) remains the preferred method for the initial diagnosis and assessment of myocardial infarction in clinical practice due to its advantages such as ease of operation, low cost, non-invasiveness, and no radiation. However, as an indirect reflection of cardiac electrical activity on the body surface, the 12-lead ECG naturally has limited spatial resolution, capable of capturing changes in electrical signals at only a limited number of sites on the body surface. It is difficult to accurately map the electrophysiological distribution on the ventricular surface and cannot finely distinguish the infarct extent and lesion degree in different coronary artery supply areas, posing a challenge to precise clinical diagnosis and treatment.

[0004] To overcome the bottleneck of insufficient spatial resolution in 12-lead ECG, academia and industry have proposed a series of data-driven methods for solving the inverse electrocardiogram (ECGI) problem. These methods attempt to reconstruct the transmembrane potential (TMP) from surface lead signals by mining deeper information within the ECG signal, thereby inferring the infarct area. However, existing methods still have significant shortcomings in practical applications, limiting the improvement of localization accuracy and stability. First, effective information mining is insufficient. Existing technologies for ECG signal preprocessing are mostly limited to routine operations such as basic filtering, baseline correction, and amplitude normalization. Feature extraction focuses on a few traditional explicit indicators such as ST segment elevation, voltage peak, and QRS complex duration, failing to delve into the temporal evolution patterns hidden in the complete ECG waveform (such as the dynamic process of myocardial cell depolarization and repolarization) and the spatial correlation characteristics between multiple leads. This results in the input inverse problem solving model having a single dimension of feature information and insufficient expressive power, directly affecting the stability and localization accuracy of the inverse problem solution.

[0005] Secondly, redundant information is not effectively processed. A large number of highly correlated waveform components exist between different leads in a 12-lead ECG, reflecting the correlation of cardiac electrical activity projected onto the body surface. However, existing technologies often use simple splicing or equal-weighted superposition to process multi-lead data during feature construction, lacking a targeted compression and screening mechanism for redundant or low-value information. This results in a large number of invalid redundant components in the extracted features, which not only increases the computational complexity of the model but may also amplify noise interference and weaken the stability of myocardial infarction region localization.

[0006] Third, the multi-dimensional information fusion strategy is crude. The temporal dynamic features, lead spatial features, and global rhythmic morphological features contained in electrocardiogram (ECG) signals are interconnected and synergistic, jointly supporting the accurate identification of infarct areas. However, existing methods mostly adopt coarse fusion methods such as simple splicing and direct summation, lacking refined fusion design. This results in redundant features not being sufficiently suppressed, key diagnostic features not being effectively highlighted, and a lack of unified global context constraints. Consequently, the fused features cannot comprehensively and accurately characterize the electrophysiological abnormalities related to myocardial infarction, further limiting the performance improvement of inverse problem solving. Summary of the Invention

[0007] In view of the aforementioned problems, this application is proposed to provide a method and apparatus for extracting spatiotemporal joint features of a 12-lead electrocardiogram that overcomes or at least partially solves the aforementioned problems, comprising: A method for extracting spatiotemporal joint features from a 12-lead electrocardiogram, the method comprising: The raw signal of a 12-lead electrocardiogram is acquired and preprocessed to obtain an input matrix; Perform preliminary feature mapping on the input matrix to generate consistent input features; Parallel feature extraction is performed on the consistent input features to obtain temporal dimension features, lead space features, and global convolutional features; The temporal dimension features, the lead spatial features, and the global convolutional features are dimensionally aligned and fused to generate spatiotemporal joint features.

[0008] Further, the step of acquiring the raw signal of the 12-lead electrocardiogram and preprocessing the raw signal to obtain the input matrix includes: Obtain the raw signal of a 12-lead electrocardiogram; The original signal is sequentially subjected to power frequency and high frequency noise suppression and baseline drift correction to obtain the corrected signal; The R-wave position is determined by R-wave detection of the correction signal, and the cardiac cycle signal is clipped based on the R-wave position. The cropped cardiac cycle signal is subjected to voltage amplitude normalization processing to obtain an input matrix of size 12×t; where 12 corresponds to 12 lead channels and t is the sampling point length of the cardiac cycle.

[0009] Further, the step of performing preliminary feature mapping on the input matrix to generate consistent input features includes: The dimension transformation parameters required for feature mapping are determined based on the input matrix; Perform feature transformation on the input matrix to map the input matrix to a feature space of a preset dimension to obtain feature data; The feature data is standardized to obtain consistent input features.

[0010] Further, the step of performing parallel feature extraction on the consistent input features to obtain temporal dimension features, lead space features, and global convolutional features includes: Using the consistent input features as shared input, three parallel extraction paths are initiated; Temporal dimension features are extracted from the consistent input features using time-segment self-attention operations; Lead space features are extracted from the consistent input features using an inter-lead self-attention mechanism; Global convolutional features are extracted from the consistent input features through multi-scale one-dimensional convolution; The time dimension features, lead space features, and global convolution features are output synchronously.

[0011] Further, the step of extracting time-dimensional features from the consistent input features through time-segment self-attention operation includes: The consistent input features are divided into overlapping time segments according to a preset length and step size. Query vectors, key vectors, and value vectors are generated through linear mapping. The similarity between vectors is calculated and normalized to obtain attention weights. The value vectors are then weighted and summed based on the weights to output the time dimension features.

[0012] Furthermore, the step of extracting lead spatial features from the consistent input features through the inter-lead self-attention mechanism includes: The consistent input features are rearranged into a lead sequence of length 12 and encoded into lead-level feature vectors. Query vectors, key vectors, and value vectors are generated through linear mapping. The similarity of the inner product between vectors is calculated and normalized to obtain the inter-lead attention weights. Based on the weights, the value vectors are weighted and summed to output the lead space features.

[0013] Furthermore, the step of dimensionally aligning and fusing the temporal dimension features, the lead spatial features, and the global convolutional features to generate spatiotemporal joint features further includes: Dimension matching processing is performed on the time dimension features, the lead space features, and the global convolutional features to make the time dimension features, the lead space features, and the global convolutional features have the same feature dimension; The time dimension features, lead space features, and global convolutional features after dimension alignment are fused using residual summation or weighted combination to obtain the fusion result; The fusion result is optimized by nonlinear transformation to generate a spatiotemporal joint feature that combines temporal evolution law, lead spatial coupling relationship and global morphological information.

[0014] An apparatus for extracting spatiotemporal joint features from a 12-lead electrocardiogram (ECG), wherein the apparatus is used to implement the steps of the method for extracting spatiotemporal joint features from a 12-lead ECG as described above. include: The acquisition module is used to acquire the raw signal of a 12-lead electrocardiogram and preprocess the raw signal to obtain an input matrix; The preliminary feature mapping module is used to perform preliminary feature mapping on the input matrix to generate consistent input features; The feature extraction module is used to perform parallel feature extraction on the consistent input features to obtain temporal dimension features, lead space features, and global convolutional features; The fusion module is used to perform dimensional alignment and fusion of the temporal dimension features, the lead spatial features, and the global convolutional features to generate spatiotemporal joint features.

[0015] An apparatus for extracting spatiotemporal joint features of a 12-lead electrocardiogram includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, it implements the method for extracting spatiotemporal joint features of a 12-lead electrocardiogram as described above.

[0016] A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, it implements the method for extracting spatiotemporal joint features of a 12-lead electrocardiogram as described above.

[0017] This application has the following advantages: In the embodiments of this application, addressing the problems of insufficient effective information mining of electrocardiogram signals, ineffective compression of redundant information, coarse fusion of multi-dimensional information leading to poor stability in solving the inverse electrocardiogram problem, and insufficient accuracy in locating myocardial infarction in the existing technology, this application provides a solution for the spatiotemporal joint feature extraction method of 12-lead electrocardiogram through three-path parallel modeling. Specifically, it is a method for extracting spatiotemporal joint features of 12-lead electrocardiograms. The method achieves efficient extraction of key information of electrocardiogram signals through multi-dimensional feature mining and refined fusion, including: acquiring the original signal of the 12-lead electrocardiogram and preprocessing the original signal to obtain an input matrix; performing preliminary feature mapping on the input matrix to generate consistent input features; performing parallel feature extraction on the consistent input features to obtain time dimension features, lead space features, and global convolutional features; and aligning and fusing the time dimension features, lead space features, and global convolutional features to generate spatiotemporal joint features. By extracting information in parallel through three paths, we can comprehensively mine effective information from three dimensions: temporal evolution, lead space, and global morphology. Combining dimension alignment and refined fusion strategies to compress redundancy and highlight key features can effectively improve the integrity and robustness of feature expression. In both simulation data and real patient data verification, it shows better accuracy in ventricular surface potential reconstruction and myocardial infarction area localization, meeting the application needs of clinical ECG inverse problem solving and precision diagnosis and treatment. Attached Figure Description

[0018] To more clearly illustrate the technical solution of this application, the drawings used in the description of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a flowchart illustrating the steps of a method for extracting spatiotemporal joint features from a 12-lead electrocardiogram according to an embodiment of this application. Figure 2 This is a flowchart of an embodiment of the present application for extracting spatiotemporal features of a 12-lead electrocardiogram (ECG). Figure 3 This is a simulation data prediction result diagram provided by an embodiment of this application using the method of this application; Figure 4 This is a diagram showing the multi-angle myocardial infarction calculation results of a real patient using the method of this application, provided in an embodiment of this application. Figure 5 This application provides an embodiment of the duration of high activation waves and electrocardiogram lead diagrams for patients with myocardial infarction caused by blood supply areas of one, two, and three coronary arteries; Figure 6 This is a diagram showing the comparison results of the classification of three coronary artery blood supply areas using the method of this application and that of a cardiologist, provided in one embodiment of this application. Figure 7 This is a heatmap of classification results based on the AHA17 segment model and coronary artery region provided in one embodiment of this application; Figure 8 This is a structural block diagram of the server side of a device for extracting spatiotemporal joint features of a 12-lead electrocardiogram according to an embodiment of this application; Figure 9 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention; 1. Computer equipment; 2. External devices; 3. Processing unit; 4. Bus; 5. Network adapter; 6. I / O interface; 7. Display; 8. Memory; 9. Random access memory; 10. Cache memory; 11. Storage system; 12. Program / utility; 13. Program module. Detailed Implementation

[0020] To make the objectives, features, and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0021] The inventors, through analysis of existing technologies, discovered that current methods do not fully extract effective information from electrocardiogram (ECG) signals. Most existing methods, when acquiring and preprocessing ECG signals, only perform basic filtering, baseline correction, and amplitude normalization. The extracted features are mostly limited to a few traditional indicators such as ST-segment elevation, voltage peak, and QRS complex duration, failing to fully explore the temporal evolution features hidden within the complete ECG waveform and the spatial correlation between multiple leads. This affects the stability and accuracy of solving the inverse ECG problem. There are highly correlated waveform components among different leads of electrocardiogram (ECG) signals. Existing techniques often simply splice or equally weight multi-lead data during feature construction, without effectively compressing and filtering redundant or low-value information. This results in extracted features containing a large amount of redundant information. This may amplify noise interference, thereby increasing the complexity of solving the ECG inverse problem and weakening the stability of myocardial infarction region localization. Some works simply concatenate or sum the temporal and spatial features without a sophisticated fusion strategy. This results in redundant features not being fully compressed, diagnostic features not being adequately highlighted, and a lack of unified global context constraints.

[0022] Reference Figure 1 This application illustrates a method for extracting spatiotemporal joint features of a 12-lead electrocardiogram according to an embodiment of the present application, comprising: S110. Obtain the raw signal of the 12-lead electrocardiogram and preprocess the raw signal to obtain the input matrix; S120. Perform preliminary feature mapping on the input matrix to generate consistent input features; S130. Parallel feature extraction is performed on the consistent input features to obtain temporal dimension features, lead space features, and global convolutional features; S140. Align the temporal dimension features, the lead spatial features, and the global convolutional features with dimensions and fuse them to generate spatiotemporal joint features.

[0023] In the embodiments of this application, addressing the problems of insufficient effective information mining of electrocardiogram signals, ineffective compression of redundant information, coarse fusion of multi-dimensional information leading to poor stability in solving the inverse electrocardiogram problem, and insufficient accuracy in locating myocardial infarction in the existing technology, this application provides a solution for the spatiotemporal joint feature extraction method of 12-lead electrocardiogram through three-path parallel modeling. Specifically, it is a method for extracting spatiotemporal joint features of 12-lead electrocardiograms. The method achieves efficient extraction of key information of electrocardiogram signals through multi-dimensional feature mining and refined fusion, including: acquiring the original signal of the 12-lead electrocardiogram and preprocessing the original signal to obtain an input matrix; performing preliminary feature mapping on the input matrix to generate consistent input features; performing parallel feature extraction on the consistent input features to obtain time dimension features, lead space features, and global convolutional features; and aligning and fusing the time dimension features, lead space features, and global convolutional features to generate spatiotemporal joint features. By extracting information in parallel through three paths, we can comprehensively mine effective information from three dimensions: temporal evolution, lead space, and global morphology. Combining dimension alignment and refined fusion strategies to compress redundancy and highlight key features can effectively improve the integrity and robustness of feature expression. In both simulation data and real patient data verification, it shows better accuracy in ventricular surface potential reconstruction and myocardial infarction area localization, meeting the application needs of clinical ECG inverse problem solving and precision diagnosis and treatment.

[0024] It should be noted that, in order to achieve non-invasive reconstruction from the 12-lead ECG on the body surface to the transmembrane potential (TMP) on the ventricular surface and the myocardial infarction area, this invention considers the general form of the positive ECG problem:

[0025] in, m For the body surface signal sequence, v nLet A be the sequence of cardiac surface signals, and A be the forward transfer matrix. Theoretically, A is a square matrix only when the number of body surface signals is comparable to the number of cardiac surface signals. However, due to limitations in measurement equipment and technology, this is almost impossible to achieve. In fact, m Therefore, A is a non-invertible singular matrix, and its inverse cannot be obtained through direct computation. This means that the inverse problem is underdetermined; any tiny perturbation in the input will introduce a large error in the output, making it extremely sensitive to noise. To obtain a stable and reliable inverse solution, high-quality spatiotemporal features related to myocardial infarction must be extracted from a limited 12-lead ECG.

[0026] To achieve the above objectives, this invention constructs an overall technical solution consisting of a "spatiotemporal feature extraction module + dimension alignment and geometric constraint module": First, the spatiotemporal feature extraction module extracts rich temporal, spatial, and global contextual features from a 12-lead ECG; then, through dimension alignment and graph attention constraints, the extracted features are mapped and constrained onto a unified ventricular geometric grid, providing a robust feature foundation for solving inverse problems and locating myocardial infarction.

[0027] The following will further explain a method for extracting spatiotemporal joint features of a 12-lead electrocardiogram in this exemplary embodiment.

[0028] As described in step S110, the raw signal of the 12-lead electrocardiogram is acquired and the raw signal is preprocessed to obtain the input matrix.

[0029] It should be noted that, firstly, a 12-lead electrocardiogram (ECG) device is used to simultaneously acquire raw cardiac electrical activity signals from 12 specific lead sites on the human body surface. These raw signals contain time-series data of voltage changes during cardiac systole and diastole, but inevitably contain interference from power frequency (50Hz or 60Hz), high-frequency noise (EMG interference, electrode contact noise), and baseline drift caused by respiration and changes in body position. To eliminate invalid interference and retain valid signals, the raw signals undergo targeted processing: digital bandpass filtering is used to suppress power frequency and high-frequency noise, and polynomial fitting or adaptive filtering algorithms are used to eliminate baseline drift, ultimately yielding a stable and clean corrected signal, laying the foundation for subsequent accurate analysis.

[0030] Next, R-wave detection algorithms such as differential thresholding and template matching were used to accurately identify the peak position of the R-wave in each cardiac cycle from the corrected signal (the R-wave is the most significant and highest amplitude waveform in the cardiac cycle, and is the core marker for dividing the cardiac cycle). Based on the R-wave position, signal segments covering the complete P-QRS-T complex were extracted according to a preset time window to achieve the separation and extraction of signals from a single cardiac cycle. Then, the voltage amplitude of the clipped cardiac cycle signals was normalized to map the voltage amplitude of all lead signals to a uniform numerical range, eliminating individual differences and systematic errors caused by different patients and different devices. Finally, the signal data were arranged according to the dimension of "12 lead channels × single cardiac cycle sampling point" to construct an input matrix of size 12×t, where t is the sampling point length of a single cardiac cycle. This matrix completely preserves the temporal evolution characteristics and spatial correlation of each lead signal.

[0031] In one embodiment of the present invention, the specific process of "acquiring the original signal of the 12-lead electrocardiogram and preprocessing the original signal to obtain the input matrix" described in step S110 can be further explained in conjunction with the following description.

[0032] Obtain the raw signal of a 12-lead electrocardiogram as described in the following steps; It should be noted that the 12-lead electrocardiogram (ECG) detection device simultaneously collects raw signals of cardiac electrical activity from 12 standard lead sites on the human body surface. These signals are presented in the form of time-series voltage change data, which fully records the electrophysiological response during cardiac contraction and relaxation.

[0033] As described in the following steps, the original signal is sequentially subjected to power frequency and high frequency noise suppression and baseline drift correction to obtain the corrected signal; It should be noted that digital bandpass filtering technology is used to process the original signal, filtering out 50Hz / 60Hz power frequency interference and high-frequency noise above 100Hz (such as electromyography interference and electrode contact noise), while retaining the effective ECG frequency components of 0.5-100Hz. Subsequently, through polynomial fitting or adaptive filtering algorithms, the slow shift of the signal baseline caused by factors such as breathing and body position changes is eliminated, so that the signal reference tends to be stable, and finally the corrected signal after removing the main interference is obtained.

[0034] As described in the following steps, the R-wave position is determined by R-wave detection of the correction signal, and the cardiac cycle signal is clipped based on the R-wave position; It should be noted that the differential thresholding method or template matching method is used to identify the features of the correction signal and accurately locate the peak position of the R wave in each cardiac cycle (the R wave is the characteristic waveform with the highest amplitude and the largest slope in the electrocardiogram signal, and it is the core marker for dividing the cardiac cycle). With the R wave peak as the center, a signal segment is extracted according to a preset time window (such as 100ms before the R wave to 300ms after the R wave) to ensure that the segment completely covers the full-cycle electrical activity of the P wave, QRS complex, and T wave, thereby achieving accurate separation and trimming of the signal of a single cardiac cycle.

[0035] As described in the following steps, the cropped cardiac cycle signal is subjected to voltage amplitude normalization processing to obtain an input matrix of size 12×t; where 12 corresponds to 12 lead channels and t is the sampling point length of the cardiac cycle.

[0036] It should be noted that by using min-max normalization or z-score standardization, the voltage amplitudes of the cardiac cycle signals after the 12 leads are uniformly mapped to a preset interval (such as [0,1] or [-1,1]), eliminating amplitude deviations caused by individual differences among patients and differences in detection equipment parameters. The standardized 12 lead signals are then arranged in a regular manner according to the dimension of "lead channel × sampling point" to construct an input matrix of size 12×t, where 12 corresponds to the 12 lead channels and t is the sampling point length of a single cardiac cycle signal. The matrix form not only preserves the temporal evolution of each lead signal but also maintains the spatial correlation between leads.

[0037] As described in step S120, preliminary feature mapping is performed on the input matrix to generate consistent input features.

[0038] It should be noted that, based on the dimensional information of the input matrix (12 lead channels, t sampling points) and the input requirements of the subsequent feature extraction module, the dimensional transformation parameters required for feature mapping are determined, including the size of the target feature space and the dimensional specifications of the mapping matrix. Through linear mapping or embedding operations, feature transformation is performed on the input matrix, converting the two-dimensional matrix form of "lead channels × sampling points" into a one-dimensional or high-dimensional feature vector of a preset dimension, realizing the mapping from the original signal dimension to the feature space dimension, and obtaining preliminary feature data. This process not only preserves the temporal characteristics and lead space correlation of the original signal, but also completes the unified adaptation of dimensions.

[0039] The mapped feature data undergoes unified standardization, employing methods such as z-score standardization or min-max normalization to eliminate dimensional differences and numerical range deviations between different feature dimensions, ensuring that all feature data fall within the same numerical distribution range. Through standardization, it is ensured that the feature components corresponding to each lead have equal weight and influence, avoiding feature bias caused by differences in the original signal amplitude. Ultimately, consistent input features with consistency, adaptability, and effectiveness are generated, providing standardized shared input data for the subsequent parallel feature extraction of the three paths.

[0040] In one embodiment of the present invention, the specific process of "performing preliminary feature mapping on the input matrix to generate consistent input features" in step S120 can be further explained in conjunction with the following description.

[0041] As described in the following steps, determine the dimension transformation parameters required for feature mapping based on the input matrix; It should be noted that the input matrix has a dimension of 12×t (12 lead channels, t sampling points). The determination of the dimension transformation parameters must simultaneously adapt to the information carrying capacity of the original signal and the input dimension requirements of the subsequent parallel feature extraction modules (time segment self-attention, inter-lead self-attention, multi-scale one-dimensional convolution). Specifically, the distribution density of effective information in the input matrix is ​​first statistically analyzed. Combined with the feature redundancy analysis of clinical ECG signals, the dimension of the target feature space is determined (e.g., 128-dimensional, 256-dimensional, etc., to ensure that key information is not lost while avoiding dimensional redundancy). At the same time, based on the two-dimensional structure of the input matrix (lead-sampling point), the specifications of the mapping matrix are set (e.g., t×d, where d is the target feature dimension) to ensure that the temporal correlation of each lead signal and the spatial coupling relationship between leads are completely preserved during the mapping process, providing parameter support for feature transformation.

[0042] As described in the following steps, feature transformation is performed on the input matrix to map the input matrix to a feature space of a preset dimension to obtain feature data; It should be noted that the feature transformation is implemented using a linear mapping or embedding algorithm. Specifically, the 12×t two-dimensional input matrix is ​​expanded row by row into a one-dimensional vector (length 12×t) according to the lead dimension. Then, matrix multiplication is performed using a preset mapping matrix (dimension 12t×d, where d is the target feature dimension) to project it onto a high-dimensional feature space of the preset dimension. In this process, the parameters of the mapping matrix are obtained through offline training and optimization to ensure that the transformed feature data can retain the temporal evolution pattern of the original ECG signal (such as the temporal characteristics of the P-QRS-T wave group) and the lead space correlation (such as the waveform synchronicity between different leads) to the greatest extent, avoiding the loss of effective information. Finally, high-dimensional feature vectors corresponding to the 12 leads are obtained and combined to form a feature data set.

[0043] As described in the following steps, the feature data is uniformly standardized to obtain consistent input features.

[0044] It should be noted that the core purpose of standardization is to eliminate dimensional differences and numerical distribution deviations between feature data from different leads, ensuring the fairness of feature weights in subsequent parallel extraction paths. Specifically, the z-score standardization algorithm is used to calculate the mean μ and standard deviation σ of all feature components in the feature dataset. Then, each feature component is converted into standard normal distribution data with a mean of 0 and a variance of 1 using the formula x'=(x-μ) / σ. If extreme outliers exist in the feature data, truncation can be performed before standardization. This process ensures that the feature data corresponding to the 12 leads are within the same numerical range, preventing the features of one lead from dominating subsequent calculations due to differences in the original signal amplitude. Ultimately, it generates consistent input features that combine consistency, stability, and adaptability, providing standardized shared input for the three parallel extraction paths.

[0045] As described in step S130, parallel feature extraction is performed on the consistent input features to obtain time dimension features, lead space features, and global convolution features.

[0046] It should be noted that this step utilizes three independent and parallel feature extraction paths to extract deep and effective information from ECG signals from three core dimensions: temporal evolution, lead spatial correlation, and global rhythm morphology. This addresses the shortcomings of existing technologies, such as insufficient single-dimensional feature extraction and incomplete information coverage. The three paths share consistent input features and execute extraction operations synchronously and in parallel, ensuring both efficiency and information complementarity through multi-perspective feature capture. The first path is the temporal dimension feature extraction path. Through time-segment self-attention operations, consistent input features are divided into overlapping time segments according to a preset time window. By learning the dependencies between segments, it accurately captures the temporal dynamic features related to myocardial electrical activity in the ECG signal (such as the sequential evolution of P-QRS-T waves and waveform duration). The second path is the lead spatial feature extraction path. Through an inter-lead self-attention mechanism, the features corresponding to the 12 leads are treated as independent spatial units. It adaptively learns the association weights between different leads, strengthening the combined features of leads related to lesions (such as abnormal signals in leads corresponding to specific coronary artery supply areas). The third path is the global convolutional feature extraction path. Through multi-scale one-dimensional convolution operations, it uses convolution kernels of different sizes to capture global ECG rhythm and morphological features at different scales (such as overall heart rate variability and macroscopic patterns of waveform contours). After the three paths simultaneously complete feature extraction, they output temporal dimension features, lead spatial features, and global convolutional features respectively, providing a multi-dimensional and complementary feature foundation for subsequent dimension alignment and fusion.

[0047] In one embodiment of the present invention, the specific process of "performing parallel feature extraction on the consistent input features to obtain temporal dimension features, lead space features and global convolutional features" described in step S130 can be further explained in conjunction with the following description.

[0048] As described in the following steps, using the consistent input feature as a shared input, three parallel extraction paths are initiated; It should be noted that the consistent input features are high-dimensional feature data (e.g., 12×d dimensions, where d is the target feature dimension) after dimensionality mapping and standardization. These features possess information integrity and format uniformity, and can simultaneously meet the input requirements of all three extraction paths. When initiating the parallel mechanism, independent computing resources are allocated to the three paths through multi-threading or a parallel computing framework, ensuring that the three paths start synchronously and execute in parallel, avoiding efficiency losses caused by serial processing. Simultaneously, the shared input design ensures that the three paths extract features based on the same original feature base, ensuring the consistency and correlation of subsequent feature fusion, and providing a prerequisite for multi-dimensional information complementarity.

[0049] As described in the following steps, temporal dimension features are extracted from the consistent input features through temporal segment self-attention operation; It should be noted that the core of time-segment self-attention computation is to focus on the temporal dynamics of ECG signals, addressing the limitations of information at a single time point and the difficulty in capturing key features during critical periods. Specifically, the consistent input features are first divided into multiple overlapping time segments according to a preset time window (e.g., a window covering 5-10 sampling points), with each segment corresponding to a local temporal interval of the ECG signal. Then, the association weight between each time segment and other segments is calculated through a self-attention mechanism, highlighting key temporal features related to myocardial electrical activity (e.g., the duration of the QRS complex, the time interval between the T and P waves, and the rise / fall slope of the waveform). Finally, the time dimension features are obtained through weighted aggregation, which fully preserves the temporal evolution trajectory of the ECG signal, providing support for judging dynamic abnormalities in myocardial electrical activity.

[0050] In one embodiment of the present invention, the specific process of step “extracting time dimension features from the consistent input features through time segment self-attention operation” can be further explained in conjunction with the following description.

[0051] As described in the following steps, the consistent input features are divided into overlapping time segments according to a preset length and step size. Query vectors, key vectors, and value vectors are generated through linear mapping. The similarity between vectors is calculated and normalized to obtain attention weights. The value vectors are weighted and summed based on the weights to output the time dimension features.

[0052] It should be noted that, in order to fully characterize the temporal evolution of the electrocardiogram (ECG) signal within a cardiac cycle, this invention introduces a time-segment-based self-attention mechanism in the time dimension. Specifically, the preprocessed 12-lead ECG matrix... Viewed as a two-dimensional sequence of "lead × time", it is arranged at fixed lengths on the time axis. and step length Perform sliding partitioning to form a series of overlapping time segments {P} B1 ,P B2 ,…,P Bq}, each fragment P Bj ∈R m×l It covers multiple adjacent sampling points. The information contained in a single time point is relatively limited, while fragmentation can provide a complete local context for each segment, so that the model can focus on key waveforms such as ST segment, QRS complex, and T wave in subsequent calculations, and also consider the transition between them.

[0053] After obtaining the time segment sequence, this invention projects each segment onto a unified feature space through a learnable linear mapping to obtain the corresponding query vector Q. t Key vector K t Sum vector V t Subsequently, a self-attention operation is constructed along the time segment sequence dimension: the relevance matrix between segments is constructed using the dot product similarity between the query and the key, and the attention weight of each segment to other segments is obtained through scaling and softmax normalization.

[0054]

[0055] This weight characterizes the importance of a given time segment to other segments in interpreting the overall cardiac cycle, allowing the network to automatically learn which segments the current segment should prioritize. This is achieved by calculating the similarity matrix Q. t K t T ∈R q×q This invention assigns higher attention weight to a specific region. When focal ST-segment elevation or pathological Q waves are present in a cardiac cycle, time segments with similar morphology or in the same repolarization process will receive higher attention.

[0056] After calculating the self-attention weights, this invention applies a weighted summation method to the value vector. Aggregation is performed to obtain the context-enhanced feature representation of each time segment, and the outputs of all segments are reassembled in chronological order to form a complete temporal feature sequence. Further normalization and nonlinear transformations are then applied to obtain high-quality feature representations in the temporal dimension. TThis representation numerically balances local waveform details with global time dependence, and can stably highlight abnormal time periods related to myocardial infarction even in the presence of heart rate variability, arrhythmia, or noise interference. This provides a well-informed and structurally clear temporal feature foundation for subsequent spatial modeling and solving inverse electrocardiogram problems.

[0057] As described in the following steps, lead spatial features are extracted from the consistent input features using an inter-lead self-attention mechanism; In one embodiment of the present invention, the specific process of step “extracting lead spatial features from the consistent input features through an inter-lead self-attention mechanism” can be further explained in conjunction with the following description.

[0058] The consistent input features are rearranged into a lead sequence of length 12 and encoded into lead-level feature vectors. Query vectors, key vectors, and value vectors are generated through linear mapping. The similarity of the inner product between vectors is calculated and normalized to obtain the inter-lead attention weights. Based on the weights, the value vectors are weighted and summed to output the lead space features.

[0059] It should be noted that the consistency input features are rearranged into a 12-dimensional lead sequence because the 12 leads correspond to different areas of the human body surface, and their signal changes have spatial correlations (such as multiple leads corresponding to the same coronary artery blood supply area showing synchronous abnormalities). After rearrangement, the spatial interaction relationship between leads can be directly modeled. The encoded lead-level feature vector (e.g., 12×d dimension) contains complete feature information for each lead. The query vector (Q), key vector (K), and value vector (V) generated by linear mapping are all 12×d dimension, where Q represents the feature query requirement of the current lead, and K represents the feature matching information of other leads. By calculating the inner product similarity of Q and K, the feature association strength between different leads can be quantified. The attention weight (12×12 dimension) obtained after Softmax normalization can adaptively highlight lead combinations related to lesions (e.g., specific lead pairs corresponding to myocardial infarction areas) and suppress interference from irrelevant leads. Finally, by weighted summation of the weights and V, the aggregation of strongly correlated lead features is achieved, and the output lead space features (12×d dimension) accurately characterize the collaborative abnormal patterns between leads.

[0060] After completing the time-dimensional segment modeling, in order to characterize the spatial coupling relationship between different leads, this invention introduces a lead-space-based self-attention mechanism in the lead dimension. Specifically, the preprocessed ECG matrix... The system rearranges the leads, treating the time series of each lead over the entire cardiac cycle as a lead unit, forming a 12-lead sequence. Through linear mapping, the time series of each lead is encoded into a fixed-dimensional feature vector, obtaining a lead-level representation in the feature space for subsequent correlation modeling. After obtaining the lead-level features, the invention applies self-attention: a query, key, and value vector are constructed for each lead feature; the inner product of the query and key is used to obtain the inter-lead similarity matrix; after scaling and softmax normalization, inter-lead attention weights are formed; and the value vectors of all leads are then weighted and summed accordingly to obtain the updated lead-level representation. This process is equivalent to adaptively learning the correlation structure between leads in the feature space, giving higher weights to leads with co-variation patterns under different infarct types such as inferior, anterior, or lateral walls. After weighted aggregation, the lead-level output is normalized and nonlinearly transformed to obtain the lead space feature representation. .

[0061]

[0062] This representation numerically integrates the synergistic changes and differences between leads, highlighting lead combinations that are crucial for identifying infarcts in different blood supply areas and distinguishing between focal and multifocal lesions. It lays a spatial information foundation for subsequent fusion with temporal and global convolutional features.

[0063] As described in the following steps, global convolutional features are extracted from the consistent input features through multi-scale one-dimensional convolution; It should be noted that the core of multi-scale one-dimensional convolution is to capture the global rhythm and morphological features of electrocardiogram (ECG) signals at different time scales, thus overcoming the limitation of single-scale convolution in covering global information. The temporal dimension of the consistent input features contains the complete periodic pattern of the ECG signal. By performing sliding convolution on this dimension with convolution kernels of different sizes, fine-grained (such as the local morphology of a single waveform), medium-grained (such as the changing trend of multiple continuous waveforms), and coarse-grained (such as the overall heart rate variability) features can be extracted respectively. The features at each scale complement each other, and the final integrated global convolution feature can reflect both the microscopic morphological details of the ECG signal and the macroscopic rhythmic pattern, providing a basis for judging the overall cardiac function status.

[0064] In one embodiment of the present invention, the specific process of the step "extracting global convolutional features from the consistent input features through multi-scale one-dimensional convolution" can be further explained in conjunction with the following description.

[0065] The multi-scale one-dimensional convolution is achieved through at least three concatenated convolution operations. Each convolution operation uses a cross-correlation operator to transform the consistent input features, capturing global rhythm and morphological information at different scales and outputting global convolution features.

[0066] It should be noted that the kernel size of the three concatenated convolutions increases sequentially (e.g., 3×1 for the first layer, 5×1 for the second layer, and 7×1 for the third layer, where 1 corresponds to the feature dimension). Different kernel sizes correspond to different temporal receptive fields: small kernels (3×1) focus on local waveform details of the ECG signal (e.g., the peak shape of the QRS complex), medium kernels (5×1) capture the changing trends of multiple adjacent sampling points (e.g., the connection pattern of the P-QRS-T complex), and large kernels (7×1) cover a longer time interval, extracting global features such as overall heart rate rhythm and waveform periodic stability. Each convolutional layer employs a cross-correlation operator to transform features. By sliding multiplication and summation between the convolutional kernel and the input features, local features are aggregated into abstract features at that scale. Simultaneously, each convolutional layer can be followed by batch normalization and activation functions (such as ReLU) to suppress gradient vanishing and enhance the nonlinear expressive power of features. After the three convolutional features are concatenated or fused, a global convolutional feature with a unified output dimension is output, ensuring consistency with the output feature format of the other two paths.

[0067] As described in the following steps, the temporal dimension features, lead spatial features, and global convolutional features are output synchronously.

[0068] It should be noted that the execution time of the three parallel paths is aligned through a preset synchronization mechanism (such as setting a maximum waiting time or using a blocking synchronization method) to ensure that the three paths complete feature extraction simultaneously before outputting them uniformly, avoiding feature loss due to single-path delays. The three types of output features maintain consistent dimensions (e.g., all are 12×d or d-dimensional vectors) and retain the core information of different dimensions of the original ECG signal: time-dimensional features focus on temporal dynamics, lead-space features focus on spatial coordination, and global convolution features focus on multi-scale global patterns. The three types of features are independent and complementary, providing a complete and diverse feature foundation for subsequent dimension alignment and refined fusion.

[0069] As described in step S140, the temporal dimension features, the lead spatial features, and the global convolutional features are dimensionally aligned and fused to generate spatiotemporal joint features.

[0070] It should be noted that, firstly, dimensional alignment is performed to ensure that the three types of features are completely consistent in dimensionality. Since the temporal dimension features, lead spatial features, and global convolutional features are extracted by three parallel paths, there may be dimensional differences. Therefore, adaptation and adjustment are required based on a preset target dimension (consistent with the target dimension d of the consistent input features): for features with insufficient dimensions, dimensions are supplemented through zero-padding or linear interpolation; for features with redundant dimensions, they are compressed to the target dimension through principal component analysis (PCA) or feature selection; finally, all three types of features are transformed into standardized features with the same dimensionality (such as a d-dimensional vector or a 12×d-dimensional matrix), eliminating the impact of dimensional differences on the fusion effect.

[0071] Next, a refined fusion strategy is employed to collaboratively integrate the aligned three types of features. The preferred fusion methods are residual summation or weighted combination: if weighted combination is used, the weight coefficients of the three types of features are learned offline (e.g., weights are dynamically allocated based on an attention mechanism, assigning higher weights to key feature dimensions related to myocardial infarction), and then the three types of features are linearly weighted and summed according to their weights; if residual summation is used, one type of feature is used as the baseline feature, and the other two types of features are superimposed on the baseline feature in the form of residuals, preserving the integrity of the original information of each feature. This fusion process can fully leverage the complementary value of the three types of features—time-dimensional features provide temporal dynamic support, lead spatial features provide spatial correlation support, and global convolutional features provide global regularity support, achieving a feature enhancement effect of "1+1+1>3".

[0072] Finally, the fusion result is optimized using nonlinear transformation to enhance the expressive power and discriminative power of the features. The fused features are input into activation functions (such as ReLU and GELU) for nonlinear mapping, breaking the limitations of linear fusion and strengthening the nonlinear patterns related to the pathology in the features (such as irregular changes in abnormal ECG signals). Simultaneously, batch normalization can be used to stabilize the feature data distribution and avoid gradient vanishing or exploding problems. After the above processing, a spatiotemporal joint feature is finally generated. This feature not only fully preserves the temporal evolution of the ECG signal and the spatial correlation of leads, but also integrates multi-scale global rhythm and morphological information, providing high-precision and highly discriminative feature input for subsequent tasks such as solving inverse ECG problems and locating myocardial infarction.

[0073] After extracting features for time-segment self-attention and lead-space self-attention, this invention integrates temporal and spatial information through global context extraction to provide a comprehensive view of the electrocardiogram. Let the comprehensive view be denoted as f. g It uses a series of convolutional layers B The result of processing:

[0074] in, Bn This represents the input of the nth layer. It is a cross-correlation operator, and W is a learnable weight. This operation compresses the features of the 12-lead signal to obtain global features. This invention robustly captures comprehensive spatiotemporal information through three parallel paths: temporal attention, spatial attention, and global context extraction. B = T + S + TS ,therefore, B The combined spatiotemporal information of the 12-lead electrocardiogram was encoded, and the local temporal dynamics, lead coordination patterns, and overall rhythm morphology were encoded into the same feature tensor.

[0075] To map the aforementioned unified spatiotemporal features to the transmembrane potential space on the ventricular grid, this invention introduces a dimension alignment and iterative optimization mechanism after feature fusion. Firstly, a learnable linear dimensionality-increasing transformation is used to... B The initial TMP estimation sequence is obtained by mapping the representation space from "lead × time" or "feature channel × time" to the "ventricular grid node × time" space. This step is equivalent to constructing a forward prediction mapping from body surface features to ventricular surface nodes, providing a starting point for subsequent iterative refinement. Given the highly ill-posed nature of the ECG inverse problem and the sensitivity of the solution to noise, this invention further designs an iterative optimization unit similar to the iterative shrinking threshold idea to refine and correct the initial TMP estimate in multiple rounds. This unit uses a symmetrical "convolution-activation-normalization" sandwich structure as the main feature transformation, applying a symmetrical constraint loss between the two outputs to ensure that the features remain consistent in overall shape before and after iteration. Simultaneously, a soft thresholding operator is inserted in the middle to compress and filter out components with small amplitude and limited contribution, thereby effectively suppressing artifacts introduced by noise and ill-posedness. The threshold parameter of the soft thresholding operator is designed as a learnable variable, capable of adaptively adjusting its intensity during end-to-end training, allowing the network to select an appropriate degree of sparsity under different datasets and noise levels. After several iterations, the TMP estimation gradually converges from a coarse linear prediction to an electrophysiological distribution that combines smoothness, physical rationality, and lesion sensitivity, providing a reliable and stable underlying potential field input for subsequent attention constraints based on ventricular geometry and myocardial infarction region identification.

[0076] After fusing spatiotemporal features and obtaining an initial estimate of the ventricular transmembrane potential (TMP), this invention further introduces ventricular geometric constraints and a graph attention module to perform fine-grained spatial optimization of the TMP distribution. Specifically, the ventricular surface is discretized into a grid structure composed of vertices and triangular facets, with each grid vertex corresponding to a spatial location and its TMP sequence changing over time. A ventricular graph is constructed based on the grid topology: grid vertices are used as graph nodes, and vertex pairs sharing facets or with Euclidean distances within a certain threshold are used as graph edges, thus obtaining a graph structure carrying geometric adjacency relationships. The TMP features output from the previous module are attached to each node, which can be considered as a set of node features with a time dimension defined on the ventricular geometry. Subsequently, this invention introduces a graph attention network on this graph structure to adaptively weighted model the information transfer process between adjacent nodes: by generating query, key, and value vectors for each node, calculating its similarity to neighboring nodes in the feature space, and obtaining edge-level attention weights through softmax normalization, the contribution of different spatial neighbors to the TMP correction of the current node is automatically learned. Nodes located within the same anatomical region or lesion tend to have higher consistency in TMP waveforms and timing, and graph attention mechanisms assign greater weight to these neighbors; while nodes that cross anatomical boundaries or are far from lesions have relatively less weight in the information aggregation process.

[0077] Building upon this foundation, through multi-layer graph attention propagation and nonlinear transformation, this invention achieves geometric consistency constraints and local smoothing of the TMP spatial distribution, while preserving the necessary gradient changes at the lesion boundary. On one hand, the TMP estimation within the ventricular surface is automatically narrowed down in the local neighborhood, resulting in spatially smooth and continuous electrophysiological activity within the same anatomical region, which better reflects the propagation characteristics of real myocardial depolarization and repolarization. On the other hand, near the suspected infarct boundary, the graph attention network can adaptively adjust weights based on the differences in features between nodes, limiting the influence of the boundary crossing the lesion and normal myocardium. This preserves lesion features such as potential drops or repolarization delays while maintaining overall smoothness, avoiding excessive blurring of the lesion boundary. Through this "geometric graph + attention weight" approach, this invention simultaneously achieves structured regularization of TMP estimation and implicit constraints on the shape and extent of the infarct region in space. This results in a ventricular TMP distribution that is both geometrically continuous and reasonable, and has a clearly discernible spatial contour in the lesion region, providing a more reliable electrophysiological basis for subsequent threshold-based or learning-based classification of myocardial infarction regions.

[0078] In one embodiment of the present invention, the specific process of "aligning and fusing the temporal dimension features, the lead spatial features and the global convolutional features to generate spatiotemporal joint features" described in step S140 can be further explained in conjunction with the following description.

[0079] As described in the following steps, dimension matching processing is performed on the time dimension features, the lead space features, and the global convolutional features to make the time dimension features, the lead space features, and the global convolutional features have the same feature dimension; It's important to note that the core purpose of dimension matching is to eliminate dimensional differences in the output features of the three parallel paths, providing a unified feature foundation for subsequent fusion. Although all three types of features originate from consistent input features, due to different extraction mechanisms, there may be inconsistencies in feature dimensions (such as vector length and matrix dimension) (e.g., time-dimensional features are d-dimensional vectors, lead-space features are 12×d-dimensional matrices, and global convolution features are 2d-dimensional vectors). In specific processing, a target dimension specification is first preset (consistent with the target dimension d of the consistent input features, unified as d-dimensional vectors or 12×d-dimensional matrices). For features with dimensions lower than the target specification, linear interpolation or zero-padding is used to supplement the dimensions, ensuring no information loss. For features with dimensions higher than the target specification, principal component analysis (PCA) or attention mechanism feature screening is used to retain key feature dimensions related to ECG lesions and compress them to the target specification. If there are differences in feature morphology (such as matrix-to-vector conversion), matrix flattening or vector reshaping operations are used to unify the morphology. Ultimately, the three types of features are completely consistent in dimension and morphology, avoiding information distortion or weight imbalance caused by dimensional mismatch.

[0080] As described in the following steps, the time dimension features, the lead space features, and the global convolutional features after dimension alignment are fused using residual summation or weighted combination to obtain a fusion result; It should be noted that this step employs a refined fusion strategy, the core of which is to fully explore the complementary value of the three types of features and avoid the overloading of key information caused by simple superposition. If a weighted combination method is chosen, the weight coefficients are determined through offline training: based on a large amount of clinical ECG data, with the accuracy of myocardial infarction localization as the optimization goal, the global weights of the three types of features are learned through gradient descent algorithm, or local dimension weights are dynamically allocated through a multi-head attention mechanism—higher weights are assigned to feature dimensions strongly correlated with the lesion (such as abnormal QRS complex timing in time dimension features and infarction-related lead combinations in lead space features), and lower weights are assigned to redundant feature dimensions, and then linear weighted summation is performed according to the weights. If a residual summation method is chosen, the global convolutional features (containing global rhythm patterns and stronger stability) are used as the baseline features, and the time dimension features and lead space features are superimposed on the baseline features in the form of residuals, that is, the fusion formula is: fusion result = baseline features + α × time dimension features + β × lead space features (α and β are residual coefficients, optimized through training). This method can highlight the differentiated information of temporal dynamics and spatial correlation while preserving global patterns. Both fusion methods can achieve synergistic complementarity of the three types of features, so that the fusion result can simultaneously cover the three core types of information: time, space, and global.

[0081] As described in the following steps, the fusion result is optimized by nonlinear transformation to generate a spatiotemporal joint feature that combines temporal evolution law, lead spatial coupling relationship and global morphological information.

[0082] It should be noted that the core of nonlinear transformation is to break the expressive limitations of linear fusion, strengthen the nonlinear patterns related to ECG lesions in the features, and improve feature discriminative power. In specific processing, the fusion result is first input into a batch normalization layer to standardize the feature data, making the feature distribution more stable and avoiding gradient vanishing or exploding in subsequent transformations. Then, an activation function (such as GELU or LeakyReLU) is applied for nonlinear mapping. Through the gradient characteristics of the nonlinear function, the hidden nonlinear correlation information in the three types of features (such as temporal-spatial coordination anomalies caused by myocardial infarction, and nonlinear coupling between global rhythm and local morphology) is amplified. If further feature abstraction is needed, one or two lightweight fully connected layers can be stacked to deeply integrate the nonlinearly transformed features and extract higher-level composite features. After the above optimization, the final spatiotemporal joint features not only fully preserve the dynamic evolution law of the time dimension and the coupling relationship of the lead space, but also integrate the rhythm and morphological information at the global level. They have stronger feature expression ability and lesion differentiation ability, and can be directly used as the core input for subsequent tasks such as solving ECG inverse problems and locating myocardial infarction.

[0083] In a specific implementation, verification is based on simulation data: Simulation data prediction results are as follows Figure 3 As shown, on a large-scale simulation dataset containing various infarct locations, infarct extents, and conduction velocities, this invention first generates corresponding 12-lead ECGs using ideal geometry and simulated TMP. Then, it uses the spatiotemporal feature extraction module and subsequent inverse problem solving network of this invention for training and testing. The results show that this invention can stably reconstruct the ventricular surface TMP distribution under different noise levels. The TMP reconstruction error is significantly reduced compared to traditional baseline methods, and the spatial localization deviation of the infarct area is significantly reduced, demonstrating the effectiveness of this method under ideal conditions.

[0084] In one specific implementation, validation is based on real patient data: Multi-angle myocardial infarction calculation results from real patients, such as Figure 4 As shown, in a real-world patient cohort from multiple centers, this invention used actual 12-lead ECG data as input and compared the estimated infarct location and extent with LGE-CMR or expert-annotated myocardial infarction areas as reference standards. Experimental results demonstrate that this invention achieves high accuracy and sensitivity in tasks such as infarct area detection and blood supply zone classification.

[0085] Comparison between model predictions and expert judgments: exist Figure 5 The duration of high-activation waves and ECG leads in patients with myocardial infarction caused by one, two, and three coronary artery supply regions are shown. Significant time steps are concentrated near the Q and T waves, consistent with clinical knowledge. Furthermore, different supply regions are emphasized in different lead combinations, reflecting the specific projection of the supply region on a 12-lead ECG. This physiologically significant knowledge can be transferred to subsequent modules and used for myocardial infarction localization. Figure 6 The results show a comparison between the present invention and cardiologists' classification of three coronary artery blood supply regions. The present invention demonstrates superior performance across all blood supply regions and metrics, with the most significant improvement in the LCX metric (AUC +0.27, F1 +0.83, accuracy +0.62, NPV +0.55). These improvements indicate that the present invention misses fewer myocardial infarction sites compared to cardiologists. Figure 7 A heatmap showing the classification results based on the AHA17 segment model and coronary artery regions is displayed. Values ​​outside the coronary artery regions are close to zero, indicating that segments from different regions rarely confuse with each other.

[0086] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0087] Reference Figure 8This application illustrates an embodiment of a device for extracting spatiotemporal joint features from a 12-lead electrocardiogram (ECG). The device is characterized in that it implements the steps of the method for extracting spatiotemporal joint features from a 12-lead ECG as described above. include: The acquisition module 810 is used to acquire the raw signal of a 12-lead electrocardiogram and preprocess the raw signal to obtain an input matrix; The preliminary feature mapping module 820 is used to perform preliminary feature mapping on the input matrix to generate consistent input features; Feature extraction module 830 is used to perform parallel feature extraction on the consistent input features to obtain temporal dimension features, lead space features and global convolutional features; The fusion module 840 is used to perform dimensional alignment and fusion of the temporal dimension features, the lead spatial features, and the global convolutional features to generate spatiotemporal joint features.

[0088] In one embodiment of the present invention, the acquisition module 810 includes: The raw signal acquisition submodule is used to acquire the raw signal of a 12-lead electrocardiogram. The correction signal submodule is used to sequentially perform power frequency and high frequency noise suppression and baseline drift correction processing on the original signal to obtain a correction signal; The trimming submodule is used to perform R-wave detection on the correction signal to determine the R-wave position, and to trim the cardiac cycle signal based on the R-wave position; The normalization submodule is used to normalize the voltage amplitude of the clipped cardiac cycle signal to obtain an input matrix of size 12×t; where 12 corresponds to 12 lead channels and t is the sampling point length of the cardiac cycle.

[0089] In one embodiment of the present invention, the preliminary feature mapping module 820 includes: The dimension transformation parameter submodule is used to determine the dimension transformation parameters required for feature mapping based on the input matrix. The feature data submodule is used to perform feature transformation on the input matrix and map the input matrix to a feature space of a preset dimension to obtain feature data; The Consistent Input Feature Submodule is used to perform unified standardization processing on the feature data to obtain consistent input features.

[0090] In one embodiment of the present invention, the feature extraction module 830 includes: The parallel extraction path submodule is used to start three parallel extraction paths with the consistent input features as shared input. The time dimension feature submodule is used to extract time dimension features from the consistent input features through time segment self-attention operation; The lead space feature submodule is used to extract lead space features from the consistent input features through an inter-lead self-attention mechanism. A global convolutional feature submodule is used to extract global convolutional features from the consistent input features through multi-scale one-dimensional convolution; The synchronous output submodule is used to synchronously output the time dimension features, lead space features, and global convolution features.

[0091] In one embodiment of the present invention, the lead space feature submodule includes: The lead space feature output unit is used to rearrange the consistency input features into a lead sequence of length 12 and encode it into a lead-level feature vector. It generates a query vector, a key vector, and a value vector through linear mapping, calculates the inner product similarity between vectors and obtains the inter-lead attention weights after normalization, and outputs the lead space features based on the weights by weighted summation of the value vectors.

[0092] In one embodiment of the present invention, the global convolutional feature submodule includes: The global convolutional feature unit is used to implement the multi-scale one-dimensional convolution through at least three concatenated convolution operations. Each convolution layer uses a cross-correlation operator to perform feature transformation on the consistent input features, captures global rhythm and morphological information at different scales, and outputs global convolutional features.

[0093] In one embodiment of the present invention, the fusion module 840 includes: The dimension matching submodule is used to perform dimension matching processing on the time dimension features, the lead space features, and the global convolutional features, so that the time dimension features, the lead space features, and the global convolutional features are in the same feature dimension; The fusion result submodule is used to fuse the dimension-aligned temporal features, the lead spatial features, and the global convolutional features using residual summation or weighted combination to obtain the fusion result. The spatiotemporal joint feature submodule is used to optimize the fusion result through nonlinear transformation to generate spatiotemporal joint features that combine temporal evolution law, lead spatial coupling relationship and global morphological information.

[0094] Reference Figure 9 The diagram illustrates a computer apparatus for implementing a method for extracting spatiotemporal joint features of a 12-lead electrocardiogram according to the present invention, which may specifically include the following: The aforementioned computer device 1 is in the form of a general-purpose computing device. The components of the computer device 1 may include, but are not limited to: one or more processors or processing units 3, memory 8, and a bus 4 connecting different system components (including memory 8 and processing unit 3).

[0095] Bus 4 represents one or more of several bus architectures, including memory buses or memory controllers, peripheral buses, graphics acceleration ports, processors, or local buses using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Audio / Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.

[0096] Computer device 1 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer device 1, including volatile and non-volatile media, removable and non-removable media.

[0097] Memory 8 may include computer system readable media in the form of volatile memory, such as random access memory 9 and / or cache memory 10. Computer device 1 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 11 may be used to read and write non-removable, non-volatile magnetic media (commonly referred to as a "hard disk drive"). Although Figure 9 As not shown, a disk drive for reading and writing to a removable non-volatile disk (such as a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (such as a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 4 via one or more data media interfaces. The memory may include at least one program product having a set (e.g., at least one) of program modules 13 configured to perform the functions of the embodiments of this application.

[0098] A program / utility 12 having a set (at least one) of program modules 13 may be stored, for example, in memory. Such program modules 13 include—but are not limited to—an operating system, one or more application programs, other program modules 13, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 13 typically perform the functions and / or methods described in the embodiments of this application.

[0099] Computer device 1 can also communicate with one or more external devices 2 (e.g., keyboard, pointing device, monitor 7, camera, etc.), and with one or more devices that enable an operator to interact with computer device 1, and / or with any device that enables computer device 1 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed through I / O interface 6. Furthermore, computer device 1 can also communicate with one or more networks (e.g., local area network (LAN)), wide area network (WAN), and / or public networks (e.g., the Internet) through network adapter 5. Figure 9 As shown, network adapter 5 communicates with other modules of computer device 1 via bus 4. It should be understood that, although... Figure 9 Not shown, it can be combined with computer device 1 to use other hardware and / or software modules, including but not limited to: microcode, device drivers, redundant processing unit 3, external disk drive array, RAID system, tape drive and data backup storage system 11, etc.

[0100] The processing unit 3 executes various functional applications and data processing by running programs stored in memory 8, such as implementing a method for extracting spatiotemporal joint features of a 12-lead electrocardiogram provided in the embodiments of this application.

[0101] That is, when the above-mentioned processing unit 3 executes the above-mentioned program, it achieves the following: acquiring the raw signal of the 12-lead electrocardiogram and preprocessing the raw signal to obtain the input matrix; Perform preliminary feature mapping on the input matrix to generate consistent input features; Parallel feature extraction is performed on the consistent input features to obtain temporal dimension features, lead space features, and global convolutional features; The temporal dimension features, the lead spatial features, and the global convolutional features are dimensionally aligned and fused to generate spatiotemporal joint features.

[0102] In this application embodiment, the application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for extracting spatiotemporal joint features of a 12-lead electrocardiogram as provided in all embodiments of the application.

[0103] That is, when the program is executed by the processor, it performs the following: acquires the raw signal of a 12-lead electrocardiogram and preprocesses the raw signal to obtain an input matrix; Perform preliminary feature mapping on the input matrix to generate consistent input features; Parallel feature extraction is performed on the consistent input features to obtain temporal dimension features, lead space features, and global convolutional features; The temporal dimension features, the lead spatial features, and the global convolutional features are dimensionally aligned and fused to generate spatiotemporal joint features.

[0104] Any combination of one or more computer-readable media may be used. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.

[0105] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including—but not limited to—electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of transmitting, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0106] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof. These programming languages ​​include object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the operator's computer, partially on the operator's computer, as a standalone software package, partially on the operator's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the operator's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider). The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably.

[0107] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present application.

[0108] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0109] The above provides a detailed description of the method and apparatus for extracting spatiotemporal features of a 12-lead electrocardiogram. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and its core ideas. At the same time, those skilled in the art will recognize that there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for extracting spatiotemporal joint features of a 12-lead electrocardiogram, characterized in that, The method includes: The raw signal of a 12-lead electrocardiogram is acquired and preprocessed to obtain an input matrix; Perform preliminary feature mapping on the input matrix to generate consistent input features; Parallel feature extraction is performed on the consistent input features to obtain temporal dimension features, lead space features, and global convolutional features; The temporal dimension features, the lead spatial features, and the global convolutional features are dimensionally aligned and fused to generate spatiotemporal joint features.

2. The method according to claim 1, characterized in that, The steps of acquiring the raw signal of a 12-lead electrocardiogram and preprocessing the raw signal to obtain an input matrix include: Obtain the raw signal of a 12-lead electrocardiogram; The original signal is sequentially subjected to power frequency and high frequency noise suppression and baseline drift correction to obtain the corrected signal; The R-wave position is determined by R-wave detection of the correction signal, and the cardiac cycle signal is clipped based on the R-wave position. The cropped cardiac cycle signal is subjected to voltage amplitude normalization processing to obtain an input matrix of size 12×t; where 12 corresponds to 12 lead channels and t is the sampling point length of the cardiac cycle.

3. The method according to claim 1, characterized in that, The step of performing preliminary feature mapping on the input matrix to generate consistent input features includes: The dimension transformation parameters required for feature mapping are determined based on the input matrix; Perform feature transformation on the input matrix to map the input matrix to a feature space of a preset dimension to obtain feature data; The feature data is standardized to obtain consistent input features.

4. The method according to claim 1, characterized in that, The step of performing parallel feature extraction on the consistent input features to obtain temporal dimension features, lead space features, and global convolutional features includes: Using the consistent input features as shared input, three parallel extraction paths are initiated; Temporal dimension features are extracted from the consistent input features using time-segment self-attention operations; Lead space features are extracted from the consistent input features using an inter-lead self-attention mechanism; Global convolutional features are extracted from the consistent input features through multi-scale one-dimensional convolution; The time dimension features, lead space features, and global convolution features are output synchronously.

5. The method according to claim 4, characterized in that, The step of extracting time dimension features from the consistent input features through time segment self-attention operation includes: The consistent input features are divided into overlapping time segments according to a preset length and step size. Query vectors, key vectors, and value vectors are generated through linear mapping. The similarity between vectors is calculated and normalized to obtain attention weights. The value vectors are then weighted and summed based on the weights to output the time dimension features.

6. The method according to claim 4, characterized in that, The step of extracting lead spatial features from the consistent input features using an inter-lead self-attention mechanism includes: The consistent input features are rearranged into a lead sequence of length 12 and encoded into lead-level feature vectors. Query vectors, key vectors, and value vectors are generated through linear mapping. The similarity of the inner product between vectors is calculated and normalized to obtain the inter-lead attention weights. Based on the weights, the value vectors are weighted and summed to output the lead space features.

7. The method according to claim 1, characterized in that, The step of aligning and fusing the temporal dimension features, the lead spatial features, and the global convolutional features to generate spatiotemporal joint features further includes: Dimension matching processing is performed on the time dimension features, the lead space features, and the global convolutional features to make the time dimension features, the lead space features, and the global convolutional features have the same feature dimension; The time dimension features, lead space features, and global convolutional features after dimension alignment are fused using residual summation or weighted combination to obtain the fusion result; The fusion result is optimized by nonlinear transformation to generate a spatiotemporal joint feature that combines temporal evolution law, lead spatial coupling relationship and global morphological information.

8. A device for extracting spatiotemporal joint features of a 12-lead electrocardiogram, characterized in that, The device for extracting spatiotemporal features of a 12-lead electrocardiogram is used to implement the steps of the method for extracting spatiotemporal features of a 12-lead electrocardiogram as described in any one of claims 1 to 7. include: The acquisition module is used to acquire the raw signal of a 12-lead electrocardiogram and preprocess the raw signal to obtain an input matrix; The preliminary feature mapping module is used to perform preliminary feature mapping on the input matrix to generate consistent input features; The feature extraction module is used to perform parallel feature extraction on the consistent input features to obtain temporal dimension features, lead space features, and global convolutional features; The fusion module is used to perform dimensional alignment and fusion of the temporal dimension features, the lead spatial features, and the global convolutional features to generate spatiotemporal joint features.

9. A device for extracting spatiotemporal joint features of a 12-lead electrocardiogram, characterized in that, The method includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the method for extracting spatiotemporal joint features of a 12-lead electrocardiogram as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the method for extracting spatiotemporal joint features of a 12-lead electrocardiogram as described in any one of claims 1 to 7.