Electrocardiosignal reconstruction method based on hybrid optimization and multi-modal feature fusion
The method optimizes lead selection and combines multi-modal features using genetic algorithms and Transformer architecture to enhance heart signal reconstruction accuracy and sensitivity in dynamic noise environments, addressing the limitations of traditional methods.
Patent Information
- Application Number
- CN202510769820.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-10
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2045-06-10
AI Technical Summary
Traditional electrocardiogram reconstruction methods lack the ability to adaptive optimization of individualized physiological characteristics and dynamic noise environments, and it is difficult to effectively characterize the time-frequency joint characteristics and key physiological indicators of electrocardiogram signals. In addition, deep learning models have limitations in long-range timing-dependent modeling, resulting in a decrease in reconstruction accuracy and insufficient pathological sensitivity.
The hybrid optimization algorithm (genetic algorithm and simulated annealing algorithm) is used to dynamically optimize the lead combination, combined with multimodal feature fusion strategy, through linear regression, convolutional layer, continuous wavelet transformation, filtering and differential calculation, expert features are extracted using the Pan-Tompkins algorithm, and feature fusion is used for feature fusion to achieve collaborative optimization of lead selection and feature extraction.
It improves the robustness and pathological sensitivity of electrocardiogram signal reconstruction, reduces the reconstruction error under motion artifacts and noise interference, improves the accuracy of QRS wave group width and ST segment offset, and enhances signal fidelity and pathological diagnosis sensitivity.
Smart Images

Figure CN120316447A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical fields of biomedical signal processing and artificial intelligence, and particularly relates to an electrocardiogram signal reconstruction method based on hybrid optimization and multi-modal feature fusion. Background Art
[0002] Traditional electrocardiogram signal reconstruction methods face multiple technical bottlenecks in clinical applications. First, existing technologies generally rely on fixed lead combinations (such as the standard 12-lead system) and lack the ability to adaptively optimize for individual physiological characteristics and dynamic noise environments. This fixed lead selection strategy is prone to a significant decrease in reconstruction accuracy when the signal quality fluctuates or some leads are detached, especially in scenarios of motion artifacts or poor device contact. Second, existing algorithms mostly perform signal modeling based on single-modal features (such as only using time-domain waveforms or frequency-domain energy distributions), and it is difficult to effectively characterize the time-frequency joint characteristics of electrocardiogram signals and key physiological indicators (such as QRS complex morphology, ST segment deviation, etc.). Such methods often cause waveform distortion or rhythm distortion due to incomplete feature representation when dealing with complex pathological signals (such as atrial fibrillation, myocardial ischemia). In addition, traditional deep learning models (such as convolutional neural networks or recurrent neural networks) have inherent limitations in long-range temporal dependence modeling. The local receptive fields of convolutional neural networks are difficult to capture the global correlations across cycles in electrocardiogram signals (such as RR interval variability), while recurrent neural networks are limited by the problem of gradient vanishing and cannot stably model the spatio-temporal correlations of multi-lead signals in a high-noise environment. These limitations make it difficult for existing technologies to meet the dual requirements of signal fidelity and pathological sensitivity in clinical diagnosis.
[0003] In recent years, although some studies have attempted to improve the reconstruction effect by fusing multi-lead signals or introducing attention mechanisms, their core algorithms still fail to break through the separate design framework of lead selection and feature representation. For example, some methods use genetic algorithms to optimize lead combinations, but do not co-optimize with downstream feature extraction and reconstruction models, resulting in a disconnection between lead selection and the signal restoration goal; some other solutions extract time-frequency features through wavelet transforms, but ignore the explicit embedding of expert knowledge (such as QRS wave parameters), resulting in the dilution of key physiological information during the feature fusion process. Summary of the Invention
[0004] In view of the above situation, the main purpose of the present invention is to propose an electrocardiogram signal reconstruction method and system based on hybrid optimization and multi-modal feature fusion to solve the above technical problems.
[0005] The present invention proposes an electrocardiogram signal reconstruction method based on hybrid optimization and multi-modal feature fusion, and the method includes the following steps: Step 1: Obtain 12-lead ECG signals, and sequentially process the 12-lead ECG signals through a linear regression model, a genetic algorithm, and a simulated annealing algorithm to obtain the optimal three-lead ECG signals; Step 2: Sequentially process the optimal three-lead ECG signals through a one-dimensional convolutional layer and max-pooling to obtain time-domain features; Step 3: Sequentially process the optimal three-lead ECG signals through continuous wavelet transform, a two-dimensional convolutional layer, and max-pooling to obtain frequency-domain features; Step 4: Perform filtering processing and differential calculation on the optimal three-lead ECG signals respectively to obtain filtered signals and differential signals, and process the filtered signals and differential signals based on the Pan-Tompkins algorithm to obtain expert features; Step 5: Perform multi-modal feature fusion on the time-domain features, frequency-domain features, and expert features to obtain fused features; Step 6: Input the fused features into the Transformer mechanism for processing to obtain the reconstructed ECG signals.
[0006] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. The present invention increases the adaptability in the selection of leads, and the robustness is significantly improved. Traditional methods rely on fixed lead combinations, and the performance drops sharply when leads are detached or there is noise interference. The present invention dynamically optimizes the lead combination based on a hybrid heuristic algorithm (genetic algorithm and simulated annealing algorithm), and the objective function fuses the reconstruction error and the correlation between leads. In complex scenarios such as motion artifacts and electromyogram noise, it can effectively reduce the reconstruction signal error and improve the fault tolerance rate of lead failure; 2. The multi-modal feature fusion strategy of the present invention improves the pathological sensitivity. The prior art mostly relies on single-modal features, resulting in the loss of pathological details. The present invention dynamically fuses the time-domain waveform, frequency-domain energy, and QRS expert features through a cross-modal attention mechanism, and the ST segment deviation error is smaller in the reconstruction of myocardial ischemia signals; 3. The present invention achieves remarkable results in long-term time series modeling and local waveform detail optimization. Traditional CNN / RNN is limited by the local receptive field or the problem of gradient disappearance, and it is difficult to balance the global rhythm and local morphology. The present invention adopts a QRS-aware Transformer architecture, combined with multi-head self-attention and a non-linear feed-forward network, making the QRS complex width error smaller.
[0007] The additional aspects and advantages of the present invention will be partially given in the following description, partially become obvious from the following description, or be understood through the embodiments of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1The flowchart of steps of an electrocardiogram signal reconstruction method based on hybrid optimization and multi-modal feature fusion proposed by the present invention; Figure 2 The method framework diagram of an electrocardiogram signal reconstruction method based on hybrid optimization and multi-modal feature fusion proposed by the present invention. Detailed implementation manners
[0009] The embodiments of the present invention will be described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the accompanying drawings are exemplary and are only used to explain the present invention and should not be construed as a limitation of the present invention.
[0010] Referring to the following description and drawings, these and other aspects of the embodiments of the present invention will be clear. In these descriptions and drawings, some specific implementation manners in the embodiments of the present invention are specifically disclosed to represent some ways of implementing the principles of the embodiments of the present invention. However, it should be understood that the scope of the embodiments of the present invention is not limited thereto.
[0011] Please refer to Figure 1 , this embodiment provides an electrocardiogram signal reconstruction method based on hybrid optimization and multi-modal feature fusion. The method includes the following steps: Step 1: Obtain 12-lead electrocardiogram signals, and process the 12-lead electrocardiogram signals through a linear regression model, a genetic algorithm, and a simulated annealing algorithm in sequence to obtain the optimal three-lead electrocardiogram signals.
[0012] Please refer to Figure 2 , in Step 1, obtain 12-lead electrocardiogram signals, and process the 12-lead electrocardiogram signals through a linear regression model, a genetic algorithm, and a simulated annealing algorithm in sequence to obtain the optimal three-lead electrocardiogram signals, which specifically includes the following sub-steps: Obtain 12-lead electrocardiogram signals, confirm 1 target lead electrocardiogram signal to be reconstructed, and select any 3 lead electrocardiogram signals from the remaining 11 lead electrocardiogram signals as a lead combination to obtain different three-lead combinations. Input the three-lead combinations into the linear regression model for processing to obtain predicted values. There are the following relational expressions in the corresponding process: ; Among them, represents the target lead electrocardiogram signal to be reconstructed, represents the independent variable matrix including three-lead electrocardiogram signals and an intercept term, represents the regression coefficient matrix, represents the error matrix, represents the estimated value of the regression coefficient, denotes transpose, represents the predicted value; It should be noted that in Figure 2 , LR represents the linear regression model, SA represents the simulated annealing algorithm, and GA represents the genetic algorithm; the matrix has 4 columns, and for the matrix all elements in the first column are 1, which is mainly used for the intercept term to better fit the data. For the matrix the second, third, and fourth columns respectively correspond to 3 lead ECG signals selected from the remaining 11 lead ECG signals. After feature extraction, these lead ECG signals constitute the data in the second, third, and fourth columns of the matrix .
[0013] Based on 165 different three-lead combinations, the error is calculated for each three-lead combination to obtain the root mean square error. There is the following relationship in the corresponding process: ; where represents the root mean square error, represents the number of samples, represents the sample index, represents the th observed value, represents the th predicted value; Furthermore, the coefficient of determination and the Pearson correlation coefficient are added to provide a more comprehensive evaluation criterion. There is the following relationship in the corresponding process: ; where represents the coefficient of determination, represents the mean value of represents the Pearson correlation coefficient, represents the th observed value of represents the mean value of Sort the 165 three-lead combinations in ascending order of the root mean square error, and select the three-lead combinations with the lowest root mean square error in the top 20%; when the root mean square errors are similar, preferentially select the three-lead combinations with the coefficient of determination and the Pearson correlation coefficient in the top several to obtain the screened candidate three-lead combination set; Based on the genetic algorithm, combine the screened candidate three-lead combination set into the initial population, construct a fitness function based on the root mean square error, the coefficient of determination, and the Pearson correlation coefficient to obtain the fitness, and select the three-lead combination with the highest fitness as the output of the genetic algorithm. There is the following relationship in the corresponding process: ; Among them, represents the fitness; Based on the simulated annealing algorithm, the output of the genetic algorithm is locally adjusted to obtain the optimal three-lead electrocardiogram signal. There is the following relational expression during the corresponding process: ; Among them, represents the probability of accepting the new solution, represents the natural exponential function, represents the current temperature, represents the new solution, represents the current solution, represents the root mean square error value of the new solution, represents the root mean square error value of the current solution.
[0014] Step 2: The optimal three-lead electrocardiogram signal is sequentially passed through a one-dimensional convolutional layer and max pooling processing to obtain time-domain features.
[0015] In Step 2, the optimal three-lead electrocardiogram signal is sequentially passed through a one-dimensional convolutional layer and max pooling processing to obtain time-domain features, which specifically includes the following sub-steps: Perform Z-Score normalization operation on the optimal three-lead electrocardiogram signal to obtain the normalized electrocardiogram signal data. There is the following relational expression during the corresponding process: ; Among them, represents the normalized electrocardiogram signal data, represents the optimal three-lead electrocardiogram signal, represents the mean in the sample and time step dimensions, represents the standard deviation in the sample and time step dimensions; Input the normalized electrocardiogram data into the one-dimensional convolutional layer for feature extraction to obtain the output of the one-dimensional convolutional layer. There is the following relational expression during the corresponding process: ; Among them, represents the output of the one-dimensional convolutional layer, represents being processed by the activation function, represents the input channel index of the convolutional kernel, represents the set of input graphs connected to the represents the index of different objects related to the convolutional layer, represents the layer's One input graph, representing the convolutional kernel weights connecting two layers of feature maps, representing the connection bias parameter, representing a one-dimensional convolutional operation; It should be noted that in this step, the hyperbolic tangent function is used as the activation function to retain positive and negative fluctuation information; since the centralized electrocardiogram signal contains negative values, and the traditional activation functions ReLU and Sigmoid have certain limitations in electrocardiogram signal processing, where ReLU will discard negative value information, while Sigmoid will compress the output to (0, 1), destroying the symmetry of the electrocardiogram signal.
[0016] Perform a one-dimensional max pooling operation on the output of the one-dimensional convolutional layer to obtain time-domain features. The following relationship exists in the corresponding process: ; where, represents each element in the time-domain feature in, represents the output time step index, represents after the max pooling operation, represents the local index within the pooling window, represents the number of time steps covered, represents the output of the one-dimensional convolutional layer at the time step value.
[0017] Step 3: Pass the optimal three-lead electrocardiogram signal through continuous wavelet transform, two-dimensional convolutional layer, and max pooling processing in sequence to obtain frequency-domain features.
[0018] In Step 3, pass the optimal three-lead electrocardiogram signal through continuous wavelet transform, two-dimensional convolutional layer, and max pooling processing in sequence to obtain frequency-domain features, which specifically includes the following sub-steps: Perform wavelet denoising processing on the optimal three-lead electrocardiogram signal to obtain the denoised optimal three-lead electrocardiogram signal. The following relationship exists in the corresponding process: ; where, represents the wavelet coefficient after soft threshold processing, represents the original wavelet coefficient, represents the sign function, represents the universal threshold; Perform continuous wavelet transform processing on the denoised optimal three-lead electrocardiogram signal to obtain three two-dimensional time-frequency images. The following relationship exists in the corresponding process: ; where, represents the coefficient of the continuous wavelet transform at scale and time position ; represents the scale, represents the time position, represents the optimal three - lead electrocardiogram signal after noise reduction, represents consecutive time points, represents the conjugate function of the wavelet mother function, represents the pixel value of the generated two - dimensional time - frequency image at scale , time position and channel ; represents the color channel, represents being processed by the normalization function, represents the time - frequency coefficient after continuous wavelet transform, represents the red channel, represents the green channel, represents the blue channel; Fuse the three two - dimensional time - frequency images and input them into the two - dimensional convolutional layer for feature extraction to obtain the output of the two - dimensional convolutional layer. The following relational expressions exist in the corresponding process: ; where, represents the feature map output by the th convolutional kernel, represents the height of the convolutional kernel, represents the width of the convolutional kernel, represents the th convolutional kernel's weight in the th channel, represents the th channel of the input tensor, represents the bias term, represents the channel index of the input tensor, represents the index in the height direction of the convolutional kernel, represents the index in the width direction of the convolutional kernel, represents the index of the convolutional kernel, represents the output of the two - dimensional convolutional layer, represents being processed by the ReLU activation function; Perform a two - dimensional max - pooling operation on the output of the two - dimensional convolutional layer to obtain the frequency - domain features. The following relational expressions exist in the corresponding process: ; where, represents the frequency - domain features, represents the height of the pooling window, represents the width of the pooling window, represents the sliding stride.
[0019] Step 4: Filter and perform differential calculation on the optimal three-lead ECG signals respectively to obtain filtered signals and differential signals, and process the filtered signals and differential signals based on the Pan-Tompkins algorithm to obtain expert features.
[0020] In Step 4, filter and perform differential calculation on the optimal three-lead ECG signals respectively to obtain filtered signals and differential signals, and process the filtered signals and differential signals based on the Pan-Tompkins algorithm to obtain expert features, which specifically include the following sub-steps: Filter the optimal three-lead ECG signals to obtain filtered signals. The following relationship exists in the corresponding process: ; where, represents the lead the signal value at time point after low-pass filtering, represents the discrete time point, represents the window length of the low-pass filter, represents the lead the signal value at time point after high-pass filtering, represents the window length of the high-pass filter, represents the sampling frequency; Perform differential calculation on the optimal three-lead ECG signals to obtain differential signals. The following relationship exists in the corresponding process: ; where, represents the difference between the first component and the second component of the filtered signal at the th time point, represents the difference between the second component and the third component of the filtered signal at the th time point, represents the difference between the third component and the first component of the filtered signal at the th time point, represents the filtered signal value of lead 1 at time point , represents the filtered signal value of lead 2 at time point , represents the filtered signal value of lead 3 at time point , represents the differential signal at time point The signal value; It should be noted that Lead 1, Lead 2 and Lead 3 respectively correspond to the three-lead ECG signals in the optimal three-lead ECG signals.
[0021] Based on the Pan-Tompkins algorithm, the filtered signal and the differential signal are successively subjected to R peak detection operation, QRS width calculation and QRS amplitude calculation to respectively obtain the R peak position feature, the QRS width feature and the QRS amplitude feature. The following relational expressions exist in the corresponding process: ; Among them, represents an indication parameter of whether the sample in Lead is an R peak at the time point ; represents the QRS complex width of the sample in Lead at the time point ; represents the starting time point of the QRS wave, represents the ending time point of the QRS wave, represents the QRS complex amplitude of the sample in Lead at the time point ; The R peak position feature, the QRS width feature and the QRS amplitude feature are fused to obtain the expert feature sequence. The following relational expressions exist in the corresponding process: ; Among them, represents the expert feature sequence, represents the expert feature sequence in the element value, represents a parameter for distinguishing different feature types; The expert feature sequence is successively subjected to time alignment, feature splicing and dimensionality reduction mapping processing to obtain the expert feature. The following relational expressions exist in the corresponding process: ; Among them, represents the feature obtained after the time alignment operation, represents the R peak time series based on the differential signal, represents the interpolation operation, represents the comprehensive feature obtained after the feature combination operation, represents the splicing operation, represents the feature obtained after the time alignment operation of the first lead, Denotes the features obtained after the time alignment operation on the second lead, Denotes the features obtained after the time alignment operation on the third lead, Denotes the expert features, Denotes the weight matrix, Denotes the bias vector.
[0022] Step 5: Perform multi-modal feature fusion on the time-domain features, frequency-domain features, and expert features to obtain the fused features.
[0023] In Step 5, perform multi-modal feature fusion on the time-domain features, frequency-domain features, and expert features to obtain the fused features, which specifically includes the following sub-steps: Perform time alignment and feature mapping processing on the time-domain features in sequence to obtain the time-domain features after feature mapping processing. The following relational expressions exist in the corresponding process: ; Among them, Denotes the time-domain features after the time alignment operation, Denotes the target time step, Denotes the time-domain features after feature mapping processing, Denotes the first weight matrix, Denotes the first bias vector; Perform spatial flattening, dimension adjustment, time alignment, and feature mapping processing on the frequency-domain features in sequence to obtain the frequency-domain features after feature mapping processing. The following relational expressions exist in the corresponding process: ; Among them, Denotes the result of spatially expanding the frequency-domain features Denotes changing the shape of the input tensor, Denotes the number of channels, Denotes the spatial height after pooling, Denotes the spatial width after pooling, Denotes the result of dimension permutation on Denotes the result of dimension adjustment operation, Denotes the frequency-domain features after time alignment, Denotes the frequency-domain features after feature mapping processing, Denotes the second weight matrix, Denotes the second bias vector; Perform feature mapping processing on the expert features to obtain the expert features after feature mapping processing. The following relational expressions exist in the corresponding process: ; Among them, represents the expert features after feature mapping processing, represents the third weight matrix, represents the third bias vector; It should be noted that by performing feature mapping on the time-domain features, frequency-domain features, and expert features respectively, the feature dimensions of the time-domain features, frequency-domain features, and expert features are unified.
[0024] The time-domain features after feature mapping processing, the frequency-domain features after feature mapping processing, and the expert features after feature mapping processing are fused to obtain fused features. There are the following relational expressions in the corresponding process: ; Among them, represents the fused features.
[0025] Step 6: Input the fused features into the Transformer mechanism for processing to obtain the reconstructed electrocardiogram signal.
[0026] In Step 6, inputting the fused features into the Transformer mechanism for processing to obtain the reconstructed electrocardiogram signal specifically includes the following sub-steps: Configure the positional encoding for the fused features to construct a positional encoding matrix, and use the positional encoding matrix to perform an embedding operation on the fused features to obtain the fused features with fused positional encoding. There are the following relational expressions in the corresponding process: ; Among them, represents the fused features with fused positional encoding, represents the time positional encoding, represents the spatial positional encoding, represents the QRS perception encoding; Based on the multi-head self-attention mechanism, process the fused features with fused positional encoding to obtain the feature vector processed by the multi-head self-attention mechanism. The fused features with fused positional encoding and the feature vector processed by the multi-head self-attention mechanism are successively subjected to residual connection and layer normalization processing to obtain the intermediate feature vector. There are the following relational expressions in the corresponding process: ; Among them, represents the intermediate feature vector, represents the result of layer normalization processing, represents the feature vector processed by the multi-head self-attention mechanism; The intermediate feature vector is input into a feedforward neural network for processing to obtain the output of the feedforward neural network. The outputs of the feedforward neural network are stacked in multiple layers to obtain the features processed by the Transformer mechanism. The following relational expressions exist in the corresponding process: ; Among them, represents the output of the feedforward neural network, represents the fifth weight matrix, represents the fifth bias vector, represents the fifth weight matrix, represents the fifth bias vector; The outputs of the feedforward neural network are stacked in multiple layers to obtain the features processed by the Transformer mechanism. The features processed by the Transformer mechanism are sequentially subjected to linear projection, time truncation, and amplitude calibration processing to obtain the reconstructed electrocardiogram signal. The following relational expressions exist in the corresponding process: ; Among them, represents the output of the linear projection, represents the features processed by the Transformer mechanism, represents the sixth weight matrix, represents the sixth bias vector, represents the output after the time truncation operation, represents the actual length of the original signal, represents the reconstructed electrocardiogram signal, represents the scaling factor for each lead, represents element-wise multiplication, represents the bias term for each lead; Furthermore, to verify the reconstruction effect, the original electrocardiogram signal and the reconstructed electrocardiogram signal are calculated for the mean squared error to obtain the mean squared error. The following relational expressions exist in the corresponding process: ; Among them, represents the mean squared error, represents the total number of time steps, represents the value of the original electrocardiogram signal at time , represents the value of the reconstructed electrocardiogram signal at time .
[0027] It should be noted that by calculating the mean square error, the overall difference between the reconstructed electrocardiogram signal and the original electrocardiogram signal over the entire time range can be intuitively understood. By minimizing the mean square error, the reconstructed electrocardiogram signal can retain the characteristics and information of the original electrocardiogram signal to the greatest extent, thereby providing a reliable data basis for subsequent analysis, diagnosis and other applications.
[0028] It should be understood that although the steps in the flowcharts of the embodiments of the present invention are shown sequentially in the direction of the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in each embodiment may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same moment, but can be executed at different moments. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or sub-steps or stages of other steps.
[0029] It should be understood that each part of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one or a combination of the following technologies well known in the art can be used: discrete logic circuits with logic gate circuits for implementing logical functions on data signals, application specific integrated circuits with appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
[0030] In the description of this specification, the descriptions referring to terms such as "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" etc. mean that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in a suitable manner in any one or more embodiments or examples.
[0031] The above-described embodiments only represent several implementation manners of the present invention, and the descriptions thereof are relatively specific and detailed, but should not be construed as a limitation to the scope of the patent of the present invention. It should be pointed out that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can still be made, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention should be subject to the appended claims.
Claims
1. A method for reconstructing electrocardiogram signals based on hybrid optimization and multi-modal feature fusion, characterized in that, The method includes the following steps: Step 1: Obtain 12-lead electrocardiogram (ECG) signals, and sequentially process the 12-lead ECG signals through a linear regression model, a genetic algorithm, and a simulated annealing algorithm to obtain the optimal three-lead ECG signals; Step 2: Sequentially process the optimal three-lead ECG signals through a one-dimensional convolutional layer and max pooling to obtain time-domain features; Step 3: Sequentially process the optimal three-lead ECG signals through continuous wavelet transform, a two-dimensional convolutional layer, and max pooling to obtain frequency-domain features; Step 4: Respectively perform filtering processing and differential calculation on the optimal three-lead ECG signals to respectively obtain filtered signals and differential signals, and process the filtered signals and differential signals based on the Pan-Tompkins algorithm to obtain expert features; Step 5: Perform multi-modal feature fusion on the time-domain features, frequency-domain features, and expert features to obtain fused features; Step 6: Input the fused features into a Transformer mechanism for processing to obtain reconstructed ECG signals.
2. The electrocardiogram signal reconstruction method based on hybrid optimization and multimodal feature fusion according to claim 1, wherein In Step 1, to obtain 12-lead ECG signals and sequentially process the 12-lead ECG signals through a linear regression model, a genetic algorithm, and a simulated annealing algorithm to obtain the optimal three-lead ECG signals, it specifically includes the following sub-steps: Obtain 12-lead ECG signals, confirm 1 target lead ECG signal to be reconstructed, select any 3 lead ECG signals from the remaining 11 lead ECG signals as a lead combination to obtain 165 different three-lead combinations, input the three-lead combinations into a linear regression model for processing to obtain predicted values; Based on the 165 different three-lead combinations, calculate the error for each three-lead combination to obtain the root mean square error; Sort the 165 three-lead combinations in ascending order of the root mean square error, and select the three-lead combinations with the lowest root mean square error in the top 20%; when the root mean square errors are similar, preferentially select the three-lead combinations with the top several values of the coefficient of determination and Pearson correlation coefficient to obtain a screened candidate three-lead combination set; Based on the genetic algorithm, combine the screened candidate three-lead combination set into an initial population, construct a fitness function based on the root mean square error, coefficient of determination, and Pearson correlation coefficient to obtain fitness, and select the three-lead combination with the highest fitness as the output of the genetic algorithm; Perform local adjustment on the output of the genetic algorithm based on the simulated annealing algorithm to obtain the optimal three-lead ECG signals.
3. The electrocardiogram signal reconstruction method based on hybrid optimization and multi-modal feature fusion according to claim 2, wherein Obtain a 12-lead electrocardiogram (ECG) signal, confirm a target lead ECG signal to be reconstructed, and select any three lead ECG signals from the remaining 11 lead ECG signals as a lead combination to obtain different three-lead combinations. Input the three-lead combinations into a linear regression model for processing to obtain predicted values. There are the following relational expressions in the corresponding process: ; Among them, represents the target lead ECG signal to be reconstructed, represents the independent variable matrix containing the three-lead ECG signal and the intercept term, represents the regression coefficient matrix, represents the error matrix, represents the estimated value of the regression coefficient, represents the transpose, represents the predicted value; In the step of calculating the error for each of the 165 different three-lead combinations to obtain the root mean square error, there are the following relationships in the corresponding process: ; Among them, represents the root mean square error, represents the number of samples, represents the sample index, represents the th observation, represents the th predicted value; In the step of combining the screened candidate three-lead combination set into an initial population based on the genetic algorithm, constructing a fitness function based on the root mean square error, coefficient of determination, and Pearson correlation coefficient to obtain fitness, and selecting the three-lead combination with the highest fitness as the output of the genetic algorithm, there are the following relationships in the corresponding process: ; Among them, represents fitness, represents the coefficient of determination, represents the Pearson correlation coefficient; In the step of performing local adjustment on the output of the genetic algorithm based on the simulated annealing algorithm to obtain the optimal three-lead ECG signals, there are the following relationships in the corresponding process: ; Among them, represents the probability of accepting a new solution, represents the natural exponential function, represents the current temperature, represents the new solution, represents the current solution, represents the root mean square error value of the new solution, represents the root mean square error value of the current solution.
4. The electrocardiogram signal reconstruction method based on hybrid optimization and multi-modal feature fusion according to claim 3, characterized in that In the said step 2, the optimal three-lead electrocardiogram (ECG) signal is successively passed through a one-dimensional convolutional layer and max-pooling processing to obtain time-domain features, which specifically include the following sub-steps: Perform Z-Score normalization operation on the optimal three-lead ECG signal to obtain the normalized ECG signal data. The following relational expression exists during the corresponding process: ; Among them, represents the normalized electrocardiogram signal data, represents the optimal three-lead electrocardiogram signal, represents the mean value in the sample and time step dimensions, represents the standard deviation in the sample and time step dimensions; Input the normalized ECG data into the one-dimensional convolutional layer for feature extraction to obtain the output of the one-dimensional convolutional layer. The following relational expression exists during the corresponding process: ; Among them, represents the output of the one-dimensional convolutional layer, represents being processed by the activation function, represents the input channel index of the convolutional kernel, represents the set of input graphs connected to the represents the index of different objects related to the convolutional layer, represents the th input graph of the represents the convolutional kernel weight connecting the feature maps of two layers, represents the connection bias parameter, represents the one-dimensional convolutional operation; Perform one-dimensional max-pooling operation on the output of the one-dimensional convolutional layer to obtain time-domain features. The following relational expression exists during the corresponding process: ; Among them, represents each element in the time-domain feature , represents the output time-step index, represents the result after the max pooling operation, represents the local index within the pooling window, represents the number of covered time steps, represents the output of the one-dimensional convolutional layer at the time step .
5. The electrocardiogram signal reconstruction method based on hybrid optimization and multimodal feature fusion according to claim 4, characterized in that In the said step 3, the optimal three-lead ECG signal is successively passed through continuous wavelet transform, two-dimensional convolutional layer and max-pooling processing to obtain frequency-domain features, which specifically include the following sub-steps: Perform wavelet denoising processing on the optimal three-lead ECG signal to obtain the denoised optimal three-lead ECG signal; Perform continuous wavelet transform processing on the denoised optimal three-lead ECG signal to obtain three two-dimensional time-frequency images; Fuse the three two-dimensional time-frequency images and input them into the two-dimensional convolutional layer for feature extraction to obtain the output of the two-dimensional convolutional layer; Perform two-dimensional max-pooling operation on the output of the two-dimensional convolutional layer to obtain frequency-domain features.
6. The electrocardiogram signal reconstruction method based on hybrid optimization and multi-modal feature fusion according to claim 5, characterized in that, Perform wavelet denoising processing on the optimal three-lead ECG signal to obtain the denoised optimal three-lead ECG signal. The following relational expression exists during the corresponding process: ; Among them, represents the wavelet coefficients after soft thresholding, represents the original wavelet coefficients, represents the sign function, represents the universal threshold; In the step of performing continuous wavelet transform processing on the denoised optimal three-lead ECG signal to obtain three two-dimensional time-frequency images, the following relational expression exists during the corresponding process: ; Among them, represents the coefficient of the continuous wavelet transform at scale and time position ; represents the scale, represents the time position, represents the optimal three-lead electrocardiogram signal after noise reduction, represents consecutive time points, represents the conjugate function of the wavelet mother function, represents the pixel value of the generated two-dimensional time-frequency image at scale , time position and channel ; represents the color channel, represents being processed by the normalization function, represents the time-frequency coefficient after continuous wavelet transform, represents the red channel, represents the green channel, represents the blue channel; In the step of fusing the three two-dimensional time-frequency images and inputting them into the two-dimensional convolutional layer for feature extraction to obtain the output of the two-dimensional convolutional layer, the following relational expression exists during the corresponding process: ; Among them, represents the feature map output by the th convolutional kernel, represents the height of the convolutional kernel, represents the width of the convolutional kernel, represents the th convolutional kernel's weight in the th channel, represents the th channel of the input tensor, represents the bias term, represents the channel index of the input tensor, represents the index in the height direction of the convolutional kernel, represents the index in the width direction of the convolutional kernel, represents the index of the convolutional kernel, represents the output of the 2D convolutional layer, represents being processed by the ReLU activation function; In the step of performing two-dimensional max-pooling operation on the output of the two-dimensional convolutional layer to obtain frequency-domain features, the following relational expression exists during the corresponding process: ; Among them, represents the frequency domain feature, represents the height of the pooling window, represents the width of the pooling window, represents the sliding stride.
7. The electrocardiogram signal reconstruction method based on hybrid optimization and multimodal feature fusion according to claim 6, wherein In the said step 4, the optimal three-lead ECG signal is respectively subjected to filtering processing and differential calculation to obtain a filtered signal and a differential signal, and the filtered signal and the differential signal are processed based on the Pan-Tompkins algorithm to obtain expert features, which specifically include the following sub-steps: Perform filtering processing on the optimal three-lead ECG signal to obtain a filtered signal; Perform differential calculation on the optimal three-lead ECG signal to obtain a differential signal; Based on the Pan-Tompkins algorithm, successively perform R-peak detection operation, QRS width calculation and QRS amplitude calculation on the filtered signal and the differential signal to respectively obtain R-peak position features, QRS width features and QRS amplitude features; Fuse the R-peak position features, QRS width features and QRS amplitude features to obtain an expert feature sequence; Successively pass the expert feature sequence through time alignment, feature splicing and dimensionality reduction mapping processing to obtain expert features.
8. The electrocardiogram signal reconstruction method based on hybrid optimization and multi-modal feature fusion according to claim 7, characterized in that Perform filtering processing on the optimal three-lead ECG signal to obtain a filtered signal. The following relational expression exists during the corresponding process: ; Among them, represents the lead the signal value after low-pass filtering at time point ; represents discrete time points, represents the window length of low-pass filtering, represents the lead the signal value after high-pass filtering at time point ; represents the window length of high-pass filtering, represents the sampling frequency; In the step of performing differential calculation on the optimal three-lead ECG signal to obtain a differential signal, the following relational expression exists during the corresponding process: ; Among them, represents the difference between the first component and the second component of the filtered signal at the th time point, represents the difference between the second component and the third component of the filtered signal at the th time point, represents the difference between the third component and the first component of the filtered signal at the th time point, represents the filtered signal value of lead 1 at time point , represents the filtered signal value of lead 2 at time point , represents the filtered signal value of lead 3 at time point , represents the differential signal at time point ; In the step of performing R-peak detection operations, QRS width calculation, and QRS amplitude calculation on the filtered signal and the differential signal in sequence based on the Pan-Tompkins algorithm to obtain the R-peak position feature, QRS width feature, and QRS amplitude feature respectively, the following relational expressions exist in the corresponding process: ; Among them, indicates whether the sample in the lead at the time point is an indication parameter of the R peak, indicates the QRS complex width of the sample in the lead at the time point ; indicates the starting time point of the QRS complex, indicates the ending time point of the QRS complex, indicates the QRS complex amplitude of the sample in the lead at the time point ; In the step of fusing the R-peak position feature, QRS width feature, and QRS amplitude feature to obtain the expert feature sequence, the following relational expressions exist in the corresponding process: ; Among them, represents the expert feature sequence, represents the expert feature sequence the element value in; represents a parameter used to distinguish different feature types; In the step of sequentially passing the expert feature sequence through time alignment, feature splicing, and dimensionality reduction mapping processing to obtain the expert feature, the following relational expressions exist in the corresponding process: ; Among them, represents the feature obtained after the time alignment operation, represents the R-peak time series based on the differential signal, represents after the interpolation operation, represents the comprehensive feature obtained after the feature combination operation, represents after the concatenation operation, represents the feature obtained after the time alignment operation for the first lead, represents the feature obtained after the time alignment operation for the second lead, represents the feature obtained after the time alignment operation for the third lead, represents the expert feature, represents the weight matrix, represents the bias vector.
9. The electrocardiogram signal reconstruction method based on hybrid optimization and multi-modal feature fusion according to claim 8, characterized in that, In step 5, perform multi-modal feature fusion on the time-domain feature, frequency-domain feature, and expert feature to obtain the fused feature, which specifically includes the following sub-steps: Pass the time-domain feature through time alignment and feature mapping processing in sequence to obtain the processed time-domain feature. The following relational expressions exist in the corresponding process: ; Among them, represents the time-domain feature after time alignment operation, represents the target time step, represents the time-domain feature after feature mapping processing, represents the first weight matrix, represents the first bias vector; Pass the frequency-domain feature through spatial flattening, dimension adjustment, time alignment, and feature mapping processing in sequence to obtain the frequency-domain feature after feature mapping processing. The following relational expressions exist in the corresponding process: ; Among them, represents the result after expanding the frequency-domain features in the spatial dimension, represents changing the shape of the input tensor, represents the number of channels, represents the spatial height after pooling, represents the spatial width after pooling, represents the result after performing dimension permutation, represents after the dimension adjustment operation, represents the frequency-domain features after time alignment, represents the frequency-domain features after feature mapping processing, represents the second weight matrix, represents the second bias vector; Perform feature mapping processing on the expert feature to obtain the expert feature after feature mapping processing. The following relational expressions exist in the corresponding process: ; Among them, represents the expert features after feature mapping processing, represents the third weight matrix, represents the third bias vector; Fuse the time-domain feature after feature mapping processing, the frequency-domain feature after feature mapping processing, and the expert feature after feature mapping processing to obtain the fused feature. The following relational expressions exist in the corresponding process: ; Among them, represents the fusion feature.
10. The electrocardiogram signal reconstruction method based on hybrid optimization and multimodal feature fusion according to claim 9, wherein In step 6, input the fused feature into the Transformer mechanism for processing to obtain the reconstructed electrocardiogram signal, which specifically includes the following sub-steps: Configure the positional encoding for the fused feature to construct the positional encoding matrix, and use the positional encoding matrix to perform an embedding operation on the fused feature to obtain the fused feature with fused positional encoding. The following relational expressions exist in the corresponding process: ; Among them, represents the fusion feature of the fusion position encoding, represents the time position encoding, represents the space position encoding, represents the QRS sensing encoding; Process the fused feature with fused positional encoding based on the multi-head self-attention mechanism to obtain the feature vector after the multi-head self-attention mechanism processing. Pass the fused feature with fused positional encoding and the feature vector after the multi-head self-attention mechanism processing through residual connection and layer normalization processing in sequence to obtain the intermediate feature vector. The following relational expressions exist in the corresponding process: ; Among them, represents the intermediate feature vector, represents being processed by layer normalization, represents the feature vector after being processed by the multi-head self-attention mechanism; Input the intermediate feature vector into the feed-forward neural network for processing to obtain the output of the feed-forward neural network. The following relational expressions exist in the corresponding process: ; Among them, represents the output of the feedforward neural network, represents the fifth weight matrix, represents the fifth bias vector, represents the fifth weight matrix, represents the fifth bias vector; Stack the outputs of the feed-forward neural network multiple times to obtain the feature after the Transformer mechanism processing. Pass the feature after the Transformer mechanism processing through linear projection, time truncation, and amplitude calibration processing in sequence to obtain the reconstructed electrocardiogram signal. The following relational expressions exist in the corresponding process: ; Among them, represents the output of the linear projection, represents the feature after being processed by the Transformer mechanism, represents the sixth weight matrix, represents the sixth bias vector, represents the output after the time truncation operation, represents the actual length of the original signal, represents the reconstructed electrocardiogram signal, represents the scaling factor for each lead, represents the element-wise multiplication, represents the bias term for each lead.
Citation Information
Patent Citations
Multi-lead electrocardiogram classification and identification method based on convolution and self-attention mechanism
CN115470828A
Twelve-lead electrocardiosignal automatic classification method based on double attention mechanism
CN115568860A
Electrocardiosignal classification method based on time-frequency domain fusion and convolutional neural network
CN116746942A
Electrocardiogram compressed sensing method and system based on attention mechanism and time-space fusion
CN118370545A
Heartbeat tag data sequence generation method and apparatus based on multi-lead electrocardiogram signal
WO2022073374A1
Cited By
STEMI and NSTEMI automatic identification method and system based on multi-modal deep learning
CN120579072A
Long-sequence electrocardiosignal disease recognition system based on Transform architecture
CN120983046A
Long sequence electrocardiogram signal disease recognition system based on transformer architecture
CN120983046B
Electrocardio lead reconstruction method based on multi-domain feature interaction and clinical semantic regulation
CN122320566A