Fetal heart rate signal data enhancement method, device, equipment and medium
By combining a masking enhancement mechanism and a dual-branch learning strategy with an improved diffusion model, the problem of unstable fetal heart rate signal data generation was solved. This enabled effective learning of the complex features and spatiotemporal dependencies of fetal heart rate signals, improving the realism of data generation and the performance of deep learning models.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU UNIV OF ELECTRONIC SCI & TECH PINGHU DIGITAL TECH INNOVATION RES INST CO LTD
- Filing Date
- 2025-12-24
- Publication Date
- 2026-04-28
AI Technical Summary
Existing technologies struggle to effectively learn the complex features and spatiotemporal dependencies of fetal heart rate signals, leading to unstable data generation and impacting the performance improvement of deep learning models.
A mask enhancement mechanism and a two-branch learning strategy are adopted, combined with an improved Transformer-based diffusion model (DiT). The mask enhancement mechanism generates random position masks, the DiT module is used to learn the features and spatiotemporal dependencies of fetal heart rate signals, and the two-branch learning strategy optimizes model training.
It improves the realism and effectiveness of fetal heart rate signal generation and enhances the performance of deep learning models in fetal heart rate signal data augmentation.
Smart Images

Figure CN121935482A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of modern medical signal processing technology, and in particular to a method, apparatus, device, and medium for enhancing fetal heart rate signal data. Background Technology
[0002] Acute or chronic fetal distress is a major contributing factor to adverse outcomes such as neonatal hypoxia and acidosis. Therefore, timely identification of risks to the fetus and pregnant woman has become a core objective of prenatal monitoring. In clinical practice, cardiotocography (CTG) provides crucial physiological and pathological information for obstetric decision-making by recording fetal heart rate (FHR) and uterine contraction (UC) activity. It is a widely used method for assessing fetal health during late pregnancy and delivery. Based on the information provided by CTG, many deep learning models for auxiliary diagnosis based on FHR signals have shown potential in interpreting FHR monitoring records. However, improving the performance of these models typically requires a large amount of clinically labeled FHR signal data. In actual data acquisition, data scarcity, missing signal segments, and class imbalance hinder the construction of high-quality datasets. Therefore, conducting research on data augmentation models based on FHR signals to generate more realistic FHR signals is particularly important for addressing the performance improvement issues of downstream auxiliary diagnostic models.
[0003] While advancements in some deep learning algorithms have provided means for generating FHR signal data, issues such as the inability to learn spatiotemporal dependencies within time series and the mode collapse problem of traditional data augmentation methods hinder the further development of FHR signal-based data augmentation methods. Furthermore, compared to other signal data, FHR signals contain rich and complex pathological features; traditional data generation methods often exhibit low personalization, and training instability further degrades sample quality. Therefore, a method capable of accurately learning the pathological features and spatiotemporal dependencies of FHR signals is needed.
[0004] In view of this, there is an urgent need to provide a data augmentation method for FHR signals, which can effectively learn the complex features and spatiotemporal dependencies of FHR signals, thereby achieving more realistic and effective FHR signal generation.
[0005] Purpose of the invention
[0006] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method, device, equipment and medium for enhancing fetal heart rate signal data. It designs a mask enhancement mechanism and a dual-branch learning strategy, supplemented by an improved Diffusion Transformer (DiT) architecture based on Transformer, to achieve effective generation of FHR signals.
[0007] To solve the above problems, the present invention adopts the following technical solution:
[0008] In a first aspect, the present invention provides a method for enhancing fetal heart rate signal data, comprising the following steps:
[0009] Step S1: Acquire fetal heart rate signal and perform preprocessing;
[0010] Step S2: Generate a random position mask for the preprocessed fetal heart rate signal through the mask enhancement mechanism module;
[0011] Step S3: Construct an improved diffusion model, which includes a conditional embedding module and multiple stacked DiT modules; input the masked fetal heart rate signal and conditional information into the improved diffusion model, encode the conditional information into a conditional embedding vector through the conditional embedding module, and input it together with the masked fetal heart rate signal into the DiT module for feature transformation, and output the generated fetal heart rate signal.
[0012] Step S4: Train the improved diffusion model. During the training process, a two-branch learning strategy is adopted, and different loss functions are used to optimize the model according to the proportion of the mask.
[0013] Step S5: Input the new fetal heart rate signal into the trained improved diffusion model to obtain the data augmentation results of the fetal heart rate signal.
[0014] Furthermore, the specific process of the mask enhancement mechanism module generating random position masks is as follows: a fixed proportion of discontinuous time steps are randomly selected from all input dimensions and marked as missing to generate position masks; then, the regions corresponding to the position masks in the original fetal heart rate signal are replaced with Gaussian noise to obtain the masked fetal heart rate signal.
[0015] Furthermore, the conditional information includes time step, label, and location mask.
[0016] Furthermore, the improved diffusion model includes a conditional embedding module and two stacked DiT (Diffusion Transformer) modules. The conditional embedding module includes a sine / cosine position encoding layer, a label embedding layer, two fully connected layers, and an activation function. The sine / cosine position encoding layer encodes the time step, the label embedding layer maps the label index to a dense vector, and the two fully connected layers and the activation function further process the encoded time step to generate a conditional embedding vector. Each DiT module includes a multilayer perceptron (MLP), two layer normalization layers, a multi-head attention layer, a point-based feedforward network layer, two scaling offset layers, and two offset layers.
[0017] Furthermore, in the dual-branch learning strategy, the masking ratio is defined to be in the range of 20% to 90%, wherein a masking ratio of 20% to 60% is defined as a low-ratio branch, and a masking ratio of 70% to 90% is defined as a high-ratio branch; the loss function of the high-ratio branch is the variational lower bound loss function, and the loss function of the low-ratio branch is the weighted sum of the variational lower bound loss function and the reconstruction loss of the unmasked region.
[0018] In a second aspect, the present invention provides a fetal heart rate signal data enhancement device for implementing the above method, comprising:
[0019] The fetal heart rate acquisition module is used to acquire the raw fetal heart rate signal and perform preprocessing.
[0020] The signal generation module is used to generate data augmentation results of the fetal heart rate signal using a trained improved diffusion model.
[0021] Thirdly, the present invention provides a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described method.
[0022] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the above-described method.
[0023] Compared with the prior art, the beneficial effects of the present invention are at least as follows:
[0024] (1) The present invention proposes a mask enhancement mechanism, which randomly generates corresponding position masks according to the shape of the input signal to simulate the data collected in clinical practice, guides the diffusion process to focus on the unmasked area containing key clinical information, thereby improving the model's ability to learn data distribution under different missing levels.
[0025] (2) This invention designs a Transformer-based diffusion model suitable for FHR signals. Through the multi-head attention layer and point feedforward network in the DiT block, it can better simulate the time evolution process of time series and use the self-attention mechanism to capture long-range dependencies and complex time dynamics.
[0026] (3) The present invention adopts a dual-branch learning strategy for the training process, and designs different loss functions for low missing values and high missing values, guiding the model to learn complementary information from the masked region and the non-masked region, thereby improving the overall generative modeling ability. Attached Figure Description
[0027] Figure 1 This is a flowchart of the method of the present invention.
[0028] Figure 2 This is a detailed architecture diagram of the process. Specific implementation methods
[0029] The technical solution of the present invention will be further described in detail below through embodiments and in conjunction with the accompanying drawings.
[0030] like Figure 1 As shown, this embodiment provides a fetal heart rate signal data enhancement method based on a diffusion model, including the following steps:
[0031] S1: Masking Enhancement Mechanism Module Constructs Location Mask
[0032] First, the FHR signal is acquired and preprocessed. For the FHR signal data, a sliding window is applied to segment it into overlapping segments. ,in Indicates the number of windows. Indicates the window length.
[0033] The preprocessed FHR signal is then input into the masking enhancement mechanism module. To simulate data loss in real-world scenarios, this invention constructs a masking enhancement mechanism module that employs a random position masking strategy. This strategy selects a fixed proportion of discontinuous time steps in all input dimensions and marks them as missing, as shown in the following equation:
[0034] (1)
[0035] in It is a sample drawn from a uniform distribution. Indicates non-missing positions. Indicates the missing position.
[0036] Subsequently, the generation and modeling of the FHR signal is regarded as a series of local interpolation tasks. In each training, the model will focus on the region specified by the location mask. After learning robust features in this region, the module will randomly select a new region for the next iteration. Through this iterative process, the model will gradually learn the complete distribution features of the FHR signal.
[0037] Specifically, such as Figure 2 As shown in (a), for the preprocessed input Each single-channel sequence is input into the masking enhancement mechanism module, which uses a preset mask ratio. A positional mask is constructed to generate masked samples. In each masked sample, the non-positional mask segments are replaced with pure Gaussian noise, thus obtaining the masked FHR sequence. (As shown in Equation 2 below). To better simulate the scenario of random data loss, multiple mask ratios were set. The percentages are set at 10% intervals, ranging from 20% to 90%. Finally, the masked FHR signal serves as the conditional input to the generative model.
[0038] (2)
[0039] in This represents the FHR signal after masking. It is a position mask generated by equation (1). and The standard deviation is Gaussian noise.
[0040] S2: Train the generative model using an improved Transformer-based diffusion model suitable for FHR signals.
[0041] The improved diffusion model constructed in this invention is a generative model with an optimized DiT module structure. Unlike traditional generative models, this diffusion model incorporates a Transformer network, enabling joint learning of long-range dependencies and global context in one-dimensional physiological time series.
[0042] The Transformer-based diffusion model applicable to FHR signals mainly includes a conditional embedding module and two stacked DiT modules.
[0043] like Figure 2 (b) and Figure 2 As shown in (c), the conditional embedding module includes a sine / cosine position encoding layer, a label embedding layer, two fully connected layers and an activation function; each DiT module includes an MLP, two layer normalization layers, a multi-head attention layer, a point feedforward network layer, two scaling offset layers and two offset layers.
[0044] Specifically, in the conditional embedding module, the time step is encoded using sine and cosine positions, then processed by a fully connected layer and an activation function to generate an embedding vector; the label information is stored in a format of shape... The embedding layer of the parameter matrix maps the input integer index lookup table to... The dense vector is used; the position mask constructed by step S1 serves as auxiliary conditional information, providing spatial index information for the masked regions in the input sequence. The core of the DiT module consists of a multi-head attention layer and a point-based feedforward network layer, both of which jointly model long-term dependencies. Furthermore, this invention improves the DiT module for FHR signals by incorporating adaptive layer normalized modulation and zero-initialization residual branches, enabling conditional embeddings to directly modulate normalized statistics, thereby enhancing the model's expressive power and accelerating training.
[0045] In the specific process, the input FHR signal is first segmented and corresponding positional encoding is added in the input layer to generate the corresponding latent representation. Then, the latent representation of the FHR signal and the conditional embedding vector output by the conditional embedding module are jointly input into the DiT module. After feature transformation is performed in the stacked DiT module, the latent representation is decoded back to the original feature space by the linear projection layer, and then desegmented to finally form a one-dimensional noise sequence prediction.
[0046] S3: Design a dual-branch learning strategy to adapt to generative modeling under different missing data conditions.
[0047] After the location mask constructed in step S1 is input into the generative model in step S2, the model typically prioritizes processing information from the masked region to achieve accurate local reconstruction. However, at low mask rates, while the model can perform effective local learning within narrow regions, it neglects the global temporal structure, often leading to local optima. Therefore, this invention proposes a dynamic dual-branch learning strategy. This method adaptively adjusts the training process based on the mask rate, better balancing global consistency and local fidelity.
[0048] Specifically, such as Figure 2 As shown in (d), various mask ratios in the range of 20% to 90% are defined in step S1. Based on these ratios, the dual-branch learning strategy divides the training process into two branches: a low-ratio branch (20% to 60%) and a high-ratio branch (70% to 90%).
[0049] 1) High proportion of branches
[0050] The masked region in the high-proportion branch already contains sufficient contextual information, so the standard training process is retained, guiding the model to focus on the region specified by the mask. The optimization objective of this branch is defined as follows:
[0051] (3)
[0052] in It is the variational lower bound loss function. These are weighting coefficients. Indicates the location mask. Represents real noise. This represents the noise in the model's predictions.
[0053] 2) Low proportion of branches
[0054] In low-proportion branches, since most areas of the input data are not masked, focusing only on the masked areas may lead to local optima. Therefore, this invention incorporates the unmasked areas into the optimization objective (as shown in Equation 4 below). This design allows the model to not only emphasize the masked areas but also capture potential physiological features in the unmasked areas and integrate them into the generated data.
[0055] (4)
[0056] in Indicates the location of the unmasked region. and These are the weighting coefficients for the masked and unmasked regions, respectively. Represents real noise. This represents the noise in the model's predictions.
[0057] S4: Use the trained model to perform data augmentation on the new fetal heart rate signal.
[0058] To further verify the effectiveness of the method of the present invention, 552 sets of CTG data from the CTU-UHB database jointly collected by the Czech Technical University and Brno University Hospital were selected for comparative testing. The generated signal quality was compared with seven other methods, including traditional oversampling techniques such as Jittering and Scaling, generative models such as WGAN which introduces Wasserstein distance as a distribution metric, CGAN which uses real labels as auxiliary information, CWGAN which combines Wasserstein distance and real label conditions, DCGAN which combines deep convolutional neural networks, and CTGGAN which is designed for FHR signal generation. The maximum mean discrepancy (MMD), Wasserstein distance (WD), Fréchet distance (FD), and root mean square error (RMSE) of the generated signals are shown in Table 1 below.
[0059] Table 1
[0060]
[0061] The contents described in this specification are merely an enumeration of the implementation forms of the inventive concept, and the scope of protection of this invention should not be regarded as limited to the specific forms described in the embodiments.
Claims
1. A method for enhancing fetal heart rate signal data, characterized in that, Includes the following steps: Step S1: Acquire fetal heart rate signal and perform preprocessing; Step S2: Generate a random position mask for the preprocessed fetal heart rate signal through the mask enhancement mechanism module; Step S3: Construct an improved diffusion model, which includes a conditional embedding module and multiple stacked DiT modules; input the masked fetal heart rate signal and conditional information into the improved diffusion model, encode the conditional information into a conditional embedding vector through the conditional embedding module, and input it together with the masked fetal heart rate signal into the DiT module for feature transformation, and output the generated fetal heart rate signal. Step S4: Train the improved diffusion model. During the training process, a two-branch learning strategy is adopted, and different loss functions are used to optimize the model according to the proportion of the mask. Step S5: Input the new fetal heart rate signal into the trained improved diffusion model to obtain the data augmentation results of the fetal heart rate signal.
2. The method for enhancing fetal heart rate signal data according to claim 1, characterized in that, The specific process of the mask enhancement mechanism module generating random position masks is as follows: a fixed proportion of discontinuous time steps are randomly selected from all input dimensions and marked as missing to generate position masks; then, the regions of the original fetal heart rate signal corresponding to the position masks are replaced with Gaussian noise to obtain the masked fetal heart rate signal.
3. The method for enhancing fetal heart rate signal data according to claim 1, characterized in that, The conditional information includes time step, label, and location mask.
4. The method for enhancing fetal heart rate signal data according to claim 3, characterized in that, The improved diffusion model includes a conditional embedding module and two stacked DiT modules; The conditional embedding module includes a sine / cosine position encoding layer, a label embedding layer, two fully connected layers, and an activation function. The sine / cosine position encoding layer encodes the time step, the label embedding layer maps the label index to a dense vector, and the two fully connected layers and the activation function further process the encoded time step to generate a conditional embedding vector.
5. The method for enhancing fetal heart rate signal data according to claim 4, characterized in that, Each of the DiT modules includes a multilayer perceptron, two layer normalization layers, a multi-head attention layer, a point feedforward network layer, two scaling offset layers, and two offset layers.
6. The method for enhancing fetal heart rate signal data according to claim 5, characterized in that, In the dual-branch learning strategy, the masking ratio is defined to be in the range of 20% to 90%, where the masking ratio of 20% to 60% is defined as the low-ratio branch, and the masking ratio of 70% to 90% is defined as the high-ratio branch. The loss function of the high-ratio branch is the variational lower bound loss function, and the loss function of the low-ratio branch is the weighted sum of the variational lower bound loss function and the reconstruction loss of the unmasked region.
7. The method for enhancing fetal heart rate signal data according to claim 6, characterized in that, The loss function for high-proportion branches is as follows: in It is the variational lower bound loss function. These are weighting coefficients. Indicates the location mask; The loss function for low-proportion branches is as follows: in Indicates the location of the unmasked region. and These are the weighting coefficients for the masked and unmasked regions, respectively.
8. A fetal heart rate signal data enhancement device for implementing the method as described in any one of claims 1-7, characterized in that, include: The fetal heart rate acquisition module is used to acquire the raw fetal heart rate signal and perform preprocessing. The signal generation module is used to generate data augmentation results of the fetal heart rate signal using a trained improved diffusion model.
9. A computer device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, It stores a computer program thereon, which, when executed by a processor, implements the method as described in any one of claims 1-7.