Electrocardiogram-gated scanning control method and system based on multi-model fusion algorithm

CN121667735BActive Publication Date: 2026-08-07SAINUO WEISHENG SCI & TECH BEIJING
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SAINUO WEISHENG SCI & TECH BEIJING
Filing Date
2026-01-30
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

然而,现有R波检测方法在复杂临床场景下面临显著挑战,传统基于阈值或波形特征的方法对噪声敏感,且在异常心律(如房颤、室性早搏或心室颤动)下易出现误检或漏检;而直接应用通用深度学习模型进行端到端R波定位,虽在部分正常心电中表现良好,却难以适应多类心律失常共存的实际情况,导致在非典型心电信号下触发可靠性急剧下降

Benefits of technology

[0013]根据本发明的技术方案,通过构建一种基于多模型融合算法的心电门控扫描控制方法,将预处理后的心电信号首先输入至基于注意力机制的分类模型以同步完成心电类型判别与注意力表征数据生成,并依据判别结果动态选择后续路径,当识别为有效心电类别时,将原始信号与注意力表征数据融合后输入对应专用R波定位模型,精准输出R波波峰位置,并以此作为触发点经预设延迟后启动前瞻性心电门控扫描;而当判定为非心电类别时,则自动切换至回顾性门控扫描模式。实现了心电类型感知、注意力引导的R波精确定位与门控策略自适应三者之间的紧密协同,不仅显著提升了在房颤、室早等复杂心律下R波检测的准确率与抗干扰能力,还通过非心电情形下的安全回退机制有效避免了因R波缺失或误检导致的扫描失败,从而在保障高成像质量的同时,大幅增强了心电门控CT系统在真实临床环境中的鲁棒性与可靠性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121667735B_ABST
    Figure CN121667735B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on multi-model fusion algorithm electrocardiogram gate scanning control method and system, comprising: obtaining the electrocardio signal to be measured, and executes pre-processing to extract R wave related features;The electrocardio signal to be measured after pre-processing is input to pre-trained classification model, determines the electrocardio type of electrocardio signal to be measured by attention mechanism, and generates corresponding attention representation data;If the electrocardio type belongs to the preset effective electrocardio category, then the electrocardio signal to be measured after pre-processing is fused with attention representation data and input to the pre-trained R wave positioning model corresponding to the effective electrocardio category, to output R wave peak position;If the electrocardio type belongs to the preset non-electrocardio category, then trigger retrospective gate scanning mode;With R wave peak position as trigger point, trigger prospective electrocardiogram gate scanning after preset delay time.It is realized that under various heart rhythms, high-precision detection R wave is switched according to intelligent prospective or retrospective gate scanning mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical imaging technology, and in particular to an ECG gating scanning control method and system based on a multi-model fusion algorithm. Background Technology

[0002] In ECG-gated CT scans, especially in prospective gating mode, the system relies on accurately detecting the R-wave peak in the electrocardiogram (ECG) as a trigger reference point to initiate X-ray exposure during the stable phase of diastole, thereby effectively suppressing cardiac pulsation artifacts and improving myocardial imaging quality. However, existing R-wave detection methods face significant challenges in complex clinical scenarios. Traditional methods based on thresholds or waveform features are sensitive to noise and prone to false positives or false negatives in abnormal rhythms (such as atrial fibrillation, premature ventricular contractions, or ventricular fibrillation). While directly applying general deep learning models for end-to-end R-wave localization performs well in some normal ECGs, it struggles to adapt to the coexistence of multiple arrhythmias, leading to a sharp decline in trigger reliability under atypical ECG signals. More critically, when the input signal is a non-ECG component that cannot identify the R-wave (such as severe interference or ventricular fibrillation), existing systems lack effective safety mechanisms and often still force prospective triggering, causing scan interruptions or image artifacts, severely impacting diagnostic accuracy and examination efficiency. Therefore, there is an urgent need for an intelligent control method that can adaptively call a dedicated detection strategy based on the type of ECG signal and automatically switch to a safe scanning mode in unreliable situations, so as to achieve highly robust and high-precision coordinated control of R-wave triggering and gated scanning. Summary of the Invention

[0003] In view of this, this invention proposes an ECG gating scan control method and system based on a multi-model fusion algorithm, which can achieve high-precision detection of R waves under various heart rhythms and intelligently switch between prospective or retrospective gating scan modes accordingly. This invention provides the following technical solution: An ECG gating scan control method based on a multi-model fusion algorithm includes: Acquire the ECG signal to be tested and perform preprocessing to extract R-wave related features; The preprocessed ECG signal to be tested is input into a pre-trained classification model. The ECG type to which the ECG signal to be tested belongs is determined through an attention mechanism, and corresponding attention representation data is generated. If the ECG type belongs to a preset valid ECG category, the preprocessed ECG signal to be tested is fused with the attention representation data and then input into the pre-trained R-wave localization model corresponding to the valid ECG category to output the R-wave peak position. If the ECG type belongs to a preset non-ECG category, a retrospective gated scan mode is triggered; Using the R-wave peak position as the trigger point, a prospective ECG-gated scan is triggered after a preset delay time.

[0004] Optionally, acquiring the ECG signal to be measured and performing preprocessing includes: The ECG signal to be measured is sequentially processed by bandpass filtering, differentiation, squaring, and sliding window integration to suppress baseline drift and high-frequency noise, enhance the slope characteristics of the R wave, and form the characteristic envelope of the R wave.

[0005] Optionally, the classification model is a multi-class neural network model constructed based on a gated recurrent unit (GRU) and a self-attention mechanism; The multi-class neural network model is configured as follows: The temporal features of the preprocessed ECG signal were extracted using a multilayer GRU. The temporal dependency features are weighted and fused using an attention mechanism to generate the attention representation data; Based on the weighted fusion of temporal features, the classification result is determined to be that the ECG type of the ECG signal to be tested belongs to one of multiple preset categories.

[0006] Optionally, the step of fusing the ECG signal to be measured with the attention representation data and inputting it into the R-wave localization model to output the R-wave peak position includes: The feature sequence of the preprocessed ECG signal to be tested is fused with the attention representation data to form an enhanced feature sequence; The enhanced feature sequence is input into a pre-trained recurrent neural network model corresponding to the ECG type; The recurrent neural network model is configured to perform time-series analysis on the enhanced feature sequence and output a probability sequence of the same length as the input sequence at the output layer. The sampling points whose probability values ​​exceed a preset threshold are identified from the probability sequence, and the positions of the identified sampling points are output as the R-wave peak positions.

[0007] Optionally, the non-ECG category includes ventricular fibrillation signal type or non-ECG signal interference type; when the classification model determines that the ECG signal to be tested belongs to the non-ECG category, the control system automatically switches to retrospective gating scan mode to continuously acquire image data within the complete cardiac cycle, avoiding prospective scan interruption due to missing or unreliable R waves.

[0008] Optionally, the step of triggering a prospective ECG-gated scan after a preset delay time, using the R-wave peak position as the trigger point, includes: Set the currently identified R-wave peak position as the scan trigger reference point; Starting from the reference point, after waiting for a system-configurable delay time corresponding to the mid-to-late diastolic phase of the heart, the scanning sequence of the imaging device is triggered to acquire cardiac image data. The acquisition of the scanning sequence is completed before the next R-wave peak is identified.

[0009] Optionally, the ECG types include 12 valid ECG categories and 1 non-ECG category; wherein each valid ECG category corresponds to an independently trained R-wave localization model.

[0010] This invention further discloses an ECG gating scanning control system based on a multi-model fusion algorithm, comprising: The signal acquisition and preprocessing module is used to acquire the ECG signal to be tested and perform preprocessing to extract R-wave related features; The classification reasoning module is used to input the preprocessed ECG signal to be tested into a pre-trained classification model, determine the ECG type to which the ECG signal to be tested belongs through an attention mechanism, and generate corresponding attention representation data. The localization inference module is used to, when the ECG type belongs to a preset effective ECG category, fuse the preprocessed ECG signal to be tested with the attention representation data and input it into a pre-trained R-wave localization model corresponding to the effective ECG category, so as to output the R-wave peak position. The mode switching module is used to trigger a retrospective gating scan mode when the ECG type belongs to a preset non-ECG category; The scan trigger control module is used to trigger a prospective ECG gating scan after a preset delay time, using the R-wave peak position as the trigger point.

[0011] The present invention further discloses a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.

[0012] The present invention further discloses an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the above-described method.

[0013] According to the technical solution of this invention, an ECG-gated scanning control method based on a multi-model fusion algorithm is constructed. The preprocessed ECG signal is first input into a classification model based on an attention mechanism to simultaneously complete ECG type discrimination and attention representation data generation. The subsequent path is dynamically selected based on the discrimination result. When a valid ECG category is identified, the original signal and attention representation data are fused and input into the corresponding dedicated R-wave localization model to accurately output the R-wave peak position. This position is then used as a trigger point to initiate prospective ECG-gated scanning after a preset delay. When a non-ECG category is identified, the system automatically switches to retrospective gated scanning mode. This achieves close synergy between ECG type perception, attention-guided precise R-wave localization, and adaptive gating strategy. It not only significantly improves the accuracy and anti-interference capability of R-wave detection under complex rhythms such as atrial fibrillation and premature ventricular contractions, but also effectively avoids scan failures due to missing or false R-waves through a safety fallback mechanism in non-ECG situations. Therefore, while ensuring high imaging quality, it greatly enhances the robustness and reliability of the ECG-gated CT system in real clinical environments. Attached Figure Description

[0014] For illustrative and not limiting purposes, the present invention will now be described in conjunction with embodiments and accompanying drawings, wherein: Figure 1 This is a flowchart illustrating the ECG gating scan control method based on a multi-model fusion algorithm in an embodiment of the present invention. Figure 2 This is a schematic diagram of the constituent modules of the ECG gating scanning control system based on a multi-model fusion algorithm in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of the electronic device in an embodiment of the present invention; Figure 4 This is a schematic diagram of the GRU ECG classification model architecture based on the attention mechanism in an embodiment of the present invention; Figure 5 This is a schematic diagram of the GRU unit time step unfolding and gating mechanism in an embodiment of the present invention; Figure 6 This is a schematic diagram of the overall architecture of the R-wave localization RNN model in an embodiment of the present invention; Figure 7 This is a schematic diagram of the time step expansion and cyclic connection of the RNN unit in an embodiment of the present invention. Detailed Implementation

[0015] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present application.

[0016] It should be noted that, where there is no conflict, the embodiments and features of the embodiments in this application can be combined with each other. The embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0017] refer to Figure 1 This embodiment discloses an ECG-gated scanning control method based on a multi-model fusion algorithm. This method is deployed in medical imaging equipment such as a computed tomography (CT) system to achieve precise triggering of prospective ECG-gated scanning. The method includes the following steps: S100: Acquire the ECG signal to be measured and perform preprocessing to extract R-wave related features.

[0018] In this step, the patient's electrocardiogram (ECG) signal is acquired in real time using a standard 12-lead ECG acquisition device. Considering that the raw ECG signal typically contains baseline drift, power line interference, and electromyographic noise, the accuracy of direct R-wave detection would be severely affected. Therefore, the ECG signal must be preprocessed before being input into the subsequent model to enhance R-wave characteristics and suppress noise.

[0019] Specifically, the preprocessing adopts the classic Pan-Tompkins algorithm flow, and performs the following preprocessing operations sequentially on the original ECG signal to be tested: Bandpass filtering: A cascaded high-pass and low-pass filter designed with a Hamming window is used to limit the frequency band of the raw ECG signal to the 5-15Hz range. This band accurately covers the main energy distribution of the QRS complex (including the R wave). This operation effectively filters out baseline drift below 5Hz (usually caused by electrode movement or breathing) and electromyographic interference and high-frequency noise above 15Hz, while significantly suppressing 50Hz power line interference, providing a clean signal foundation for subsequent processing.

[0020] Differential operation: First-order differential operation is performed on the bandpass filtered ECG signal to extract the slope information of the waveform. Because the R wave has steep rising and falling edges, its differential value is large; while the P wave and T wave are relatively flat, their differential values ​​are small. Therefore, differential processing can significantly enhance the contour of the R wave, making it more prominent throughout the ECG cycle.

[0021] Squaring operation: Performing point-by-point squaring on the differentiated signal. This further amplifies the R-wave energy and eliminates negative values, ensuring that all signal components are positive.

[0022] Sliding window integration: The squared signal is integrated using a moving window (e.g., the integration window length is set to approximately 0.15 seconds). This operation smooths the signal, generating a waveform that reflects the energy envelope of the QRS complex. On this envelope, each QRS complex corresponds to a smoothed single peak, and the R-wave peak is located near the apex of that single peak. Ultimately, this envelope signal is the extracted R-wave feature envelope, which, as the preprocessed signal output, effectively suppresses noise and enhances the morphological characteristics of the R-wave.

[0023] The preprocessing process takes the raw ECG signal sequence to be tested, which contains multiple sampling points (e.g., 1000 sampling points acquired over 10 seconds at a sampling rate of 100 Hz). (where n=1000), converted into enhanced feature sequences This sequence serves as high-quality input for subsequent deep learning models.

[0024] S200: Input the preprocessed ECG signal to be tested into the pre-trained classification model, determine the ECG type of the ECG signal to be tested through the attention mechanism, and generate the corresponding attention representation data.

[0025] The R-wave characteristic envelope sequence obtained after preprocessing (n=1000) will be fed as input into a pre-trained Attention-Based GRU classification model. This model is one of the core components of this invention, and its structure is as follows: Figure 4 and Figure 5 As shown, it is mainly used to accomplish two major tasks: first, to accurately classify electrocardiogram signals; and second, to generate attention representation data for subsequent steps.

[0026] The classification model is a multi-class neural network model designed to process 12-lead electrocardiogram (ECG) signals. Its core structure includes: Input layer: Receives a feature sequence consisting of 1000 nodes, corresponding to preprocessed ECG data with a duration of 10 seconds and a sampling rate of 100Hz.

[0027] GRU layer: The model contains at least two GRU layers, which can efficiently capture long-term temporal dependencies in ECG signals, such as heart rate variability and the temporal evolution patterns of abnormal waveforms, through their update gate and reset gate mechanisms.

[0028] Self-Attention Mechanism Layer: Following the GRU layer, a self-attention mechanism is introduced. The core algorithm of this mechanism is: Q (Query) is the query term for which output needs to be calculated, K (Key) is the key used to match the query term, and V (Value) is the actual value corresponding to the key. The dimension of the key is used to scale the dot product result. All are derived from the temporal features output by the GRU layer. The self-attention mechanism dynamically evaluates the importance of features at different time points in the sequence and performs weighted fusion on them. This process produces two key outputs: The weighted fusion of advanced temporal features is used for the final classification decision; Attention weight matrix or attention representation data derived therefrom This data encodes the importance distribution of each part of the input sequence for the current classification task.

[0029] Output layer: Consists of a fully connected layer with 13 nodes and a Softmax activation function. These 13 nodes correspond to 13 preset ECG types, including: 1. Normal ECG, 2. Sinus tachycardia, 3. Sinus bradycardia, 4. Paroxysmal supraventricular tachycardia, 5. Atrial flutter, 6. Atrial fibrillation, 7. Ventricular fibrillation, 8. Atrial premature contractions, 9. Ventricular premature contractions, 10. First-degree atrioventricular block, 11. Second-degree type 1 atrioventricular block, 12. Second-degree type 2 atrioventricular block, and 13. Third-degree atrioventricular block. The Softmax function transforms the output into a probability distribution; the type corresponding to the node with the highest probability value is the ECG type determined by the model.

[0030] The classification model was trained on a large-scale labeled dataset. Data was collected from 12-lead devices and strictly classified and labeled according to the 13 types mentioned above, with at least 1000 samples collected for each type. To improve the model's generalization ability, at least 500 non-ECG signal data (such as square waves and mechanical vibration signals) were also added to the training set, and these data were uniformly labeled as "non-ECG signal interference type". The training set and the test set were divided in a 7:3 ratio.

[0031] In practical applications, the preprocessed feature sequences The data is input into a deployed classification model. Temporal features are extracted sequentially through a GRU layer, then weighted and fused using a self-attention mechanism, and finally the classification result is obtained through the output layer. The category corresponding to the highest probability value in the output is determined as the ECG type to which the ECG signal to be tested belongs.

[0032] Meanwhile, the attention representation data generated by the self-attention mechanism This data is extracted and retained synchronously. It consists of feature vectors or matrices containing key spatiotemporal context information of the input signal, and plays a role in feature enhancement in subsequent R-wave localization steps.

[0033] S300: If the ECG type belongs to a preset valid ECG category, the preprocessed ECG signal to be tested is fused with the attention representation data and then input into the pre-trained R-wave localization model corresponding to the valid ECG category to output the R-wave peak position.

[0034] After obtaining the classification results and attention representation data in step S200, the decision-making and localization stage begins. Predefined valid ECG categories are defined. In this embodiment, this set includes all categories except "ventricular fibrillation" and "non-ECG signal interference types," specifically 12 of the aforementioned 13 categories: normal ECG, sinus tachycardia, sinus bradycardia, paroxysmal supraventricular tachycardia, atrial flutter, atrial fibrillation, premature atrial contractions, premature ventricular contractions, first-degree atrioventricular block, second-degree type 1 atrioventricular block, second-degree type 2 atrioventricular block, and third-degree atrioventricular block. "Ventricular fibrillation" is excluded because its R-wave morphology is extremely disordered, making it almost impossible to reliably identify, while "non-ECG signals" are considered invalid input.

[0035] First, determine the ECG type of the classification result output in step S200. If it belongs to a valid ECG category, then execute this step to perform high-precision R-wave localization to support prospective gating. If it belongs to a non-ECG category (i.e., "ventricular fibrillation" or "non-ECG signal interference type"), then skip this step and proceed directly to step S400 to trigger retrospective gating scan mode.

[0036] To achieve higher accuracy for valid ECG categories, this implementation method employs a collaborative enhancement mechanism. Specifically, the preprocessed ECG signal feature sequence... Attention representation data generated by classification models The fusion is performed by weighted multiplication of the two elements (or other feature combination methods) to generate an enhanced feature sequence. Its calculation can be expressed as: ,in, This is applied to the corresponding dimension of the sequence. By utilizing the weights of key signal components (such as QRS complex regions) identified by the self-attention mechanism, the preprocessed features are enhanced a second time, thereby further highlighting R-wave related features and suppressing interference from irrelevant or noisy parts before inputting them into the localization model.

[0037] This implementation pre-trains a dedicated R-wave localization model for each valid ECG category. These models are all recurrent neural network (RNN) models, and their structures are as follows: Figure 6 and Figure 7As shown, this RNN model contains multiple RNN layers for deep time-series analysis of the enhanced feature sequence, capturing the precise moment of R-wave occurrence. The number of nodes in the output layer is equal to the length of the input sequence (e.g., 1000 nodes), and each node uses the Sigmoid activation function, outputting a probability value between 0 and 1. This probability value represents the likelihood that the corresponding time point is the peak of the R-wave. Enhanced feature sequence The input is fed into a dedicated RNN localization model corresponding to the current ECG type. After forward propagation, the model outputs a probability sequence of the same length as the input sequence. .

[0038] Further, R-wave position determination is performed, setting a preset threshold (e.g., 0.9). The output probability sequence is traversed, and all sampling points with probability values ​​exceeding the threshold are identified as candidate R-wave peaks. Subsequently, the final R-wave peak position can be determined as needed (e.g., taking the maximum value within a set time window). The precise position information is output as a reference point for subsequent scan triggering.

[0039] Each dedicated RNN localization model is trained using labeled data for the corresponding category, with the location of each R-wave peak precisely marked in the labeled data. Through training, the model learns to regress the probability distribution of R-wave location from the ECG signal features of that category, enabling each model to learn the R-wave features of specific ECG signal morphologies more precisely, thus achieving higher localization accuracy and robustness than the general model.

[0040] S400: If the ECG type belongs to a preset non-ECG category, then a retrospective gated scan mode is triggered.

[0041] When the classification model in step S200 determines that the current ECG signal belongs to a preset non-ECG category, it will abandon high-precision R-wave localization and subsequent prospective triggering, and instead start the backup retrospective gated scanning mode. This ensures that the scanning work can still be carried out safely and continuously when ECG synchronization cannot be reliably achieved, thereby guaranteeing the integrity of image acquisition and the feasibility of diagnosis.

[0042] As mentioned above, the preset non-ECG categories include the following two types: Ventricular fibrillation signal type: This type of ECG signal is characterized by irregular and disordered fibrillation waves, with the QRS complex morphology disappearing or extremely irregular, making it impossible to reliably and accurately identify the R wave peaks that can be used to trigger a scan. Non-ECG signal interference types: These signals originate from non-physiological interferences, such as poor electrode contact, electromyography artifacts caused by strenuous patient exercise, external electromagnetic interference (such as square wave noise), or mechanical signals introduced by equipment vibration. These signals do not constitute valid cardiac electrical activity, and R-wave detection on them is meaningless.

[0043] When the classification result is any of the above non-ECG categories, the logic flow of the control system is as follows: Interrupt forward triggering logic: Immediately stop the feature fusion and R-wave localization process in step S300, and also stop waiting for the R-wave-based trigger signal to control the scan.

[0044] Switching scanning protocol: The control system automatically switches the scanning protocol of the imaging device (such as a CT scanner) from prospective ECG gating mode to retrospective ECG gating mode.

[0045] Initiating continuous acquisition: In retrospective ECG gating mode, the system controls the imaging device to continuously acquire image projection data at a constant speed or phase interval throughout one or more complete and continuous cardiac cycles. Simultaneously, the synchronously acquired ECG signals are continuously recorded. The core of retrospective gating lies in acquiring data first, and then using the recorded ECG signals for retrospective reconstruction.

[0046] Image Reconstruction: After acquisition, in the image reconstruction stage, the recorded electrocardiogram (ECG) signals are used as a reference (e.g., each R wave is used as the starting point of the cardiac cycle). The continuously acquired projection data are assigned to different phases of the cardiac cycle, thereby reconstructing images of the heart at different motion phases. This method enables real-time, accurate detection of individual R waves without relying on them. Therefore, it has lower requirements for the quality and stability of the ECG signals and can effectively avoid prospective scan interruptions or trigger misalignments caused by missing, falsely detected, or unreliable R waves, thus ensuring successful acquisition of image data.

[0047] Therefore, this implementation method does not simply report an error or stop scanning when prospective detection fails, but automatically switches to another mature and feasible alternative scanning scheme based on intelligent assessment of the ECG signal quality. This is particularly suitable for patients with arrhythmias (such as ventricular fibrillation) or examination scenarios where the ECG signal quality is poor for various reasons, greatly improving the success rate and clinical applicability of the entire scanning process.

[0048] S500: Using the R-wave peak position as the trigger point, a prospective ECG-gated scan is triggered after a preset delay time.

[0049] Once the electrocardiogram (ECG) signal is determined to be valid and the R-wave peak position is successfully located via step S300, this information is used to precisely control the scanning timing of the imaging device, performing a prospective ECG-gated scan. This allows for the accurate mapping of electrophysiological events (R-waves) to an imaging time window where mechanical motion is relatively static.

[0050] Specifically, each identified R-wave peak position (corresponding to a specific time point in the ECG signal sampling sequence) is set as the absolute trigger point for a scan sequence. This trigger point represents the beginning of ventricular depolarization, i.e., the start of a cardiac cycle. After the trigger point, a preset delay time (TriggerDelay) is introduced, ensuring that X-ray exposure and data acquisition occur within 60% to 80% of the RR interval, when the ventricle is in end-diastole, with minimal cardiac motion and artifacts. This delay time is a parameter that can be configured by the system or operator based on specific scanning protocols, patient heart rate, and other factors. For example, the system can have a built-in lookup table algorithm based on the patient's heart rate to automatically calculate and set the optimal delay, or it can allow manual fine-tuning. Subsequently, after the preset delay time has elapsed from the R-wave trigger point, the control system immediately sends a trigger command to the scanning execution module of the imaging equipment (such as the X-ray tube and detector system). In response to the command, a scan sequence with preset exposure parameters (such as tube voltage, tube current, and scanning range) is initiated. X-ray emission begins, and the detector simultaneously begins acquiring projection data. The duration of this scan sequence is preset, with the goal of completing it before the next R-wave peak is identified and triggered. After an R-wave-triggered acquisition is completed, ECG signals are continuously monitored. Once the next R-wave peak is identified by the positioning model in step S300, it is immediately used as the new reference point, and the above delay-trigger-acquisition process is repeated until the preset total scan range or number of scan layers is completed.

[0051] Therefore, the aforementioned timing control ensures that each acquisition occurs during the same phase when cardiac motion is weakest, effectively eliminating motion artifacts caused by heartbeats. This results in highly consistent projection data, significantly improved clarity of the reconstructed cardiac CT images, and sharper vascular edges, facilitating clinical diagnosis. Furthermore, because exposure is only performed at specific time phases, rather than continuously throughout the entire cardiac cycle, the radiation dose is typically significantly lower than that of retrospective ECG-gated scans, adhering to the principle of optimal radiation protection. Combined with the aforementioned signal processing, intelligent classification, and positioning steps, this constitutes a complete, intelligent, and highly accurate prospective ECG-gated scan control solution.

[0052] refer to Figure 2 This embodiment further discloses an ECG gating scanning control system based on a multi-model fusion algorithm, including: The signal acquisition and preprocessing module 21 is used to acquire the ECG signal to be tested and perform preprocessing to extract R-wave related features, including: real-time acquisition of the patient's ECG signal to be tested. Subsequently, the algorithm unit built into this module sequentially performs bandpass filtering, differentiation, squaring, and sliding window integration on the raw signal to suppress baseline drift and high-frequency noise, and enhance the slope features of the R-wave, ultimately forming a clear R-wave feature envelope signal output. Its processing flow strictly follows the Pan-Tompkins algorithm, providing high-quality input features for subsequent deep learning models; The classification reasoning module 22 is used to input the preprocessed ECG signal to be tested into a pre-trained classification model, determine the ECG type of the ECG signal through an attention mechanism, and generate corresponding attention representation data. This includes running a pre-trained multi-class neural network model based on a gated recurrent unit (GRU) and a self-attention mechanism. After receiving the R-wave feature envelope sequence from the preprocessing module, the model extracts temporal-dependent features through its GRU layer and uses a self-attention mechanism to perform weighted fusion of these features. Finally, the model completes two outputs: Determining the ECG type: Using the Softmax function of the output layer, the specific ECG type of the ECG signal to be tested is determined from multiple preset ECG categories. Generating attention representation data: During the weighted fusion process, attention representation data containing key spatiotemporal information of the input signal is generated simultaneously. For use by subsequent modules; The localization inference module 23, when the ECG type belongs to a preset valid ECG category, fuses the preprocessed ECG signal to be tested with the attention representation data and inputs it into a pre-trained R-wave localization model corresponding to the valid ECG category to output the R-wave peak position. This includes receiving a decision (valid ECG category) and related data from the classification inference module. First, feature fusion is performed, fusing the preprocessed signal feature sequence with the attention representation data to form an enhanced feature sequence. Then, a dedicated RNN localization model corresponding to the valid ECG category is invoked. This model performs deep temporal analysis on the enhanced feature sequence and outputs a probability sequence of the same length as the input sequence at the output layer. By identifying peak points exceeding a preset threshold in this probability sequence, the precise R-wave peak position is finally output. The mode switching module 24 is used to trigger a retrospective gated scanning mode when the ECG type belongs to a preset non-ECG category. This includes: receiving the ECG type output by the classification inference module in real time, which internally contains a preset list of non-ECG categories (including at least "ventricular fibrillation" and "non-ECG signal interference type"). When the ECG type is determined to belong to this list, the module immediately generates a control command to trigger the system to switch to the retrospective ECG gated scanning mode. This command overrides the prospective triggering logic, controlling the imaging device to continuously acquire image data throughout the complete cardiac cycle, thereby avoiding prospective scan interruptions due to missing or unreliable R waves. The scan trigger control module 25 is used to trigger a prospective ECG-gated scan after a preset delay time, using the R-wave peak position as the trigger point. This includes receiving the R-wave peak position from the positioning inference module, which uses this position as the trigger reference point to start an internal timing mechanism. After a preset delay time (e.g., 60%-80% of the RR interval) corresponding to the mid-to-late diastolic phase of the heart, which is system-configurable, the module sends a trigger signal to the scanning system of the imaging device to initiate a prospective ECG-gated scan sequence to acquire cardiac image data. This module ensures that each acquisition is completed before the next R-wave is identified, thereby achieving precise exposure synchronized with cardiac motion and minimizing artifacts.

[0053] Figure 3 A schematic diagram of the physical structure of an electronic device provided in an embodiment of the present invention, such as... Figure 3 As shown, the electronic device 50 includes: a processor 501, a memory 502, and a bus 503; The processor 501 and the memory 502 communicate with each other via the bus 503; the processor 501 is used to call the program instructions in the memory 502 to execute the methods provided in the above-described embodiments.

[0054] This embodiment provides a non-transitory computer-readable storage medium that stores computer instructions that cause a computer to execute the methods provided in the above-described embodiments.

[0055] Those skilled in the art will understand that all or part of the steps of the above-described method implementation can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above-described method implementation. The aforementioned storage medium includes various storage media capable of storing program code, such as ROM, RAM, magnetic disk, or optical disk.

[0056] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0057] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of each embodiment or some parts of the embodiments.

[0058] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for ECG gating scanning control based on a multi-model fusion algorithm, characterized in that, include: Acquire the ECG signal to be tested and perform preprocessing to extract R-wave related features; The preprocessed ECG signal to be tested is input into a pre-trained classification model. The ECG type to which the ECG signal to be tested belongs is determined through an attention mechanism, and corresponding attention representation data is generated. The ECG type includes multiple valid ECG categories and one non-ECG category. The attention representation data encodes the importance distribution of each part of the input sequence to the current classification task. If the ECG type belongs to the effective ECG category, the feature sequence of the preprocessed ECG signal to be tested and the attention representation data are fused by element-wise weighted multiplication to form an enhanced feature sequence. The enhanced feature sequence is then input into the pre-trained R-wave localization model corresponding to the effective ECG category to output the R-wave peak position. If the ECG type belongs to the non-ECG category, a retrospective gated scan mode is triggered to continuously acquire image data throughout the complete cardiac cycle, avoiding prospective scan interruptions due to missing or unreliable R waves; wherein, the non-ECG category includes ventricular fibrillation signal type or non-ECG signal interference type; Using the R-wave peak position as the trigger point, a prospective ECG-gated scan is triggered after a preset delay time.

2. The ECG gating scanning control method according to claim 1, characterized in that, The acquisition of the ECG signal to be measured and the preprocessing included: The ECG signal to be measured is sequentially processed by bandpass filtering, differentiation, squaring, and sliding window integration to suppress baseline drift and high-frequency noise, enhance the slope characteristics of the R wave, and form the characteristic envelope of the R wave.

3. The ECG gating scanning control method according to claim 1, characterized in that, The classification model is a multi-class neural network model built on a gated recurrent unit (GRU) and a self-attention mechanism. The multi-class neural network model is configured as follows: The temporal features of the preprocessed ECG signal were extracted using a multilayer GRU. The temporal features are weighted and fused using an attention mechanism to generate the attention representation data; Based on the weighted fusion of temporal features, the classification result is determined to be that the ECG type of the ECG signal to be tested belongs to one of multiple preset categories.

4. The ECG gating scanning control method according to claim 1, characterized in that, The step of fusing the ECG signal to be measured with the attention representation data and inputting it into the R-wave localization model to output the R-wave peak position includes: The feature sequence of the preprocessed ECG signal to be tested is fused with the attention representation data to form an enhanced feature sequence; The enhanced feature sequence is input into a pre-trained recurrent neural network model corresponding to the ECG type; The recurrent neural network model is configured to perform time-series analysis on the enhanced feature sequence and output a probability sequence of the same length as the input sequence at the output layer. The sampling points whose probability values ​​exceed a preset threshold are identified from the probability sequence, and the positions of the identified sampling points are output as the R-wave peak positions.

5. The ECG gating scanning control method according to claim 1, characterized in that, The step of triggering a prospective ECG-gated scan by using the R-wave peak position as the trigger point and after a preset delay time includes: Set the currently identified R-wave peak position as the scan trigger reference point; Starting from the reference point, after waiting for a system-configurable delay time corresponding to the mid-to-late diastolic phase of the heart, the scanning sequence of the imaging device is triggered to acquire cardiac image data. The acquisition of the scanning sequence is completed before the next R-wave peak is identified.

6. The ECG gating scanning control method according to claim 1, characterized in that, The ECG types include 12 valid ECG categories and 1 non-ECG category.

7. A ECG gating scanning control system based on a multi-model fusion algorithm, characterized in that, include: The signal acquisition and preprocessing module is used to acquire the ECG signal to be tested and perform preprocessing to extract R-wave related features; The classification reasoning module is used to input the preprocessed ECG signal to be tested into a pre-trained classification model, determine the ECG type to which the ECG signal belongs through an attention mechanism, and generate corresponding attention representation data. The ECG type includes multiple valid ECG categories and one non-ECG category. The attention representation data encodes the importance distribution of each part of the input sequence to the current classification task. The localization inference module is used to fuse the feature sequence of the preprocessed ECG signal to be tested with the attention representation data by performing element-wise weighted multiplication when the ECG type belongs to the effective ECG category, forming an enhanced feature sequence, and inputting the enhanced feature sequence into the pre-trained R-wave localization model corresponding to the effective ECG category to output the R-wave peak position; The mode switching module is used to trigger a retrospective gated scanning mode when the ECG type belongs to the non-ECG category, so as to continuously acquire image data within the complete cardiac cycle and avoid prospective scanning interruption due to missing or unreliable R waves; wherein, the non-ECG category includes ventricular fibrillation signal type or non-ECG signal interference type; The scan trigger control module is used to trigger a prospective ECG gating scan after a preset delay time, using the R-wave peak position as the trigger point.

8. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the method described in any one of claims 1-6.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method of any one of claims 1-6.

Citation Information

Patent Citations

  • Multi-class arrhythmia detection method based on lead attention mechanism

    CN110890155A

  • Method for identifying QRS waves in electrocardiosignals based on multi-head attention mechanism GRU network

    CN119097324A

  • Electrocardiogram arrhythmia classification method and system based on residual shrinkage network

    CN121015205A