Noninvasive blood potassium concentration estimation method and device, computer equipment and storage medium
By combining real and simulated ECG data and using deep learning models to estimate blood potassium concentration, the problems of insufficient estimation accuracy and incomplete data samples in the prior art are solved, and higher estimation accuracy and robustness are achieved.
Patent Information
- Application Number
- CN202411932014.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-12-26
AI Technical Summary
In the prior art, the estimation of blood potassium concentrations is insufficient, the data samples are incomplete, and the real-time performance is poor.
By combining real ECG data with simulated ECG data, deep learning models are used for training, which improves the robustness of the model at different blood potassium concentrations and enhances the ability to identify abnormal ECG signals.
It improves the accuracy and robustness of non-invasive estimation of blood potassium concentration, enhances the ability to identify abnormal signals, and ensures that the estimation results are physiologically interpretable.
Smart Images

Figure CN119679424A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of blood potassium detection, and more specifically to a non-invasive blood potassium concentration estimation method, device, computer equipment and storage medium. Background Art
[0002] Blood potassium concentration is essential for maintaining good health. The normal range of blood potassium concentration is 3.5mmol / L-5.5mmol / L. This range helps maintain the body's electrolyte balance, acid-base balance, and normal neuromuscular function. If the blood potassium concentration is lower than 3.5mmol / L, hypokalemia may occur, while the blood potassium concentration is higher than 5.5mmol / L, it may lead to hyperkalemia. Both conditions may cause serious effects on the heart and other important organs.
[0003] Traditional methods for detecting blood potassium levels rely on regular blood chemistry tests, which are invasive and cannot be monitored in real time. Although some studies have been conducted on existing blood potassium estimation methods based on electrocardiogram (ECG) analysis, there are still problems such as insufficient accuracy, insufficient data samples, and poor real-time performance. With the rapid development of deep learning technology, more and more studies have begun to try to use deep learning models to estimate blood potassium levels. Existing methods mainly rely on real data training, but real data often have limited samples and it is difficult to cover all changes in blood potassium levels. Summary of the invention
[0004] 1. Technical issues to be solved
[0005] In view of the problems of insufficient accuracy of blood potassium concentration estimation and incomplete data samples in the prior art, the present invention provides a non-invasive blood potassium concentration estimation method, device, computer equipment and storage medium, which combines real electrocardiogram data with simulated electrocardiogram data and accurately estimates blood potassium concentration through deep learning model training, effectively improves the robustness of the deep learning model under different blood potassium concentrations, and enhances the ability to recognize abnormal electrocardiogram signals.
[0006] 2. Technical solution
[0007] The purpose of the present invention is achieved through the following technical solutions.
[0008] A non-invasive method for estimating blood potassium concentration comprises the following steps:
[0009] Collect real ECG data, pre-process the real ECG data, and extract key physiological features from the real ECG data;
[0010] Generate simulated electrocardiogram data, perform data enhancement on the simulated electrocardiogram data, and extract key physiological features from the simulated electrocardiogram data;
[0011] The real electrocardiogram data and the simulated electrocardiogram data are mixed to obtain a mixed data set, and the mixed data set is divided into a training set, a validation set, and a test set;
[0012] Constructing a deep learning model, wherein the deep learning model includes a convolution module, a feature compression module, a global feature aggregation module and a classification output module;
[0013] The deep learning model is trained based on the training set, and the deep learning model in the training process is evaluated based on the validation set to obtain a trained deep learning model;
[0014] The test set is input into the trained deep learning model for non-invasive blood potassium concentration estimation to obtain the estimation result.
[0015] As a further improvement of the present invention, in the deep learning model, the convolution module extracts features from the mixed data set to obtain deep features, the feature compression module compresses and expands the deep features to obtain enhanced deep features, the global feature aggregation module compresses the enhanced deep features into a global deep feature vector through a global average pooling layer, and the classification output module maps the global deep feature vector to the target output through a fully connected layer.
[0016] As a further improvement of the present invention, the training of the deep learning model based on the training set includes: constrained training through signal feature loss of simulated electrocardiogram data, joint constrained training through real electrocardiogram data and simulated electrocardiogram data, constrained training through adversarial learning fusion simulation rules and / or soft constraint training based on physiological laws.
[0017] As a further improvement of the present invention, the constraint training is performed by simulating the signal feature loss of electrocardiogram data, and the specific steps include:
[0018] Extract key physiological features from simulated ECG data;
[0019] Align the extracted key physiological features with the deep features learned by the deep learning model during training;
[0020] The deep learning model is constrained during the training process through the feature loss function.
[0021] As a further improvement of the present invention, the joint constraint training using real electrocardiogram data and simulated electrocardiogram data specifically comprises the following steps:
[0022] For simulated ECG data, feature loss is used to constrain the feature learning of the deep learning model;
[0023] For real ECG data, the classification of blood potassium concentration by deep learning model is optimized by classification loss;
[0024] The feature loss of the simulated ECG data and the classification loss of the real ECG data are weighted and combined to form a total loss function;
[0025] The deep learning model is constrained during the training process through the total loss function.
[0026] As a further improvement of the present invention, the constraint training is performed by fusing the simulation rule with adversarial learning, and the specific steps include:
[0027] Construct a discriminator to distinguish physiological key features from deep features;
[0028] Optimizing the generator to make it conform to the simulation law, wherein the simulation law is the physiological law contained in the simulated electrocardiogram data;
[0029] Construct a joint loss function by combining the classification loss with the generator’s adversarial loss;
[0030] The deep learning model is constrained during the training process through a joint loss function.
[0031] As a further improvement of the present invention, the soft constraint training based on physiological laws specifically comprises the following steps:
[0032] Soft constraints that define simulation rules;
[0033] Define the constraint loss function and construct the total loss function through classification loss and constraint loss;
[0034] The deep learning model is constrained during the training process through the total loss function.
[0035] A non-invasive blood potassium concentration estimation device, comprising:
[0036] A data acquisition module collects real ECG data, pre-processes the real ECG data, and extracts key physiological features from the real ECG data;
[0037] A data generation module generates simulated electrocardiogram data, performs data enhancement on the simulated electrocardiogram data, and extracts key physiological features from the simulated electrocardiogram data;
[0038] A data processing module, mixing the real electrocardiogram data and the simulated electrocardiogram data to obtain a mixed data set, and dividing the mixed data set into a training set, a validation set, and a test set;
[0039] A model building module, which builds a deep learning model, wherein the deep learning model includes a convolution module, a feature compression module, a global feature aggregation module and a classification output module;
[0040] Model training module: trains the deep learning model based on the training set, evaluates the deep learning model during the training process based on the validation set, and obtains a trained deep learning model;
[0041] The concentration estimation module inputs the test set into the trained deep learning model to perform non-invasive blood potassium concentration estimation and obtain the estimation result.
[0042] A computer device comprises a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and wherein the processor implements any of the above-mentioned methods when executing the computer program.
[0043] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any of the above methods is executed.
[0044] 3. Beneficial effects
[0045] Compared with the prior art, the advantages of the present invention are:
[0046] (1) The present invention provides a non-invasive blood potassium concentration estimation method, device, computer equipment and storage medium, which generates simulated electrocardiogram data through a biophysical model and organically combines the simulated electrocardiogram data with real electrocardiogram data, thereby covering the problem of insufficient real electrocardiogram data samples and maintaining the distribution characteristics of real electrocardiogram data, thereby providing comprehensive and balanced training input for deep learning models.
[0047] (2) The present invention provides a non-invasive blood potassium concentration estimation method, device, computer equipment and storage medium. During the deep learning model training process, simulation rules are introduced, and the deep learning model is comprehensively optimized through methods such as feature alignment, joint training, adversarial learning and soft constraints. This can not only improve the accuracy of non-invasive estimation of blood potassium concentration, but also ensure that the estimation result has a clear physiological interpretation, providing a valuable reference for clinical decision-making.
[0048] (3) The non-invasive blood potassium concentration estimation method, device, computer equipment and storage medium of the present invention, combined with the biophysical simulation model and deep learning technology, effectively enhance the diversity of electrocardiogram data. In particular, in the task of non-invasive blood potassium concentration estimation, the simulated data not only makes up for the defects in the real data, but also can simulate the electrocardiogram signals under a variety of blood potassium concentrations, thereby broadening the application scope of the deep learning model. It can be widely used in portable medical equipment, remote health monitoring systems and personalized medicine, and has strong practicality and wide applicability. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1This is a flow chart of a non-invasive blood potassium concentration estimation method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0050] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0051] Example
[0052] like Figure 1 As shown, a non-invasive blood potassium concentration estimation method provided by this embodiment. The method includes: collecting real electrocardiogram data, preprocessing the real electrocardiogram data, and extracting key physiological features from the real electrocardiogram data; generating simulated electrocardiogram data, performing data enhancement on the simulated electrocardiogram data, and extracting key physiological features from the simulated electrocardiogram data; mixing the real electrocardiogram data and the simulated electrocardiogram data to obtain a mixed data set, and dividing the mixed data set into a training set, a validation set, and a test set; constructing a deep learning model, the deep learning model includes a convolution module, a feature compression module, a global feature aggregation module, and a classification output module; training the deep learning model based on the training set, and evaluating the deep learning model in the training process based on the validation set to obtain a trained deep learning model; inputting the test set into the trained deep learning model to perform non-invasive blood potassium concentration estimation and obtain an estimation result.
[0053] Specifically in this embodiment, real electrocardiogram data is collected and screened from existing public data sets. It should be noted that the real electrocardiogram data corresponds to the blood potassium concentration test data performed within a few hours. In the prior art, blood potassium levels are divided into three categories: hypokalemia, blood potassium concentration <3.5mmol / L; normal blood potassium, blood potassium concentration 3.5mmol / L-5.0mmol / L; hyperkalemia, blood potassium concentration>5.0mmol / L.
[0054] After the real electrocardiogram data is collected, it is necessary to pre-process the real electrocardiogram data. In this embodiment, the pre-processing includes filtering, normalization processing and feature extraction.
[0055] As for filtering, since real ECG data is usually accompanied by high-frequency noise (e.g., electromagnetic interference), low-frequency noise (e.g., baseline drift) and environmental noise (e.g., electromyographic interference), these noises will seriously interfere with the detection of waveform features of real ECG data. Filtering is used to eliminate noise interference in real ECG data, retain the core waveform shape, and provide clear data input for subsequent steps. The processing method specifically includes: (1) using a low-pass filter (cutoff frequency 50Hz) to remove high-frequency noise and ensure smooth edges of ECG signals; (2) using a bandpass filter (0.5Hz to 50Hz) to eliminate low-frequency drift and further remove high-frequency interference; (3) to avoid phase distortion, a zero-phase filter (e.g., a bidirectional Butterworth filter) is used to ensure the integrity of the waveform on the time axis.
[0056] For normalization, after filtering, the main noise in the real ECG data has been removed, but the amplitude difference may still affect the deep learning model's learning of key physiological features. Due to differences in acquisition equipment, acquisition conditions and individual patients, the amplitude of ECG signals of different samples may vary significantly. For example, different electrode contact quality or patient skin resistance can cause the ECG signal amplitude to be amplified or reduced. Amplitude differences can cause the deep learning model to be overly sensitive to or ignore the features of certain samples, affecting the stability of training. Therefore, normalization is used to eliminate individual differences in ECG signal amplitude, ensure the consistency of sample data, provide standardized input for deep learning model training, and ensure the accuracy of subsequent feature calculations. The processing methods specifically include: (1) zero averaging, adjusting the ECG signal mean to 0 to eliminate overall offset; (2) standardization, adjusting the ECG signal standard deviation to 1, unifying the dynamic range of amplitude, and ensuring that all samples are on the same scale.
[0057] For feature extraction, key physiological features that reflect the physiological laws of real ECG data are extracted through feature extraction. Key physiological features are not only used to build the basis for subsequent alignment of real ECG data and simulated ECG data, but also to make physiological laws explicit. For example, the characteristics closely related to changes in blood potassium concentration, such as QT interval and T wave shape, are extracted, so that the deep learning model can effectively embed the physiological characteristics of simulated ECG data during the training process. At the same time, feature extraction provides clear data support for subsequent deep learning model training methods (for example, physiological law constraints, joint optimization, etc.). The processing methods specifically include: (1) time domain feature extraction, using a peak detection algorithm (e.g., threshold-based peak detection) to extract the P wave, QRS complex, and T wave of real ECG data; calculating the key physiological characteristics of each waveform (e.g., amplitude, width, and interval); extracting statistical features such as heart rate variability (HRV); (2) frequency domain feature extraction, using fast Fourier transform (FFT) to analyze the spectral characteristics of real ECG data and extract the energy distribution of low-frequency and high-frequency bands; (3) time-frequency domain feature extraction, combining wavelet transform to extract local changes in time and frequency of real ECG data.
[0058] Therefore, by preprocessing the real ECG data, the interference of irrelevant ECG signals can be eliminated, the standardization and consistency of ECG signals can be ensured, and key physiological features can be extracted to provide high-quality data for subsequent deep learning model training.
[0059] Further, simulated electrocardiogram data is generated. In this embodiment, the simulated electrocardiogram data is generated using an existing biophysical model. It should be noted that the biophysical model is the basis for generating simulated electrocardiogram data and can accurately describe the electrophysiological process of the heart. The electrophysiological process of the heart is simulated by a biophysical simulation model (for example, the Hodgkin-Huxley model, the Luo-Rudy model, and the TenTusscher model, etc.), thereby generating electrocardiogram signals under different blood potassium concentrations.
[0060] Specifically, at different blood potassium concentrations, the conductivity and membrane potential of potassium ion channels change significantly, which will directly affect the performance of action potentials and ECG signals of cardiomyocytes. Therefore, it is necessary to adjust the ion concentration and electrophysiological parameters in the biophysical simulation model to generate ECG data at different blood potassium concentrations. The specific settings are as follows: normal blood potassium concentration, about 3.5mmol / L-5.0mmol / L; low blood potassium concentration, about 2.0-mmol / L3.0mmol / L and below; high blood potassium concentration, about 5.5mmol / L-6.5mmol / L and above. At the same time, adjust the parameters related to potassium ion (K+) channels (for example, potassium ion channel conductivity and resting membrane potential, etc.) to simulate the effect of different potassium concentrations on cardiac action potentials.
[0061] Then, simulated ECG data is generated through the biophysical model. The core goal of generating simulated ECG data is to gradually simulate the formation process of ECG signals through multi-level modeling (e.g., single cell, tissue level, body surface projection), from electrical activity at the ion level to tissue electrical activity, and then to body surface ECG signals, and finally generate complete ECG data covering different blood potassium concentrations. The specific steps include:
[0062] (1) Single-cell action potential simulation: basic unit modeling
[0063] Single-cell action potential simulation is the basis of cardiac electrical activity simulation. By establishing an electrophysiological model of a single cardiomyocyte, the direct effects of different blood potassium concentrations on cell membrane potential and ion channel dynamics are captured. Single-cell action potential simulation provides kinetic parameters at the ion level for subsequent tissue-level electrical activities and is the basic unit for simulating cardiac electrical activities. Specific methods include: using the Hodgkin-Huxley model, Luo-Rudy model or Ten Tusscher model to simulate the action potential of a single cardiomyocyte and capture the effects of different blood potassium concentrations on ion channel dynamics. By adjusting the conductivity, resting membrane potential and kinetic parameters of the repolarization process of potassium ion channels, the effects of changes in blood potassium concentration on cell membrane electrical activity are accurately simulated. When blood potassium is high, the action potential duration (APD) is shortened and the repolarization speed is accelerated; when blood potassium is low, the action potential is prolonged and the repolarization speed is slowed down. During the simulation process, key physiological features are extracted, including the action potential duration (APD) to reflect the changes in the electrical activity cycle, and the maximum depolarization potential and repolarization slope are used to quantify the depolarization and repolarization characteristics of the cell membrane, providing basic data for subsequent tissue-level simulation. Therefore, through single-cell action potential simulation, the electrical activity of cardiomyocytes is simulated from the ion channel and membrane potential levels, providing basic parameters for higher-level simulations.
[0064] (2) 2D / 3D cardiac tissue electrical activity simulation: tissue-level modeling
[0065] Based on the electrical activity of single cells, the electrical activity propagation process between myocardial cells is simulated through a two-dimensional or three-dimensional tissue model to capture the spatiotemporal characteristics of local electrical activity. Through cardiac tissue-level simulation, the electrical activity propagation behavior of a larger spatial scale is constructed, and this process directly provides the basic electrical activity distribution for the generation of surface electrocardiograms. The specific method includes: using the FitzHugh-Nagumo model or the Bidomain model to simulate the electrical activity propagation between cells in cardiac tissue, and capturing the spatiotemporal propagation characteristics of electrical activity in tissues by defining the electrical coupling between cells on a two-dimensional or three-dimensional grid. By adjusting the potassium ion channel parameters, the effects of different blood potassium concentrations on the propagation of electrical activity are simulated, especially the abnormal propagation characteristics such as the local reentry phenomenon caused by hyperkalemia. The electrical activity propagation speed is extracted in the simulation to quantify the propagation changes under different blood potassium concentrations, and the potential gradient distribution is calculated to reflect the synchronization of electrical activity in cardiac tissue, providing input data of tissue-level electrical activity for the generation of surface electrocardiograms. Therefore, through two-dimensional / three-dimensional cardiac tissue electrical activity simulation, the single cell simulation is extended to the tissue scale, the electrical activity propagation characteristics between cells are simulated, and the spatial distribution basis is provided for the generation of surface electrocardiograms.
[0066] (3) Surface ECG Generation: Final Signal Modeling
[0067] By projecting the electrical activity of the heart tissue onto the body surface, the final ECG signal is generated, covering a complete 12-lead surface ECG. Surface ECG generation is the ultimate goal of the simulation process. Its signal features are transmitted and accumulated layer by layer by single-cell and tissue-level simulations, and finally present the complete characteristics of cardiac electrical activity. The specific method includes: using an electric field model (for example, the Duchateau model) to project the electrical activity in the two-dimensional or three-dimensional heart tissue onto the body surface to generate a complete 12-lead ECG signal. During the simulation process, the potential field of the heart tissue is mapped to the surface lead position, and the influence of the lead position, conductivity and body surface geometry is combined to accurately simulate the influence of different blood potassium concentrations on the ECG characteristics. The generated ECG data can reflect the changes in the QT interval and T wave shape under specific blood potassium levels. For example, hypokalemia leads to a prolonged QT interval and a flat T wave; hyperkalemia causes a shortened QT interval and a sharp T wave. This process provides complete data support for the diversity of ECG features and deep learning model training. Therefore, through surface ECG generation, the tissue-level electrical activity is projected onto the body surface to generate a 12-lead ECG signal reflecting the overall cardiac electrical activity, and finally the simulated ECG data is obtained, showing the characteristic changes under different blood potassium concentrations.
[0068] It should be noted that in this embodiment, after the simulated ECG data is generated, it is necessary to perform data enhancement and balancing on the simulated ECG data. By performing data enhancement and balancing on the simulated ECG data, various changes and uncertainties in the real acquisition scene can be simulated, thereby improving the adaptability of the deep learning model to the real ECG data.
[0069] In this embodiment, in order to improve the generalization ability of the deep learning model, the following data enhancement methods are used to enhance the simulated electrocardiogram data:
[0070] (1) Noise addition. By adding noise, the simulated ECG data is made closer to the characteristics of the actual collected data. By adding Gaussian noise, low-frequency noise and electromyographic interference to the simulated ECG data, the common electronic interference, baseline drift and muscle activity noise in the actual acquisition process are simulated, making the simulated ECG data closer to the actual signal characteristics. Specifically, Gaussian noise with a standard deviation of 1%-5% of the signal mean is added, slowly changing low-frequency noise is generated using a sine wave or polynomial, and electromyographic interference is generated using high-frequency filtering (20Hz-100Hz). By adding noise, the generated simulated ECG data appears more realistic in a noisy environment, improving the robustness of the deep learning model to noise interference.
[0071] (2) Time-shift processing. By simulating the offset of the starting position of the ECG signal, the robustness of the deep learning model to the time alignment problem is improved. Specifically, by randomly time-shifting the ECG signal (for example, 10ms-50ms) to simulate the offset of the starting position of the ECG signal, the adaptability of the deep learning model to the time alignment problem is improved. After time shifting, the integrity of the ECG signal is maintained through periodic padding or zero padding, and all leads are ensured to shift synchronously to avoid phase deviation. Through time-shift processing, the robustness of the deep learning model to the timing changes of the ECG signal can be enhanced, which is suitable for complex scenarios with large ECG cycle offsets.
[0072] (3) Amplitude adjustment and frequency change. By adjusting the amplitude and frequency of the ECG signal, ECG signals under various blood potassium concentrations are generated to simulate physiological diversity. By randomly adjusting the amplitude and frequency of the ECG waveform, physiological diversity under various blood potassium concentrations is simulated. Specifically, the ECG signal amplitude is adjusted as a whole or the amplitudes of the P wave, QRS complex, and T wave are adjusted individually (for example, in hyperkalemia, the T wave increases), and the ECG signal frequency is adjusted by changing the ECG signal period or using Fourier transform (FFT) band scaling (for example, the heart rate increases from 60bpm to 100bpm). Through amplitude adjustment and frequency change, the generated diversified ECG signals can cover a wider range of physiological conditions, improving the deep learning model's ability to learn dynamic changes.
[0073] (4) Interpolation technology. Generate more intermediate points between samples of known blood potassium concentration to expand the coverage of the data set. Specifically, linear interpolation, polynomial interpolation or spline interpolation are used to generate intermediate data points between samples of known blood potassium concentration to expand the coverage of the data set. At the same time, quality detection is performed to ensure the smoothness and consistency of the generated ECG signal. Through interpolation technology, the blank areas in the blood potassium concentration distribution can be filled, making the generated simulated ECG data more continuous and uniform, and improving the estimation accuracy of the deep learning model for blood potassium concentration.
[0074] It should be noted that, in response to the problems of insufficient abnormal samples and class imbalance, this embodiment adopts a data balancing strategy to improve the balance of the data set. Data balancing strategies include existing undersampling, oversampling and SMOTE strategies. Undersampling reduces the dominant position of normal samples in the data set by randomly selecting a part of the normal samples. Oversampling supplements the number of abnormal potassium samples (for example, hyperkalemia or hypokalemia) through data enhancement. SMOTE generates comprehensive features of minority class samples by interpolation, further expanding the data coverage. Thus, the data balancing strategy can achieve class balance in the training data set, avoid the bias of the deep learning model towards normal samples, and enhance the sensitivity to rare samples.
[0075] In this embodiment, after data enhancement and balancing of the simulated ECG data, the simulated ECG data and the real ECG data are mixed to obtain a mixed data set. The simulated ECG data and the real ECG data are organically combined by the mixed data set, which can not only cover the areas where the real ECG data samples are insufficient, but also maintain the distribution characteristics of the real ECG data, providing a comprehensive and balanced training input for the deep learning model.
[0076] Specifically, a comprehensive data set is constructed by mixing simulated ECG data and real ECG data. First, the quantitative distribution of samples with different blood potassium concentrations in the real ECG data is analyzed, sparse areas are identified, and the simulated ECG data is used to supplement them, while maintaining the consistency of the characteristics of the two types of data. In order to avoid the simulated ECG data from excessively affecting the distribution of the real ECG data, the simulated ECG data and the real ECG data are mixed by setting the weight ratio (for example, 3:1) to ensure a more comprehensive data distribution, so as to effectively avoid the problem of underfitting of the deep learning model on certain sample categories and improve the deep learning model's ability to estimate multiple blood potassium concentrations. At the same time, the deep learning model can not only learn the statistical characteristics of the actual clinical scenario from the real ECG data, but also obtain clear physiological index benchmarks from the simulated ECG data. After obtaining the mixed data set, the mixed data set is divided into a training set, a validation set, and a test set.
[0077] Furthermore, a deep learning model is constructed. In this embodiment, the deep learning model adopts a multi-stage convolutional neural network structure, and gradually extracts the deep features of the electrocardiogram signal in the mixed data set through stacked convolution operations. The deep learning model includes a convolution module, a feature compression module, a global feature aggregation module, and a classification output module.
[0078] In the convolution module, each stage contains several one-dimensional convolution layers (e.g., Conv1, Conv2, ..., ConvK), which slide the one-dimensional convolution kernel in the time dimension to extract the local time series features (e.g., P wave, QRS complex, T wave, etc.) in the ECG signal. The convolution layer is followed by a batch normalization layer (Batch Normalization) and an activation function (e.g., ReLU activation function), which accelerates the training of deep learning models and enhances nonlinear expression capabilities.
[0079] In the feature compression module, as the network depth increases, the time dimension gradually decreases and the number of feature channels gradually increases. For example, the time dimension is 5000 steps in the initial stage. After multiple layers of convolution and pooling, the time dimension may be reduced to 39 steps, and the number of channels increases from 12 dimensions to 1024 dimensions. By gradually compressing and expanding, the feature expression ability of the deep learning model is enhanced, enabling it to capture more abstract and complex deep features.
[0080] In the global feature aggregation module, after all convolutional layers, a global average pooling layer is used to compress the time dimension into a global depth feature vector of fixed size. This process not only reduces the number of parameters and prevents overfitting, but also retains the global time information, which is convenient for subsequent classification processing.
[0081] In the classification output module, the global feature vector is mapped to the target output through the fully connected layer. The output dimension is (*, 3), where * represents the batch size, that is, the number of samples input into the deep learning model at one time, and 3 corresponds to three classification tasks: hypokalemia, normal blood potassium, and hyperkalemia. The output is converted into a probability distribution using the Softmax activation function for multi-class classification.
[0082] Therefore, in this embodiment, the mixed data set is input into the deep learning model, the convolution module extracts features from the mixed data set to obtain deep features, the feature compression module compresses and expands the deep features to obtain enhanced deep features, the global feature aggregation module compresses the enhanced deep features into global deep feature vectors through the global average pooling layer, and the classification output module maps the global deep feature vectors to the target output through the fully connected layer.
[0083] It is worth noting that in this embodiment, the deep learning model is trained by the training set, so that a deep learning model that can accurately and non-invasively estimate the blood potassium concentration and has physiological rationality can be constructed. The deep learning model provided in this embodiment not only needs to automatically extract key physiological features from the electrocardiogram (ECG) signal, but also needs to introduce the physiological laws contained in the simulated ECG data during the training process, that is, the simulation laws, to constrain the learning process of the deep learning model and improve the interpretability and estimation robustness of the deep learning model for ECG signals.
[0084] Therefore, in this embodiment, an end-to-end deep learning method is used to directly input a mixed data set that has not been characterized, and the deep features of the electrocardiogram data are automatically extracted and learned through a multi-layer convolutional neural network (CNN). At the same time, simulation rules are introduced to comprehensively optimize the deep learning model during the training phase through methods such as feature alignment, joint training, adversarial learning, and soft constraints.
[0085] During the training process, the complementarity of real ECG data and simulated ECG data is fully considered in the input stage of the deep learning model. On the one hand, the real ECG data truly reflects the real physiological state in the clinical environment. On the other hand, the simulated ECG data generated based on the biophysical model provides a clear and controllable physiological feature reference for the deep learning model. By mixing the real ECG data and the simulated ECG data, the input data can retain the characteristic distribution of the real ECG signal and introduce the physiological regularity guidance contained in the simulated ECG signal during the training process.
[0086] In this embodiment, the input of the deep learning model is the preprocessed ECG signal in the training set, specifically a standard 12-lead ECG signal. The length of each ECG signal is 5000 sampling points, which usually corresponds to 10 seconds of ECG data (sampling rate is 500Hz). The dimension of the input data is defined as (*, N, 5000), where * represents the batch size (Batchsize), that is, the number of samples input at one time, N represents the number of leads, the standard is 12 (can be expanded to single lead or multiple leads according to demand), and 5000 represents the signal length, that is, the number of time points per lead.
[0087] Using the training set as the input of the deep learning model allows the deep learning model to simultaneously perceive the differences and connections between real physiological signals and their idealized feature distributions in the early stages of training, laying the foundation for subsequent deep learning model optimization and feature extraction (for example, deep feature learning of each convolutional layer, attention allocation, alignment of features and simulation rules, etc.).
[0088] During the end-to-end training of the deep learning model, although the input is the signal waveform in the training set, the physiological features clearly defined in the simulated ECG data (for example, QT interval and T wave morphology indicators) will indirectly participate in feature learning through specific strategies during training. Specific manifestations include: (1) Feature extraction of simulated ECG data. The biophysical simulation model is used to generate ECG signals under different blood potassium concentrations, and key physiological features are extracted from them, such as QT interval (indicating action potential duration) and T wave shape (indicating repolarization process). These features serve as targets or constraints to guide the deep learning model to learn the correct physiological laws. (2) Feature representation of the middle layer of the deep learning model. The deep learning model automatically extracts features through the convolutional layer. These features imply the temporal pattern of the ECG signal (for example, waveform, amplitude and frequency). Through feature alignment or supervision mechanism, the features of the simulated ECG data are used to optimize the middle layer representation of the deep learning model, so that the learning direction of the deep learning model is more in line with physiological laws. (3) Feature embedding method. The features of the simulated ECG data are embedded into the training process of the deep learning model by using strategies such as feature loss, joint training, and adversarial learning. That is, by adding items related to the features of the simulated ECG data into the loss function, it is ensured that the deep learning model not only performs well in the classification task, but also captures the physiological characteristics closely related to blood potassium concentration.
[0089] Therefore, in this embodiment, the multi-dimensional feature participation method ensures that the deep learning model has strong physiological interpretability and robustness while achieving high-precision classification.
[0090] In order to further improve the estimation ability and physiological consistency of the deep learning model, this embodiment adopts a multi-level optimization strategy during the training process. In the prior art, only classification loss may cause the deep learning model to overfit statistical features and ignore the deep physiological significance. Therefore, in this embodiment, the physiological laws contained in the simulated electrocardiogram data are infiltrated into the deep learning model through a variety of training strategies. The training strategy can balance the classification performance and physiological rationality of the deep learning model, and finally obtain an estimation model with excellent performance and explainability.
[0091] It is worth noting that this embodiment proposes four training strategies to perform constrained training on the deep learning model, including: constrained training through signal feature loss of simulated ECG data, joint constrained training through real ECG data and simulated ECG data, constrained training through adversarial learning (Adversarial Training) fusing simulation rules and / or soft constraint training based on physiological laws.
[0092] Constrained training is performed on the signal feature loss of simulated ECG data. In deep learning model training, only classification loss may cause the deep learning model to overfit and ignore the underlying physiological laws. By introducing key physiological features extracted from simulated ECG data signals (for example, QT interval and T wave shape) as the learning target of the deep learning model, the learning direction of the deep learning model can be effectively constrained, so that it not only has high classification accuracy but also conforms to physiological rationality. The specific steps include:
[0093] (1) Extracting key physiological features from simulated ECG data: In order to ensure that the deep learning model can follow known physiological laws during the learning process, it is necessary to extract key physiological features related to changes in blood potassium concentration from the simulated ECG data.
[0094] S1. Generate simulated ECG data using a biophysical simulation model, and generate corresponding ECG signals according to different blood potassium concentrations through the biophysical simulation model. Use the simulated ECG data to simulate the changes in the ECG under different blood potassium concentrations, and reflect the specific impact of blood potassium concentration on cardiac electrical activity;
[0095] S2. Extract key physiological features. Extract key physiological features related to blood potassium concentration from the generated simulated ECG data, such as QT interval, T wave amplitude and shape, etc. These key physiological features not only represent the basic form of ECG signals, but are also directly related to changes in blood potassium concentration. For example, the QT interval represents the duration of the action potential, and an increase in blood potassium concentration generally leads to a shortening of the QT interval; the T wave shape reflects the repolarization process, and changes in blood potassium concentration will affect the amplitude and sharpness of the T wave.
[0096] S3. Feature extraction method, feature extraction can be based on signal processing technology, such as peak detection, filtering and time domain analysis, or it can directly extract simulated ECG data. The feature extraction method ensures that the extracted features accurately reflect the physiological changes of ECG signals.
[0097] (2) Align the extracted key physiological features with the deep features automatically learned by the deep learning model during the training process to ensure that the learning direction of the deep learning model is consistent with the physiological laws.
[0098] S1. Define feature representation, define x as electrocardiogram data; define key physiological features as f simulation (x), that is, through f simulation The function extracts features from the simulated ECG data to obtain key physiological features; the deep features automatically learned by the deep learning model during the training process are defined as f model (x), labelled f model (x) is the depth feature.
[0099] S2. Calculate the feature alignment loss by calculating the key physiological features f simulation (x) and deep features f model The mean squared error (MSE) between (x) defines the feature alignment loss, which is expressed as:
[0100]
[0101] in, represents feature alignment loss, ||...|| represents the Euclidean norm of the vector, which is the L2 norm in this embodiment.
[0102] S3. Feature alignment strategy, by incorporating feature alignment loss into the total loss function, the deep learning model not only optimizes classification accuracy during training, but also approaches the physiological features defined in the simulated ECG data. The feature alignment strategy helps reduce the physiological bias that may be generated by the deep learning model in an unconstrained situation and ensures that the features learned by the deep learning model are physiologically reasonable.
[0103] (3) Introducing feature loss. After defining the feature alignment loss, it needs to be incorporated into the total loss function of the deep learning model to constrain the deep learning model during the training process.
[0104] S1. Define the total loss function, which converts the classification loss during the deep learning model training process and feature alignment loss Combined to form the total loss function, the total loss function is expressed as:
[0105]
[0106] in, represents the total loss function for constrained training by simulating the signal feature loss of electrocardiogram data, and λ represents the weight coefficient, which is used to balance the weight of classification loss and feature loss.
[0107] S2. The selection of weight coefficient λ needs to be adjusted according to the specific training situation. When the weight coefficient λ is increased, the deep learning model will pay more attention to feature alignment and enhance physiological rationality, but may sacrifice some classification accuracy; when the weight coefficient λ is reduced, the opposite is true. Therefore, in practical applications, it is necessary to select the appropriate weight coefficient λ through methods such as cross-validation to achieve the best balance effect.
[0108] Therefore, by introducing the feature loss of simulated ECG data, the physiological interpretability of the deep learning model can be significantly enhanced, making the features learned by the deep learning model closer to the simulation law. At the same time, feature loss, as an additional constraint, can effectively prevent the deep learning model from overfitting certain specific patterns in the training data, thereby improving the generalization ability and robustness of the deep learning model. The introduction of feature loss not only ensures that the deep learning model follows the physiological laws, but also makes it more adaptable and able to maintain high performance and reliability in actual application scenarios with different data distributions.
[0109] For joint constrained training with real ECG data and simulated ECG data. Real ECG data contains real distribution characteristics and clinical significance, but it may be noisy and complex. Simulated ECG data has clear physiological regularity and controllability, but it does not fully match the real complexity. Therefore, through joint training, the deep learning model can learn both normalized physiological characteristics on simulated ECG data and real distribution on real ECG data, thereby obtaining a deep learning model with both performance and interpretability. In this embodiment, different loss functions are constructed for real ECG data and simulated ECG data, and their contributions are balanced during the training process. The specific steps include:
[0110] S1. For simulated ECG data, feature loss Constrain the feature learning of the deep learning model so that the deep learning model can learn feature representations that conform to physiological laws.
[0111] S2. For real ECG data, through classification loss (e.g., cross entropy loss) optimizes the accuracy of the deep learning model in classifying blood potassium concentration.
[0112] S3. Construct a loss function to convert the feature loss of simulated ECG data into and the classification loss of real ECG data Perform weighted combination to form the total loss function, which is expressed as:
[0113]
[0114] in, represents the total loss function of joint constrained training through real ECG data and simulated ECG data, and α and β represent weight coefficients, which are used to balance the contribution of feature loss and classification loss.
[0115] S4. The weight coefficients α and β need to be adjusted according to the specific task requirements and data distribution. In this embodiment, appropriate weights can be determined by cross-validation and other methods, so that the deep learning model can maintain good adaptability to the actual data distribution while learning the physiological regularity characteristics.
[0116] Therefore, by jointly constraining the training of real ECG data and simulated ECG data, the complementary characteristics of simulated ECG data and real ECG data can be fully utilized. The simulated ECG data provides clear guidance on physiological laws, while the real ECG data improves the adaptability of the deep learning model to real scenarios. This complementarity helps the deep learning model to achieve better performance in many aspects. By combining the two loss functions, the deep learning model can achieve a better balance between classification performance and physiological consistency, so that the overall estimation ability is significantly improved. In addition, by jointly training the simulated ECG data with the real ECG data, the generalization ability of the deep learning model is enhanced, so that it can better adapt to different data distributions and actual application environments, greatly improving its application value in actual medical environments.
[0117] For constrained training by integrating simulation rules through adversarial learning. In this embodiment, adversarial learning is performed by introducing a generator and a discriminator. The generator is used to generate representations of key physiological features, and the discriminator is used to determine whether the key physiological features come from simulated electrocardiogram data. This process makes the features learned by the deep learning model closer to physiological rules. The specific steps include:
[0118] (1) Construct a discriminator to distinguish physiological key features and deep features.
[0119] S1. The discriminator D is a binary classifier whose task is to determine whether the input features come from simulated ECG data. The discriminator needs to learn to distinguish key physiological features from deep features.
[0120] S2. Define the discriminator loss. The discriminator loss function aims to maximize its ability to distinguish key physiological features and deep features, which is expressed as:
[0121]
[0122] Where D(·) represents the discriminator function, which is used to determine whether the input feature is a physiological key feature or a deep feature. The output is usually a probability between 0 and 1, indicating the credibility of the input feature being judged as a physiological key feature; f simulation (x) represents key physiological characteristics, f model (x) represents the depth feature; xreal represents the real ECG data, represents the operator that takes the expected distribution of the real ECG data, that is, the statistical average of the real ECG data, x sim represents the simulated electrocardiogram data, It represents the operator for taking the expected distribution of the simulated ECG data, that is, finding the statistical average of the simulated ECG data.
[0123] S3. Training of the discriminator. During the training process, the discriminator continuously optimizes its parameters to improve its discrimination ability. At the same time, the generator, that is, the deep learning model, optimizes its parameters so that the discriminator cannot distinguish between key physiological features and deep features, so that the deep learning model can generate feature representations that are more in line with physiological laws.
[0124] (2) Optimize the generator to make it conform to the simulation rules. In the adversarial learning framework, the goal of the generator is to generate features that cannot be accurately distinguished by the discriminator, so as to approach the physiological rules of the simulated ECG data.
[0125] S1. The goal of the generator is to optimize its own parameters so that the deep features generated by the deep learning model can be considered by the discriminator as key physiological features from simulated ECG data.
[0126] S2. Define the adversarial loss of the generator. The adversarial loss function of the generator aims to minimize the discriminator's ability to distinguish its generated features, which is expressed as:
[0127]
[0128] in, The adversarial loss function of the representation generator is used to train the deep learning model to generate feature representations that are closer to key physiological features.
[0129] S3. Generator optimization, by minimizing the generator loss, the deep learning model will generate feature representations that are more consistent with the physiological laws of simulated ECG data. This not only improves the physiological rationality of the model features, but also enhances the generalization ability of the deep learning model on real data.
[0130] (3) Joint loss function. In the adversarial learning framework, the total loss function needs to combine the classification loss and the adversarial loss of the generator to achieve dual optimization of classification accuracy and feature physiological rationality.
[0131] S1. Define the total loss function, combine the classification loss with the adversarial loss to form the total loss function, which is expressed as:
[0132]
[0133] in, It represents the total loss function of constrained training through adversarial learning and simulation rules, and γ represents the weight coefficient, which is used to balance the weight of classification loss and generator loss.
[0134] S2. Setting of weight coefficient γ. The selection of weight coefficient γ needs to be adjusted according to specific task requirements and training conditions. When the weight coefficient γ increases, the deep learning model will pay more attention to the physiological rationality of the features, but it may affect the classification accuracy. When the weight coefficient γ decreases, the opposite is true. Therefore, the optimal weight coefficient γ needs to be determined through experiments to achieve the best balance effect.
[0135] Therefore, by integrating adversarial learning with simulation rules for constrained training, the authenticity of features can be enhanced, making the features generated by the deep learning model more consistent with the simulation rules. The adversarial mechanism not only improves the physiological consistency of features, but also achieves continuous optimization of feature representation through the dynamic game process between the generator and the discriminator, thereby significantly improving the generalization ability and robustness of the deep learning model. In addition, the adversarial mechanism can effectively reduce the deviation of the deep learning model in specific data distribution, making it more stable and reliable in different scenarios. This method ensures that the deep learning model continues to approach physiological laws while pursuing high classification accuracy, enhancing the credibility and applicability of the deep learning model in clinical applications.
[0136] For soft constraint training based on physiological laws. Certain physiological characteristics (for example, the relationship between the QT interval and blood potassium level) have been confirmed by clinical studies. These laws are added to the training process as soft constraints. Once the deep learning model estimate violates the physiological law, it is corrected through soft penalties. Unlike hard constraints, soft constraints allow deep learning models to freely adapt to the actual data distribution within a certain range, avoiding excessive restrictions that lead to reduced performance of deep learning models. The specific steps include:
[0137] (1) Define soft constraints of simulation rules. In order to ensure that the estimation results of the deep learning model conform to known physiological rules, this embodiment encodes physiological rules as soft constraints. In specific implementation, it is necessary to define corresponding physiological constraint rules based on the influence of blood potassium concentration on ECG signals.
[0138] S1. The physiological law, i.e. the simulation law, is obtained through the biophysical simulation model. The biophysical simulation model is used to analyze the changes in ECG signals under different blood potassium concentrations and determine the relevant physiological laws. For example, when the blood potassium concentration increases, the QT interval shortens. High blood potassium accelerates the repolarization process of myocardial cells, resulting in a shortened QT interval; the T wave is sharp, and high blood potassium concentration increases the amplitude of the T wave and makes the shape sharper. When the blood potassium concentration decreases, the QT interval prolongs. Low blood potassium concentration slows down the repolarization process of myocardial cells, resulting in a prolonged QT interval; the T wave is flat. Low blood potassium concentration reduces the amplitude of the T wave and makes the shape flatter.
[0139] S2. Encode the simulation rules as constraints. According to the above physiological rules, convert them into mathematical expressions or logical rules. For example, the relationship between the QT interval and the blood potassium concentration, if the blood potassium concentration increases, the QT interval is shortened, if the blood potassium concentration decreases, the QT interval is prolonged; the relationship between the T wave shape and the blood potassium concentration, if the blood potassium concentration increases, the T wave is sharp, if the blood potassium concentration decreases, the T wave is flat.
[0140] S3. These rules are formalized as inequality constraints and embedded into the loss function of the deep learning model as a reference for optimization.
[0141] (2) Introducing constrained loss. In order to apply the above physiological laws in the deep learning model training process, these constraints need to be converted into specific loss functions. When the estimation results of the deep learning model violate the known physiological laws, the system will automatically add a penalty loss to guide the deep learning model to adjust the estimation results.
[0142] S1. Define a constraint loss function, and quantify the estimated result of the constraint violation into the degree of violation according to the defined physiological law, and express it through the constraint loss. In this embodiment, the constraint loss is expressed as:
[0143]
[0144] in, represents the constraint loss, and violations represents the degree to which the deep learning model estimation results violate the physiological constraints. For example, in the case of hyperkalemia, if the QT interval estimated by the deep learning model is not shortened to the predetermined range, a violation occurs, and vice versa.
[0145] S2. Incorporate the constraint loss into the total loss function. The total loss function combines the classification loss with the constraint loss to form a total loss function. The total loss function is expressed as:
[0146]
[0147] in, represents the total loss function of soft constraint training based on physiological laws, and δ represents the penalty coefficient, which is used to control the weight of soft constraint loss.
[0148] S3. Constrained implementation details. Soft constraints allow deep learning models to deviate from physiological laws moderately during optimization to adapt to the diversity and complexity of actual data, but will penalize behaviors that violate the laws. This approach avoids the training difficulties that may be caused by hard constraints, while ensuring that deep learning models are flexible while following physiological laws.
[0149] Therefore, soft constraint training based on physiological laws can ensure that the deep learning model strictly follows the known physiological laws during training, significantly improving the physiological rationality and credibility of the training results. By encoding physiological laws as soft constraints, the deep learning model can be flexibly adjusted during the optimization process to adapt to the diversity and complexity of actual data without limiting performance due to overly strict constraints. This soft constraint method not only maintains the flexibility of the deep learning model, enabling it to adapt to different data distributions while approaching physiological laws, but also improves the interpretability of the deep learning model estimation results through clear physiological constraints. This helps clinicians better understand and trust the decision-making process of the deep learning model, and enhances the application value of the deep learning model in actual medical decision-making.
[0150] In this embodiment, constraint training is performed by the signal feature loss of simulated ECG data, feature loss of simulated ECG data is introduced, the physiological interpretability of the deep learning model is enhanced, overfitting is prevented, and the deep learning model learns feature representations that conform to physiological laws. Joint constraint training is performed by real ECG data and simulated ECG data, and the simulated ECG data and real ECG data are used to balance regularity learning and classification performance, so that the deep learning model can maintain good adaptability to the distribution of real data while learning physiological laws. Constrained training is performed by fusing simulation laws with adversarial learning, and adversarial learning of generators and discriminators is used to make the features generated by the deep learning model more consistent with the physiological laws in the simulated ECG data, thereby improving the authenticity and physiological consistency of the features. Soft constraint training based on physiological laws, by encoding physiological laws as soft constraint conditions, guides the deep learning model to follow physiological knowledge, while maintaining flexibility, and ensures that the estimation results are physiologically reasonable and interpretable. Therefore, in this embodiment, by constraining the deep learning model, not only can the accuracy of non-invasive blood potassium concentration estimation be improved, but also the estimation results can be ensured to have a clear physiological interpretation, providing valuable reference for clinical decision-making.
[0151] In this embodiment, after constrained training of the deep learning model, the robustness of the deep learning model is verified using simulated electrocardiogram data under different blood potassium concentrations to test whether the deep learning model can accurately identify local features such as QT interval prolongation and T wave changes. The specific methods include: cross-validation, using the k-fold cross-validation method to evaluate the performance of the model under different blood potassium concentrations; confusion matrix analysis, evaluating the classification performance of the deep learning model on different categories through the confusion matrix; AUC evaluation, calculating the area under the ROC curve (AUC) to measure the overall classification ability of the deep learning model.
[0152] Furthermore, by combining simulated ECG data with real ECG data, the estimation results of the deep learning model are optimized to improve the accuracy of classification. The specific methods include: adjusting the threshold of the deep learning model, based on the output of the simulated ECG data, optimizing the decision threshold of the deep learning model in practical applications to ensure accurate and non-invasive estimation of blood potassium concentration; enhancing anomaly detection, by enhancing the simulated ECG data, the deep learning model can better identify the characteristics of ECG signals under different blood potassium concentrations, especially on abnormal samples (for example, hyperkalemia or hypokalemia); weight adjustment, according to the verification results, adjusting the weight coefficients in the loss function (for example, α, β, γ, λ and δ) to optimize the performance of the deep learning model.
[0153] Therefore, in this embodiment, after the deep learning model is trained based on the training set, the deep learning model in the training process is evaluated based on the validation set to obtain a trained deep learning model, and the test set is input into the trained deep learning model to estimate the blood potassium concentration and obtain an estimation result. Therefore, in view of the fact that blood potassium concentration can only be detected by invasive blood drawing in the prior art, this embodiment only organically combines real electrocardiogram data with simulated electrocardiogram data, based on deep learning model training, and only inputs electrocardiogram data, it can realize blood potassium concentration estimation, thereby achieving non-invasive purpose.
[0154] This embodiment also provides a non-invasive blood potassium concentration estimation device, including a data acquisition module, a data generation module, a data processing module, a model construction module, a model training module and a concentration estimation module. The data acquisition module collects real electrocardiogram data, pre-processes the real electrocardiogram data, and extracts key physiological features from the real electrocardiogram data. The data generation module generates simulated electrocardiogram data, performs data enhancement on the simulated electrocardiogram data, and extracts key physiological features from the simulated electrocardiogram data. The data processing module mixes the real electrocardiogram data and the simulated electrocardiogram data to obtain a mixed data set, and divides the mixed data set into a training set, a validation set and a test set. The model construction module constructs a deep learning model, and the deep learning model includes a convolution module, a feature compression module, a global feature aggregation module and a classification output module. The model training module trains the deep learning model based on the training set, and evaluates the deep learning model in the training process based on the validation set to obtain a trained deep learning model. The concentration estimation module inputs the test set into the trained deep learning model to perform non-invasive blood potassium concentration estimation and obtain an estimation result. The non-invasive blood potassium concentration estimation device provided in this embodiment can implement any of the non-invasive blood potassium concentration estimation methods, and the specific working process of a non-invasive blood potassium concentration estimation device can refer to the corresponding process in the embodiment of the non-invasive blood potassium concentration estimation method. The method and device provided in this embodiment can be implemented in other ways. For example, the device embodiment described above is only schematic; for example, the division of a certain module is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point, the mutual connection or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or it can be an electrical, mechanical or other form of connection.
[0155] This embodiment also provides a computer device. A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the non-invasive blood potassium concentration estimation method when executing the computer program.
[0156] This embodiment also provides a computer-readable storage medium. A computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, a non-invasive blood potassium concentration estimation method described in this embodiment is executed. The computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, device or device; the program code contained in the computer-readable medium can be transmitted using any appropriate medium, including but not limited to wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0157] The above schematically describes the invention and its implementation methods, which is not restrictive. Without departing from the spirit or basic features of the invention, the invention can be implemented in other specific forms. What is shown in the accompanying drawings is only one of the implementation methods of the invention. The actual structure is not limited thereto, and any figure mark in the claims should not limit the claims involved. Therefore, if a person of ordinary skill in the art is inspired by it, without departing from the purpose of the invention, a structural method and an embodiment similar to the technical solution are designed without creativity, which should all belong to the protection scope of the present invention. In addition, the word "including" does not exclude other elements or steps, and the word "one" before the element does not exclude the inclusion of "multiple" elements. The multiple elements stated in the product claim can also be implemented by one element through software or hardware. The words first, second, etc. are used to indicate the name, and do not indicate any specific order.
Claims
1. A non-invasive method for estimating blood potassium concentration, comprising the following steps: Collect real ECG data, pre-process the real ECG data, and extract key physiological features from the real ECG data; Generate simulated electrocardiogram data, perform data enhancement on the simulated electrocardiogram data, and extract key physiological features from the simulated electrocardiogram data; The real electrocardiogram data and the simulated electrocardiogram data are mixed to obtain a mixed data set, and the mixed data set is divided into a training set, a validation set, and a test set; Constructing a deep learning model, wherein the deep learning model includes a convolution module, a feature compression module, a global feature aggregation module and a classification output module; The deep learning model is trained based on the training set, and the deep learning model in the training process is evaluated based on the validation set to obtain a trained deep learning model; The test set is input into the trained deep learning model for non-invasive blood potassium concentration estimation to obtain the estimation result.
2. The non-invasive method for estimating blood potassium concentration according to claim 1, characterized in that: In the deep learning model, the convolution module extracts features from the mixed data set to obtain deep features, the feature compression module compresses and expands the deep features to obtain enhanced deep features, the global feature aggregation module compresses the enhanced deep features into a global deep feature vector through a global average pooling layer, and the classification output module maps the global deep feature vector to the target output through a fully connected layer.
3. A non-invasive blood potassium concentration estimation method according to claim 2, characterized in that: The training of the deep learning model based on the training set includes: constraining training through signal feature loss of simulated electrocardiogram data, jointly constraining training through real electrocardiogram data and simulated electrocardiogram data, constraining training through adversarial learning and fusion of simulation rules, and / or soft constraint training based on physiological rules.
4. The non-invasive method for estimating blood potassium concentration according to claim 3, characterized in that: The constraint training is performed by simulating the signal feature loss of electrocardiogram data, and the specific steps include: Extract key physiological features from simulated ECG data; Align the extracted key physiological features with the deep features learned by the deep learning model during training; The deep learning model is constrained during the training process through the feature loss function.
5. The non-invasive method for estimating blood potassium concentration according to claim 3, characterized in that: The joint constraint training is performed by using real electrocardiogram data and simulated electrocardiogram data, and the specific steps include: For simulated ECG data, feature loss is used to constrain the feature learning of the deep learning model; For real ECG data, the classification of blood potassium concentration by deep learning model is optimized by classification loss; The feature loss of the simulated ECG data and the classification loss of the real ECG data are weighted and combined to form a total loss function; The deep learning model is constrained during the training process through the total loss function.
6. The non-invasive method for estimating blood potassium concentration according to claim 3, characterized in that: The specific steps of performing constraint training by fusing simulation rules with adversarial learning include: Construct a discriminator to distinguish physiological key features from deep features; Optimizing the generator to make it conform to the simulation law, wherein the simulation law is the physiological law contained in the simulated electrocardiogram data; Construct a joint loss function by combining the classification loss with the generator’s adversarial loss; The deep learning model is constrained during the training process through a joint loss function.
7. The non-invasive method for estimating blood potassium concentration according to claim 3, characterized in that: Soft constraint training based on physiological laws, the specific steps include: Soft constraints that define simulation rules; Define the constraint loss function and construct the total loss function through classification loss and constraint loss; The deep learning model is constrained during the training process through the total loss function.
8. A non-invasive blood potassium concentration estimation device, characterized in that: include: A data acquisition module collects real ECG data, pre-processes the real ECG data, and extracts key physiological features from the real ECG data; A data generation module generates simulated electrocardiogram data, performs data enhancement on the simulated electrocardiogram data, and extracts key physiological features from the simulated electrocardiogram data; A data processing module, mixing the real electrocardiogram data and the simulated electrocardiogram data to obtain a mixed data set, and dividing the mixed data set into a training set, a validation set, and a test set; A model building module, which builds a deep learning model, wherein the deep learning model includes a convolution module, a feature compression module, a global feature aggregation module and a classification output module; Model training module: trains the deep learning model based on the training set, evaluates the deep learning model during the training process based on the validation set, and obtains a trained deep learning model; The concentration estimation module inputs the test set into the trained deep learning model to perform non-invasive blood potassium concentration estimation and obtain the estimation result.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is executed.
Citation Information
Patent Citations
Noninvasive blood potassium monitoring method in hysteroscopy
CN117694978A
Space-based dim and small target intelligent detection method based on embedded platform
CN117710767A
Training method of single-molecule spectral feature recognition model and spectral feature recognition method
CN118865030A
Blood electrolyte concentration noninvasive measurement method and device, computer equipment and storage medium
CN118873134A
Battery charging station with improved charging efficiency through constant temperature maintenance
KR1020240125720A