A method for generating abnormal heart rate samples based on BiLSTM-GAN

CN122556948APending Publication Date: 2026-08-14GUANGZHOU INST OF RAILWAY TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-09
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

现有基于生成对抗网络的异常心率生成方法多采用单向时序提取结构,无法充分捕获心率序列前后文之间的双向依赖关系,导致生成样本与真实生理信号在时序规律和生理一致性上存在显著偏差,难以满足临床辅助诊断与模型训练的高标准需求

Benefits of technology

[0029]通过双向时序特征提取与对抗生成网络的深度融合,从根本上解决了异常心率临床样本稀缺这一制约心率监测算法发展的关键问题。传统数据增强方法难以模拟真实心律失常的复杂时序依赖,而本方案利用双向长短期记忆网络精准捕获心率信号的前后文关联,使生成的合成样本不仅波形形态逼真,更在心率变异性等生理指标上与真实异常样本高度一致。实验表明,采用本方案生成的合成数据能够显著提升下游心率异常检测模型的准确率和召回率,有效扩充了训练样本库,大幅降低了对大规模临床数据采集的依赖和成本。同时,精心设计的混合损失函数及训练优化策略解决了传统生成对抗网络在时序信号处理中易崩溃、模式坍塌的固有缺陷,保证了训练过程的稳定性和生成质量的可重复性。因此,本技术方案为心血管疾病智能诊断和可穿戴设备算法研发提供了高质量的数据支撑,具有重要的临床应用价值和产业推广前景。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122556948A_ABST
    Figure CN122556948A_ABST
Patent Text Reader

Abstract

This invention discloses a method for generating abnormal heart rate samples based on BiLSTM-GAN, belonging to the field of heart rate monitoring technology. The method includes acquiring and preprocessing raw heart rate signal information to generate preprocessed heart rate signal information; extracting bidirectional temporal features of the preprocessed signal using a bidirectional temporal coding network to generate bidirectional temporal feature information; constructing an adversarial generative network containing a generator and a discriminator, wherein the generator's input is at least partially based on the bidirectional temporal feature information; and performing adversarial training using a hybrid loss function containing adversarial loss and temporal consistency constraints, enabling the generator to produce synthetic samples that are temporally consistent with real abnormal heart rates. This invention guides adversarial generation through bidirectional temporal features, stably producing high-fidelity, physiologically reasonable abnormal heart rate data, effectively solving the problem of scarce clinical samples and providing sufficient data support for heart rate monitoring algorithm training.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of heart rate monitoring technology, specifically to a method for generating abnormal heart rate samples based on BiLSTM-GAN. Background Technology

[0002] Heart rate monitoring is a crucial tool for the prevention and diagnosis of cardiovascular diseases. Abnormal heart rate signals, as key early warning indicators, are of significant value in clinical diagnosis and algorithm training. Generative adversarial networks (GANs) offer a novel technical approach for generating medical signal samples, but they generally suffer from drawbacks such as training instability and pattern collapse in time-series signal processing. Existing GAN-based abnormal heart rate generation methods mostly employ unidirectional temporal extraction structures, failing to fully capture the bidirectional dependencies between the preceding and following contexts of the heart rate sequence. This results in significant deviations between the generated samples and real physiological signals in terms of temporal regularity and physiological consistency, making it difficult to meet the high standards required for clinical auxiliary diagnosis and model training.

[0003] However, existing technologies for generating abnormal heart rate samples still suffer from the following core problems: First, clinical samples of abnormal heart rates are naturally scarce due to their low incidence and difficulty in collection, directly leading to insufficient training data for heart rate monitoring algorithms and limiting their generalization ability. Second, traditional generative adversarial network (GAN) models struggle to maintain a dynamic balance between the generator and discriminator during training, easily resulting in gradient vanishing or pattern collapse, leading to severe distortion of the generated samples. Third, existing methods fail to deeply integrate bidirectional temporal feature extraction with the adversarial generative framework, neglecting the physiological correlation between different moments in the heart rate signal, making it impossible to accurately model the dynamic evolution of arrhythmias, resulting in poor physiological consistency between the generated samples and real signals. These problems make it difficult for existing technologies to stably and efficiently generate high-quality abnormal heart rate data, severely hindering the clinical application and promotion of intelligent diagnostic technologies for cardiovascular diseases. Summary of the Invention

[0004] To address the problems mentioned in the background section, this invention provides a method for generating abnormal heart rate samples based on BiLSTM-GAN.

[0005] The above-mentioned objective of this application is achieved through the following technical solution:

[0006] A method for generating abnormal heart rate samples based on BiLSTM-GAN includes the following steps:

[0007] S10: Acquire raw heart rate signal information and preprocess the raw heart rate signal information to generate preprocessed heart rate signal information;

[0008] S20: Use a bidirectional temporal coding network to extract features from the preprocessed heart rate signal information to generate bidirectional temporal feature information that characterizes the dependency relationship between the heart rate signal before and after processing.

[0009] S30: Construct an adversarial generative network containing a generator and a discriminator, wherein the input of the generator is at least partially based on the bidirectional temporal feature information;

[0010] S40: The adversarial generator network is trained using a hybrid loss function that includes temporal consistency constraints to optimize the generator so that it generates synthetic abnormal heart rate sample information that is consistent with the temporal pattern of real abnormal heart rate signals.

[0011] In a preferred embodiment, this application can be further configured such that step S10 includes the following steps:

[0012] S101: Collect clinical heart rate signal information, screen sample information whose signal quality meets preset requirements, and obtain effective heart rate signal information;

[0013] S102: The effective heart rate signal information is sequentially subjected to bandpass filtering denoising, median filtering denoising and amplitude normalization to generate standardized heart rate signal information;

[0014] S103: The standardized heart rate signal information is divided into multiple heart rate signal segments according to a fixed time length, and each heart rate signal segment is labeled with a normal or abnormal category label to generate the preprocessed heart rate signal information.

[0015] In a preferred embodiment, this application can be further configured as follows: the bidirectional temporal coding network in step S20 is a bidirectional long short-term memory network, which includes an input layer, a bidirectional LSTM layer, a dropout layer, and a feature fusion layer; the input layer receives the preprocessed heart rate signal information, the bidirectional LSTM layer extracts temporal features along the forward and reverse directions respectively, and the feature fusion layer concatenates and reduces the dimensionality of the forward and reverse temporal features to output the bidirectional temporal feature information.

[0016] In a preferred embodiment, this application can be further configured as follows: the generator in step S30 includes an input layer, a feature fusion module, a decoding layer, and an output layer; the input layer receives random noise information of a preset dimension and the bidirectional temporal feature information; the feature fusion module fuses the random noise information and the bidirectional temporal feature information to generate fused feature information; the decoding layer upsamples and deconvolutionally decodes the fused feature information; and the output layer outputs synthesized heart rate sample information through an activation function.

[0017] In a preferred embodiment, this application can be further configured such that: the discriminator in step S30 includes an input layer, a feature extraction layer, and a classification layer; the input layer receives real heart rate sample information or synthetic heart rate sample information output by the generator; the feature extraction layer uses a hybrid structure of convolutional neural network and bidirectional long short-term memory network to extract temporal features; and the classification layer outputs probability information that the input sample is a real sample.

[0018] In a preferred embodiment, this application may be further configured such that: the hybrid loss function in step S40 includes at least adversarial loss and temporal consistency loss; the adversarial loss is used to prompt the generator to generate samples that are difficult to be distinguished by the discriminator, and the temporal consistency loss is used to calculate the difference in temporal dynamic characteristics between the generated samples and the real samples based on the heart rate variability index, thereby constraining the physiological rationality of the generated samples.

[0019] In a preferred embodiment, this application can be further configured such that the adversarial training in step S40 adopts a strategy of alternating training of the generator and the discriminator, and introduces a gradient pruning mechanism and an adaptive learning rate adjustment mechanism.

[0020] In a preferred example, this application may be further configured to include step S50: deploying the trained generator separately, inputting random noise information of a preset dimension, generating synthetic abnormal heart rate sample information, and performing quality assessment on the synthetic abnormal heart rate sample information, calculating its physiological consistency index, data distribution consistency index and model fit index with the real abnormal heart rate sample information.

[0021] The second objective of this invention is achieved through the following technical solution:

[0022] An abnormal heart rate sample generation system based on BiLSTM-GAN is used to execute an abnormal heart rate sample generation method based on BiLSTM-GAN, including:

[0023] The data preprocessing module is used to acquire raw heart rate signal information and preprocess it to generate preprocessed heart rate signal information.

[0024] A bidirectional timing coding module is used to extract bidirectional timing features from the preprocessed heart rate signal information and generate bidirectional timing feature information;

[0025] The adversarial generative network module includes a generator and a discriminator, wherein the input of the generator is at least partially based on the bidirectional temporal feature information;

[0026] The training optimization module is used to perform adversarial training on the adversarial generative network module using a hybrid loss function that includes temporal consistency constraints.

[0027] The sample generation module is used to deploy the trained generator separately, input random noise information of a preset dimension, and generate synthetic abnormal heart rate sample information.

[0028] The beneficial effects of the abnormal heart rate sample generation method based on BiLSTM-GAN of this invention are as follows:

[0029] By deeply integrating bidirectional temporal feature extraction with generative adversarial networks (GANs), this approach fundamentally solves the key problem hindering the development of heart rate monitoring algorithms: the scarcity of clinical samples of abnormal heart rates. Traditional data augmentation methods struggle to simulate the complex temporal dependencies of real arrhythmias, while this scheme utilizes bidirectional long short-term memory networks to accurately capture the contextual relationships of heart rate signals. This results in synthetic samples that not only have realistic waveforms but also exhibit high consistency with real abnormal samples in physiological indicators such as heart rate variability. Experiments show that the synthetic data generated using this scheme significantly improves the accuracy and recall of downstream heart rate abnormality detection models, effectively expands the training sample library, and greatly reduces the dependence on and cost of large-scale clinical data collection. Simultaneously, the carefully designed hybrid loss function and training optimization strategy address the inherent defects of traditional GANs in temporal signal processing, such as susceptibility to collapse and pattern collapse, ensuring the stability of the training process and the reproducibility of generation quality. Therefore, this technical solution provides high-quality data support for the development of algorithms for intelligent diagnosis of cardiovascular diseases and wearable devices, possessing significant clinical application value and promising prospects for industrial promotion. Attached Figure Description

[0030] Figure 1 This is a flowchart of an embodiment of an abnormal heart rate sample generation method based on BiLSTM-GAN according to this application. Detailed Implementation

[0031] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0032] As attached Figure 1 As shown, a method for generating abnormal heart rate samples based on BiLSTM-GAN includes the following steps:

[0033] S10: Acquire raw heart rate signal information and preprocess the raw heart rate signal information to generate preprocessed heart rate signal information;

[0034] S20: Use a bidirectional temporal coding network to extract features from the preprocessed heart rate signal information to generate bidirectional temporal feature information that characterizes the dependency relationship between the heart rate signal before and after processing.

[0035] S30: Construct an adversarial generative network containing a generator and a discriminator, wherein the input of the generator is at least partially based on the bidirectional temporal feature information;

[0036] S40: The adversarial generator network is trained using a hybrid loss function that includes temporal consistency constraints to optimize the generator so that it generates synthetic abnormal heart rate sample information that is consistent with the temporal pattern of real abnormal heart rate signals.

[0037] In this embodiment, the raw heart rate signal information is unprocessed heart rate time series data collected from ECG monitoring devices, wearable devices, or publicly available medical datasets; the preprocessed heart rate signal information is standardized heart rate segment data after noise filtering, amplitude normalization, and sequence segmentation; the bidirectional temporal coding network is a neural network structure capable of simultaneously extracting sequence features along both the forward and reverse time directions; the bidirectional temporal feature information is a deep feature representation containing the dependencies between heart rate signals, reflecting the dynamic laws of the heartbeat sequence on the time axis; the adversarial generative network is a neural network system containing two mutually competitive components: a generator and a discriminator; the generator is a neural network used to synthesize fake heart rate samples; the discriminator is a neural network used to distinguish between real heart rate samples and generated samples; the hybrid loss function is a joint optimization objective containing multiple constraint terms; the temporal consistency constraint is a loss term that forces generated samples and real samples to maintain consistency in dynamic indicators such as heart rate variability; the synthesized abnormal heart rate sample information is artificial heart rate sequence data with real physiological characteristics output by the trained generator.

[0038] Specifically, the process begins by acquiring and preprocessing the raw heart rate signal to generate denoised, normalized, and segmented preprocessed heart rate signals, providing clean and well-organized input data for subsequent feature extraction. Then, a bidirectional temporal coding network is used to extract bidirectional temporal features from the preprocessed signal. These features capture both the historical dependence and future influence of the heart rate sequence, providing a more complete characterization of the occurrence and evolution of abnormal heart rates. Next, an adversarial generative network (GCN) is constructed, comprising a generator and a discriminator. The generator's input is at least partially based on these bidirectional temporal features, allowing it to reference real temporal patterns when synthesizing samples. Finally, a hybrid loss function with temporal consistency constraints is used for adversarial training of the network. During training, both the generator and discriminator are optimized, forcing the generator to produce synthesized samples that are highly consistent with the temporal patterns of real abnormal heart rate signals. This approach fundamentally addresses the problem of scarce abnormal heart rate samples by generating high-fidelity and physiologically reasonable synthetic data to expand the training set. This provides ample and diverse samples for training the abnormal heart rate detection algorithm, significantly improving the model's generalization ability and clinical applicability, while reducing the cost and ethical risks of large-scale clinical data collection.

[0039] In one embodiment, step S10 includes the following steps:

[0040] S101: Collect clinical heart rate signal information, screen sample information whose signal quality meets preset requirements, and obtain effective heart rate signal information;

[0041] S102: The effective heart rate signal information is sequentially subjected to bandpass filtering denoising, median filtering denoising and amplitude normalization to generate standardized heart rate signal information;

[0042] S103: The standardized heart rate signal information is divided into multiple heart rate signal segments according to a fixed time length, and each heart rate signal segment is labeled with a normal or abnormal category label to generate the preprocessed heart rate signal information.

[0043] In this embodiment, the clinical heart rate signal information is the raw record obtained from hospital ECG monitoring, Holter recordings, or a publicly available arrhythmia database; the preset requirements are quality screening criteria set based on signal-to-noise ratio, baseline drift amplitude, and artifact interference; the effective heart rate signal information is the usable heart rate sequence after removing severe noise, power line interference, and bad segments; bandpass filtering denoising is the operation of using a Butterworth filter to filter out high-frequency electromyographic noise and low-frequency baseline drift, and the Butterworth filter is typically set from 0.5Hz to 40Hz; median filtering denoising is the operation of taking the median through a sliding window. The operation suppresses sudden impulse noise using a value-based method; amplitude normalization is used to linearly map the signal amplitude to a uniform numerical range to eliminate dimensional differences between different acquisition devices; the standardized heart rate signal information is a heart rate sequence with normalized amplitude and noise suppression after the above filtering and normalization; the fixed time length is a preset time window for segmenting the heart rate sequence; the heart rate signal segment is a sequence of continuous heart rate sampling points within each time window; the normal or abnormal category label is a marker indicating whether the segment belongs to normal sinus rhythm or a specific abnormal type such as atrial fibrillation or premature beats, based on medical diagnostic annotations.

[0044] Specifically, clinical heart rate signals are first collected from multiple sources, and valid heart rate signals are selected based on preset signal quality requirements, eliminating bad segments containing severe noise or unusable data to ensure the reliability of the data foundation for subsequent modeling. Then, the valid signals undergo bandpass filtering to remove interference outside the normal frequency band, median filtering to eliminate sudden spike noise, and amplitude normalization to eliminate dimensional differences, generating standardized heart rate signals with a uniform amplitude range and clean waveforms from different sources. Finally, the standardized signals are segmented into multiple heart rate signal segments of fixed time length, and each segment is labeled as normal or abnormal, generating preprocessed heart rate signals for model training. This process transforms the original heterogeneous clinical data into standardized, quality-controlled training samples, significantly improving data availability and model training efficiency. Simultaneously, signal segmentation expands the sample size and provides accurate categorical criteria for subsequent supervised feature extraction.

[0045] In one embodiment, the bidirectional temporal coding network in step S20 is a bidirectional long short-term memory network, which includes an input layer, a bidirectional LSTM layer, a dropout layer, and a feature fusion layer. The input layer receives the preprocessed heart rate signal information, the bidirectional LSTM layer extracts temporal features along the forward and reverse directions respectively, and the feature fusion layer concatenates and reduces the dimensionality of the forward and reverse temporal features to output the bidirectional temporal feature information.

[0046] In this embodiment, Bidirectional Long Short-Term Memory (LSTM) is a variant of recurrent neural network capable of simultaneously learning long-term dependencies in both the forward and backward directions of a sequence. The input layer is the first layer of the network, responsible for receiving external input data and transforming its dimensions. The bidirectional LSTM layer consists of forward and backward LSTM layers, processing the sequence along the forward and backward directions of time, respectively, and outputting a concatenation of the hidden states in both directions. The dropout layer is a regularization layer that randomly discards some neuron outputs during training to prevent overfitting. The feature fusion layer is a network component that concatenates the forward and backward features output by the bidirectional LSTM and performs dimensionality reduction. Concatenation is the operation of joining two feature vectors end-to-end along the channel dimension. Dimensionality reduction is achieved by reducing the number of feature channels through convolutional or fully connected layers to extract the main components.

[0047] Specifically, the network consists of an input layer, a bidirectional LSTM layer, a dropout layer, and a feature fusion layer connected sequentially. The input layer receives the preprocessed heart rate signal information and reshapes it into the tensor shape required by the network. The bidirectional LSTM layer extracts the hidden states of the heart rate sequence along both the forward and backward time directions, ensuring that the output features at each time step simultaneously incorporate information from the past and future. The dropout layer randomly discards some neurons with a certain probability to suppress overfitting. The feature fusion layer concatenates the forward and backward temporal features and then performs dimensionality reduction to obtain compact bidirectional temporal feature information. By fully utilizing the bidirectional dependency of the heart rate signal, the extracted features contain both past historical trends and future directions. Compared to unidirectional temporal models, it can more accurately capture the contextual relationships before and after abnormal heart rate events, thus providing the generator with richer physiological constraints and improving the temporal realism of the synthesized samples.

[0048] In one embodiment, the generator in step S30 includes an input layer, a feature fusion module, a decoding layer, and an output layer; the input layer receives random noise information of a preset dimension and the bidirectional temporal feature information; the feature fusion module fuses the random noise information and the bidirectional temporal feature information to generate fused feature information; the decoding layer upsamples and deconvolutionally decodes the fused feature information; and the output layer outputs synthesized heart rate sample information through an activation function.

[0049] In this embodiment, the generator is a neural network module in the Generative Adversarial Network (GAN) responsible for synthesizing fake heart rate samples; the input layer is the first layer of the generator that receives external input; the feature fusion module is a component that combines random noise and temporal features; the random noise information of a preset dimension is a low-dimensional vector sampled from a known distribution (such as a uniform distribution) and used as a random seed for the generator; the fused feature information is a comprehensive vector obtained by adding or concatenating the noise vector with the bidirectional temporal features element-wise; the decoding layer is a network part that gradually restores the fused features to the original signal length through upsampling and deconvolution operations; upsampling is the operation of expanding the temporal dimension of the feature map; deconvolution decoding is the operation of mapping low-resolution features back to high-resolution signals using transposed convolution; the output layer is the last layer of the generator; the activation function is a non-linear function (such as Sigmoid or Tanh) used to limit the output value within a reasonable range; and the synthesized heart rate sample information is the simulated heart rate sequence finally output by the generator.

[0050] Specifically, the generator comprises an input layer, a feature fusion module, a decoding layer, and an output layer. The input layer simultaneously receives random noise information of a preset dimension and bidirectional temporal feature information output from a bidirectional temporal coding network. The feature fusion module adds or concatenates these two parts of information element-wise to generate fused feature information, effectively constraining the diversity brought about by random noise under the guidance of bidirectional temporal features. The decoding layer performs multiple upsampling and deconvolution decoding on the fused feature information, gradually expanding the low-dimensional features into a high-dimensional sequence of the same length as the original signal. The output layer adjusts the amplitude to a reasonable range using an activation function, outputting synthetic heart rate sample information. This allows the generator to produce diverse synthetic samples while maintaining the inherent temporal regularity of abnormal heart rates, thus significantly improving the quality and physiological realism of the generated samples and avoiding the pattern collapse or physiological inconsistencies caused by purely random noise generation.

[0051] In one embodiment, the discriminator in step S30 includes an input layer, a feature extraction layer, and a classification layer; the input layer receives real heart rate sample information or synthetic heart rate sample information output by the generator; the feature extraction layer uses a hybrid structure of convolutional neural network and bidirectional long short-term memory network to extract temporal features; and the classification layer outputs the probability information that the input sample is a real sample.

[0052] In this embodiment, the discriminator is a neural network module in the generative adversarial network responsible for distinguishing between real heart rate samples and generated samples; the input layer is the entry point for the discriminator to receive data; the real heart rate sample information is a segment of real heart rate signal from the preprocessed dataset; the feature extraction layer is a network part used to extract high-level features from the input signal; the convolutional neural network is a network that extracts local waveform features through convolutional kernels; the hybrid structure of the bidirectional long short-term memory network is a combined model that inputs the local features extracted by the CNN into the BiLSTM to capture global temporal dependencies; the classification layer is a fully connected network responsible for outputting binary classification probabilities based on the extracted features; the probability information that the input sample is a real sample is a value between 0 and 1, representing the confidence level of the discriminator in considering the input to be a real sample.

[0053] Specifically, the discriminator comprises an input layer, a feature extraction layer, and a classification layer. The input layer receives real heart rate sample information or synthetic heart rate sample information output by the generator. The feature extraction layer employs a hybrid structure of convolutional neural networks and bidirectional long short-term memory networks: first, local waveform morphological features in the heart rate signal are extracted through convolutional layers; then, bidirectional LSTM is used to capture the temporal dependencies of these morphological features, resulting in a deep representation that includes both local details and global temporal sequence. The classification layer outputs the probability information that the input sample is a real sample based on this representation. This allows the discriminator to simultaneously evaluate the authenticity of the sample from both waveform morphology and temporal sequence patterns, giving it stronger discriminative capabilities. It also enables the generator to not only mimic local waveforms but also simulate real temporal evolution processes, thereby improving the overall physiological consistency of the synthetic samples.

[0054] In one embodiment, the hybrid loss function in step S40 includes at least adversarial loss and temporal consistency loss; the adversarial loss is used to prompt the generator to generate samples that are difficult to be distinguished by the discriminator, and the temporal consistency loss is used to calculate the difference in temporal dynamic characteristics between the generated samples and the real samples based on the heart rate variability index, in order to constrain the physiological rationality of the generated samples.

[0055] In this embodiment, the hybrid loss function is an optimization objective consisting of a weighted sum of multiple loss terms of different properties; the adversarial loss is a loss that measures the degree of game between the generator and the discriminator, often using Wasserstein distance or binary cross-entropy, which causes the generator to produce samples that the discriminator cannot distinguish between real and fake; the temporal consistency loss is a loss term that constrains the deviation between the generated signal and the real signal in dynamic indicators such as heart rate variability; the heart rate variability indicator is a statistic describing the fluctuation of the heart rate interval, such as the standard deviation of the RR interval or the root mean square of the difference between adjacent RR intervals; the difference between the generated sample and the real sample in the temporal dynamic characteristics is a quantified value obtained by calculating the absolute difference or relative error of the above indicators.

[0056] Specifically, the hybrid loss function comprises at least two parts: adversarial loss and temporal consistency loss. The adversarial loss drives the generator to produce synthetic signals with statistical features indistinguishable from real samples, prompting the discriminator to continuously optimize its discrimination ability; both improve together in the game. The temporal consistency loss calculates the difference in temporal dynamics between generated and real samples based on heart rate variability (HRV) indicators and adds it as an additional penalty to the total loss, forcing the generator not only to replicate local waveforms but also to mimic real circadian rhythms. By guiding the generator's optimization direction from both adversarial game and physiological principles, the physiological rationality of the generated samples is significantly improved. This avoids the problem in traditional GAN ​​training where only distribution fitting is considered while neglecting temporal structure, making the synthesized abnormal heart rate samples highly similar to real samples in terms of HRV variability.

[0057] In one embodiment, the adversarial training in step S40 employs a strategy of alternating training of the generator and discriminator, and introduces a gradient pruning mechanism and an adaptive learning rate adjustment mechanism.

[0058] In this embodiment, adversarial training is a learning process in which the generator and discriminator are alternately iteratively optimized. The strategy of alternating training is to update the discriminator for several steps in each iteration, and then update the generator for several steps to maintain a dynamic balance between the two. The gradient pruning mechanism limits the maximum norm of the gradient during backpropagation to prevent the gradient from being too large and causing training instability. The adaptive learning rate adjustment mechanism dynamically adjusts the learning rate of each parameter according to the gradient history (such as using the Adam optimizer or cosine annealing strategy) to accelerate convergence and reduce oscillations.

[0059] Specifically, the training process employs a strategy of alternating updates between the generator and discriminator. In each training epoch, the generator is first fixed to train the discriminator for a certain number of steps, and then the discriminator is fixed to train the generator for a certain number of steps, preventing either from becoming too powerful and causing mode collapse. A gradient pruning mechanism is also introduced, truncating the norm of the gradient before each parameter update to avoid numerical instability caused by excessively large gradients. Furthermore, an adaptive learning rate adjustment mechanism is used, automatically adjusting the learning rate according to changes in loss during training, accelerating convergence and reducing oscillations. These strategies collectively stabilize the training process of complex temporal generative networks like BiLSTM-GAN, addressing the training collapse and mode collapse problems that traditional GANs easily encounter in heart rate signal generation. This ensures the model can smoothly converge to a high-quality solution, resulting in consistently high fidelity abnormal heart rate samples, and the training process is repeatable and easily reproducible.

[0060] In one embodiment, the method further includes step S50: deploying the trained generator separately, inputting random noise information of a preset dimension, generating synthetic abnormal heart rate sample information, and performing quality assessment on the synthetic abnormal heart rate sample information, calculating its physiological consistency index, data distribution consistency index and model fit index with the real abnormal heart rate sample information.

[0061] In this embodiment, the random noise information of the preset dimension is a random vector of the same dimension as during training, usually sampled from a uniform distribution; the synthetic abnormal heart rate sample information is a new artificial heart rate sequence output by the generator; quality assessment is the process of testing and verifying various quantitative indicators of the synthetic sample; physiological consistency index is the degree of closeness between physiological parameters such as heart rate variability and real abnormal samples; data distribution consistency index is the similarity between the synthetic sample and the real sample in the overall statistical distribution, commonly measured by KL divergence; and model fit index is the improvement in the performance of the downstream task model after adding the synthetic sample to the training set.

[0062] Specifically, the trained generator is extracted from the adversarial network and fed with random noise information of a preset dimension to generate synthetic abnormal heart rate samples in batches for subsequent data augmentation or algorithm testing. The synthetic samples are then subjected to multi-dimensional quality assessment, calculating physiological consistency indices, data distribution consistency indices, and model fit indices with real abnormal samples. This verifies the effectiveness and practicality of the generated samples, ensuring that the synthetic data not only appears visually similar but also meets usable standards in terms of clinically relevant physiological indicators, statistical distribution, and actual improvement effects on downstream tasks. This provides a scientific basis for its final application in medical AI training or clinical assistance.

[0063] An abnormal heart rate sample generation system based on BiLSTM-GAN is used to execute an abnormal heart rate sample generation method based on BiLSTM-GAN, including:

[0064] The data preprocessing module is used to acquire raw heart rate signal information and preprocess it to generate preprocessed heart rate signal information.

[0065] A bidirectional timing coding module is used to extract bidirectional timing features from the preprocessed heart rate signal information and generate bidirectional timing feature information;

[0066] The adversarial generative network module includes a generator and a discriminator, wherein the input of the generator is at least partially based on the bidirectional temporal feature information;

[0067] The training optimization module is used to perform adversarial training on the adversarial generative network module using a hybrid loss function that includes temporal consistency constraints.

[0068] The sample generation module is used to deploy the trained generator separately, input random noise information of a preset dimension, and generate synthetic abnormal heart rate sample information.

[0069] A specific embodiment of the abnormal heart rate sample generation method based on BiLSTM-GAN proposed in this application is as follows:

[0070] First, raw heart rate signals are obtained from ECG monitoring equipment or publicly available medical datasets. This information is then filtered to remove segments with severe noise interference. Next, bandpass filtering and median filtering are performed sequentially to remove out-of-band interference and sudden impulse noise. Amplitude normalization maps the signal amplitude to a uniform interval. Finally, the signal is segmented into multiple segments of fixed time length, and each segment is labeled as normal or abnormal, generating clean, well-organized preprocessed heart rate signals with category labels. This preprocessed signal is then processed using a bidirectional temporal coding network (BTCN), specifically a bidirectional long short-term memory network. The network's bidirectional LSTM layers extract the hidden states of the heart rate sequence along both the forward and backward directions, a dropout layer suppresses overfitting, and a feature fusion layer concatenates and reduces the dimensionality of the forward and backward temporal features, outputting bidirectional temporal feature information that integrates historical dependencies and future influences. A generative adversarial network (GAN) comprising a generator and a discriminator is then constructed. The generator's input layer simultaneously receives random noise information of a preset dimension and the aforementioned bidirectional temporal feature information. After element-wise addition or concatenation by a feature fusion module, the input is fed into a decoding layer. The signal length is gradually recovered through upsampling and deconvolution decoding, and finally, an activation function outputs synthesized heart rate sample information. The discriminator employs a hybrid structure of a convolutional neural network and a bidirectional long short-term memory network to extract features from real heart rate samples or synthesized samples output by the generator and output the true probability. Based on this, a hybrid loss function including adversarial loss and temporal consistency loss is used for adversarial training of the network: the adversarial loss drives the generator to produce samples that the discriminator struggles to distinguish, while the temporal consistency loss calculates the difference in dynamic temporal characteristics between the generated samples and real samples based on heart rate variability indicators, forcing the generator to not only mimic local waveforms but also simulate real circadian rhythms. The training employs a strategy of alternating updates between the generator and discriminator, and introduces gradient pruning and adaptive learning rate adjustment mechanisms to stabilize the training process. Ultimately, this enables the generator to produce synthetic abnormal heart rate samples that are highly consistent with real abnormal heart rate signals in terms of temporal patterns. After training, the generator is deployed independently, and random noise is input to generate synthetic samples in batches. Its effectiveness is verified through quality evaluation using physiological consistency indicators, data distribution consistency indicators, and model fit indicators.

[0071] The present invention and its embodiments have been described above. This description is not restrictive. The accompanying drawings are only one embodiment of the present invention. The actual structure is not limited to this. In short, if a person skilled in the art is inspired by this description and designs a similar structure and embodiment without departing from the spirit of the present invention, such design should fall within the protection scope of the present invention.

Claims

1. A method for generating abnormal heart rate samples based on BiLSTM-GAN, characterized in that, Includes the following steps: S10: Acquire raw heart rate signal information and preprocess the raw heart rate signal information to generate preprocessed heart rate signal information; S20: Use a bidirectional temporal coding network to extract features from the preprocessed heart rate signal information to generate bidirectional temporal feature information that characterizes the dependency relationship between the heart rate signal before and after processing. S30: Construct an adversarial generative network containing a generator and a discriminator, wherein the input of the generator is at least partially based on the bidirectional temporal feature information; S40: The adversarial generator network is trained using a hybrid loss function that includes temporal consistency constraints to optimize the generator so that it generates synthetic abnormal heart rate sample information that is consistent with the temporal pattern of real abnormal heart rate signals.

2. The method for generating abnormal heart rate samples based on BiLSTM-GAN according to claim 1, characterized in that: Step S10 includes the following steps: S101: Collect clinical heart rate signal information, screen sample information whose signal quality meets preset requirements, and obtain effective heart rate signal information; S102: The effective heart rate signal information is sequentially subjected to bandpass filtering denoising, median filtering denoising and amplitude normalization to generate standardized heart rate signal information; S103: The standardized heart rate signal information is divided into multiple heart rate signal segments according to a fixed time length, and each heart rate signal segment is labeled with a normal or abnormal category label to generate the preprocessed heart rate signal information.

3. The method for generating abnormal heart rate samples based on BiLSTM-GAN according to claim 1, characterized in that: The bidirectional temporal coding network in step S20 is a bidirectional long short-term memory network. The bidirectional long short-term memory network includes an input layer, a bidirectional LSTM layer, a dropout layer, and a feature fusion layer. The input layer receives the preprocessed heart rate signal information. The bidirectional LSTM layer extracts temporal features along the forward and reverse directions, respectively. The feature fusion layer concatenates and reduces the dimensionality of the forward and reverse temporal features to output the bidirectional temporal feature information.

4. The method for generating abnormal heart rate samples based on BiLSTM-GAN according to claim 1, characterized in that: The generator in step S30 includes an input layer, a feature fusion module, a decoding layer, and an output layer; the input layer receives random noise information of a preset dimension and the bidirectional temporal feature information; the feature fusion module fuses the random noise information and the bidirectional temporal feature information to generate fused feature information. The decoding layer upsamples and deconvolutionally decodes the fused feature information, and the output layer outputs synthesized heart rate sample information through an activation function.

5. The method for generating abnormal heart rate samples based on BiLSTM-GAN according to claim 4, characterized in that: The discriminator in step S30 includes an input layer, a feature extraction layer, and a classification layer; the input layer receives real heart rate sample information or synthetic heart rate sample information output by the generator; the feature extraction layer uses a hybrid structure of convolutional neural network and bidirectional long short-term memory network to extract temporal features; and the classification layer outputs the probability information that the input sample is a real sample.

6. The method for generating abnormal heart rate samples based on BiLSTM-GAN according to claim 1, characterized in that: The hybrid loss function in step S40 includes at least adversarial loss and temporal consistency loss; the adversarial loss is used to prompt the generator to generate samples that are difficult to be distinguished by the discriminator, and the temporal consistency loss is used to calculate the difference in temporal dynamic characteristics between the generated samples and the real samples based on the heart rate variability index, in order to constrain the physiological rationality of the generated samples.

7. The method for generating abnormal heart rate samples based on BiLSTM-GAN according to claim 6, characterized in that: The adversarial training in step S40 employs a strategy of alternating training of the generator and discriminator, and introduces a gradient pruning mechanism and an adaptive learning rate adjustment mechanism.

8. The method for generating abnormal heart rate samples based on BiLSTM-GAN according to claim 1, characterized in that: It also includes step S50: deploying the trained generator separately, inputting random noise information of a preset dimension, generating synthetic abnormal heart rate sample information, and performing quality assessment on the synthetic abnormal heart rate sample information, calculating its physiological consistency index, data distribution consistency index and model adaptability index with real abnormal heart rate sample information.

9. An abnormal heart rate sample generation system based on BiLSTM-GAN, used to execute the abnormal heart rate sample generation method based on BiLSTM-GAN as described in any one of claims 1-8, characterized in that, include: The data preprocessing module is used to acquire raw heart rate signal information and preprocess it to generate preprocessed heart rate signal information. A bidirectional timing coding module is used to extract bidirectional timing features from the preprocessed heart rate signal information and generate bidirectional timing feature information; The adversarial generative network module includes a generator and a discriminator, wherein the input of the generator is at least partially based on the bidirectional temporal feature information; The training optimization module is used to perform adversarial training on the adversarial generative network module using a hybrid loss function that includes temporal consistency constraints. The sample generation module is used to deploy the trained generator separately, input random noise information of a preset dimension, and generate synthetic abnormal heart rate sample information.