Method, system, electronic device and medium for visual enhancement of electrocardiogram signal
By extracting and mapping multiple features of ECG signals and constructing a three-dimensional trajectory diagram, the problems of low accuracy and efficiency in ECG signal interpretation in traditional methods are solved, and more efficient signal visualization is achieved.
Patent Information
- Application Number
- CN202411636825.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2044-11-15
AI Technical Summary
Traditional ECG signal visualization methods have low accuracy and efficiency in interpreting ECG signals, making it difficult to effectively observe and analyze differences in signal intensities and between leads.
By acquiring ECG signals of multiple leads within a preset time period, frequency features, multi-lead consistency features, dynamic features and enhanced signal features are extracted, and these features are mapped into pseudo-color images respectively. Finally, a three-dimensional trajectory map is constructed to improve the visualization effect.
It improves the accuracy and efficiency of ECG signal interpretation, enhances signal differentiation and feature visibility, and improves ECG signal visualization.
Smart Images

Figure CN119157551B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electrocardiogram (ECG) signal processing, and in particular to an ECG signal visualization enhancement method, system, electronic device, and medium. Background Art
[0002] The electrocardiogram (ECG) is a noninvasive and easily accessible tool for recording cardiac electrical activity. Each cardiac cycle can be identified by its characteristic periodic waveform, and changes in the ECG signal are often closely correlated with changes in cardiac dynamics. Traditionally, ECG examinations are typically performed through simple visual analysis of the one-dimensional (1D) time series waveform. Studies have demonstrated the significant effectiveness of visualization techniques in assisting clinicians in interpreting ECGs.
[0003] However, traditional ECG signal visualization methods present several difficulties and challenges. Because ECGs typically contain data from multiple leads, each providing information about the heart's electrical activity from a different perspective, the single-color or grayscale image display limits the observation of varying signal strengths and differences between leads. This can make characteristic details difficult to detect due to lead-to-lead variations or signal complexity. Consequently, traditional ECG signal visualization methods offer low accuracy and efficiency in interpreting ECG signals, reducing the effectiveness of ECG signal visualization. Summary of the Invention
[0004] This application aims to propose an electrocardiogram (ECG) signal visualization enhancement method, system, electronic device, and medium, which can improve the accuracy and efficiency of ECG signal interpretation, thereby improving the ECG signal visualization effect.
[0005] In a first aspect, an embodiment of the present application provides a method for visualizing and enhancing an electrocardiogram signal, the method comprising:
[0006] Acquiring first electrocardiogram signals of multiple leads within a preset time period;
[0007] Extracting frequency features, multi-lead consistency features, dynamic features, and enhanced signal features of the first ECG signals of the multiple leads, wherein the frequency feature is the frequency distribution of the first ECG signal of each lead in the frequency domain, the multi-lead consistency feature is a comprehensive measure of the synchronization of the first ECG signals of two different leads in the time domain and the phase difference of the first ECG signals of two different leads in the frequency domain, the dynamic feature is the first-order derivative and the second-order derivative of the first ECG signal of each lead, and the enhanced signal feature is the ECG signal after weighting the first ECG signal of each lead through the attention mechanism;
[0008] Mapping the frequency feature into a first pseudo-color map, mapping the multi-lead consistency feature into a second pseudo-color map, and mapping the dynamic feature and the enhanced signal feature into a third pseudo-color map;
[0009] A three-dimensional trajectory map is constructed according to the first pseudo-color map, the second pseudo-color map, and the third pseudo-color map.
[0010] Compared with the prior art, the first aspect of the present application has the following beneficial effects:
[0011] This method obtains the first ECG signals of multiple leads within a preset time period; extracts the frequency characteristics, multi-lead consistency characteristics, dynamic characteristics and enhanced signal characteristics of the first ECG signals of multiple leads, wherein the frequency characteristics are the frequency distribution of the first ECG signal of each lead in the frequency domain, the multi-lead consistency characteristics are the comprehensive measurement value between the synchronization of the first ECG signals of two different leads in the time domain and the phase difference of the first ECG signals of two different leads in the frequency domain, the dynamic characteristics are the first-order derivative and the second-order derivative of the first ECG signal of each lead, and the enhanced signal characteristics are the ECG signals after weighting the first ECG signals of each lead through the attention mechanism; maps the frequency characteristics into a first pseudo-color image, maps the multi-lead consistency characteristics into a second pseudo-color image, and maps the dynamic characteristics and the enhanced signal characteristics into a third pseudo-color image; and constructs a three-dimensional trajectory image based on the first pseudo-color image, the second pseudo-color image and the third pseudo-color image. In this way, by extracting multiple types of features from ECG signals of multiple leads, mapping the multiple types of features into multiple color maps, and finally constructing a three-dimensional trajectory map based on the multiple color maps, the accuracy and efficiency of interpreting ECG signals are improved, and the advantages of pseudo-color in enhancing signal discrimination and feature visibility are fully utilized, thereby improving the visualization effect of ECG signals.
[0012] In some embodiments, extracting frequency features, multi-lead consistency features, dynamic features, and enhanced signal features of the first electrocardiogram signals of the multiple leads includes:
[0013] Calculating the synchronization of the first electrocardiogram signals of two different leads in the time domain to obtain a first result;
[0014] Calculating a phase difference in the frequency domain between the first electrocardiogram signals of the two different leads to obtain a second result;
[0015] According to the first result and the second result, a comprehensive metric value between the first electrocardiogram signals of the two different leads is calculated, and the comprehensive metric value is used as a multi-lead consistency feature.
[0016] In some embodiments, calculating a comprehensive metric value between the first electrocardiogram signals of the two different leads based on the first result and the second result includes:
[0017] ;
[0018] in, Represents a comprehensive measurement value, represents the weight coefficient, represents the total length of the lag time window for cross-correlation, represents the first result obtained by calculating the synchronization of the first ECG signals of two different leads in the time domain through the cross-correlation function, represents the lag time window length, represents the number of frequency components of Fourier transform, It represents the second result obtained by calculating the phase difference of the first ECG signals of two different leads in the frequency domain. Indicates the frequency components.
[0019] In some embodiments, extracting frequency features, multi-lead consistency features, dynamic features, and enhanced signal features of the first electrocardiogram signals of the multiple leads includes:
[0020] Calculating the first derivative of the first electrocardiogram signal of each lead;
[0021] Calculating the second-order derivative of the first electrocardiogram signal of each lead;
[0022] The first-order derivative and the second-order derivative of the first electrocardiogram signal of each lead are used as dynamic features.
[0023] In some embodiments, extracting frequency features, multi-lead consistency features, dynamic features, and enhanced signal features of the first electrocardiogram signals of the multiple leads includes:
[0024] Segmenting the first electrocardiogram signal of each lead within the preset time period into second electrocardiogram signals of a plurality of time segments;
[0025] The second ECG signals of the multiple time segments are input into the multi-head attention mechanism for attention weighting to obtain enhanced signal features corresponding to the first ECG signal of each lead.
[0026] In some embodiments, inputting the second ECG signals of the multiple time segments into a multi-head attention mechanism for weighting attention weights to obtain enhanced signal features corresponding to the first ECG signals of each lead includes:
[0027] ;
[0028] in, Indicates enhanced signal characteristics, Indicates the sampling time point The first ECG signal at Indicates the number of time slices, represents the Dirac function, Indicates the time point corresponding to the maximum attention weight output by the multi-head attention mechanism, Indicates the Time segments The value of the maximum attention weight in , Indicates the The time point that the multi-head attention mechanism pays most attention to in the time segment The corresponding second ECG signal.
[0029] In some embodiments, mapping the dynamic features and the enhanced signal features into a third pseudo-color image comprises:
[0030] Summing the first-order derivative of the first electrocardiogram signal of each lead, the second-order derivative of the first electrocardiogram signal of each lead, and the enhanced signal feature to obtain a combined feature;
[0031] The combined features are mapped into a third pseudo-color image.
[0032] In a second aspect, an embodiment of the present application further provides an electrocardiogram signal visualization enhancement system, the system comprising:
[0033] A data acquisition unit, configured to acquire first electrocardiogram signals of a plurality of leads within a preset time period;
[0034] a feature extraction unit, configured to extract frequency features, multi-lead consistency features, dynamic features, and enhanced signal features of the first ECG signals of the multiple leads, wherein the frequency feature is the frequency distribution of the first ECG signal of each lead in the frequency domain, the multi-lead consistency feature is a comprehensive measure of the synchronization of the first ECG signals of two different leads in the time domain and the phase difference of the first ECG signals of two different leads in the frequency domain, the dynamic feature is the first-order derivative and the second-order derivative of the first ECG signal of each lead, and the enhanced signal feature is the ECG signal after weighting the first ECG signal of each lead through an attention mechanism;
[0035] a feature mapping unit, configured to map the frequency feature into a first pseudo-color map, map the multi-lead consistency feature into a second pseudo-color map, and map the dynamic feature and the enhanced signal feature into a third pseudo-color map;
[0036] The trajectory map construction unit is configured to construct a three-dimensional trajectory map according to the first pseudo-color map, the second pseudo-color map, and the third pseudo-color map.
[0037] In a third aspect, an embodiment of the present application also provides an electronic device comprising at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions that can be executed by the at least one control processor, and the instructions are executed by the at least one control processor so that the at least one control processor can execute a method for visualizing and enhancing an electrocardiogram signal as described above.
[0038] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the above-mentioned method for visualizing and enhancing an electrocardiogram signal.
[0039] It can be understood that the beneficial effects of the above-mentioned second to fourth aspects compared with the relevant technologies are the same as the beneficial effects of the above-mentioned first aspect compared with the relevant technologies. Please refer to the relevant description in the above-mentioned first aspect and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0041] Figure 1 This is a flowchart of an embodiment of the method for visualizing and enhancing electrocardiogram signals provided by the present application;
[0042] Figure 2 This is a flow chart of the best embodiment of the method for visualizing and enhancing electrocardiogram signals provided by the present application;
[0043] Figure 3 This is a schematic structural diagram of an embodiment of the electrocardiogram signal visualization enhancement system provided by the present application;
[0044] Figure 4 It is a structural diagram of an embodiment of the electronic device provided by this application. DETAILED DESCRIPTION
[0045] The following describes in detail embodiments of the present application. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application and are not to be construed as limiting the present application.
[0046] In the description of this application, if there is a description of first, second, etc., it is only for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0047] In the description of this application, it should be understood that descriptions involving orientation, such as the orientation or positional relationship indicated by up, down, etc., are based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on this application.
[0048] In the description of this application, it should be noted that, unless otherwise clearly defined, terms such as setting, installing, and connecting should be understood in a broad sense, and technical personnel in the relevant technical field can reasonably determine the specific meaning of the above terms in this application based on the specific content of the technical solution.
[0049] The electrocardiogram (ECG) is a noninvasive and easily accessible tool for recording cardiac electrical activity. Each cardiac cycle can be identified by its characteristic periodic waveform, and changes in the ECG signal are often closely correlated with changes in cardiac dynamics. Traditionally, ECG examinations are typically performed through simple visual analysis of the one-dimensional (1D) time series waveform. Studies have demonstrated the significant effectiveness of visualization techniques in assisting clinicians in interpreting ECGs.
[0050] However, traditional ECG signal visualization methods present several difficulties and challenges. Because ECGs typically contain data from multiple leads, each providing information about the heart's electrical activity from a different perspective, the single-color or grayscale image display limits the observation of varying signal strengths and differences between leads. This can make characteristic details difficult to detect due to lead-to-lead variations or signal complexity. Consequently, traditional ECG signal visualization methods offer low accuracy and efficiency in interpreting ECG signals, reducing the effectiveness of ECG signal visualization.
[0051] In order to solve the problem that the traditional ECG signal visualization method has low accuracy and efficiency in interpreting ECG signals, thereby reducing the visualization effect of ECG signals, this application proposes an ECG signal visualization enhancement method, system, electronic device and medium.
[0052] Reference Figure 1 The present invention provides a method for visualizing and enhancing an electrocardiogram signal. The method comprises the following steps:
[0053] Step S100: acquiring first electrocardiogram signals of a plurality of leads within a preset time period;
[0054] Step S200: extracting frequency features, multi-lead consistency features, dynamic features, and enhanced signal features of the first ECG signals of multiple leads, wherein the frequency feature is the frequency distribution of the first ECG signal of each lead in the frequency domain, the multi-lead consistency feature is a comprehensive measure of the synchronization of the first ECG signals of two different leads in the time domain and the phase difference of the first ECG signals of two different leads in the frequency domain, the dynamic feature is the first-order derivative and the second-order derivative of the first ECG signal of each lead, and the enhanced signal feature is the ECG signal obtained by weighting the first ECG signal of each lead through the attention mechanism;
[0055] Step S300: mapping the frequency feature into a first pseudo-color map, mapping the multi-lead consistency feature into a second pseudo-color map, and mapping the dynamic feature and the enhanced signal feature into a third pseudo-color map;
[0056] Step S400: construct a three-dimensional trajectory map according to the first pseudo-color map, the second pseudo-color map, and the third pseudo-color map.
[0057] In this embodiment, the first ECG signals of multiple leads within a preset time period are obtained; the frequency characteristics, multi-lead consistency characteristics, dynamic characteristics and enhanced signal characteristics of the first ECG signals of multiple leads are extracted, wherein the frequency characteristics are the frequency distribution of the first ECG signal of each lead in the frequency domain, the multi-lead consistency characteristics are the comprehensive measurement value between the synchronization of the first ECG signals of two different leads in the time domain and the phase difference of the first ECG signals of two different leads in the frequency domain, the dynamic characteristics are the first-order derivative and the second-order derivative of the first ECG signal of each lead, and the enhanced signal characteristics are the ECG signals after the first ECG signals of each lead are weighted by the attention mechanism; the frequency characteristics are mapped into a first pseudo-color image, the multi-lead consistency characteristics are mapped into a second pseudo-color image, and the dynamic characteristics and the enhanced signal characteristics are mapped into a third pseudo-color image; and a three-dimensional trajectory image is constructed according to the first pseudo-color image, the second pseudo-color image and the third pseudo-color image. In this way, by extracting multiple types of features from ECG signals of multiple leads, mapping the multiple types of features into multiple color maps, and finally constructing a three-dimensional trajectory map based on the multiple color maps, the accuracy and efficiency of interpreting ECG signals are improved, and the advantages of pseudo-color in enhancing signal discrimination and feature visibility are fully utilized, thereby improving the visualization effect of ECG signals.
[0058] The above-mentioned acquisition of the first ECG signals of multiple leads within the preset time period can be performed by using appropriate acquisition equipment to perform sampling at a preset Hertz (HZ) for a period of time (the preset time period can be a manually set time period), and sampling the first ECG signals of multiple leads.
[0059] The above-mentioned suitable acquisition device can be a device used for sampling electrocardiogram signals in the prior art, and this embodiment does not impose any specific limitation.
[0060] The above-mentioned mapping of frequency characteristics into a first pseudo-color image, mapping multi-lead consistency characteristics into a second pseudo-color image, and mapping dynamic characteristics and enhanced signal characteristics into a third pseudo-color image can be achieved by using a pseudo-color mapping function to map frequency characteristics into a first pseudo-color image, mapping multi-lead consistency characteristics into a second pseudo-color image, and mapping dynamic characteristics and enhanced signal characteristics into a third pseudo-color image.
[0061] The three-dimensional trajectory map constructed based on the first, second, and third pseudo-color images may be constructed by fusing the first, second, and third pseudo-color images into a single image. For example, the three-dimensional trajectory map may be constructed using existing Python software.
[0062] In some embodiments, extracting frequency features, multi-lead consistency features, dynamic features, and enhanced signal features of first ECG signals from multiple leads includes:
[0063] Calculating the synchronization of the first electrocardiogram signals of two different leads in the time domain to obtain a first result;
[0064] Calculating the phase difference between the first electrocardiogram signals of two different leads in the frequency domain to obtain a second result;
[0065] A comprehensive metric value between the first electrocardiogram signals of two different leads is calculated according to the first result and the second result, and the comprehensive metric value is used as a multi-lead consistency feature.
[0066] In this embodiment, a first result is obtained by calculating the synchronization of the first ECG signals of two different leads in the time domain; a second result is obtained by calculating the phase difference of the first ECG signals of the two different leads in the frequency domain; and based on the first and second results, a comprehensive metric value between the first ECG signals of the two different leads is calculated, and the comprehensive metric value is used as a multi-lead consistency feature. In this way, by adjusting the impact of synchronization and phase difference on the comprehensive metric value, the comprehensive metric value simultaneously reflects synchronization and phase difference. Synchronization provides a similarity measurement in the time domain, and the phase difference provides a difference in the frequency domain. This analyzes the correlation between ECG signals of different leads, and better improves the understanding and analysis capabilities of complex ECG signals.
[0067] In some embodiments, calculating a comprehensive metric between first ECG signals of two different leads based on the first result and the second result includes:
[0068] ;
[0069] in, Represents a comprehensive measurement value, represents the weight coefficient, represents the total length of the lag time window for cross-correlation, represents the first result obtained by calculating the synchronization of the first ECG signals of two different leads in the time domain through the cross-correlation function, represents the lag time window length, represents the number of frequency components of Fourier transform, It represents the second result obtained by calculating the phase difference of the first ECG signals of two different leads in the frequency domain. Indicates the frequency components.
[0070] In some embodiments, extracting frequency features, multi-lead consistency features, dynamic features, and enhanced signal features of first ECG signals from multiple leads includes:
[0071] Calculating the first derivative of the first ECG signal of each lead;
[0072] Calculating the second derivative of the first ECG signal of each lead;
[0073] The first-order derivative and the second-order derivative of the first ECG signal of each lead are used as dynamic features.
[0074] In this embodiment, the first-order derivative of each lead's first ECG signal is calculated, followed by the second-order derivative. These first-order and second-order derivatives are then used as dynamic features. This allows the first-order derivative to capture the local rate of change of the ECG signal, detecting locations of sudden or rapid signal changes. The second-order derivative reflects the signal's dynamic trend, helping to identify overall acceleration or deceleration, further enhancing understanding and analysis of complex ECG signals.
[0075] In some embodiments, extracting frequency features, multi-lead consistency features, dynamic features, and enhanced signal features of first ECG signals from multiple leads includes:
[0076] Segmenting the first electrocardiogram signal of each lead within a preset time period into second electrocardiogram signals of a plurality of time segments;
[0077] The second ECG signals of multiple time segments are input into the multi-head attention mechanism for attention weighting to obtain the enhanced signal features corresponding to the first ECG signal of each lead.
[0078] In this embodiment, the first ECG signal of each lead within a preset time period is segmented into multiple second ECG signals in multiple time segments. These second ECG signals in multiple time segments are then fed into a multi-head attention mechanism for weighted attention, yielding enhanced signal features corresponding to the first ECG signal of each lead. In this way, the multi-head attention mechanism assigns different weights to ECG signals at different time points, highlighting ECG signals corresponding to important time segments and further improving the ability to understand and analyze complex ECG signals.
[0079] In some embodiments, the second ECG signals of multiple time segments are input into a multi-head attention mechanism for attention weighting to obtain enhanced signal features corresponding to the first ECG signal of each lead, including:
[0080] ;
[0081] in, Indicates enhanced signal characteristics, Indicates the sampling time point The first ECG signal at Indicates the number of time slices, represents the Dirac function, Indicates the time point corresponding to the maximum attention weight output by the multi-head attention mechanism, Indicates the Time segments The value of the maximum attention weight in , Indicates the The time point that the multi-head attention mechanism pays most attention to in the time segment The corresponding second ECG signal.
[0082] In some embodiments, mapping the dynamic features and the enhanced signal features into a third pseudo-color map comprises:
[0083] Summing the first-order derivative of the first ECG signal of each lead, the second-order derivative of the first ECG signal of each lead, and the enhanced signal feature to obtain a combined feature;
[0084] The combined features are mapped into a third pseudo-color map.
[0085] In this embodiment, a combined feature is obtained by summing the first-order derivative of the first ECG signal for each lead, the second-order derivative of the first ECG signal for each lead, and the enhanced signal feature; the combined feature is then mapped into a third pseudo-color image. This balances the enhanced signal feature, the rate of change (i.e., the first-order derivative), and the dynamic trend (i.e., the second-order derivative). By mapping the combined feature into the third pseudo-color image, it is possible to intuitively identify which time segments receive greater attention, thereby enhancing the visual representation of the ECG signal features.
[0086] To facilitate understanding by those skilled in the art, a set of best embodiments is provided below:
[0087] The electrocardiogram (ECG) is a non-invasive and easily accessible tool for recording the heart's electrical activity. Each cardiac cycle can be identified by its characteristic periodic waveform, and changes in the ECG signal are often closely correlated with changes in cardiac dynamics. Traditionally, ECG examinations are typically performed through simple visual analysis of one-dimensional (1D) time series waveforms. Studies have shown that visualization technology is significantly effective in helping clinicians interpret ECGs, not only improving the detection rate of heart attacks but also helping non-specialists identify when ECG signals deviate from the normal baseline so that they can seek medical help promptly.
[0088] However, traditional ECG signal visualization methods have some difficulties and challenges. First, ECG signals are easily interfered with by various physiological and environmental noises, such as myoelectric interference, baseline drift, and electromagnetic noise, which increases the difficulty of accurate interpretation. Second, ECGs usually contain multiple lead data, each of which provides information about cardiac electrical activity from a different perspective. The display of a single color or grayscale image limits the observation of different signal intensities and differences between leads, resulting in feature details that may be difficult to detect due to differences between leads or signal complexity. In addition, as the amount of ECG data increases, manual visual inspection is inefficient and cannot meet the needs of large-scale data analysis.
[0089] To address the above issues, this embodiment proposes a method for enhancing ECG signal visualization based on multi-step pseudo-color mapping and 3D trajectory graphs (i.e., 3D trajectory graphs). Multi-step pseudo-color mapping technology maps features at different levels into colors, making key waveform features more intuitive and helpful in distinguishing and identifying specific ECG activity. The 3D trajectory graph presents time and frequency distribution, dynamic enhancement signals, and lead consistency information in three-dimensional space, providing a more comprehensive perspective and clearly demonstrating the differences and correlations between different leads.
[0090] This embodiment provides an innovative method for enhancing ECG signal visualization, which has important technical and practical value. This method not only improves the accuracy and efficiency of ECG signal interpretation, but also has broad applications in scientific research, clinical monitoring, and smart health devices, providing an effective tool for in-depth analysis and real-time monitoring of ECG data.
[0091] The goal of this embodiment is to provide a novel method for visualizing and enhancing ECG signals by combining multi-step pseudo-color mapping and 3D trajectory graphs. This method leverages the advantages of pseudo-color in enhancing signal differentiation and feature visibility, as well as the ability of 3D trajectory graphs to display multidimensional data and highlight dynamic waveform changes, significantly improving visualization for multidimensional analysis and feature recognition of complex ECG signals. Specifically, it includes the following:
[0092] 1. Define the problem.
[0093] Data preprocessing: Preprocess the ECG signal, including denoising, filtering, and normalization, to remove physiological and environmental noise and improve signal clarity and accuracy.
[0094] Multi-parameter feature extraction: Extract multiple parameters from the ECG signal: frequency features, synchronization and phase difference between different leads (i.e., multi-lead consistency features), local change rate and overall trend change of the ECG signal (i.e., dynamic features), and signal attention weight enhancement features (i.e., enhanced signal features).
[0095] Multi-step pseudo color mapping: multi-dimensional features (i.e., multi-parameter features) are mapped to the visual image through the pseudo color function.
[0096] 3D trajectory map construction: Pseudo-color information and features are integrated into the 3D trajectory map to show the dynamic changes of the signal in time, frequency, and signal enhancement.
[0097] Performance evaluation: Design appropriate technical indicators, such as color contrast, image clarity, and dynamic effects, and collect feedback through user experience surveys to evaluate the practicality and application value of visualization methods.
[0098] 2. Goals and constraints.
[0099] (1) Objective.
[0100] The goal of this embodiment is to provide an innovative method for visualizing and enhancing ECG signal features, based on multi-step pseudo-color mapping and 3D trajectory diagram technology, to achieve efficient and intuitive display of ECG signals. Taking advantage of technical advantages, the ECG signal is frequency analyzed, multi-head attention signal enhancement is used, and synchronization with other leads is performed separately through multi-step pseudo-color mapping technology; at the same time, a 3D trajectory diagram is used to display time, dynamically enhance signals, and perform multi-layer coloring for lead consistency, providing a multi-dimensional signal perspective. This method not only improves the ability to understand and analyze complex ECG signals, but also can adapt to different signal forms and noise conditions, and improve the accuracy and robustness of visualization. Experiments have shown that this embodiment has broad application prospects in clinical ECG analysis, intelligent health monitoring, and large-scale data research.
[0101] (2) Constraints.
[0102] Hardware constraints: Due to the computational complexity of 3D trajectory maps and pseudo-color rendering, the computing resource limitations of the device must be considered to ensure stable operation on different hardware platforms, especially on portable and low-power devices.
[0103] Data privacy: The patient's ECG data is fully protected during the visualization process, in compliance with relevant laws, regulations and ethical standards, to avoid the leakage of sensitive information.
[0104] Practicality: Ensure that the method can be widely used in actual medical scenarios, with a simple design and ease of use, suitable for real-time and efficient ECG signal analysis and display in clinical environments and smart health devices.
[0105] Compatibility: Considering the multi-lead nature of the ECG, the method ensures compatibility between data from different leads and is able to simultaneously process and display ECG signals from multiple leads. For example, in wearable device applications, the visualization of data from a small number of leads (such as a single lead or three leads) will be focused, ensuring the effective display of data in 3D trajectory diagrams and pseudo-color rendering.
[0106] Adjustability: Allows users to customize visualization parameters and analysis angles according to specific needs.
[0107] 3. Implementation of specific technical solutions.
[0108] This embodiment combines the pseudo color mapping and 3D trajectory map method, referring to Figure 2 The specific technical solution of this embodiment includes the following steps:
[0109] Step 1: Signal acquisition and preprocessing.
[0110] (1) Signal acquisition: Acquire 12-lead electrocardiogram (ECG) signal data over a period of time and select appropriate acquisition equipment to ensure the integrity and accuracy of the data, including the correct placement of electrodes and equipment calibration to ensure the integrity and accuracy of the data.
[0111] Specifically, select high-quality acquisition equipment to acquire 12-lead electrocardiogram (ECG) signal data. This equipment can include conventional ECG monitoring equipment or hospital-grade ECG recorders. Ensure that the equipment is fully calibrated before acquisition to reduce systematic errors.
[0112] (2) Data preprocessing: De-noising, filtering and normalization are performed on the collected ECG signals to eliminate physiological and environmental noise, improve signal clarity and lay the foundation for subsequent feature extraction and visualization analysis.
[0113] Specifically, a high-pass filter can be used to remove low-frequency noise and baseline drift, and a low-pass filter can be used to remove high-frequency noise. Normalization refers to adjusting the signal to a uniform scale range, and Z-score normalization can be used for normalization.
[0114] Step 2: Multi-parameter feature extraction.
[0115] (1) Frequency distribution: The time domain information is converted to the frequency domain through fast Fourier transform to obtain the frequency distribution (i.e., frequency characteristics) of the ECG signal (i.e., the first ECG signal).
[0116] Specifically, for the sampling points ECG signal value at , use Fast Fourier Transform (FFT) to analyze the frequency characteristics, the calculation formula is:
[0117] ;
[0118] in, represents the spectrum of the signal, The index representing the frequency, Indicates the signal length, usually the number of sampling points of ECG data, and , corresponding to different frequency components. Each lead corresponds to a time series, and FFT is performed separately to obtain the spectrum information of each lead.
[0119] (2) Multi-lead consistency: Calculate the synchronization and phase relationship between the ECG signals of different leads (i.e., the first ECG signal) and analyze the time correlation of different leads.
[0120] Specifically, a formula combining synchronization and phase difference is constructed, where synchronization provides a similarity measure in the time domain, and phase difference provides a difference measure in the frequency domain.
[0121] Synchronicity can be evaluated by calculating the cross-correlation function of the ECG signals of different leads, which is calculated as follows:
[0122] ;
[0123] in, Represents the ECG signals of two leads and The cross-correlation function, and Represents the ECG signals of two different leads. Indicates lead ECG signal values, offset in time The sampling point value after that indicates Signal relative to The signal is delayed operation.
[0124] In frequency index The phase difference of ECG signals of different leads in the frequency domain is for:
[0125] ;
[0126] and Respectively represent leads and leads The frequency domain signal is indexed at frequency The phase at .
[0127] In order to balance the synchronization and phase difference, this embodiment sets a weight parameter , and obtain an overall measure (i.e., comprehensive measure value).
[0128] ;
[0129] in, Indicates lead and The comprehensive measure of represents the cross-correlation function of the two leads in the time domain, which measures the synchronization. represents the phase difference between the two leads in the frequency domain, The length of the lag time window representing the cross-correlation, usually the same as the signal length, represents the number of frequency components of Fourier transform, Represents the weight coefficient, which is used to adjust the impact of synchronization and phase difference on the final measurement.
[0130] (3) Dynamic trend: The first-order derivative and second-order derivative of the ECG signal (i.e., the first ECG signal) are calculated to capture the dynamic characteristics. The dynamic trend can reflect the overall change characteristics of the signal over time.
[0131] Specifically, the first-order derivative can capture the local rate of change of the ECG signal and is used to detect locations where the signal suddenly changes or changes rapidly. Usually, there will be obvious high-amplitude changes when the signal changes rapidly (such as at the peak of the R wave), which helps us identify locations where the ECG signal changes rapidly, such as the QRS complex.
[0132] For ECG signals , and the calculation formula of its rate of change is:
[0133] ;
[0134] in, Indicates that at the sampling point The signal change rate at and Represent the ECG signal values at adjacent sampling points respectively.
[0135] The second-order derivative can reflect the dynamic trend of the signal and help identify the overall acceleration or deceleration of the signal, such as ST segment rise or fall. The specific calculation formula is:
[0136] ;
[0137] in, Indicates that at the sampling point The second-order derivative of the signal at is used to reflect the trend change and acceleration of the signal over time, helping to capture larger trend turning points.
[0138] (4) Signal enhancement: A multi-head attention mechanism is added to assign different weights to signals at different time points, highlighting important ECG signal segments (such as waveforms when the heart is abnormal). The extracted attention weights can be used as important features to reflect the key areas of the model's attention.
[0139] Specifically, a multi-head attention mechanism is used to assign different weights to signals at different time points to highlight important ECG signal segments.
[0140] For each lead, the ECG signal sequence within a period of time is divided into multiple time segments as the input of the model. This segmentation method is conducive to the multi-head attention mechanism to focus on different time segments. Assume that the sequence is divided into segments, each segment contains sampling points.
[0141] ;
[0142] in, Indicates the The multi-head attention mechanism is used to model the segmented time segments. The goal of the multi-head attention mechanism is to learn the relationship between each time segment and other time segments.
[0143] a. Construction of query, key and value vectors.
[0144] For each time segment , we map it to query Q, key K and value V vectors. This is achieved through linear transformation:
[0145] ;
[0146] ;
[0147] ;
[0148] in, 、 and Represents the trainable weight matrices used to map input to query, key, and value vectors, respectively.
[0149] b. Calculation of attention weights.
[0150] For a given query vector and key vector , calculate its similarity through dot product and convert it into weight through Softmax function:
[0151] ;
[0152] in, Represents a time segment Time Segment The attention weight, Indicates the dimension of the key vector, used for scaling. The larger the weight, the more attention the model pays to the segment.
[0153] c. Weighted output
[0154] Use the calculated attention weights Pair value vector Perform weighted summation to get the output of each fragment:
[0155] ;
[0156] in, Indicates the The value vector of each time segment represents the information carried by that segment. The result of the weighted summation is the output of the time segment that the model considers important. This step focuses on important signal segments through the attention mechanism.
[0157] d. Multi-headed attention.
[0158] In order to enable the model to capture different temporal features from multiple perspectives, this embodiment uses a multi-head attention mechanism. Multi-head attention models different parts of the signal by running multiple attention heads in parallel. Each attention head has an independent query, key, and value matrix:
[0159] ;
[0160] in, Indicates the The output of the attention head is Represents a learnable weight matrix for linear transformation, summarizing the results of multiple heads, usually initialized with random values, and continuously optimized during training.
[0161] The attention output of each head is:
[0162] ;
[0163] in, 、 and Represent independent weight matrices for query, key, and value, respectively.
[0164] For each fragment , the focused time segment can be determined by the maximum attention weight:
[0165] ;
[0166] In the original ECG signal The attention weight is superimposed on the basis of , the specific calculation formula is:
[0167] ;
[0168] in, Indicates enhanced signal characteristics, Indicates the sampling time point The first ECG signal at Indicates the number of time slices, represents the Dirac function, which is used to determine The key time point, that is, if ,but ,otherwise . Indicates the time point corresponding to the maximum attention weight output by the multi-head attention mechanism, Indicates the Time segments The value of the maximum attention weight in , the corresponding time point is , Indicates the The time point that the multi-head attention mechanism pays most attention to in the time segment The corresponding second ECG signal.
[0169] Step 3: Multi-step pseudo-color mapping.
[0170] (1) Frequency layer coloring: The calculated ECG signal frequency is mapped into a color gradient from green to purple from low frequency to high frequency and placed in the first layer.
[0171] Specifically, the frequency characteristics of the extracted ECG signal are mapped to a pseudo color (i.e., the first pseudo color map). The pseudo color mapping formula used is:
[0172] ;
[0173] in, Indicates signal strength The mapped color, Indicates a pseudo-color mapping function, such as a heatmap or rainbow.
[0174] (2) Consistency layer coloring: Use transparency to indicate synchronization. High synchronization areas have lower transparency and are highlighted.
[0175] Specifically, the calculated synchronization and phase differences between different leads are combined to define a multi-lead consistency feature. Taking one lead as the primary object, the consistency curve between that lead and the other leads is plotted. The mapping formula used for coloring is also a pseudo-color mapping function.
[0176] (3) Dynamic enhancement coloring: combining dynamic trends and signal enhancement, emphasizing areas with high signal change rates to reflect dynamic trends.
[0177] Specifically, the dynamic trend (i.e., dynamic feature) extracted from the feature is combined with the signal enhancement (i.e., enhanced signal feature) to define a new dynamic enhanced signal (i.e., combined feature). and dynamic trends With the enhanced signal Combined, the formula for calculating the combined features is:
[0178] ;
[0179] in, and Represents the weight coefficient, which is used to balance the enhancement signal, rate of change, and dynamic trend. This allows us to intuitively see which time segments are given more attention through the post-colorization image.
[0180] Then, the curve is drawn and colored, and the mapping formula used for coloring is also the pseudo color mapping function.
[0181] Step 4: Construct three-dimensional trajectory map.
[0182] (1) Multi-dimensional feature fusion: The pseudo-color information after multi-step coloring is integrated into the three-dimensional trajectory, so that the trajectory line can show multiple features at the same time.
[0183] Specifically, the three colored curve graphs in step 3 are fused by using software in the prior art to construct a three-dimensional trajectory graph.
[0184] (2) User-defined settings: Allow users to customize visualization parameters and analysis angles according to specific needs, such as adjusting the color scale of pseudo-color mapping, selecting different leads or three-dimensional view angles, etc., to meet different analysis needs, and use evaluation indicators to detect the performance of the method.
[0185] Specifically, users can customize visualization parameters and analysis angles based on their specific needs. Users can adjust the color scale of the pseudo-color mapping, select different lead displays, and adjust the angle of the 3D view to meet different analysis requirements.
[0186] The above method can be evaluated based on three evaluation indicators: readability, feature separation and computational efficiency.
[0187] Readability can be indirectly reflected by the signal-to-noise ratio (SNR) of the image. The SNR formula is:
[0188] ;
[0189] in, represents the power of the signal, Indicates the power of the noise.
[0190] Feature Separation measures whether visualization can effectively distinguish different ECG features (such as P waves, QRS waves, and T waves) and abnormal waveforms. Automated algorithms can be used to calculate the distance or overlap between features. Specifically,
[0191] ;
[0192] in, Representation characteristics The average value of Representation characteristics The standard deviation of .
[0193] Computational Efficiency measures the time and resource consumption of generating visualizations. The evaluation metrics used include generation time (in seconds) and memory usage (in MB).
[0194] ;
[0195] The output quality here ( ) can be measured by the aforementioned readability and feature separation, Indicates resource consumption.
[0196] The above method combines pseudo-color and 3D trajectory diagrams to enhance the visualization of various ECG signal features. Through continuous optimization steps, errors and missed detections are corrected to improve detection accuracy.
[0197] The application scenarios of the technical solution of this embodiment include:
[0198] The technical solution of this embodiment is suitable for advanced analysis and visualization of ECG signals, and is particularly widely used in scientific research experiments, data mining, and engineering analysis. Through this method, researchers and technical developers can accurately extract features and display three-dimensionally complex ECG signals, enhancing their understanding and analysis capabilities of specific waveforms. This technology is not only suitable for laboratory research, but can also be integrated into intelligent health monitoring and signal processing systems as a core tool for data visualization and feature analysis. In addition, this method is also suitable for the development of machine learning models, helping to extract and analyze key features in large-scale ECG data, and providing new possibilities for the research and application of ECG signals.
[0199] The innovation of this embodiment lies in the combination of pseudo-color coding and 3D trajectory mapping technology, which comprehensively displays the frequency distribution, dynamic signal enhancement, and inter-lead correlation information of the ECG signal, making the waveform characteristics more prominent. Dynamic color gradients and animation effects enhance the visual representation of ECG signal characteristics, helping researchers and technicians quickly identify key features in large amounts of data. The introduction of automatic detection and annotation algorithms provides strong support for in-depth research and technological applications of ECG signals.
[0200] Reference Figure 3 The embodiment of the present application further provides an electrocardiogram signal visualization enhancement system, which includes a data acquisition unit 100, a feature extraction unit 200, a feature mapping unit 300, and a trajectory diagram construction unit 400, wherein:
[0201] The data acquisition unit 100 is used to acquire first electrocardiogram signals of multiple leads within a preset time period;
[0202] A feature extraction unit 200 is configured to extract frequency features, multi-lead consistency features, dynamic features, and enhanced signal features of first ECG signals of multiple leads, wherein the frequency feature is the frequency distribution of the first ECG signal of each lead in the frequency domain, the multi-lead consistency feature is a comprehensive measure of the synchronization of the first ECG signals of two different leads in the time domain and the phase difference of the first ECG signals of two different leads in the frequency domain, the dynamic feature is the first-order derivative and second-order derivative of the first ECG signal of each lead, and the enhanced signal feature is the ECG signal obtained by weighting the first ECG signal of each lead through an attention mechanism;
[0203] A feature mapping unit 300 is configured to map the frequency feature into a first pseudo-color map, map the multi-lead consistency feature into a second pseudo-color map, and map the dynamic feature and the enhanced signal feature into a third pseudo-color map;
[0204] The trajectory map construction unit 400 is configured to construct a three-dimensional trajectory map according to the first pseudo-color map, the second pseudo-color map, and the third pseudo-color map.
[0205] It should be noted that, since the ECG signal visualization enhancement system in this embodiment and the above-mentioned ECG signal visualization enhancement method are based on the same inventive concept, the corresponding contents in the method embodiment are also applicable to the system embodiment and will not be described in detail here.
[0206] Reference Figure 4 , an embodiment of the present application further provides an electronic device, the electronic device comprising:
[0207] at least one memory;
[0208] at least one processor;
[0209] at least one program;
[0210] The programs are stored in the memory, and the processor executes at least one program to implement the above-mentioned electrocardiogram signal visualization enhancement method implemented in the present disclosure.
[0211] The electronic device may be any intelligent terminal including a mobile phone, a tablet computer, a personal digital assistant (PDA), an in-vehicle computer, etc.
[0212] The electronic device according to the embodiment of the present application is described in detail below.
[0213] The processor 1600 may be implemented as a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is configured to execute relevant programs to implement the technical solutions provided by the embodiments of the present disclosure.
[0214] The memory 1700 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1700 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1700 and is called by the processor 1600 to execute the ECG signal visualization enhancement method of the embodiments of this disclosure.
[0215] Input / output interface 1800, used for information input and output;
[0216] Communication interface 1900, used to implement communication interaction between this device and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WiFi, Bluetooth, etc.);
[0217] Bus 2000 , which transmits information between various components of the device (e.g., processor 1600 , memory 1700 , input / output interface 1800 , and communication interface 1900 );
[0218] The processor 1600 , the memory 1700 , the input / output interface 1800 , and the communication interface 1900 are connected to each other in communication within the device via the bus 2000 .
[0219] An embodiment of the present disclosure further provides a storage medium, which is a computer-readable storage medium and stores computer-executable instructions. The computer-executable instructions are used to enable a computer to execute the above-mentioned electrocardiogram signal visualization enhancement method.
[0220] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0221] The embodiments described in the embodiments of the present disclosure are intended to more clearly illustrate the technical solutions of the embodiments of the present disclosure and do not constitute a limitation on the technical solutions provided by the embodiments of the present disclosure. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present disclosure are also applicable to similar technical problems.
[0222] Those skilled in the art will understand that the technical solutions shown in the drawings do not constitute a limitation on the embodiments of the present disclosure, and may include more or fewer steps than shown in the drawings, or a combination of certain steps, or different steps.
[0223] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.
[0224] Those skilled in the art will appreciate that all or some of the steps in the methods, systems, and functional modules / units in the devices disclosed above may be implemented as software, firmware, hardware, or appropriate combinations thereof.
[0225] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0226] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0227] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0228] Units described as separate components may or may not be physically separate, and 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 these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0229] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0230] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions for enabling an electronic device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store programs, such as a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk. The embodiments of the present application are described in detail above in conjunction with the accompanying drawings, but the present application is not limited to the above embodiments. Various changes can be made within the scope of knowledge possessed by ordinary technicians in the relevant technical field without departing from the purpose of the present application.
Claims
1. A method for visualizing and enhancing an electrocardiogram signal, characterized in that: The method comprises: Acquiring first electrocardiogram signals of multiple leads within a preset time period; Extracting frequency features, multi-lead consistency features, dynamic features, and enhanced signal features of the first ECG signals of the multiple leads, wherein the frequency feature is the frequency distribution of the first ECG signal of each lead in the frequency domain, the multi-lead consistency feature is a comprehensive measure of the synchronization of the first ECG signals of two different leads in the time domain and the phase difference of the first ECG signals of two different leads in the frequency domain, the dynamic feature is the first-order derivative and the second-order derivative of the first ECG signal of each lead, and the enhanced signal feature is the ECG signal after weighting the first ECG signal of each lead through the attention mechanism, including: Segmenting the first electrocardiogram signal of each lead within the preset time period into second electrocardiogram signals of a plurality of time segments; Inputting the second ECG signals of the multiple time segments into a multi-head attention mechanism for attention weighting to obtain enhanced signal features corresponding to the first ECG signal of each lead; Mapping the frequency feature into a first pseudo-color map, mapping the multi-lead consistency feature into a second pseudo-color map, and mapping the dynamic feature and the enhanced signal feature into a third pseudo-color map, specifically, Summing the first-order derivative of the first electrocardiogram signal of each lead, the second-order derivative of the first electrocardiogram signal of each lead, and the enhanced signal feature to obtain a combined feature; Mapping the combined features into a third pseudo-color image; A three-dimensional trajectory diagram is constructed based on the first pseudo-color map, the second pseudo-color map, and the third pseudo-color map. Specifically, a pseudo-color mapping function is used to map the frequency feature into a first pseudo-color map, the multi-lead consistency feature into a second pseudo-color map, and the dynamic feature and the enhanced signal feature into a third pseudo-color map. The first pseudo-color map, the second pseudo-color map, and the third pseudo-color map are fused to construct a three-dimensional trajectory diagram.
2. The method for visualizing and enhancing an electrocardiogram signal according to claim 1, wherein: The extracting of frequency features, multi-lead consistency features, dynamic features, and enhanced signal features of the first electrocardiogram signals of the multiple leads includes: Calculating the synchronization of the first electrocardiogram signals of two different leads in the time domain to obtain a first result; Calculating a phase difference in the frequency domain between the first electrocardiogram signals of the two different leads to obtain a second result; According to the first result and the second result, a comprehensive metric value between the first electrocardiogram signals of the two different leads is calculated, and the comprehensive metric value is used as a multi-lead consistency feature.
3. The method for visualizing and enhancing an electrocardiogram signal according to claim 2, wherein: Calculating a comprehensive metric value between the first electrocardiogram signals of the two different leads according to the first result and the second result includes: Among them, S xy represents the comprehensive metric value, α represents the weight coefficient, M represents the total length of the cross-correlation lag time window, C xy (n) represents the first result obtained by calculating the synchronization of the first ECG signals of two different leads in the time domain through the cross-correlation function, n represents the length of the lag time window, K represents the number of frequency components of the Fourier transform, Δφ(k) represents the second result obtained by calculating the phase difference between the first ECG signals of two different leads in the frequency domain, and k represents the kth frequency component.
4. The method for visualizing and enhancing an electrocardiogram signal according to claim 1, wherein: The extracting of frequency features, multi-lead consistency features, dynamic features, and enhanced signal features of the first electrocardiogram signals of the multiple leads includes: Calculating the first derivative of the first electrocardiogram signal of each lead; Calculating the second-order derivative of the first electrocardiogram signal of each lead; The first-order derivative and the second-order derivative of the first electrocardiogram signal of each lead are used as dynamic features.
5. The method for visualizing and enhancing an electrocardiogram signal according to claim 1, wherein: Inputting the second ECG signals of the multiple time segments into a multi-head attention mechanism for weighting the attention weights to obtain enhanced signal features corresponding to the first ECG signals of each lead includes: Where x′(n) represents the enhanced signal feature, x(n) represents the first ECG signal at sampling time point n, L represents the number of time segments, δ(·) represents the Dirac function, and P i Indicates the time point corresponding to the maximum attention weight output by the multi-head attention mechanism, represents the i-th time segment x i The value of the maximum attention weight in x(P i ) represents the time point P that the multi-head attention mechanism pays most attention to in the i-th time segment i The corresponding second ECG signal.
6. An electrocardiogram signal visualization enhancement system, characterized in that: The system comprises: A data acquisition unit, configured to acquire first electrocardiogram signals of a plurality of leads within a preset time period; A feature extraction unit is configured to extract frequency features, multi-lead consistency features, dynamic features, and enhanced signal features of the first ECG signals of the multiple leads, wherein the frequency feature is the frequency distribution of the first ECG signal of each lead in the frequency domain, the multi-lead consistency feature is a comprehensive measure of the synchronization of the first ECG signals of two different leads in the time domain and the phase difference of the first ECG signals of two different leads in the frequency domain, the dynamic feature is the first-order derivative and the second-order derivative of the first ECG signal of each lead, and the enhanced signal feature is the ECG signal after weighting the first ECG signal of each lead through the attention mechanism, including: Segmenting the first electrocardiogram signal of each lead within the preset time period into second electrocardiogram signals of a plurality of time segments; Inputting the second ECG signals of the multiple time segments into a multi-head attention mechanism for attention weighting to obtain enhanced signal features corresponding to the first ECG signal of each lead; A feature mapping unit is used to map the frequency feature into a first pseudo color map, map the multi-lead consistency feature into a second pseudo color map, and map the dynamic feature and the enhanced signal feature into a third pseudo color map, specifically, Summing the first-order derivative of the first electrocardiogram signal of each lead, the second-order derivative of the first electrocardiogram signal of each lead, and the enhanced signal feature to obtain a combined feature; Mapping the combined feature into a third pseudo color; The trajectory map construction unit is used to construct a three-dimensional trajectory map based on the first pseudo-color map, the second pseudo-color map, and the third pseudo-color map. Specifically, the frequency feature is mapped into a first pseudo-color map, the multi-lead consistency feature is mapped into a second pseudo-color map, and the dynamic feature and the enhanced signal feature are mapped into a third pseudo-color map using a pseudo-color mapping function. The first pseudo-color map, the second pseudo-color map, and the third pseudo-color map are fused to construct a three-dimensional trajectory map.
7. An electronic device, characterized in that: It includes at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions that can be executed by the at least one control processor, and the instructions are executed by the at least one control processor to enable the at least one control processor to execute the electrocardiogram signal visualization enhancement method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the electrocardiogram signal visualization enhancement method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Multi-lead cardiac mapping signal analyzing and processing device and method
CN111772621A
Frequency domain pseudo-color enhanced magnetocardiogram signal feature image generation method and storage medium
CN117274117A