Myocardial infarction diagnosis system based on deep federated transfer learning
The myocardial infarction diagnosis system based on deep federated transfer learning, which utilizes ECG signal preprocessing, spatiotemporal feature extraction, and federated transfer training modules, solves the problems of data privacy and individual differences in myocardial infarction diagnosis and achieves high-precision personalized diagnosis.
Patent Information
- Application Number
- CN202510762822.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-09
- Publication Date
- 2025-09-12
AI Technical Summary
Existing technologies cannot effectively utilize distributed ECG data from wearable devices in the diagnosis of myocardial infarction due to restrictions on data privacy regulations, making personalized diagnosis difficult to achieve, and traditional centralized training methods are difficult to overcome individual differences among patients.
A myocardial infarction diagnosis system based on deep federated transfer learning is adopted. The ECG signal preprocessing module removes noise, locates and repairs the signal, the spatiotemporal feature extraction module processes the timing and physiological space information in parallel, and the federated transfer training module dynamically weights and aggregates local model parameters to generate a global myocardial infarction diagnosis model.
Under the premise of protecting patient privacy, it effectively overcomes individual differences, achieves high-precision and personalized diagnosis of myocardial infarction, and improves diagnostic accuracy and efficiency.
Smart Images

Figure CN120636768A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of myocardial infarction diagnosis, and in particular relates to a myocardial infarction diagnosis system based on deep federated transfer learning. Background Art
[0002] With the widespread adoption of wearable ECG monitoring technology, demand for remote diagnosis of myocardial infarction based on 12-lead electrocardiogram (ECG) signals is growing. The core goal of wearable ECG diagnostic systems tailored to individual patients is to rapidly adapt to individual physiological characteristics and provide personalized, highly accurate diagnostic results. This requires diagnostic models to robustly address individual patient variability. This variability primarily stems from factors such as a patient's unique cardiac physiology, age, pathological conditions, and the dynamic nature of daily data collection. To achieve both universal applicability and personalization, models have traditionally relied on centralized training, collecting and integrating ECG data from a large, diverse user base on a centralized server to enhance the model's generalization capabilities to account for individual differences. However, this centralized training paradigm faces significant challenges: wearable devices are distributed across different users, regions, or medical institutions, generating user ECG data that is inherently distributed. Due to strict patient privacy regulations (e.g., compliance with HIPAA, GDPR, and other data privacy regulations), this sensitive health data stored on these devices cannot be shared or transmitted to a centralized server, creating insurmountable "data silos."
[0003] Therefore, under the rigid constraints of data privacy regulations, traditional methods that rely on centralized big data training are unable to effectively utilize decentralized local data for personalized model training. Summary of the Invention
[0004] Based on this, it is necessary to provide a myocardial infarction diagnosis system based on deep federated transfer learning to address the above technical problems. It can effectively overcome the individual differences caused by scattered data while protecting patient privacy, and achieve high-precision and personalized myocardial infarction diagnosis for different patients.
[0005] In the first aspect, the present application provides a myocardial infarction diagnosis system based on deep federated transfer learning, including an electrocardiogram signal preprocessing module, a spatiotemporal feature extraction module, a federated transfer training module, and a myocardial infarction diagnosis module:
[0006] The ECG signal preprocessing module is used to perform noise location and repair processing on the acquired original ECG signal to obtain a high-quality ECG signal; wherein the original ECG signal comes from the client device;
[0007] The spatiotemporal feature extraction module is used to input high-quality ECG signals into a dual-channel deep neural network to extract spatiotemporal fusion features. The dual-channel deep neural network is used to parallelly process the timing information and physiological space information of high-quality ECG signals.
[0008] A federated transfer training module is used to dynamically weight and aggregate the model parameters of the acquired local myocardial infarction diagnosis model to obtain updated parameters. The updated parameters are used to train the global myocardial infarction diagnosis model. The local myocardial infarction diagnosis model is trained by the client device based on local ECG signal data.
[0009] The myocardial infarction diagnosis module is used to input the acquired target ECG data into the global myocardial infarction diagnosis model to obtain the myocardial infarction diagnosis result.
[0010] In a possible embodiment, the ECG signal preprocessing module is configured to perform the following steps:
[0011] The original ECG signal is cleaned by a preset composite filter to obtain a preliminary denoised signal; wherein the composite filter includes a high-pass filter and a notch filter;
[0012] Perform discrete wavelet transform on the preliminary denoised signal and extract the wavelet coefficients;
[0013] The EDWT quality curve is constructed based on the mean absolute deviation of the wavelet coefficients;
[0014] Perform contour detection on the preliminary denoised signal based on the preset ECG contour detection algorithm and calculate the segmentation threshold;
[0015] The preliminary denoised signal corresponding to the EDWT quality curve is segmented and marked according to the segmentation threshold to obtain a first signal and a second signal; wherein the first signal is a high-quality ECG signal and the second signal is a signal to be processed;
[0016] The second signal is repaired, the unrepairable segments are removed and the repairable segments are smoothly connected to output a high-quality ECG signal.
[0017] In a possible embodiment, constructing an EDWT quality curve based on the mean absolute deviation of wavelet coefficients includes:
[0018] The signal quality evaluation value of the preliminary denoised signal is calculated using the following formula, and the signal quality evaluation values are sequentially spliced to form the EDWT quality curve:
[0019]
[0020] Among them, E iis the signal quality evaluation value of the ith subsequence of the preliminary denoised signal, d is the number of decomposition layers of discrete wavelet transform, m is the maximum number of decomposition layers of discrete wavelet transform, F is the sampling frequency of the preliminary denoised signal, f noise is the noise frequency, β i,d is the decomposition coefficient of the ith subsequence of the preliminary denoised signal at the dth layer, min(·,1) is the minimum value function, is the floor function.
[0021] In a possible embodiment, performing data repair on the second signal, removing unrepairable segments and smoothly connecting repairable segments to output a high-quality ECG signal includes:
[0022] The second signal is subjected to QRS region-shielded steady-state wavelet transform for denoising to obtain a preliminary repaired ECG signal;
[0023] Generate a repair EDWT curve based on the preliminary repair ECG signal, perform secondary segmentation labeling based on the repair EDWT curve, and divide the preliminary repair ECG signal into QL1 segment, QL2 segment, and QL3 segment. Among them, QL1 segment is the first repairable segment, QL2 segment is the second repairable segment, and QL3 segment is the unrepairable segment.
[0024] The QL1 segment and the QL2 segment are smoothly connected through local morphological filtering to output high-quality ECG signals.
[0025] In a possible embodiment, the QL1 segment and the QL2 segment are smoothly connected by local morphological filtering to output a high-quality ECG signal, including:
[0026] Perform morphological closing operation on QL1 segment and QL2 segment based on one-dimensional linear structure unit to obtain closing operation result;
[0027] Perform morphological opening operation on QL1 segment and QL2 segment based on one-dimensional linear structure unit to obtain the opening operation result;
[0028] The arithmetic average of the closing operation results and the opening operation results is performed to generate a smooth signal sequence, which is used to connect the QL1 segment and the QL2 segment to obtain a high-quality ECG signal.
[0029] In a possible embodiment, the spatiotemporal feature extraction module includes:
[0030] The spatial domain graph convolution submodule includes a cascaded graph convolution layer, a batch normalization layer, and a random dropout layer. The graph convolution layer is used to extract spatial correlation features based on the topological structure of the original ECG signal;
[0031] The time domain convolution submodule includes a cascaded time domain convolution layer, a batch normalization layer, and a rectified linear unit activation layer. The time domain convolution layer is used to capture the dynamic time domain features of the ECG signal waveform through a sliding window;
[0032] The attention weighted fusion submodule includes a sequentially connected feature splicing layer, a multi-head self-attention layer, a residual connection layer, and a layer normalization layer. The attention weighted fusion submodule is used to fuse spatial correlation features with dynamic temporal features and output spatiotemporal fusion features;
[0033] The classification output submodule includes a CORAL domain adaptation layer and a Softmax classifier. The CORAL domain adaptation layer is used to perform cross-domain distribution alignment on spatiotemporal fusion features, and the Softmax classifier is used to output the probability of myocardial infarction diagnosis.
[0034] In one possible embodiment, the spatial graph convolution submodule is used to perform the following steps:
[0035] Each lead of the original ECG signal is used as a graph node, and the time domain features are extracted through a one-dimensional convolutional layer to generate a node feature set. The original ECG signal is a 12-lead ECG signal.
[0036] Lead affiliation was divided based on the pathological area of myocardial infarction, specifically: leads I, aVL, and V1 to V6 were grouped as the anterior and lateral wall groups and fully connected within the group, with lead V1 directly connected to leads V2, aVL, and I; leads II, III, aVF, and aVR were grouped as the inferior wall group and connected in a closed loop;
[0037] Obtain the three-dimensional spatial coordinates of each lead, calculate the Euclidean distance between the leads, and map the Euclidean distance to spatial similarity using radial basis function;
[0038] The adjacency matrix is constructed by combining the anatomical grouping connectivity and spatial similarity weights;
[0039] The node feature set and the adjacency matrix are combined into graph structure data, and a graph convolution operation is performed on the graph structure data to obtain spatial correlation features that characterize the physiological correlation between leads.
[0040] In one possible embodiment, the federated transfer training module includes:
[0041] A central server-side initialization submodule is used to pre-train a global initial myocardial infarction diagnosis model based on a public ECG dataset and distribute the global initial myocardial infarction diagnosis model to multiple client devices;
[0042] The client local training submodule is used to instruct each client device to train and update local model parameters using local ECG signal data, generate a local myocardial infarction diagnosis model, and transmit the updated model parameters back to the central server;
[0043] The central server-side aggregation submodule is used to dynamically weight and aggregate the model parameters obtained from each client device to update the global initial myocardial infarction diagnosis model to obtain a global myocardial infarction diagnosis model;
[0044] The dynamic migration feedback submodule is used to feed back the optimized model parameters to each IoT client device based on the migration strategy of dynamic adversarial domain adaptation.
[0045] In a possible embodiment, the dynamic migration feedback submodule is configured to perform the following steps:
[0046] The public ECG dataset used for pre-training on the central server is determined as the source domain patient data. The feature center of each myocardial infarction category in the source domain patient data is calculated to obtain the source domain category feature center vector.
[0047] Determine the local ECG signal data of the client device as the new patient data in the target domain, calculate the feature center of each myocardial infarction category in the new patient data in the target domain, and obtain the target domain category feature center vector;
[0048] Based on the source domain category feature center vector and the target domain category feature center vector, the semantic alignment loss is calculated to obtain the semantic alignment loss value;
[0049] Based on the parameter distribution of the global initial myocardial infarction diagnosis model and the parameter distribution of the local myocardial infarction diagnosis model, a structural alignment loss is calculated to obtain a structural alignment loss value;
[0050] Based on the semantic alignment loss value and the structural alignment loss value, the model parameters are optimized to obtain the migrated optimized model parameters and feed them back to the client device.
[0051] In a possible embodiment, the central server-side aggregation submodule is configured to perform the following steps:
[0052] Each client device performs model training based on local ECG signal data to generate updated local model weights;
[0053] Based on the local validation set of each client device, the myocardial infarction classification accuracy is calculated to obtain the classification accuracy value of each client device;
[0054] Based on the classification accuracy value and the data volume of local ECG signal data, dynamic weighted aggregation is performed to update the global initial myocardial infarction diagnosis model to obtain a global myocardial infarction diagnosis model.
[0055] The aforementioned myocardial infarction diagnosis system based on deep federated transfer learning uses an ECG signal preprocessing module to locate and repair noise in the original signal, generating high-quality ECG signals. The spatiotemporal feature extraction module uses a dual-channel deep neural network to parallelly process the signal's temporal and physiological spatial information to extract spatiotemporal fusion features. The federated transfer training module dynamically weights and aggregates the parameters of the local myocardial infarction diagnosis model trained locally on the client, generating updated parameters to train the global myocardial infarction diagnosis model. The myocardial infarction diagnosis module outputs diagnostic results based on the global model. This technical solution integrates distributed ECG data resources through a federated collaborative framework, combined with a spatiotemporal feature fusion mechanism, effectively overcoming the individual differences caused by dispersed data and achieving high-precision, personalized myocardial infarction diagnosis for different patients. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0057] Figure 1 This is a schematic diagram of the structure of a myocardial infarction diagnosis system based on deep federated transfer learning provided by the present invention;
[0058] Figure 2 This is a flow chart of a data preprocessing method in the ECG signal preprocessing module provided by the present invention. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0060] First, a brief introduction is given to the terms involved in the embodiments of this application.
[0061] The ECG signal is a record of the potential changes of the heart's electrical activity in the time dimension collected by surface electrodes. Its waveform characteristics directly reflect the depolarization and repolarization process of myocardial cells and are important physiological parameters for the clinical diagnosis of heart disease. Among them, the 12-lead ECG signal is a standard clinical monitoring method. By synchronously collecting electrical signals from 12 anatomical sites including the chest (V1-V6), limbs (I, II, III) and pressurized limbs (aVR, aVL, aVF), a multi-dimensional projection of cardiac electrical activity is constructed, thereby comprehensively capturing the potential change characteristics of different areas of the heart. This multi-lead collaborative acquisition mechanism can overcome the visual field limitations of single-lead monitoring, provide a spatial distribution-level diagnostic basis for pathological conditions such as myocardial ischemia and infarction, and is the core data foundation for intelligent analysis of cardiovascular diseases.
[0062] A deep neural network is a computational model that abstracts and recognizes high-dimensional data features through multi-layer nonlinear transformations. It adaptively learns the inherent patterns of data through a backpropagation algorithm. In this system, a dual-channel deep neural network architecture, through independent feature extraction channels deployed in parallel, focuses on collaborative learning of the dynamic temporal evolution of ECG signals and physiological spatial correlation features, overcoming the limitations of single-channel architectures in fusing heterogeneous temporal and spatial features. This dual-channel collaborative mechanism enhances the ability to jointly model multidimensional pathological representations of ECG signals without increasing model complexity, providing more comprehensive feature support for the accurate diagnosis of myocardial infarction.
[0063] The discrete wavelet transform is a time-frequency analysis tool based on wavelet basis functions. It uses multi-scale decomposition to jointly locate the signal in the time and frequency dimensions, thereby extracting local features of non-stationary signals (such as electrocardiogram signals). Its core lies in performing convolution operations on discrete sampled signals using scaled and translated wavelet basis functions, decomposing the approximate coefficients and detail coefficients representing the components of different frequency bands layer by layer. In this system, this method constructs a frequency-adaptive quality assessment curve by extracting the multi-scale detail coefficients of the signal, providing multi-resolution analysis support for the location of motion artifact noise in the electrocardiogram signal, and is a key preprocessing technology for improving the quality of myocardial infarction diagnostic data.
[0064] The EDWT (Enhanced Discrete Wavelet Transform) quality curve is an enhanced signal quality quantification tool based on the discrete wavelet transform. It extracts detail coefficients from the ECG signal through multi-scale decomposition and dynamically generates a frequency-adaptive quality assessment sequence based on its mean absolute deviation. This curve continuously maps the noise contamination level of each signal segment in the time dimension, enabling precise location and quantitative assessment of non-stationary noise such as motion artifacts. This provides a basis for segmented quality labeling for subsequent signal restoration, significantly improving the targeted and reliable noise removal during ECG signal preprocessing.
[0065] The QRS region is the core waveform segment in the ECG signal that represents the ventricular myocardial depolarization process. It is composed of the Q wave (initial negative wave), the R wave (the first positive main wave), and the S wave (the negative wave after the R wave), and presents a high-amplitude narrow wave morphology (normal width 60-100ms). This region contains the initial electrical activity characteristics of ventricular contraction. Its waveform amplitude, duration, and morphological variation are key pathological hallmarks for diagnosing myocardial ischemia, infarction, and arrhythmias. In signal preprocessing, the shielding operation of the QRS region is intended to prevent noise repair algorithms from interfering with this core pathological feature segment, ensuring that the waveform integrity for myocardial infarction diagnosis is not compromised.
[0066] Based on the above explanations, the embodiment of this application provides a myocardial infarction diagnosis system 10 based on deep federated transfer learning. Schematically, the implementation environment includes: sensors, terminals, and processors. The terminals are connected to the sensors and processors via a network; the sensors include, but are not limited to, 12-lead ECG patches, wearable ECG monitors, smart bracelet ECG modules, and clinical-grade 12-lead ECG machines; and the processor can be a central processing unit, a graphics processing unit, a neural network processor, or a multi-core processor, without limitation here.
[0067] In combination with the above-mentioned explanations of terms and implementation environments, the application scenarios of the embodiments of this application are described. A myocardial infarction diagnosis system 10 based on deep federated transfer learning provided in the embodiments of this application can be applied in, but not limited to, the following scenarios:
[0068] In the hospital myocardial infarction diagnosis scenario, the system's ECG signal preprocessing module 11 can first perform noise reduction and repair processing on the original ECG signals collected by various equipment in the hospital to obtain high-quality ECG signals. The spatiotemporal feature extraction module 12 then inputs these signals into a dual-channel deep neural network to extract spatiotemporal fusion features containing temporal and physiological space information. The federated migration training module 13 can dynamically weight and aggregate the local diagnostic model parameters trained by each department and ward based on local ECG signal data to update the global model parameters. Based on this global model, the myocardial infarction diagnosis module 14 can quickly and accurately diagnose myocardial infarction, provide important reference for clinicians, effectively improve the accuracy and efficiency of myocardial infarction diagnosis in hospitals, and solve diagnostic problems caused by individual differences among patients and data dispersion.
[0069] Illustratively, the myocardial infarction diagnosis system 10 based on deep federated transfer learning provided in the embodiment of the present application can also be applied to other application scenarios. This is only used as an example and is not limited to the specific application scenario.
[0070] In an exemplary embodiment, Figure 1As shown, a myocardial infarction diagnosis system 10 based on deep federated transfer learning is provided. This embodiment uses the system as an example of a terminal in the aforementioned implementation environment. It is understandable that the system can also be applied to a server, or to a system including a terminal and a server, and implemented through the interaction between the terminal and the server. In this embodiment, the system includes an ECG signal preprocessing module 11, a spatiotemporal feature extraction module 12, a federated transfer training module 13, and a myocardial infarction diagnosis module 14:
[0071] The ECG signal preprocessing module 11 is used to perform noise location and repair processing on the acquired original ECG signal to obtain a high-quality ECG signal; wherein the original ECG signal comes from the client device.
[0072] Specifically, raw ECG signals can originate from a variety of client devices, such as hospital ECG monitors, home health monitors, or wearable ECG monitoring devices. This module first performs noise localization on the raw ECG signals, identifying noise components such as baseline drift and myoelectric interference through frequency or time domain analysis. It then repairs the identified noise using techniques such as filtering and waveform reconstruction, resulting in high-quality ECG signals that provide a reliable data foundation for subsequent diagnosis.
[0073] The spatiotemporal feature extraction module 12 is used to input the high-quality ECG signal into a dual-channel deep neural network to extract spatiotemporal fusion features, wherein the dual-channel deep neural network is used to parallelly process the timing information and physiological space information of the high-quality ECG signal.
[0074] For example, the pre-processed high-quality ECG signal is input into a dual-channel deep neural network. The dual-channel deep neural network contains two parallel processing channels, one of which focuses on processing the timing information of high-quality ECG signals. It can use structures such as recurrent neural networks (RNN) or long short-term memory networks (LSTM) to capture the changing trends and patterns of the signal in the time dimension; the other channel processes physiological spatial information and can use structures such as convolutional neural networks (CNN) to analyze the spatial distribution characteristics of the signal at different leads or electrode positions. Through the parallel processing of the two channels, spatiotemporal fusion features that combine timing and physiological spatial information are extracted, providing more comprehensive and accurate feature information for the diagnosis of myocardial infarction.
[0075] The federated migration training module 13 is used to dynamically weight and aggregate the model parameters of the acquired local myocardial infarction diagnosis model to obtain updated parameters, wherein the updated parameters are used to train the global myocardial infarction diagnosis model, and the local myocardial infarction diagnosis model is trained by the client device based on local electrocardiogram signal data.
[0076] Specifically, each client device obtains a local myocardial infarction diagnosis model based on local ECG signal data training and sends the model parameters to the module. The federated migration training module 13 dynamically weights and aggregates the parameters of these local models. During the dynamic weighting process, different weights can be determined based on factors such as the data volume, data quality, or model performance of each client device to more reasonably integrate the parameters of each local model and obtain updated parameters. These updated parameters are then used to train the global myocardial infarction diagnosis model, so that the global model can integrate the characteristics and diagnostic information of each client, adapt to the characteristics of different patient groups, and improve the generalization ability of diagnosis.
[0077] The myocardial infarction diagnosis module 14 is used to input the acquired target ECG data into the global myocardial infarction diagnosis model to obtain a myocardial infarction diagnosis result.
[0078] Specifically, when target ECG data is acquired, it is fed into a trained global MI diagnosis model. Based on previously learned spatiotemporal fusion features and the diagnostic knowledge of each client, the global model analyzes and determines the target ECG data, ultimately outputting a MI diagnosis result, providing a reliable diagnostic reference for doctors and patients.
[0079] The aforementioned myocardial infarction diagnosis system 10 based on deep federated transfer learning uses an ECG signal preprocessing module 11 to locate and repair noise in the original signal, generating high-quality ECG signals. A spatiotemporal feature extraction module 12 employs a dual-channel deep neural network to parallelly process the signal's temporal and physiological spatial information, extracting spatiotemporal fusion features. A federated transfer training module 13 dynamically weights and aggregates the parameters of the local myocardial infarction diagnosis model trained locally on the client, generating updated parameters to train a global myocardial infarction diagnosis model. The myocardial infarction diagnosis module 14 outputs diagnostic results based on the global model. This technical solution integrates distributed ECG data resources through a federated collaborative framework, combined with a spatiotemporal feature fusion mechanism, effectively overcoming individual differences caused by dispersed data and enabling high-precision, personalized myocardial infarction diagnosis for different patients.
[0080] like Figure 2 As shown, in a possible embodiment, the ECG signal preprocessing module 11 is configured to perform the following steps:
[0081] Step 101 : Cleaning the original ECG signal through a preset composite filter to obtain a preliminary denoised signal; wherein the composite filter includes a high-pass filter and a notch filter.
[0082] Specifically, a composite filter consisting of a high-pass filter and a notch filter can be used to collaboratively process the signal. The high-pass filter can filter out low-frequency noise, such as baseline drift, while the notch filter can remove interference at specific frequencies, such as power frequency interference (typically 50Hz or 60Hz), thereby obtaining a preliminary denoised signal. For example, by adjusting the filter cutoff frequency to adapt to different acquisition environments, the basic signal quality can be significantly improved.
[0083] Step 102: Perform discrete wavelet transform on the preliminary denoised signal to extract wavelet coefficients.
[0084] Specifically, discrete wavelet transform is performed on the preliminary denoised signal to extract wavelet coefficients. Discrete wavelet transform can decompose the signal into a linear combination of wavelet basis functions at different scales and positions, and the wavelet coefficients reflect the characteristics of the signal at different scales and positions.
[0085] Step 103: construct an EDWT quality curve based on the mean absolute deviation of the wavelet coefficients.
[0086] Specifically, an EDWT (Empirical Discrete Wavelet Transform) quality curve is constructed based on the mean absolute deviation of wavelet coefficients. The mean absolute deviation can be used to measure the fluctuation degree of the signal, and the EDWT quality curve can reflect the quality change of the signal.
[0087] Step 104 : Perform contour detection on the preliminary denoised signal based on a preset ECG contour detection algorithm, and calculate a segmentation threshold.
[0088] Specifically, a preset ECG contour detection algorithm is used to perform contour detection on the preliminary denoised signal and calculate a segmentation threshold. The ECG contour detection algorithm identifies typical waveform contours in the ECG signal, such as the P wave, QRS complex, and T wave. Based on these contour features, a segmentation threshold is calculated to distinguish signal quality segments.
[0089] Step 105 , segmenting and marking the preliminary denoised signal corresponding to the EDWT quality curve according to the segmentation threshold, and dividing it into a first signal and a second signal; wherein the first signal is a high-quality ECG signal, and the second signal is a signal to be processed.
[0090] Specifically, the initial denoised signal corresponding to the EDWT quality curve is segmented and labeled according to a segmentation threshold, resulting in a first signal and a second signal. Segments with quality assessment values above the threshold are marked as the first signal and retained directly, while segments below the threshold are marked as the second signal and transferred to the repair process. This grading mechanism achieves precise separation of high-quality signals from the signal to be repaired.
[0091] Step 106 , performing data repair on the second signal, removing the unrepairable segments and smoothly connecting the repairable segments, and outputting a high-quality ECG signal.
[0092] Specifically, data repair is performed on the second signal, removing unrepairable segments and smoothly connecting repairable segments to produce a high-quality ECG signal. Unrepairable segments, which may be severely distorted, are directly removed to avoid interference with subsequent diagnosis. Repairable segments are then smoothed using techniques such as spline interpolation or moving averages to restore signal continuity and integrity, resulting in a high-quality ECG signal that provides a reliable data foundation for subsequent feature extraction and diagnosis.
[0093] In a possible embodiment, constructing an EDWT quality curve based on the mean absolute deviation of wavelet coefficients includes:
[0094] The signal quality evaluation value of the preliminary denoised signal is calculated using the following formula, and the signal quality evaluation values are sequentially spliced to form the EDWT quality curve:
[0095]
[0096] Among them, E i is the signal quality evaluation value of the ith subsequence of the preliminary denoised signal, d is the number of decomposition layers of discrete wavelet transform, m is the maximum number of decomposition layers of discrete wavelet transform, F is the sampling frequency of the preliminary denoised signal, f noise is the noise frequency, β i,d is the decomposition coefficient of the ith subsequence of the preliminary denoised signal at the dth layer, min(·,1) is the minimum value function, is the floor function.
[0097] Specifically, the continuous ECG signal is segmented into multiple subsequences according to a fixed time window, each containing a number of sampling points. Furthermore, a discrete wavelet transform is performed on each subsequence to extract its detail coefficients at a multi-layer decomposition, where the number of decomposition layers is dynamically determined by the relationship between the signal sampling frequency and the noise frequency. For example, a floor function is used to calculate the maximum number of decomposition layers to ensure that high-frequency noise components are fully captured. For the i-th subsequence, a quality assessment is performed based on its detail coefficients at the high-frequency decomposition layer. The weighted sum of the detail coefficients at a specific layer is selected and multiplied by a sampling frequency scaling factor to obtain an initial assessment value. The result is then constrained to a range of zero to one using a minimum function to generate the signal quality assessment value for that subsequence. For example, the noise frequency is set to the dominant frequency band of motion artifacts, ensuring that the assessment value accurately reflects the intensity of noise contamination. The assessment values of all subsequences are concatenated in chronological order to form an EDWT quality curve. This curve represents the time index on the horizontal axis and the quality score on the vertical axis, achieving a continuous quantitative mapping of signal quality along the time dimension. Unlike traditional fixed threshold methods, this dynamic curve can adapt to the frequency characteristics of different acquisition devices. The above technical solution achieves accurate quantitative evaluation of motion artifact noise through multi-scale detail coefficient weighted aggregation and frequency adaptive normalization mechanism, improves the sensitivity and generalization ability of noise localization, and provides a reliable basis for ECG signal repair.
[0098] In a possible embodiment, performing data repair on the second signal, removing unrepairable segments and smoothly connecting repairable segments to output a high-quality ECG signal includes:
[0099] The second signal is subjected to QRS region-shielded steady-state wavelet transform for denoising to obtain a preliminary repaired ECG signal.
[0100] Specifically, the second signal is subjected to a QRS region-shielded steady-state wavelet transform for denoising, obtaining a preliminary repaired ECG signal. The steady-state wavelet transform can effectively remove high-frequency noise from the signal while retaining the main features of the signal. The QRS region shielding technology is used to protect the important QRS complex part of the ECG signal to avoid damage to key features during the denoising process. For example, the Daubechies wavelet can be selected as the transform basis function, and the denoising degree can be controlled by adjusting the threshold, thereby removing noise while retaining the effective information of the signal to the greatest extent.
[0101] A repaired EDWT curve is generated based on the preliminary repaired ECG signal. Secondary segmentation and labeling are performed according to the repaired EDWT curve, and the preliminary repaired ECG signal is divided into QL1 segment, QL2 segment and QL3 segment. Among them, QL1 segment is the first repairable segment, QL2 segment is the second repairable segment, and QL3 segment is the unrepairable segment.
[0102] Exemplarily, the same quality assessment algorithm as in the aforementioned preprocessing can be used, but the noise frequency parameters are adjusted according to the characteristics of the repaired signal; further, a dynamic grading threshold can be set according to the curve value range to divide the signal into three categories. For example, the repaired EDWT curve can be generated by calculating the local variance or energy characteristics of the signal, and then the signal is segmented and marked according to the preset threshold or clustering algorithm: QL1 segment (quality score ≥ 0.8, slight distortion can be used directly), QL2 segment (0.5 ≤ score < 0.8, boundary smoothing is required), QL3 segment (score < 0.5, severe distortion needs to be eliminated) to accurately identify the repairable and unrepairable segments in the signal and improve the accuracy of segmentation.
[0103] The QL1 segment and the QL2 segment are smoothly connected through local morphological filtering to output high-quality ECG signals.
[0104] Specifically, local morphological filtering can be used to smoothly connect the QL1 and QL2 segments, generating a high-quality ECG signal. This technique effectively smooths signal abrupt changes, ensuring a natural transition between repairable segments. For example, a morphological filtering method based on structuring elements can be used, controlling the degree of smoothing by adjusting the shape and size of the structuring elements. This approach not only removes residual noise from the signal but also ensures signal continuity and integrity, improving signal quality.
[0105] In a possible embodiment, the QL1 segment and the QL2 segment are smoothly connected by local morphological filtering to output a high-quality ECG signal, including:
[0106] Based on the one-dimensional linear structure unit, the morphological closing operation is performed on the QL1 segment and the QL2 segment to obtain the closing operation result.
[0107] Specifically, a one-dimensional linear structuring unit is slid along the ECG signal's time series, performing a morphological closing operation: dilation expands the signal's peaks, followed by erosion to shrink the troughs, generating a closing result. This operation fills gaps in the waveform's valleys at the junctions between segments, eliminating amplitude drops caused by signal interruptions. For example, the structuring unit length is set to 100ms to match the periodic nature of the ECG waveform.
[0108] A morphological opening operation is performed on the QL1 segment and the QL2 segment based on the one-dimensional linear structure unit to obtain the opening operation result.
[0109] Specifically, an erosion operation is first performed to smooth out peak glitches, followed by a dilation operation to restore the waveform's main structure, generating the result of an opening operation. This operation effectively suppresses abnormally high-amplitude oscillations in the transition region between segments, avoiding the waveform blunting caused by traditional filtering. For example, the opening operation can eliminate high-frequency spikes left by electromyographic interference.
[0110] The arithmetic average of the closing operation results and the opening operation results is performed to generate a smooth signal sequence, which is used to connect the QL1 segment and the QL2 segment to obtain a high-quality ECG signal.
[0111] Specifically, the corresponding sampling points of the two result sequences are averaged to generate a smoothed signal sequence. This fusion mechanism leverages the valley-filling capabilities of closed operations with the peak-smoothing capabilities of open operations, ultimately achieving a natural transition between waveform segments. For example, the original slope characteristics of key diagnostic segments such as the PR interval are preserved.
[0112] In a possible embodiment, the spatiotemporal feature extraction module 12 includes:
[0113] The spatial domain graph convolution submodule includes a cascaded graph convolution layer, a batch normalization layer, and a random dropout layer. The graph convolution layer is used to extract spatial correlation features based on the topological structure of the original ECG signal.
[0114] Specifically, the graph convolution layer extracts spatial correlation features based on the topological structure of the raw ECG signal, such as the positional relationships of ECG leads and the propagation paths of the electrical signals. For example, the graph convolution layer can capture the correlation of electrical activity between different heart regions and identify abnormal spatial conduction patterns. The batch normalization layer then normalizes the data, accelerating training and improving model stability. The dropout layer randomly disables some neurons during training to prevent overfitting and enhance the model's generalization ability.
[0115] The time domain convolution submodule includes a cascaded time domain convolution layer, a batch normalization layer, and a rectified linear unit activation layer. The time domain convolution layer is used to capture the dynamic time domain features of the ECG signal waveform through a sliding window.
[0116] Specifically, the time-domain convolution layer uses a sliding window technique to capture the dynamic time-domain features of the ECG signal waveform, such as rising edges, peaks, and falling edges. The batch normalization layer normalizes the convolution output to ensure the stability of the data distribution. The rectified linear unit activation layer introduces nonlinearity, enhancing the model's ability to learn complex features.
[0117] The attention weighted fusion submodule includes a feature splicing layer, a multi-head self-attention layer, a residual connection layer and a layer normalization layer connected in sequence. The attention weighted fusion submodule is used to fuse spatial correlation features with dynamic time domain features and output spatiotemporal fusion features.
[0118] Specifically, the feature concatenation layer concatenates and integrates the two features. The multi-head self-attention layer automatically learns the importance of features by calculating the correlation weights between different features, weighting key features. The residual connection layer and layer normalization layer work together to ensure the stability and efficiency of the fusion process, enhancing the model's expressiveness and convergence speed.
[0119] The classification output submodule includes a CORAL domain adaptation layer and a Softmax classifier. The CORAL domain adaptation layer is used to perform cross-domain distribution alignment on spatiotemporal fusion features, and the Softmax classifier is used to output the probability of myocardial infarction diagnosis.
[0120] Specifically, the CORAL domain adaptation layer achieves cross-domain distribution alignment by minimizing the difference between the source and target domain feature distributions, improving the model's adaptability to different data distributions. Based on the aligned features, the Softmax classifier outputs the probability of a myocardial infarction diagnosis, providing a quantitative basis for clinical decision-making.
[0121] In one possible embodiment, the spatial graph convolution submodule is used to perform the following steps:
[0122] Each lead of the original ECG signal is used as a graph node, and the time domain features are extracted through a one-dimensional convolutional layer to generate a node feature set. The original ECG signal is a 12-lead ECG signal.
[0123] Specifically, a one-dimensional convolution operation is performed independently on the timing signal of each lead, capturing the local time-domain features of the waveform through a sliding window. Furthermore, the convolution output of each lead is used as a graph node feature and combined to form a node feature set. For example, a convolution layer with a kernel length of 150ms is used to adapt the QRS complex width to generate initial features that represent the dynamic changes of a single lead.
[0124] The lead affiliation was divided based on the pathological area of myocardial infarction, specifically: leads I, aVL, V1 to V6 were grouped as the anterior and lateral wall groups and full connections were established within the groups, with lead V1 directly connected to leads V2, aVL, and I; leads II, III, aVF, and aVR were grouped as the inferior wall group and closed-loop connections were formed.
[0125] For example, a fully connected network was established for the anterior and lateral wall groups (I, aVL, V1-V6), with V1 leading to additionally strengthen direct connections with V2, aVL, and I, accurately mapping the electrical conduction characteristics of the anterior septal infarct region. A closed-loop connection was formed for the inferior wall group (II, III, aVF, aVR), simulating the potential closed loop of the inferior wall leads. This anatomical grouping strategy transcends the limitations of traditional mechanical mapping and imbues topological structures with clinical and pathological significance.
[0126] The three-dimensional spatial coordinates of each lead are obtained, the Euclidean distance between the leads is calculated, and the Euclidean distance is mapped to spatial similarity through the radial basis function.
[0127] Specifically, the three-dimensional spatial coordinates of each lead in the human chest cavity are obtained, the Euclidean distance between the leads is calculated, and the distance is mapped to a similarity weight in the interval [0,1] using a radial basis function. For example, the close distance between leads V3 and V4 gives them a high weight, strengthening the correlation between the adjacent lead signals; the distance between aVR and leads II is reduced, which is consistent with the law of cardiac electrical conduction attenuation.
[0128] The adjacency matrix was constructed by combining the anatomical grouping connectivity and spatial similarity weights.
[0129] Specifically, leads within the same anatomical group are assigned a base connection weight, which is then multiplied by the spatial similarity coefficient for enhancement. For leads in different groups, only the spatial similarity weight is retained. For example, because leads V1 and V2 belong to the same anterior wall group and are close together, their connection weight is increased to 0.95, exceeding the expressive power of a traditional binary adjacency matrix.
[0130] The node feature set and the adjacency matrix are combined into graph structure data, and a graph convolution operation is performed on the graph structure data to obtain spatial correlation features that characterize the physiological correlation between leads.
[0131] Specifically, the node feature set and the adjacency matrix are combined into graph structure data. Furthermore, a multi-layer graph convolution operation is performed: each node aggregates the weighted features of the neighboring nodes, and the node state is updated through nonlinear transformation. The final output is the spatial features that characterize the potential conduction correlation between leads. For example, the V1-V4 lead feature correlation is enhanced, which directly reflects the pathological pattern of anterior wall myocardial infarction. This embodiment can effectively extract the physiological correlation features between leads by modeling the leads of the ECG signal as graph nodes and combining the anatomical grouping connection relationship and spatial similarity to construct an adjacency matrix. Compared with the traditional feature extraction method based on fixed templates, this method can more flexibly adapt to the ECG signal characteristics of different patients and improve the diagnostic accuracy of the model for myocardial infarction. Its innovation lies in integrating the spatial topological relationship and pathological grouping knowledge of ECG leads into the graph neural network, and enhancing the model's learning ability of the spatial correlation of ECG signals through graph convolution operations.
[0132] In one possible embodiment, the federated transfer training module 13 includes:
[0133] The central server-side initialization submodule is used to pre-train a global initial myocardial infarction diagnosis model based on a public ECG dataset and distribute the global initial myocardial infarction diagnosis model to multiple client devices.
[0134] Specifically, a global initial myocardial infarction diagnosis model can be pre-trained based on a public ECG dataset and distributed to multiple client devices. Among them, the public ECG dataset can be selected from authoritative datasets such as the PTB database or the MIT-BIH database, covering ECG signals of normal and myocardial infarction patients of different ages and genders. The pre-training process can adopt a supervised learning method, with ECG signal features as input and diagnostic labels as output, to train a preliminary global initial model. For example, a deep neural network architecture is used to optimize model performance by adjusting the number of network layers and the number of neurons. During distribution, the central server sends the model to each client device through a secure communication protocol to ensure the security and integrity of data transmission.
[0135] The client local training submodule is used to instruct each client device to train and update local model parameters through local ECG signal data, generate a local myocardial infarction diagnosis model, and transmit the updated model parameters back to the central server.
[0136] Exemplarily, the client local training submodule instructs each client device to use local ECG signal data to train and update local model parameters, generate a local myocardial infarction diagnosis model, and transmit the updated parameters back to the central server. Each client device collects ECG signal data of local patients, which have individual differences, such as different heart rates, conduction pathways, etc. The client uses the received global initial model as a starting point and performs model training in combination with local data. For example, a fine-tuning strategy is adopted to update only the parameters of the last layer or several layers of the model to adapt to the characteristics of the local data. Data enhancement techniques, such as adding noise, signal scaling, etc., can be used during training to improve the generalization ability of the model. After the training is completed, the client transmits the updated model parameters back to the central server through encrypted communication.
[0137] The central server-side aggregation submodule is used to dynamically weight and aggregate the model parameters obtained from each client device to update the global initial myocardial infarction diagnosis model and obtain a global myocardial infarction diagnosis model.
[0138] Specifically, the dynamic weighting strategy comprehensively considers factors such as the data volume, data quality, and model performance of each client. For example, parameters of clients with larger data volumes are given higher weights, or weights are dynamically adjusted based on the model's accuracy on the local validation set. Using the secure aggregation protocol used in federated learning, parameters are efficiently integrated while protecting the privacy of each client. The aggregated global model incorporates the characteristic information of each client, improving the model's adaptability and diagnostic accuracy for different patient groups.
[0139] The dynamic migration feedback submodule is used to feed back the optimized model parameters to each IoT client device based on the migration strategy of dynamic adversarial domain adaptation.
[0140] Specifically, based on a migration strategy based on dynamic adversarial domain adaptation, the model parameters after migration and optimization are fed back to each IoT client device. The dynamic adversarial domain adaptation strategy aims to reduce the impact of differences in data distribution across different clients on model performance. For example, the CORAL (Correlation Alignment) algorithm is used to align feature distributions across different domains, or a domain adaptation method based on a generative adversarial network (GAN) is used to generate feature representations that can adapt to different domains. The migrated and optimized model parameters are fed back to the client device via the communication network. The client device uses these parameters to update the local model, further improving the accuracy and adaptability of local diagnosis.
[0141] In a possible embodiment, the dynamic migration feedback submodule is configured to perform the following steps:
[0142] The public ECG dataset used for pre-training on the central server is identified as the source domain patient data. The feature center of each myocardial infarction category in the source domain patient data is calculated to obtain the source domain category feature center vector.
[0143] Specifically, we can call the public ECG dataset used for pre-training as the source domain patient data, input the dataset into the feature extraction network, and perform feature vector clustering on all samples of each myocardial infarction category (such as ST segment elevation / non-elevation); further, calculate the arithmetic mean of the feature vectors of each category to generate the source domain category feature center vector. For example, the K-means algorithm is used to optimize the center vector position to ensure that it represents the core pathological pattern of the category.
[0144] The local electrocardiogram signal data of the client device is determined as the new patient data in the target domain, and the feature center of each myocardial infarction category in the new patient data in the target domain is calculated to obtain the target domain category feature center vector.
[0145] Specifically, the client device's local ECG signal data is identified as the new target domain patient data. The feature center is calculated for each myocardial infarction category in the new target domain patient data to obtain the target domain category feature center vector. The local ECG signal data collected by the client device has individual differences. Using the same feature extraction method, the feature center for each myocardial infarction category is calculated to obtain the target domain category feature center vector.
[0146] Based on the source domain category feature center vector and the target domain category feature center vector, the semantic alignment loss is calculated to obtain the semantic alignment loss value.
[0147] Specifically, semantic alignment can be performed based on the feature center vectors of the source domain and the target domain, and the semantic alignment loss value can be calculated using the following formula:
[0148]
[0149] Among them, L sa is the semantic alignment loss value, K is the total number of myocardial infarction classification categories, indicating the number of diagnostic classification categories (such as normal, ST-segment elevation myocardial infarction, etc.), is the feature center vector of the kth category in the source domain patient data, is the feature center vector of the kth category in the new patient data in the target domain. This function is used to minimize the difference in the feature centers of similar myocardial infarction in the source domain and the target domain to ensure the semantic consistency of the categories.
[0150] Based on the parameter distribution of the global initial myocardial infarction diagnosis model and the parameter distribution of the local myocardial infarction diagnosis model, the structural alignment loss is calculated to obtain the structural alignment loss value.
[0151] Specifically, the structure alignment is performed based on the feature center vectors of the source domain and the target domain, and the structure alignment loss value is calculated by the following formula:
[0152]
[0153] Among them, L coral is the structural alignment loss value, b is the dimension of the model embedding feature, is the covariance matrix of the source domain feature distribution calculated by the eigenvector of the source domain patient data, which is used to characterize the overall distribution characteristics of the source domain data. t is the covariance matrix of the target domain feature distribution calculated by the feature vector of the new patient data in the target domain, which is used to reflect the distribution characteristics of the target domain data. is the Frobenius norm of the square of the matrix, used to quantify the distribution difference, is a normalization coefficient used to scale the loss value to avoid dimensionality effects. This function is used to align the covariance structure of the source domain and target domain feature distributions and eliminate inter-domain distribution shifts.
[0154] Based on the semantic alignment loss value and the structural alignment loss value, the model parameters are optimized to obtain the migrated optimized model parameters and feed them back to the client device.
[0155] Furthermore, based on the semantic alignment loss value and the structural alignment loss value, the model parameters are optimized to obtain the model parameters after migration optimization, and the parameters are fed back to the client device. The optimization process can update the parameters of the global initial model by combining the semantic alignment loss and the structural alignment loss through optimization algorithms such as gradient descent. For example, the two loss functions are minimized at the same time so that the model parameters are adapted to the data characteristics of the target domain both semantically and structurally. The optimized model parameters are fed back to the client device through the communication network, and the client device uses these parameters to update the local model to improve its diagnostic performance for new patient data. The above embodiment can effectively reduce the feature distribution differences between the source domain and the target domain by dynamically migrating the semantic alignment and structural alignment strategies of the feedback submodule, thereby improving the adaptability and diagnostic accuracy of the model in different patient groups. Compared with traditional transfer learning methods, this method can more comprehensively align feature semantics and model structure, overcome the problem of model performance degradation caused by data distribution differences, and provide an adaptive distributed solution for high-precision diagnosis of myocardial infarction.
[0156] In a possible embodiment, the central server-side aggregation submodule is configured to perform the following steps:
[0157] Each client device performs model training based on local ECG signal data to generate updated local model weights.
[0158] Based on the local validation set of each client device, the myocardial infarction classification accuracy is calculated to obtain the classification accuracy value of each client device.
[0159] Based on the classification accuracy value and the data volume of local ECG signal data, dynamic weighted aggregation is performed to update the global initial myocardial infarction diagnosis model to obtain a global myocardial infarction diagnosis model.
[0160] For example, the client device loads the initial model sent by the central server and optimizes the network parameters using the backpropagation algorithm combined with local ECG data to form a weight matrix adapted to the patient characteristics of the device. The following steps are performed for each client: forward reasoning is performed on the ECG data of the validation set to generate predicted labels; the predicted labels are compared with the true labels; and the percentage of correct samples is calculated to obtain the classification accuracy value. This process quantitatively evaluates the diagnostic reliability of each local model; based on the obtained classification accuracy value and the amount of local ECG signal data, the server performs dynamic weighted aggregation. Specifically, the global weight is aggregated using the following formula:
[0161]
[0162] in, is the global weight, The local weights for the t+1 round generated by training the model based on the local ECG signal data for each client device, a kis the myocardial infarction classification accuracy of each client device on the local validation set, K is the total number of clients participating in the training, A normalization factor is used to ensure that the sum of all client weights is 1, avoiding weight scaling bias. This formula is used to achieve intelligent aggregation of local model parameters in federated learning, optimizing global model performance through a dual-weight mechanism of accuracy and data volume.
[0163] In summary, the embodiment of the present application provides a myocardial infarction diagnosis system 10 based on deep federated transfer learning, which realizes noise localization and hierarchical repair based on the EDWT quality curve through the ECG signal preprocessing module 11, significantly improving the signal quality in high-interference environments; the spatiotemporal feature extraction module 12 deeply mines the spatiotemporal pathological correlation of ECG signals through dual-channel fusion of pathology-driven graph convolution and time series dilation convolution; the federated transfer training module 13 adopts dynamic weighted aggregation and adversarial domain adaptation strategy to integrate scattered medical knowledge under the premise of ensuring data privacy; the myocardial infarction diagnosis module 14 combines the CORAL domain adaptation layer to achieve cross-patient distribution alignment and eliminate individual difference interference. This technical solution can significantly improve the accuracy and clinical applicability of myocardial infarction diagnosis across institutions and devices while ensuring the privacy and security of medical data, and provide a feasible technical paradigm for distributed cardiovascular disease prevention and control.
[0164] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0165] The above-described embodiments merely represent several implementation methods of the embodiments of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that a person skilled in the art may make various modifications and improvements without departing from the concept of the embodiments of the present application, and these modifications and improvements fall within the scope of protection of the embodiments of the present application.
Claims
1. A myocardial infarction diagnosis system based on deep federated transfer learning, characterized by: The system includes an ECG signal preprocessing module, a spatiotemporal feature extraction module, a federated transfer training module, and a myocardial infarction diagnosis module: The ECG signal preprocessing module is used to perform noise location and repair processing on the acquired original ECG signal to obtain a high-quality ECG signal; wherein the original ECG signal comes from the client device; The spatiotemporal feature extraction module is configured to input the high-quality ECG signal into a dual-channel deep neural network to extract spatiotemporal fusion features, wherein the dual-channel deep neural network is configured to process the timing information and physiological space information of the high-quality ECG signal in parallel; The federated migration training module is configured to dynamically weight and aggregate the model parameters of the acquired local myocardial infarction diagnostic model to obtain updated parameters, wherein the updated parameters are used to train the global myocardial infarction diagnostic model, wherein the local myocardial infarction diagnostic model is trained by the client device based on local electrocardiogram signal data; The myocardial infarction diagnosis module is used to input the acquired target electrocardiogram data into the global myocardial infarction diagnosis model to obtain a myocardial infarction diagnosis result.
2. The system according to claim 1, wherein: The ECG signal preprocessing module is used to perform the following steps: Cleaning the original ECG signal using a preset composite filter to obtain a preliminary denoised signal; wherein the composite filter includes a high-pass filter and a notch filter; Performing discrete wavelet transform on the preliminary denoised signal to extract wavelet coefficients; constructing an EDWT quality curve based on the mean absolute deviation of the wavelet coefficients; Performing contour detection on the preliminary denoised signal based on a preset ECG contour detection algorithm and calculating a segmentation threshold; Segment-marking the preliminary denoised signal corresponding to the EDWT quality curve according to the segmentation threshold to obtain a first signal and a second signal; wherein the first signal is the high-quality electrocardiogram signal and the second signal is a signal to be processed; Data repair is performed on the second signal, unrepairable segments are removed, and repairable segments are smoothly connected to output the high-quality electrocardiogram signal.
3. The system according to claim 2, characterized in that The constructing of an EDWT quality curve based on the mean absolute deviation of the wavelet coefficients includes: The signal quality evaluation value of the preliminary denoised signal is calculated by the following formula, and the signal quality evaluation values are sequentially spliced to form the EDWT quality curve: Among them, E i is the signal quality evaluation value of the ith subsequence of the preliminary denoised signal, d is the number of decomposition layers of the discrete wavelet transform, m is the maximum number of decomposition layers of the discrete wavelet transform, F is the sampling frequency of the preliminary denoised signal, f noise is the noise frequency, β i,d is the decomposition coefficient of the ith subsequence of the preliminary denoised signal at the dth layer, min(·,1) is the minimum value function, is the floor function.
4. The system according to claim 2, wherein: The performing data repair on the second signal, removing unrepairable segments and smoothly connecting repairable segments, and outputting the high-quality electrocardiogram signal includes: Performing a QRS region-shielded steady-state wavelet transform on the second signal to perform denoising to obtain a preliminary repaired ECG signal; generating a repair EDWT curve based on the preliminary repair ECG signal, performing secondary segmentation labeling according to the repair EDWT curve, and dividing the preliminary repair ECG signal into a QL1 segment, a QL2 segment, and a QL3 segment, wherein the QL1 segment is a first repairable segment, the QL2 segment is a second repairable segment, and the QL3 segment is the unrepairable segment; The QL1 segment and the QL2 segment are smoothly connected through local morphological filtering to output the high-quality electrocardiogram signal.
5. The system according to claim 4, characterized in that The step of smoothly connecting the QL1 segment and the QL2 segment through local morphological filtering to output the high-quality electrocardiogram signal includes: performing a morphological closing operation on the QL1 segment and the QL2 segment based on a one-dimensional linear structure unit to obtain a closing operation result; performing a morphological opening operation on the QL1 segment and the QL2 segment based on the one-dimensional linear structure unit to obtain an opening operation result; Performing an arithmetic average on the closing operation result and the opening operation result to generate a smoothed signal sequence, wherein the smoothed signal sequence is used to connect the QL1 segment and the QL2 segment to obtain the high-quality electrocardiogram signal.
6. The system according to claim 1, wherein: The spatiotemporal feature extraction module includes: A spatial domain graph convolution submodule, comprising a cascaded graph convolution layer, a batch normalization layer, and a random dropout layer, wherein the graph convolution layer is used to extract spatial correlation features based on the topological structure of the original ECG signal; A time-domain convolution submodule, comprising a cascaded time-domain convolution layer, a batch normalization layer, and a rectified linear unit activation layer. The time-domain convolution layer is used to capture the dynamic time-domain features of the ECG signal waveform through a sliding window; An attention weighted fusion submodule, comprising a feature splicing layer, a multi-head self-attention layer, a residual connection layer, and a layer normalization layer connected in sequence, wherein the attention weighted fusion submodule is used to fuse the spatial correlation features with the dynamic temporal features and output the spatiotemporal fusion features; The classification output submodule includes a CORAL domain adaptation layer and a Softmax classifier. The CORAL domain adaptation layer is used to perform cross-domain distribution alignment on the spatiotemporal fusion features, and the Softmax classifier is used to output the probability of myocardial infarction diagnosis.
7. The system according to claim 6, characterized in that The spatial domain graph convolution submodule is used to perform the following steps: Taking each lead of the original ECG signal as a graph node, extracting time domain features through a one-dimensional convolutional layer to generate a node feature set, wherein the original ECG signal is a 12-lead ECG signal; Lead affiliation was divided based on the pathological area of myocardial infarction, specifically: leads I, aVL, and V1 to V6 were grouped as the anterior and lateral wall groups and fully connected within the group, with lead V1 directly connected to leads V2, aVL, and I; leads II, III, aVF, and aVR were grouped as the inferior wall group and connected in a closed loop; Obtaining the three-dimensional spatial coordinates of each lead of the original electrocardiogram signal, calculating the Euclidean distance between each lead, and mapping the Euclidean distance to spatial similarity using a radial basis function; constructing an adjacency matrix by combining the anatomical grouping connectivity relationship and the spatial similarity weight; The node feature set and the adjacency matrix are combined into graph structure data, and a graph convolution operation is performed on the graph structure data to obtain the spatial correlation feature that characterizes the physiological correlation between leads.
8. The system according to claim 1, wherein: The federated migration training module includes: a central server-side initialization submodule, configured to pre-train a global initial myocardial infarction diagnosis model based on a public electrocardiogram dataset, and distribute the global initial myocardial infarction diagnosis model to a plurality of client devices; The client local training submodule is used to instruct each client device to train and update local model parameters through local ECG signal data to generate a local myocardial infarction diagnosis model, and transmit the updated model parameters back to the central server; a central server-side aggregation submodule, configured to dynamically weight and aggregate the model parameters acquired from each of the client devices to update the global initial myocardial infarction diagnostic model, thereby obtaining the global myocardial infarction diagnostic model; The dynamic migration feedback submodule is used to feed back the model parameters after migration optimization to each IoT client device based on the migration strategy of dynamic adversarial domain adaptation.
9. The system according to claim 8, characterized in that The dynamic migration feedback submodule is used to perform the following steps: Determine the public ECG dataset used for pre-training on the central server as source domain patient data, perform feature center calculation on each myocardial infarction category in the source domain patient data, and obtain a source domain category feature center vector; Determining the local electrocardiogram signal data of the client device as target domain new patient data, performing feature center calculation on each myocardial infarction category in the target domain new patient data to obtain a target domain category feature center vector; Calculating a semantic alignment loss based on the source domain category feature center vector and the target domain category feature center vector to obtain a semantic alignment loss value; performing a structural alignment loss calculation based on the parameter distribution of the global initial myocardial infarction diagnostic model and the parameter distribution of the local myocardial infarction diagnostic model to obtain a structural alignment loss value; Based on the semantic alignment loss value and the structural alignment loss value, model parameter optimization is performed to obtain the model parameters after migration optimization, and the parameters are fed back to the client device.
10. The system according to claim 8, wherein: The central server-side aggregation submodule is used to perform the following steps: Each of the client devices performs model training based on the local ECG signal data to generate updated local model weights; Calculating the accuracy of myocardial infarction classification based on the local validation set of each client device to obtain a classification accuracy value of each client device; Based on the classification accuracy value and the data volume of the local electrocardiogram signal data, dynamic weighted aggregation is performed to update the global initial myocardial infarction diagnosis model to obtain a global myocardial infarction diagnosis model.