Physiological constraint type ECG reconstruction method and system based on multi-branch gating network
The physiologically constrained ECG reconstruction method using a multi-branch gated network solves the problems of dependence on 12-lead ECG and low diagnostic efficiency in existing technologies, and realizes ECG diagnosis by reconstructing complete leads with fewer leads, thus improving the convenience and diagnostic accuracy of monitoring equipment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-13
- Publication Date
- 2026-05-08
AI Technical Summary
Existing technologies rely on 12-lead electrocardiograms and specialized equipment, which limits the widespread use and diagnostic efficiency of electrocardiogram monitoring. Furthermore, traditional methods rely on linear transformation models, which lack universality.
A multi-branch gating network is used to reconstruct a standard 12-lead electrocardiogram through multi-lead input and dedicated feature extraction, cross-lead attention fusion, parallel decoding and feature gating, and physiological constraint synthesis.
It enables the reconstruction of complete leads with fewer leads, reduces equipment costs, improves diagnostic efficiency, and enhances reconstruction accuracy and consistency through cross-attention and physiological constraint modules.
Smart Images

Figure CN121999077A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of biomedical signal processing and deep learning technology, specifically to a physiologically constrained ECG reconstruction method and system based on a multi-branch gating network. Background Technology
[0002] More than 300 million electrocardiograms (ECGs) are performed globally each year, and the 12-lead ECG has become a fundamental diagnostic tool for assessing cardiovascular disease. Using an array of 10 separate skin electrodes, a series of 12 different electrical signals are acquired to aid in the diagnosis of various cardiopulmonary diseases. Despite advancements in vectorcardiography and other recording techniques, including the Mason-Likar system, most clinical diagnoses still rely on the standard 12-lead ECG, the accuracy of which is highly dependent on the operator's skill. Specialized equipment, typically only available in hospitals or clinics, and specially trained personnel are required to perform and interpret the ECGs.
[0003] In recent years, technological advancements have made it possible to monitor specific cardiac activity with higher quality and speed using wearable devices, including smartwatches, patch monitors, and apps. However, in this context, ECG monitoring is often limited to a single lead (usually lead I) or a few limb leads, which is insufficient for the continuous diagnosis of abnormalities confined to specific myocardial regions, such as acute myocardial infarction. Because the specific patterns of acute MI can be reflected in limb leads, precordial leads, or a combination of limb and precordial leads, current guidelines require the clinical interpretation of a standard 12-lead ECG.
[0004] The 12 leads in a standard ECG are not entirely independent and are known to be partially correlated. Therefore, over the past 30 years, techniques for synthesizing a fully standardized finite set of ECG leads have been proposed. While initial advances in this field relied on linear transformation models, the proliferation of artificial intelligence (AI) has enabled the development of more sophisticated methods. Previous studies primarily relied on patient-specific models or derived from limited datasets, which may have limited their generalizability.
[0005] Therefore, it is necessary to design a new physiological constraint-based ECG reconstruction method and system based on multi-branch gating networks to solve the above problems. Summary of the Invention
[0006] The purpose of this invention is to propose a physiologically constrained ECG reconstruction method and system based on a multi-branch gating network, in order to solve at least one technical problem existing in the prior art.
[0007] To achieve the above objectives, the present invention adopts the following technical solution:
[0008] A physiologically constrained ECG reconstruction method based on multi-branch gating networks includes the following steps:
[0009] S1. Multi-lead input and dedicated feature extraction: The pre-processed ECG signals from leads I, II, and V3 are input into three independent one-dimensional convolutional encoders to extract the deep bottleneck feature vectors and multi-scale jump feature maps of each lead in parallel.
[0010] S2. Cross-lead attention fusion: Utilizing a cross-attention module, a global context space is constructed. Through learnable query vectors, the specific morphological features are intelligently fused across leads to generate decoding guidance features for different target leads.
[0011] (1)
[0012] in, d and k are the feature dimensions; Q is the learnable query vector corresponding to each target lead; K is the feature of different input leads; V is the key and value matrix obtained by linear transformation of the global context information; d and k are the feature dimensions.
[0013] S3. Parallel Decoding and Feature Gating: Based on the decoding guidance features generated in S2, lead I, II, and V1 to V6 signals are reconstructed by eight parallel decoders. During each upsampling stage of the decoder, an attention gating module is introduced, using the features of each decoder stage as the gating signal to adaptively weight and filter the jump feature maps of the corresponding encoder levels. The calculation process of the attention gating is defined by the following formula:
[0014]
[0015]
[0016] ;
[0017] in, As an intermediate fusion feature, and For convolution weights, For bias, To output the convolution transformation, For the Sigmoid function, For the generated attention coefficients, The gating feature is the final output.
[0018] S4. Physiological Restraint Synthesis: The preprocessed signals from leads I and II in S1 are input into the physiological restraint module. Based on the linear relationship of the electrocardiogram vectors, the remaining four limb leads are calculated using the following formula:
[0019] Lead III = Reconstructed value of Lead II - Reconstructed value of Lead I;
[0020] Lead aVR = -0.5 × (Reconstruction value of Lead I + Reconstruction value of Lead II);
[0021] Lead aVL = Reconstructed value of Lead I - 0.5 × Reconstructed value of Lead II;
[0022] Lead aVF = Reconstructed value of Lead II - 0.5 × Reconstructed value of Lead I;
[0023] S5, Output Complete Leads: Combine the eight lead signals reconstructed in S3 with the four lead signals calculated in S4 to output a complete standard 12-lead electrocardiogram.
[0024] Preferably, the preprocessing in S1 specifically includes: filtering the original ECG signal using a fourth-order Butterworth bandpass filter with a passband of 0.5Hz to 40Hz, resampling all signals to a sampling rate of 250Hz and uniformly truncating or padding to 2048 sampling points, and finally performing max-min normalization processing.
[0025] Preferably, both the one-dimensional convolutional encoder and decoder are composed of multiple stacked dual convolutional units. Each dual convolutional unit contains two cascaded one-dimensional convolutional blocks, and each convolutional block sequentially includes: a one-dimensional convolutional layer, a batch normalization layer, a Dropout layer, and a LeakyReLU activation function layer.
[0026] Preferably, in S2, eight independent learnable query vectors Q are initialized for the decoders of the eight target leads respectively.
[0027] Preferably, in S3, each decoder receives multi-scale jump features from all three encoders via a jump connection and filters them through its own independent attention gating module.
[0028] Preferably, the method uses the PTB-XL clinical electrocardiogram dataset for model training, validation, and testing.
[0029] A physiological constraint-based ECG reconstruction system based on a multi-branch gating network, the system comprising: a preprocessing module for standardizing the input signals from leads I, II, and V3; a multi-encoder module for extracting specific features from each input lead; a cross-attention fusion module for attention calculation and information fusion as described in S2; a multi-decoder module for parallel reconstruction of eight basic leads, and integrating an attention gating submodule to perform feature selection as described in S3; a physiological constraint calculation module for performing linear equation calculation as described in S4; and an output module for synthesizing and outputting a complete 12-lead ECG.
[0030] Preferably, the multi-encoder module, the cross-attention fusion module, the multi-decoder module, and the internal attention gating submodule together constitute an end-to-end deep learning model, which is jointly optimized and trained under the supervision of a loss function.
[0031] Compared with existing technologies, the physiologically constrained ECG reconstruction method and system based on multi-branch gating networks provided by this invention have the following beneficial effects:
[0032] 1. This invention employs multiple encoders to independently extract features, avoiding mutual interference between signals from different leads during early fusion. Through a cross-attention mechanism, it adaptively aggregates information crucial to the current reconstruction task from different input leads, achieving precise cross-lead complementarity. The attention gating module automatically reduces the influence of irrelevant features, filters background noise in skip connections, and retains only key waveform features. Multiple decoders generate multiple leads independently and in parallel, avoiding mutual interference between different lead generation tasks.
[0033] 2. The physiological constraint module of this invention combines Einthoven's law and Goldberger's equation, and calculates some leads through linear transformation, which reduces the complex mapping relationship that the neural network needs to learn, and fundamentally ensures that the derived leads conform to the electrophysiological laws of the heart.
[0034] 3. This invention requires only three leads (I, II, and V2) as input to reconstruct a complete 12-lead electrocardiogram required for clinical diagnosis, achieving the reconstruction of a complete lead with fewer leads, and providing core technology for developing more convenient and low-cost electrocardiogram monitoring equipment. Attached Figure Description
[0035] Figure 1. Overall process control diagram of this application;
[0036] Figure 2 is a structural diagram of the dual convolutional unit in the dedicated feature extraction module in this embodiment of the application;
[0037] Figure 3 is a schematic diagram of the structure and calculation process of the cross-attention module in an embodiment of this application;
[0038] Figure 4 is a schematic diagram of the attention gating module in an embodiment of this application;
[0039] Figure 5 is a schematic diagram of the linear operation logic of the physiological constraint reconstruction module in the embodiment of this application;
[0040] Figure 6 is a schematic diagram of the overall architecture of the deep multi-encoder-multi-decoder attention gating network provided in the embodiments of this application;
[0041] Figure 7 is a schematic diagram of the input 3-lead provided in the embodiment of this application.
[0042] Figure 8 is a schematic diagram comparing the waveforms of the ECG signal reconstructed by the model in the embodiment of this application with the actual standard 12-lead signal. Detailed Implementation
[0043] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0044] In the description of this invention, it should be understood that the terms "upper", "lower", "front", "rear", "left", "right", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
[0045] Please see the appendix Figure 1 As shown, this embodiment provides a physiologically constrained ECG reconstruction method and system based on a multi-branch gating network. The method includes the following steps:
[0046] S1. Multi-lead input and dedicated feature extraction: The pre-processed ECG signals from leads I, II, and V3 are input into three independent one-dimensional convolutional encoders to extract the deep bottleneck feature vectors and multi-scale jump feature maps of each lead in parallel.
[0047] S2. Cross-lead attention fusion: Using a cross-attention module, a global context space is constructed, and the exclusive morphological features are intelligently fused across leads through learnable query vectors to generate decoding guidance features for different target leads.
[0048] S3, Parallel Decoding and Feature Gating: Based on the decoding guidance features generated by S2, the signals of leads I, II and V1 to V6 are reconstructed by eight parallel decoders respectively. During the upsampling process of each level of the decoder, an attention gating module is introduced. The features of each level of the decoder are used as the gating signal to adaptively weight and filter the jump feature maps of the corresponding level of the encoder.
[0049] S4. Physiological constraint synthesis: Input the preprocessed lead I and II signals from S1 into the physiological constraint module, and calculate the remaining four limb leads based on the linear relationship of the electrocardiogram vectors.
[0050] S5, Output Complete Leads: Combine the eight lead signals reconstructed in S3 with the four lead signals calculated in S4 to output a complete standard 12-lead electrocardiogram.
[0051] The preprocessing described in S1 specifically includes: filtering the original ECG signal using a fourth-order Butterworth bandpass filter with a passband of 0.5Hz to 40Hz, resampling all signals to a sampling rate of 250Hz and uniformly truncating or padding to 2048 sampling points, and finally performing max-min normalization processing.
[0052] The specific implementation method is as follows:
[0053] As shown in Figure 2, the Double Convolutional Unit (DoubleConv) is crucial for both encoders and decoders in extracting and reconstructing deep features. This Double Convolutional Unit consists of two cascaded convolutional blocks, each containing a one-dimensional convolutional layer (Conv1d), a batch normalization layer, a dropout layer, and a LeakyReLU activation layer.
[0054] The specific implementation details are as follows: The kernel size of the one-dimensional convolutional layer is set to 19, and the filling mode is "same". This large receptive field design aims to effectively capture the long-term morphological characteristics of the P-QRS-T wave group in the electrocardiogram signal.
[0055] Batch normalization layers are used to normalize feature distribution and prevent gradient vanishing in deep networks;
[0056] The Dropout layer sets the dropout rate to 0.05 to prevent overfitting by randomly deactivating some neurons;
[0057] The activation function chosen is LeakyReLU with a negative slope of 0.2. Compared to ordinary ReLU, it allows a small gradient to flow through the negative half-axis, thus effectively solving the "neuron death" problem and preserving the characteristic information of the negative wave of the electrocardiogram signal (such as the deep S wave) to the maximum extent.
[0058] In this embodiment, as shown in Figure 3, this module is located between the encoder bottleneck layer and the decoder, aiming to solve the problem of intelligent fusion of different input lead information. Its working principle is based on a scaled dot product attention mechanism: First, the deep bottleneck features output by the three independent encoders are concatenated along the channel dimension to construct a global context matrix. This matrix is then linearly transformed to generate keys (Key, K) and values (Value, V). Simultaneously, a set of exclusive learnable parameters is initialized for each subsequent decoder as a query (Query, Q). The calculation of attention weights follows the formula:
[0059] (1)
[0060] in, The feature dimension is 64 in this embodiment. The scaling factor is used to prevent the dot product result from becoming too large, causing the Softmax function to enter the gradient saturation region. Through this calculation process, the model can adaptively calculate the similarity between the query vector Q and the features K of different input leads according to the current reconstruction task (e.g., reconstructing lead V1), thereby dynamically adjusting the weighting ratio of V and achieving accurate on-demand allocation of cross-lead information.
[0061] In this embodiment, as shown in Figure 4, the module is integrated into the skip connection path of the decoder to filter background noise. Its specific signal processing is as follows: The module receives two input signals: one is the upsampled feature from the current layer of the decoder (as the gate signal g), and the other is the skip feature from the corresponding layer of the encoder (as the input signal s). First, convolution operations are used to map the gate signal g and the input signal s to the same feature dimension. Then, the two are added element-wise and fused nonlinearly using the ReLU activation function. The fused feature is then passed through a convolutional layer to compress the number of channels to 1, and the Sigmoid activation function is used to map the values to the range of 0 to 1, thereby generating an attention coefficient map (i.e., a soft mask). Finally, this attention coefficient map is multiplied point-by-point with the original input signal s to achieve feature filtering—that is, retaining high-response regions (such as waveform peaks) and suppressing low-response regions (such as baseline noise). The formulas involved in the internal calculations of this module are as follows:
[0062]
[0063]
[0064]
[0065] in, As an intermediate fusion feature, and For convolution weights, For bias, To output the convolution transformation, For the Sigmoid function, For the generated attention coefficients, This refers to the gating feature of the final output.
[0066] In this embodiment, as shown in Figure 5, this module is located in a branch of the network and is used to ensure the physical consistency of the signal. Its processing logic is as follows: the neural network is only responsible for predicting eight linearly independent base leads (I, II, V1-V6), while the remaining four limb leads (III, aVR, aVL, aVF) do not participate in the learning of network parameters and are directly calculated from the base leads through linear combination. This calculation process strictly follows Einthoven's law and the Goldberger equation, and the specific calculation formula is as follows:
[0067] =Ⅱ+Ⅰ (5)
[0068]
[0069]
[0070]
[0071] In this embodiment, as shown in Figure 6, the overall signal flow of the architecture is as follows: The three single-channel signals (I, II, V3) at the input end are input into two parallel routes. One route enters three independent encoder channels, undergoes multiple layers of double convolution and downsampling operations, and extracts multi-scale jump features and deep bottleneck features. The deep bottleneck features are sent to the cross-attention module, interacting with the query vector of the decoder to generate fusion features. The jump features are sent to the attention gating module, waiting to be matched and filtered with the upsampled features of the decoder. The eight parallel decoders at the back end receive the fusion features as the initial input, and during the gradual upsampling process, combined with the gating-filtered jump features, gradually restore the temporal details of the signal, and finally generate 8 basic lead signals. The other route is that leads I and II of the three input single-channel signals are input to the physiological constraint module to generate the remaining 4 limb leads, thereby completing the 12-lead electrocardiogram with the 8 basic lead signals generated by the decoder. The entire network model can be regarded as a nonlinear mapping function F, and its input-output relationship can be expressed as:
[0072]
[0073] in, This is the input 3-lead signal. This is the output 3-lead signal. This is the output of the 12-lead signal.
[0074] In this embodiment, as shown in Figure 7, in order to adapt to the input tensor requirements of deep neural networks and eliminate the influence of environmental noise on signal reconstruction accuracy, the system performs a compact and standardized preprocessing procedure on the raw data: First, a fourth-order Butterworth bandpass filter (passband frequency 0.5Hz-40Hz) is used to filter the raw signal to remove power frequency interference, electromyographic noise, and respiratory baseline drift; then, all records are uniformly resampled to 250Hz, and the signal length is fixed to 2048 sampling points through zero-padding or truncation operations; finally, the amplitude is mapped to the [-1, 1] interval using the max-min normalization method, and the training set and test set are divided according to the patient ID to prevent data leakage.
[0075] After completing the above preprocessing, this embodiment, based on the principle of spatial complementarity of ECG vectors, specifically separates leads I, II, and V3 from the standard 12-lead ECG system as the input source, such as... Figure 7 As shown in the figure, this diagram visually illustrates the time-domain waveforms of the three leads used as model input after preprocessing. Leads I and II, as standard limb leads, primarily capture changes in the cardiac electrical axis in the frontal plane and the electrical activity of the inferior and lateral walls; while lead V3, as an anterior chest lead, supplements the spatial potential information of the heart in the transverse (anteroposterior) plane. Figure 7 As can be seen, the processed signal waveform has a stable baseline and clear P-QRS-T characteristic waves. These three signals, which contain information in different spatial dimensions, will be sent in parallel to the three independent encoder channels of the MED-AG-UNet model as the reference information for subsequent reconstruction of a complete 12-lead electrocardiogram.
[0076] Referring to Table 1, which is a comparison table of test indicators for each model in the embodiments of this application, the following is a comparison table:
[0077] Model MSE PCC WS CNN 0.0159 0.8929 0.8691 CNN-LSTM 0.0053 0.9645 0.9395 Res-CNN 0.0049 0.9667 0.9386 Unet 0.0053 0.9656 0.9445 MED-AG-Unet 0.0048 0.9745 0.9511
[0078] To objectively evaluate the performance of the MED-AG-UNet model, this embodiment conducts a quantitative comparative experiment with several mainstream deep learning models, including Convolutional Neural Networks (CNN), Convolutional Long Short-Term Memory Networks (CNN-LSTM), Residual Convolutional Networks (Res-CNN), and the standard UNet model. The experiment uses three core metrics to comprehensively evaluate the reconstruction quality of the ECG signal: Mean Squared Error (MSE) measures the numerical difference between the reconstructed ECG signal and the real standard signal; the closer the value is to 0, the smaller the reconstruction error. For a real signal sequence x of length N and a reconstructed signal sequence... The calculation formula is as follows:
[0079]
[0080] in, Let be the amplitude of the real signal at the i-th sampling point. This represents the amplitude of the reconstructed signal at the corresponding point. The Pearson correlation coefficient (PCC) measures the linear correlation between the reconstructed waveform and the true waveform in terms of morphological trend; the closer the value is to 1, the more consistent the waveform morphology. Its calculation formula is as follows:
[0081]
[0082] in, and These are the mean values of the real signal and the reconstructed signal, respectively. A weighted similarity (WS) is also included. To more comprehensively evaluate the similarity of signals in the presence of small time shifts, this embodiment introduces a weighted similarity index based on dynamic time warping (DTW). This index combines shape correlation and time alignment distance, and its calculation formula is as follows:
[0083]
[0084] in This represents the dynamic time warping (DTW) distance between the normalized real signal and the reconstructed signal; This represents the Pearson correlation coefficient between two signals after DTW optimal path alignment. The attenuation coefficient (set to 0.01 in this embodiment) is used to control the penalty applied to the similarity score by distance. As shown in Table 1, traditional CNN models perform poorly on the few-lead reconstruction task, with an MSE as high as 0.0159 and a PCC of only 0.89, making it difficult to capture the complex temporal dependencies in ECG signals. The CNN-LSTM model incorporating time-series processing capabilities and the Res-CNN model incorporating residual connections show improved performance, with MSEs decreasing to 0.0053 and 0.0049 respectively, and PCCs increasing to 0.96 for both. The standard UNet model, with its skip connection structure, also achieves an MSE of 0.0053 and a PCC of 0.9656, but it still has limitations in handling nonlinear mappings between multiple leads. In contrast, the MED-AG-UNet model proposed in this embodiment achieves the best results across all metrics. Its MSE was reduced to 0.0048, significantly lower than other comparative models, indicating the smallest reconstruction error; PCC reached 0.9745, and WS reached 0.9511, both ranking first. This significant performance improvement is mainly attributed to the unique multi-encoder structure in the model, which avoids feature interference; the cross-attention mechanism achieves precise complementarity of information between leads; and the attention gating module effectively filters noise in skip connections. The data strongly demonstrate the technical advantages of this invention in maintaining high waveform fidelity and reducing reconstruction error.
[0085] like Figure 8 As shown in the figure, the waveforms of a test sample across all 12 leads are illustrated. The red curve represents the actual signal, while the blue curve represents the model-generated reconstructed signal. The comparison reveals that the reconstructed signal maintains a high degree of consistency with the actual signal in terms of morphology, amplitude, and phase of the P wave, QRS complex, and T wave. Particularly noteworthy is the extremely high reconstruction accuracy demonstrated by the model in the precordial leads (V1, V2, V4, V5, V6) which were not used as input signals, and in the limb leads (III, aVR, aVL, aVF) calculated through physiological constraints. This intuitively verifies the effectiveness of the cross-attention mechanism in capturing nonlinear correlations between leads, and the advantage of the attention gating module in preserving key waveform details.
[0086] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the deployed equipment can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0087] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A physiologically constrained ECG reconstruction method based on a multi-branch gating network, characterized in that, Includes the following steps: S1. Multi-lead input and dedicated feature extraction: The pre-processed ECG signals from leads I, II, and V3 are input into three independent one-dimensional convolutional encoders to extract the deep bottleneck feature vectors and multi-scale jump feature maps of each lead in parallel. S2. Cross-lead attention fusion: Utilizing a cross-attention module, a global context space is constructed. Through learnable query vectors, the specific morphological features are intelligently fused across leads to generate decoding guidance features for different target leads. (1) in, d and k are the feature dimensions; Q is the learnable query vector corresponding to each target lead; K is the feature of different input leads; V is the key and value matrix obtained by linear transformation of the global context information; d and k are the feature dimensions. S3. Parallel Decoding and Feature Gating: Based on the decoding guidance features generated in S2, lead I, II, and V1 to V6 signals are reconstructed by eight parallel decoders. During each upsampling stage of the decoder, an attention gating module is introduced, using the features of each decoder stage as the gating signal to adaptively weight and filter the jump feature maps of the corresponding encoder levels. The calculation process of the attention gating is defined by the following formula: ; in, As an intermediate fusion feature, and For convolution weights, For bias, To output the convolution transformation, For the Sigmoid function, For the generated attention coefficients, The gating feature is the final output. S4. Physiological Restraint Synthesis: The preprocessed signals from leads I and II in S1 are input into the physiological restraint module. Based on the linear relationship of the electrocardiogram vectors, the remaining four limb leads are calculated using the following formula: Lead III = Reconstructed value of Lead II - Reconstructed value of Lead I; Lead aVR = -0.5 × (Reconstruction value of Lead I + Reconstruction value of Lead II); Lead aVL = Reconstructed value of lead I - 0.5 × Reconstructed value of lead II; Lead aVF = Reconstructed value of Lead II - 0.5 × Reconstructed value of Lead I; S5, Output Complete Leads: Combine the eight lead signals reconstructed in S3 with the four lead signals calculated in S4 to output a complete standard 12-lead electrocardiogram.
2. The physiologically constrained ECG reconstruction method based on a multi-branch gating network according to claim 1, characterized in that: The preprocessing described in S1 specifically includes: filtering the original ECG signal using a fourth-order Butterworth bandpass filter with a passband of 0.5Hz to 40Hz, resampling all signals to a sampling rate of 250Hz and uniformly truncating or padding to 2048 sampling points, and finally performing max-min normalization processing.
3. The physiologically constrained ECG reconstruction method based on a multi-branch gating network according to claim 1, characterized in that: Both the one-dimensional convolutional encoder and decoder are composed of multiple stacked dual convolutional units. Each dual convolutional unit contains two cascaded one-dimensional convolutional blocks. Each convolutional block includes, in sequence, a one-dimensional convolutional layer, a batch normalization layer, a Dropout layer, and a LeakyReLU activation function layer.
4. The physiologically constrained ECG reconstruction method based on a multi-branch gating network according to claim 1, characterized in that: In S2, eight independent learnable query vectors Q are initialized for the decoders of the eight target leads respectively.
5. The physiologically constrained ECG reconstruction method based on a multi-branch gating network according to claim 1, characterized in that: In S3, each decoder receives multi-scale jump features from all three encoders via jump connections and filters them through its own independent attention gating module.
6. The physiologically constrained ECG reconstruction method based on a multi-branch gating network according to claim 1, characterized in that: The method uses the PTB-XL clinical electrocardiogram dataset for model training, validation, and testing.
7. A physiologically constrained ECG reconstruction system based on a multi-branch gating network, characterized in that, The system for implementing the method of any one of claims 1-6 comprises: a preprocessing module for standardizing the input signals of leads I, II, and V3; a multi-encoder module for extracting specific features of each input lead; a cross-attention fusion module for attention calculation and information fusion as described in S2; a multi-decoder module for parallel reconstruction of eight basic leads and integrating an attention gating submodule to perform feature screening as described in S3; a physiological constraint calculation module for performing linear equation calculation as described in S4; and an output module for synthesizing and outputting a complete 12-lead electrocardiogram.
8. The physiologically constrained ECG reconstruction system based on a multi-branch gating network according to claim 7, characterized in that: The multi-encoder module, cross-attention fusion module, multi-decoder module, and internal attention gating submodule together constitute an end-to-end deep learning model, which is jointly optimized and trained under the supervision of a loss function.