CycleGAN-based brain blood oxygen signal enhancement method and system

By employing a CycleGAN-based brain oxygenation signal enhancement method, utilizing cascaded noise reduction modules and multi-round iterative optimization mechanisms, combined with multi-scale convolutional kernels and a comprehensive loss function, the problem of insufficient signal quality in wearable fNIRS devices is solved. This achieves intelligent conversion from low-quality to high-quality signals, improves the signal-to-noise ratio, and maintains the temporal continuity and physiological characteristics of the signal.

CN121176903APending Publication Date: 2025-12-23FUDAN UNIVERSITY

Patent Information

Application Number
CN202511290257.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-10
Publication Date
2025-12-23

AI Technical Summary

Technical Problem

Wearable functional near-infrared spectroscopy (fNIRS) devices suffer from problems in signal quality, including low signal-to-noise ratio, susceptibility to motion artifacts and physiological noise, limited light source power, and insufficient detector sensitivity. These issues remain unresolved in existing signal enhancement methods and technologies. Furthermore, existing signal enhancement methods struggle to adapt to complex and variable noise environments. Traditional GANs and CycleGANs exhibit problems such as neglecting temporal dependencies and failing to preserve physiological characteristics in one-dimensional temporal signal processing.

Method used

A CycleGAN-based brain oxygenation signal enhancement method is adopted. The CycleGAN network architecture is constructed by cascading noise reduction modules, bidirectional generator network and discriminator network. The signal is preprocessed and enhanced by combining multi-scale convolution kernels and multi-round iterative optimization mechanism. A comprehensive loss function is used for full constraints, including adversarial loss, cycle consistency loss and physiological signal constraint loss, to ensure the temporal continuity and physiological characteristics of the signal.

Benefits of technology

It achieves intelligent conversion from low-quality wearable device signals to clinical-grade high-quality signals, effectively improving the signal-to-noise ratio, reducing noise interference, maintaining the temporal continuity and physiological characteristics of the signal, and improving signal quality in stages, thereby enhancing the quality of cerebral blood oxygenation signals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121176903A_ABST
    Figure CN121176903A_ABST
Patent Text Reader

Abstract

The invention provides a CycleGAN-based brain blood oxygen signal enhancement method and system, and the method comprises the steps: building a mapping relation between a wearable device and a clinical-level device, enabling the wearable device and the clinical-level device to synchronously collect a brain blood oxygen signal, carrying out the preprocessing, and constructing a training data set; carrying out secondary preprocessing on the brain blood oxygen signal by adopting a cascade noise reduction module; the method comprises the following steps: constructing a CycleGAN network architecture by adopting a bidirectional generator network and a discriminator network, and obtaining an fNIRS-CycleGAN network model by optimizing parameters of the network architecture and training; different frequency band components of the brain blood oxygen signals are processed in parallel through convolution kernels of different scales by adopting a multi-round iterative optimization mechanism and a multi-scale multi-iteration optimization strategy through a network model; and evaluating the enhancement effect of the brain blood oxygen signal by using the quantitative index. According to the invention, intelligent conversion from a low-quality wearable device signal to a clinical-grade high-quality signal is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of biomedical signal processing and deep learning technology, specifically to a method and system for enhancing brain oxygenation signals based on CycleGAN, and more particularly to a method for enhancing the quality of wearable functional near-infrared spectroscopy (fNIRS) brain oxygenation signals based on an improved CycleGAN. Background Technology

[0002] Functional near-infrared spectroscopy (fNIRS) is an emerging non-invasive brain imaging technique that reflects neural activity by detecting changes in the concentrations of oxyhemoglobin (HbO) and deoxyhemoglobin (HbR) in brain tissue. According to the modified Lambert-Beer law, the attenuation of light in biological tissue can be expressed as:

[0003] ΔOD=ε·Δc·L·DPF

[0004] Where ΔOD is the change in optical density, ε is the extinction coefficient, Δc is the change in hemoglobin concentration, L is the distance between the source and the detector, and DPF is the differential path length factor.

[0005] In recent years, wearable fNIRS devices have been widely used in the fields of mental illness diagnosis, occupational health monitoring, and sports rehabilitation due to their portability, low cost, and real-time monitoring capabilities. However, compared with clinical-grade fNIRS devices, wearable devices have significant gaps in signal quality. The main problems include: (1) low signal-to-noise ratio, with typical wearable devices having a signal-to-noise ratio of only 15-25dB, while clinical-grade devices can reach 40-60dB; (2) susceptibility to motion artifacts and physiological noise, including heartbeat, respiration, and head movements; (3) limited light source power, resulting in insufficient penetration depth; and (4) low detector sensitivity, making it difficult to accurately capture weak changes in blood oxygenation signals.

[0006] Existing signal enhancement methods can be mainly divided into two categories. One category is traditional signal processing-based methods, such as bandpass filtering, independent component analysis (ICA), and principal component analysis (PCA). These methods rely on prior knowledge and manually designed features, making them difficult to adapt to complex and varied noisy environments. The other category is end-to-end methods based on deep learning, such as deep neural networks (DNN) and convolutional neural networks (CNN). Although these methods improve signal quality to some extent, they require a large amount of data for supervised learning. However, obtaining strictly paired data between wearable devices and clinical-grade devices is extremely difficult and costly in practical applications.

[0007] While Generative Adversarial Networks (GANs) have achieved significant success in image generation, their direct application to one-dimensional temporal signals presents numerous challenges. Traditional GANs require paired data for training, and while CycleGAN can handle unpaired data, its original design is geared towards two-dimensional images. Directly applying it to one-dimensional fNIRS signals leads to: (1) ignoring the temporal dependencies of the signal; (2) failing to maintain the physiological characteristics of blood oxygen dynamics response; and (3) being prone to mode collapse, generating a single-mode output. CycleGAN variants based on one-dimensional convolutional neural networks can adapt the CycleGAN architecture, originally designed for 2D images, to 1D signal processing tasks for signal-to-signal translation.

[0008] Patent document CN118216931A discloses a brain data augmentation method and apparatus based on generative artificial intelligence. The method and apparatus include: correcting missing channels in low-resolution EEG data to obtain coarse-grained high-resolution EEG data; taking the low-resolution EEG data as input and outputting corresponding EEG temporal pattern codes and EEG spatial pattern codes; taking the low-resolution EEG data and the aforementioned EEG temporal pattern codes and spatial pattern codes as input and outputting fine-grained high-resolution EEG data, which is then superimposed with the coarse-grained high-resolution EEG data to obtain reconstructed high-resolution EEG data. However, this patent document still has the drawback of ignoring the temporal dependence of signals. Summary of the Invention

[0009] In view of the deficiencies in the prior art, the purpose of this invention is to provide a method and system for enhancing brain blood oxygenation signals based on CycleGAN.

[0010] A method for enhancing cerebral oxygenation signals based on CycleGAN, provided by the present invention, includes the following steps:

[0011] Data acquisition and preprocessing steps: Device calibration is performed to establish a mapping relationship between wearable fNIRS devices and clinical-grade fNIRS devices. Cerebral blood oxygenation signals are simultaneously acquired using both wearable and clinical-grade fNIRS devices. The acquired cerebral blood oxygenation signals are then preprocessed for the first time to construct a training dataset.

[0012] Signal preprocessing steps: Before the brain blood oxygenation signal in the training dataset is input into the fNIRS-CycleGAN network model, a cascaded noise reduction module is used to perform secondary preprocessing on the brain blood oxygenation signal. The cascaded noise reduction module includes hysteresis cancellation filtering and adaptive wavelet threshold denoising.

[0013] Network model construction steps: A CycleGAN network architecture is constructed using a bidirectional generator network and a discriminator network. The network parameters of the CycleGAN network architecture are optimized in stages using a progressive training strategy to obtain the CycleGAN network model. The CycleGAN network model is trained using brain blood oxygenation signals after secondary preprocessing to obtain the fNIRS-CycleGAN network model.

[0014] Signal processing enhancement steps: Using the fNIRS-CycleGAN network model, and employing a multi-Iteration optimization mechanism and a multi-scale multiple-iteration optimization strategy, different frequency band components of the cerebral blood oxygenation signal are processed in parallel through convolutional kernels of different scales;

[0015] Signal enhancement assessment steps: Use quantitative indicators to evaluate the enhancement effect of cerebral blood oxygenation signal processed by the fNIRS-CycleGAN network model.

[0016] Preferably, in the signal preprocessing step, the signal-to-noise ratio of the cerebral blood oxygenation signal input to the fNIRS-CycleGAN network model is improved through a five-step cascaded processing flow.

[0017] Preferably, in the network model construction step, the bidirectional generator network adopts a U-Net architecture adapted to one-dimensional time-series signals, including an encoder, a residual generator, and a decoder, to achieve end-to-end signal quality mapping.

[0018] The discriminator network adopts a multi-scale 1D-PatchGAN structure, performs discrimination at multiple time windows of different lengths, and introduces spectral normalization technology to improve training stability.

[0019] In the network model construction step, a comprehensive loss function is used to fully constrain the training and learning of the network model; the comprehensive loss function includes adversarial loss, cycle consistency loss, frequency domain consistency loss, physiological signal constraint loss, temporal continuity loss, peak preservation loss, and noise perception loss.

[0020] The adversarial loss employs least squares loss to improve the realism of the generated signal; the cyclic consistency loss ensures the reversibility of the bidirectional mapping; and the frequency domain consistency loss maintains the spectral characteristics of the blood oxygen dynamics response.

[0021] The physiological signal constraint loss is used to force a negative correlation between HbO and HbR signals; HbO is oxyhemoglobin, which refers to hemoglobin that is bound to oxygen; HbR is deoxyhemoglobin, which refers to hemoglobin that is not bound to oxygen.

[0022] The temporal continuity loss is used to maintain the temporal smoothness of the signal; the peak hold loss is used to protect task-related activation responses; and the noise perception loss is used to constrain noise priors based on the preprocessing stage.

[0023] Preferably, in the signal processing enhancement step, an attention mechanism is used to adaptively fuse multi-scale features to balance the effect and reduce computational cost.

[0024] The quality of cerebral blood oxygenation signal is gradually improved through five rounds of iteration: the first round focuses on basic noise reduction, the second round is used to restore physiological response patterns, the third round is used to finely adjust the peak value, the fourth round is used for overall optimization, and the fifth round is for optional detail enhancement.

[0025] Preferably, the data acquisition and preprocessing steps specifically include the following steps:

[0026] Device calibration steps: Establish the mapping relationship between wearable fNIRS devices and clinical-grade fNIRS devices. Based on the modified Beer-Lambert law, the relationship between oxygen saturation (SO2) and optical density ratio (ODR) is as follows:

[0027] SO2=k0×ODR+b

[0028] Where k0 and b are calibration parameters obtained by fitting through hierarchical linear regression;

[0029] Synchronous acquisition steps: A timestamp synchronization mechanism is used to align the time of data acquisition by the wearable fNIRS device and the clinical fNIRS device that have established a mapping relationship, and to ensure that the sampling frequency, the duration of each acquisition, and the sampling method of the two devices are the same, so as to synchronously acquire brain blood oxygenation signals through the two devices.

[0030] Data preprocessing steps: Signal standardization, artifact detection, and quality grading are performed on the brain blood oxygenation signals collected by wearable fNIRS devices and clinical-grade fNIRS devices;

[0031] In the signal standardization process, the cerebral blood oxygenation signal is standardized using z-score. The z-score standardization formula is as follows:

[0032] x norm =(x-μ) / σ

[0033] Where, x norm σ represents the standardized brain oxygenation signal value, x represents the original brain oxygenation signal value, μ represents the mean of the brain oxygenation signal data, and σ represents the standard deviation of the brain oxygenation signal data.

[0034] In the artifact detection process, motion artifacts of cerebral blood oxygenation signals are detected based on amplitude thresholds and rate of change.

[0035] In the quality grading process, the dataset of cerebral blood oxygenation signals is divided into multiple levels according to the signal-to-noise ratio;

[0036] Dataset construction steps: Use preprocessed brain blood oxygenation signal data from a pre-processed brain blood oxygenation signal dataset with a preset percentage to construct the training dataset.

[0037] Preferably, the signal preprocessing step specifically includes the following steps:

[0038] Hysteresis cancellation filtering steps: A hysteresis cancellation filter is used to process the time delay distortion in the transmission of cerebral oxygenation signals. The transfer function of the hysteresis cancellation filter is defined as follows:

[0039]

[0040] Where H(z) represents the system transfer function of the hysteresis cancellation filter, z represents the complex frequency domain variable, the complex frequency domain refers to the z-transform domain, α and β are the parameters of the hysteresis cancellation filter. The parameter α controls the zero position and affects the high-frequency response characteristics of the cancellation filter, while the parameter β controls the pole position and determines the stability and low-frequency characteristics of the cancellation filter.

[0041] Adaptive wavelet filtering steps: Construct a soft thresholding function based on the statistical characteristics of cerebral blood oxygenation signals. The soft thresholding function is used to remove noise from the cerebral blood oxygenation signals. The soft thresholding function is defined as follows:

[0042] T soft (x) = sign(ω)·max(|x|-λ,0)

[0043] Among them, T soft (ω) represents the output value of the soft thresholding function, and in this formula, it represents the denoised wavelet coefficients. ω is the wavelet coefficient, and λ is the adaptive threshold. The formula for calculating the adaptive threshold λ is:

[0044]

[0045] Where, σ noise-std The value is an estimate of the noise standard deviation, log(L) signal L is the natural logarithm with base e. signal The signal length and noise standard deviation are estimated using the robust median absolute deviation method.

[0046] The five-step cascaded noise reduction process employs a progressive noise reduction strategy, sequentially executing five steps: raw signal input of cerebral blood oxygenation signal, preliminary filtering, signal reversal processing, reversal and recovery processing, and secondary fine filtering. Through multiple iterations, noise in the cerebral blood oxygenation signal is gradually suppressed.

[0047] Preferably, the network model construction step specifically includes the following steps:

[0048] The bidirectional generator network construction steps are as follows: A U-Net structure adapted to one-dimensional signals is adopted, and a bidirectional generator network is constructed using three core components: an encoder, a residual, and a decoder.

[0049] The encoder contains a 3-layer downsampling module, with each layer having the structure: Conv1D(k=3,s=2)+InstanceNorm+LeakyReLU(a=0.2). The number of channels can be gradually increased from the 2 input channels to 256 channels, realizing the layer-by-layer abstraction of features.

[0050] Where Conv1D represents a one-dimensional convolutional layer; k is an abbreviation for kernel_size, which is the kernel size and represents the length of the convolutional kernel; s is an abbreviation for stride, which is the stride and represents the distance the convolutional kernel slides each time; InstanceNorm represents instance normalization; LeakyReLU is the LeakyReLU activation function, and a represents the slope of the activation function; the two input channels are the HbO signal channel and the HbR signal channel, respectively.

[0051] The residual unit contains 9 residual blocks, and the mathematical expression for each residual block is as follows:

[0052] ResBlock(f in )=f in +Conv1D(Conv1D(f in ))

[0053] Among them, ResBlock(f in ) represents the output of the residual block, Conv1D(·) is the one-dimensional convolution operation function, and f in For the input features of the residual block, the Conv1D convolution kernel size is 3, the stride is 1, and the number of channels is 256.

[0054] The decoder contains three upsampling modules, each with the structure: TransposeConv1D(k=3,s=2)+InstanceNorm+ReLU. The number of channels can be gradually reduced from 256 to 2, and finally outputs enhanced HbO and HbR signals.

[0055] Where TransposeConv1D represents a one-dimensional deconvolution layer, which is the inverse operation of Conv1D; ReLU is the ReLU activation function.

[0056] Discriminator network construction steps: A discriminator network is constructed using a 1D-PatchGAN structure to achieve multi-scale discrimination;

[0057] The discriminator network consists of four convolutional layers:

[0058] First layer: Conv1D(kernel_size=4, stride=2)→LeakyReLU(a=0.2);

[0059] Second layer: Conv1D(kernel_size=4, stride=2)→InstanceNorm→LeakyReLU(a=0.2);

[0060] Third layer: Conv1D(kernel_size=4, stride=1)→InstanceNorm→LeakyReLU(a=0.2);

[0061] Fourth layer: Conv1D(kernel_size=1, stride=1);

[0062] Three independent discriminator networks were constructed for three different time window lengths of 128, 256, and 512, respectively, to enhance the perception of multi-scale features. The three discriminator networks have the same network architecture. The parameters of the three discriminator networks are independent of each other. The three discriminator networks can process signal features corresponding to their respective time window lengths.

[0063] In the convolutional layers of the discriminator network, spectral normalization is applied to constrain the spectral norm of the weight matrix. The mathematical expression for spectral normalization is:

[0064]

[0065] Among them, W SN σ(W) represents the weight matrix after spectral normalization, and σ(W) represents the maximum singular value of the weight matrix W.

[0066] The steps for constructing a multi-component loss function are as follows: Design a comprehensive loss function that integrates seven key components to comprehensively constrain model learning. The comprehensive loss function consists of seven key components, each collaboratively optimizing different aspects of signal quality. The expression for the comprehensive loss function is:

[0067] L total =L adv +L cycle +λ freq ·L freq +λ physio ·L physio +λ temp ·L temp +λ peak ·L peak +λ denoise ·Ldenoise

[0068] Among them, L total To account for the overall loss, L adv To combat the losses, L cycle For the cycle consistency loss, λ freq L is the weight for the frequency domain consistency loss. freq For frequency domain consistency loss, λ physio L is the weight of the physiological signal constraint loss. physio For physiological signal-constrained loss, λ temp L is the weight for the temporal continuity loss. temp For temporal continuity loss, λ peak To maintain the weight of the loss at the peak, L peak To preserve peak value, λ denoise L is the weight for the noise perception loss. denoise For noise perception loss;

[0069] Combat loss L adv The least squares adversarial loss is expressed as follows:

[0070]

[0071] In the formula, L adv (G, D) Y (X, Y) is the adversarial loss function, G is the generator network, and D is the generator network. Y For the discriminator network, X represents the low-quality signal domain of the input, Y represents the high-quality signal domain of the target, and y ~ p data (y) represents the true high-quality signal sample variable y from the target domain, which follows the probability distribution p of the target domain data. data (y), D Y (·) represents the discriminator network function, x ~ p data (x) represents a low-quality signal sample variable x from the input domain, which follows the probability distribution p of the input domain data. data (x), where G(·) is the generator network function;

[0072] in, Make the discriminator network output close to 1 for the real signal y. Make the discriminator network's output of the generated signal G(x) close to 0, where E[·] represents the mathematical expectation, p data (·) indicates the data distribution;

[0073] Cyclic consistency loss L cycle The expression is:

[0074]

[0075] Among them, Lcycle (G,F) is the cycle consistency loss function, F is the reverse generator network from the Y domain to the X domain, F(·) is the reverse generator network function, and |·|1 represents the L1 norm;

[0076] Frequency domain uniformity loss L freq The expression is:

[0077]

[0078] Where |·|2 represents the L2 norm, The square of the L2 norm is represented by FFT(·), which is the Fast Fourier Transform function.

[0079] Physiological signal constraint loss L physio The expression is:

[0080] L physio =α corr ·L corr +β smooth ·L smooth

[0081] Among them, L corr and L smooth The expression is:

[0082] L corr =max(0,corr(HbO,HbR)+0.7)

[0083]

[0084] Among them, L corr L represents the correlation loss between HbO and HbR signals. smooth α represents the signal smoothness loss. cirr For L corr The weighting coefficient, β smooth For L smooth The weighting coefficients, corr(HbO,HbR), represent the Pearson correlation coefficients of the HbO and HbR signals, where HbO and HbR represent the concentration changes of oxyhemoglobin and deoxyhemoglobin, respectively. Represents the gradient operator;

[0085] Temporal continuity loss L temp The expression is:

[0086]

[0087] Where t is the time index, x t Let x be the signal at time point t. t-1 The signal is from the previous time point;

[0088] Peak hold loss L peak The expression is:

[0089]

[0090] Where P(·) is the peak detection operator;

[0091] Noise perception loss L denoise The expression is:

[0092]

[0093] Where N(·) is the noise extraction operator, N est This represents the estimated noise level;

[0094] Progressive training steps: A multi-stage progressive training strategy is adopted to gradually increase the training difficulty and network complexity, enabling the network model to gradually transition from simple mapping relationship learning to complex signal enhancement tasks. Specifically, this includes the following stages:

[0095] The first stage is the basic mapping learning stage, which is used to establish the basic mapping relationship from low-quality to high-quality signals.

[0096] The second stage involves introducing a multi-scale discriminator architecture to improve the generation quality of different frequency components.

[0097] The third stage involves fine-tuning the signal at full resolution to improve detail and overall consistency.

[0098] Preferably, the signal processing enhancement step specifically includes the following steps:

[0099] Multi-scale convolutional kernel construction steps: Three convolutional kernels of different scales are used in parallel in the bidirectional generator network. The three scale convolutional kernels are 3-scale convolutional kernel, 5-scale convolutional kernel, and 7-scale convolutional kernel.

[0100] Three-scale convolutional kernels are used to capture high-frequency details, including noise components and rapid physiological changes; five-scale convolutional kernels are used to extract mid-frequency features, corresponding to normal blood oxygen dynamics response patterns; and seven-scale convolutional kernels are used to model low-frequency trends, handling slow baseline drift and long-term physiological changes.

[0101] The multi-scale convolutional kernel parallel processing architecture enables the network model to simultaneously focus on different frequency components of the signal;

[0102] Feature fusion steps: Multi-scale feature fusion is performed using a feature fusion mechanism. This mechanism assigns weights to features at different scales through an adaptive attention mechanism. The feature fusion formula is as follows:

[0103]

[0104] Among them, F fused L represents the fused feature representation; L represents the number of scales, α i For attention weights, This represents the feature map of the i-th scale at the l-th layer;

[0105] Attention weight α i The calculation uses Softmax normalization, and the formula is:

[0106]

[0107] in, This represents the original attention score of the i-th scale at the l-th layer. This represents the original attention score of the j-th scale at the l-th layer;

[0108] The formula for calculating the attention score is:

[0109]

[0110] in, Let W represent the feature map of the j-th scale at the l-th layer, and let GAP(·) represent the global average pooling operation. β and b β These are the learnable weight matrix and the bias term, respectively;

[0111] Iterative optimization process steps: A five-round progressive iterative strategy is adopted, with each round focusing on a different optimization objective. Through multiple rounds of iteration, the signal quality is gradually improved. Specifically, it includes the following five rounds of iteration:

[0112] First iteration: Perform basic noise reduction, remove high-frequency noise components, activate the weights of 3-scale convolutional kernels, reduce the influence of 5-scale and 7-scale convolutional kernels, and make the overall loss function mainly focus on the noise perception loss L. denoise ;

[0113] Second iteration: Enhance signal core features, restore typical physiological response patterns, extract mid-frequency features using 5-scale convolutional kernels, and apply physiological signal constraint loss L... physio Instruct the network model to learn the correct blood oxygen dynamics pattern;

[0114] Third iteration: Fine-tuning peak and phase information to preserve task-related activation features, building upon the first and second iterations, using peak preservation loss L... peak Ensure that important physiological responses are not overly smoothed;

[0115] Fourth iteration: Perform overall optimization to ensure signal integrity and consistency, comprehensively considering features at all scales, and applying the cyclic consistency loss L... cycle and temporal continuity loss L temp Ensure overall signal quality;

[0116] Fifth iteration: Optimize the details of task requirements, adjust the weight coefficients of each loss in the comprehensive loss function according to the requirements of specific application scenarios, and enhance the preset signal features;

[0117] The mathematical expression for each iteration is:

[0118] s (i+1) =G (i) (s (i) )

[0119] Among them, (s (i) G represents the input signal for the i-th iteration; (i) Let represent the generator network in the i-th iteration, whose parameters are adjusted according to the optimization objective of the current iteration; s (i+1) This represents the output of the i-th iteration and serves as the input for the next iteration.

[0120] Preferably, the signal enhancement evaluation step includes technical indicator evaluation and physiological significance evaluation;

[0121] The technical indicators are evaluated using signal quantization evaluation indicators, physiological fidelity evaluation indicators, and time-domain and frequency-domain characteristic evaluation indicators.

[0122] The signal quantification evaluation indicators include: signal-to-noise ratio improvement, peak signal-to-noise ratio, and structural similarity index;

[0123] The signal-to-noise ratio improvement is defined as:

[0124]

[0125] Among them, SNR enhanced Represents the signal-to-noise ratio (SNR) of the enhanced signal. original The signal-to-noise ratio represents the original signal.

[0126] Wherein, SIR stands for Signal-to-Noise Ratio Improvement. SIR measures the strength of the useful signal relative to the noise, and its calculation formula is:

[0127]

[0128] Where, σ signal σ represents the standard deviation of the useful signal, signifying the change in signal strength or amplitude; noise The standard deviation of the noise component represents the unwanted random variation in the system;

[0129] The peak signal-to-noise ratio (PSNR) is defined as the ratio of the maximum possible power of the signal to the noise power, and is used to evaluate the signal reconstruction quality. The calculation formula is as follows:

[0130]

[0131] Where PSNR is the peak signal-to-noise ratio, and MAX is the maximum possible amplitude of the signal. 2 The maximum signal power is given by MSE, which is the mean square error. The formula for MSE is:

[0132]

[0133] Where N is the total number of signal samples, and x represents the length of the time series; enhanced [i] is the enhanced signal value at the i-th time point; x target [i] is the target signal value at the i-th time point;

[0134] The structural similarity index, used to evaluate the degree of structural similarity between two signals, is defined as follows:

[0135]

[0136] Where SSIM(x,y) is the structural similarity index; x is the enhanced signal, which is the enhanced brain oxygenation signal collected by the wearable fNIRS device; y is the target signal, which is the brain oxygenation signal collected by the clinical-grade fNIRS device; μ x denoted by μ, represents the mean of signal x, reflecting the average level of the enhanced signal; y Reflects the average level of the target signal; The variance represents the enhanced signal, reflecting the degree of signal change; σ represents the variance of the enhanced signal, reflecting the degree of change in the target signal; xy c1 is the covariance; c2 is the first stability constant; c3 is the second stability constant.

[0137] The physiological fidelity assessment indicators include: HbO-HbR correlation retention and blood oxygen dynamics response fidelity;

[0138] The HbO-HbR correlation retention degree is used to assess the degree to which the relationship between HbO and HbR is maintained after enhancement, and to verify whether the enhancement process maintains the correct physiological relationship. It is defined as follows:

[0139]

[0140] Where CPR represents the HbO-HbR correlation preservation; corr(·) is the Pearson correlation coefficient function, which calculates the degree of linear correlation between the two variables; HbO enhancedHbR enhanced These are the changes in oxyhemoglobin concentration and deoxyhemoglobin concentration in the enhanced signal, respectively; HbO target HbR target These are the oxyhemoglobin concentration change signal and the deoxyhemoglobin concentration change signal in the target signal, respectively.

[0141] The blood oxygen dynamics response fidelity, used to assess the degree of HRF shape preservation, is defined as:

[0142]

[0143] Where HRF(·) is the blood oxygen dynamics response function, HRF fidelity For blood oxygen kinetic response fidelity, used to assess the degree of HRF shape retention; HRF enhanced To enhance the blood oxygen dynamic response of the signal; HRF target (t) represents the hemodynamic response to the target signal;

[0144] The time-domain and frequency-domain performance evaluation indicators include: power spectral density retention, frequency domain consistency coefficient, timing smoothness index, and peak protection rate.

[0145] The power spectral density retention, used to evaluate the power retention of the signal before and after enhancement at a preset frequency, is defined as:

[0146]

[0147] Among them, PSDP freq PSD is the power spectral density retention at a preset frequency. enhanced (f) PSD target (f) represents the power spectral density values ​​of the enhanced signal and the target signal at frequency f, respectively;

[0148] The frequency domain consistency coefficient, used to quantify the preservation of frequency domain characteristics, is defined as follows:

[0149]

[0150] Among them, FFT enhanced (f) represents the Fourier transform of the enhanced signal at frequency f, FFT. target (f) represents the Fourier transform of the target signal at frequency f, and FDCC is the frequency domain consistency coefficient;

[0151] The temporal smoothness index, used to evaluate the temporal continuity of a signal, is defined as follows:

[0152]

[0153] Where TSI is the time series smoothness index, T is the total number of time points, and x enhanced [t+1]-x enhanced [t] and x target [t+1]-x target [t] represents the difference between the enhanced signal and the target signal at adjacent time points, x[·] represents the discrete-time signal, t represents the index of the current time point, and t+1 represents the index of the next time point;

[0154] The peak protection rate, used to evaluate the degree to which important activation responses are preserved, is defined as:

[0155]

[0156] Where PPR is the peak protection rate, and N peaks,preserved To enhance the number of peak values ​​held by the signal; N peaks,total The total number of peak values ​​in the target signal;

[0157] Based on the results of signal quantification evaluation indicators, a comprehensive evaluation model is established, and various indicators are weighted and scored. The comprehensive quality score is defined as follows:

[0158] Quality Score

[0159] =α signal Score signal +β physio Score physio +γ frequency Score frequency +δ temporal Score temporal

[0160] Among them, Quality Score For overall quality scoring;

[0161] α signal Weighting coefficients for the signal quality dimension score; Score signal The signal quality dimension is scored based on SNR, PSNR, and SSIM(x,y);

[0162] β physio The weighting coefficients for the physiological fidelity dimension score; Score physio Scoring for physiological fidelity dimension based on CPR and HRF fidelity To score;

[0163] γ frequency Weighting coefficients for the frequency domain characteristic dimension score; Score frequency Scoring is performed based on the frequency domain characteristics dimension, using PSDP. freqFDCC will score the scores.

[0164] δ temporal The weighting coefficients for the score in the temporal continuity dimension; Score temporal The score is based on the temporal continuity dimension, using TSI and PPR.

[0165] The physiological significance was assessed using the Bland-Altman test and clinical equivalence assessment.

[0166] For clinical equivalence assessment, the enhancement effect is verified by comparison with a clinical-grade fNIRS device, defined as:

[0167]

[0168] Clinical Equivalence S is the clinical equivalence assessment value; M is the total number of test samples; SSIM(·) is the structural similarity index function; S enhanced,m S clinical,m The images show the enhanced cerebral oxygenation signal of the m-th sample and the cerebral oxygenation signal acquired by a clinical-grade fNIRS device, respectively.

[0169] This invention also provides a cerebral oxygenation signal enhancement system based on CycleGAN, comprising the following modules:

[0170] Data acquisition and preprocessing module: Performs device calibration, establishes a mapping relationship between wearable fNIRS devices and clinical-grade fNIRS devices, enables wearable fNIRS devices and clinical-grade fNIRS devices to synchronously acquire cerebral blood oxygenation signals, and performs initial preprocessing on the acquired cerebral blood oxygenation signals to construct a training dataset;

[0171] Signal preprocessing module: Before the brain blood oxygenation signal in the training dataset is input into the fNIRS-CycleGAN network model, the cascaded denoising module performs secondary preprocessing on the brain blood oxygenation signal. The cascaded denoising module includes hysteresis cancellation filtering and adaptive wavelet threshold denoising.

[0172] Network model construction module: The CycleGAN network architecture is constructed based on the bidirectional generator network and the discriminator network. The network parameters of the CycleGAN network architecture are optimized in stages based on the progressive training strategy to obtain the CycleGAN network model. The CycleGAN network model is trained through the brain blood oxygenation signal after secondary preprocessing to obtain the fNIRS-CycleGAN network model.

[0173] Signal processing enhancement module: The fNIRS-CycleGAN network model is used with a multi-Iteration optimization mechanism and a multi-scale multiple iteration optimization strategy to process different frequency band components of cerebral blood oxygenation signals in parallel through convolutional kernels of different scales;

[0174] Signal enhancement assessment module: Uses quantitative indicators to evaluate the enhancement effect of cerebral blood oxygenation signal processed by the fNIRS-CycleGAN network model.

[0175] Compared with the prior art, the present invention has the following beneficial effects:

[0176] 1. This invention provides a wearable fNIRS brain oxygenation signal quality enhancement method based on improved CycleGAN, which realizes intelligent conversion from low-quality wearable device signals to clinical-grade high-quality signals.

[0177] 2. This invention effectively improves the signal-to-noise ratio of the input signal and reduces noise interference to subsequent network model training through a cascaded noise reduction module (including hysteresis cancellation filtering and adaptive wavelet threshold denoising) and a five-step cascaded processing flow. The cascaded noise reduction module of this invention can specifically eliminate time delay distortion in signal transmission and dynamically remove motion artifacts, physiological noise such as heartbeat and breathing through adaptive wavelet thresholding. In particular, it performs layered suppression of low-frequency drift and high-frequency interference that wearable devices are susceptible to, providing cleaner input data for the network model and thus improving the model's learning efficiency of effective signal features.

[0178] 3. This invention maintains the temporal continuity and physiological characteristics of cerebral blood oxygenation signals and avoids pattern collapse by employing a specific generator and discriminator structure design and a comprehensive loss function (including seven components such as fusion adversarial loss, cycle consistency loss, and physiological signal constraint loss). The U-Net architecture of this invention adapts to the temporal feature extraction and reconstruction of one-dimensional signals through an encoder-residual-decoder structure. Multi-scale 1D-PatchGAN discriminates at different time windows, enhancing the perception of temporal patterns. In the comprehensive loss function, the temporal continuity loss constrains the temporal smoothness of the signal, the physiological signal constraint loss enforces the negative correlation between HbO and HbR, the cycle consistency loss ensures the reversibility of the bidirectional mapping, and the multi-dimensional constraints ensure that the generated signal conforms to physiological laws while avoiding single-mode output.

[0179] 4. This invention achieves phased and refined improvement of signal quality and balance of different frequency band components (high-frequency details, mid-frequency physiological response, and low-frequency trends) through a multi-Iteration optimization mechanism (five rounds of progressive iteration) and parallel processing of multi-scale convolutional kernels (3, 5, and 7 scales). The multi-round iteration of this invention focuses on basic noise reduction, physiological pattern restoration, peak adjustment, and other objectives, gradually optimizing the quality of each dimension of the signal. The 3 / 5 / 7 scale convolutional kernels specifically process high-frequency noise, mid-frequency blood oxygen dynamics response, and low-frequency baseline drift, respectively. Combined with the attention mechanism adaptive fusion feature, it can both retain task-related activation peaks (such as brain activity response) and suppress irrelevant noise, thereby improving signal quality. Attached Figure Description

[0180] Other features, objects, and advantages of the present invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:

[0181] Figure 1 This is a schematic diagram of the overall implementation steps of the CycleGAN-based brain oxygenation signal enhancement method of the present invention;

[0182] Figure 2 A schematic diagram of the five-step cascaded process for preprocessing noise reduction;

[0183] Figure 3 A schematic diagram of the improved CycleGAN network architecture;

[0184] Figure 4 This is a schematic diagram of the generator network structure;

[0185] Figure 5 This is a schematic diagram of the structure of a multi-scale discriminator network;

[0186] Figure 6 This is a schematic diagram of the recovery mechanism of Multi-Iteration. Detailed Implementation

[0187] The present invention will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present invention, but do not limit the invention in any way. It should be noted that those skilled in the art can make several changes and improvements without departing from the concept of the present invention. These all fall within the protection scope of the present invention.

[0188] Example 1

[0189] This embodiment provides a method for enhancing cerebral oxygenation signals based on CycleGAN, including the following steps:

[0190] Data acquisition and preprocessing steps: Device calibration is performed to establish a mapping relationship between wearable fNIRS devices and clinical-grade fNIRS devices. Cerebral blood oxygenation signals are simultaneously acquired using both wearable and clinical-grade fNIRS devices. The acquired cerebral blood oxygenation signals are then preprocessed for the first time to construct a training dataset.

[0191] The data acquisition and preprocessing steps specifically include the following steps:

[0192] Device calibration steps: Establish the mapping relationship between wearable fNIRS devices and clinical-grade fNIRS devices. Based on the modified Beer-Lambert law, the relationship between oxygen saturation (SO2) and optical density ratio (ODR) is as follows:

[0193] SO2=k0×ODR+b

[0194] Where k0 and b are calibration parameters obtained by fitting through hierarchical linear regression;

[0195] Synchronous acquisition steps: A timestamp synchronization mechanism is used to align the time of data acquisition by the wearable fNIRS device and the clinical fNIRS device that have established a mapping relationship, and to ensure that the sampling frequency, the duration of each acquisition, and the sampling method of the two devices are the same, so as to synchronously acquire brain blood oxygenation signals through the two devices.

[0196] Data preprocessing steps: Signal standardization, artifact detection, and quality grading are performed on the brain blood oxygenation signals collected by wearable fNIRS devices and clinical-grade fNIRS devices;

[0197] In the signal standardization process, the cerebral blood oxygenation signal is standardized using z-score. The z-score standardization formula is as follows:

[0198] x norm =(x-μ) / σ

[0199] Where, x norm σ represents the standardized brain oxygenation signal value, x represents the original brain oxygenation signal value, μ represents the mean of the brain oxygenation signal data, and σ represents the standard deviation of the brain oxygenation signal data.

[0200] In the artifact detection process, motion artifacts of cerebral blood oxygenation signals are detected based on amplitude thresholds and rate of change.

[0201] In the quality grading process, the dataset of cerebral blood oxygenation signals is divided into multiple levels according to the signal-to-noise ratio;

[0202] Dataset construction steps: Use preprocessed brain blood oxygenation signal data from a pre-processed brain blood oxygenation signal dataset with a preset percentage to construct the training dataset.

[0203] Signal preprocessing steps: Before the brain blood oxygenation signal in the training dataset is input into the fNIRS-CycleGAN network model, a cascaded noise reduction module is used to perform secondary preprocessing on the brain blood oxygenation signal. The cascaded noise reduction module includes hysteresis cancellation filtering and adaptive wavelet threshold denoising.

[0204] In the signal preprocessing step, the signal-to-noise ratio of the cerebral blood oxygenation signal input to the fNIRS-CycleGAN network model is improved through a five-step cascaded processing flow.

[0205] The signal preprocessing steps specifically include the following steps:

[0206] Hysteresis cancellation filtering steps: A hysteresis cancellation filter is used to process the time delay distortion in the transmission of cerebral oxygenation signals. The transfer function of the hysteresis cancellation filter is defined as follows:

[0207]

[0208] Where H(z) represents the system transfer function of the hysteresis cancellation filter, z represents the complex frequency domain variable, the complex frequency domain refers to the z-transform domain, α and β are the parameters of the hysteresis cancellation filter. The parameter α controls the zero position and affects the high-frequency response characteristics of the cancellation filter, while the parameter β controls the pole position and determines the stability and low-frequency characteristics of the cancellation filter.

[0209] Adaptive wavelet filtering steps: Construct a soft thresholding function based on the statistical characteristics of cerebral blood oxygenation signals. The soft thresholding function is used to remove noise from the cerebral blood oxygenation signals. The soft thresholding function is defined as follows:

[0210] T soft (x) = sign(ω)·max(|x|-λ,0)

[0211] Among them, T soft (ω) represents the output value of the soft thresholding function, and in this formula, it represents the denoised wavelet coefficients. ω is the wavelet coefficient, and λ is the adaptive threshold. The formula for calculating the adaptive threshold λ is:

[0212]

[0213] Where, σ noise-std The value is an estimate of the noise standard deviation, log(L) signal L is the natural logarithm with base e. signal The signal length and noise standard deviation are estimated using the robust median absolute deviation method.

[0214] The five-step cascaded noise reduction process employs a progressive noise reduction strategy, sequentially executing five steps: raw signal input of cerebral blood oxygenation signal, preliminary filtering, signal reversal processing, reversal and recovery processing, and secondary fine filtering. Through multiple iterations, noise in the cerebral blood oxygenation signal is gradually suppressed.

[0215] Network model construction steps: A CycleGAN network architecture is constructed using a bidirectional generator network and a discriminator network. The network parameters of the CycleGAN network architecture are optimized in stages using a progressive training strategy to obtain the CycleGAN network model. The CycleGAN network model is trained using brain blood oxygenation signals after secondary preprocessing to obtain the fNIRS-CycleGAN network model.

[0216] In the network model construction step, the bidirectional generator network adopts a U-Net architecture adapted to one-dimensional time-series signals, including an encoder, a residual generator, and a decoder, to achieve end-to-end signal quality mapping.

[0217] The discriminator network adopts a multi-scale 1D-PatchGAN structure, performs discrimination at multiple time windows of different lengths, and introduces spectral normalization technology to improve training stability.

[0218] In the network model construction step, a comprehensive loss function is used to fully constrain the training and learning of the network model; the comprehensive loss function includes adversarial loss, cycle consistency loss, frequency domain consistency loss, physiological signal constraint loss, temporal continuity loss, peak preservation loss, and noise perception loss.

[0219] The adversarial loss employs least squares loss to improve the realism of the generated signal; the cyclic consistency loss ensures the reversibility of the bidirectional mapping; and the frequency domain consistency loss maintains the spectral characteristics of the blood oxygen dynamics response.

[0220] The physiological signal constraint loss is used to force a negative correlation between HbO and HbR signals; HbO is oxyhemoglobin, which refers to hemoglobin that is bound to oxygen; HbR is deoxyhemoglobin, which refers to hemoglobin that is not bound to oxygen.

[0221] The temporal continuity loss is used to maintain the temporal smoothness of the signal; the peak hold loss is used to protect task-related activation responses; and the noise perception loss is used to constrain noise priors based on the preprocessing stage.

[0222] The network model construction steps specifically include the following steps:

[0223] The bidirectional generator network construction steps are as follows: A U-Net structure adapted to one-dimensional signals is adopted, and a bidirectional generator network is constructed using three core components: an encoder, a residual, and a decoder.

[0224] The encoder contains a 3-layer downsampling module, with each layer having the structure: Conv1D(k=3,s=2)+InstanceNorm+LeakyReLU(a=0.2). The number of channels can be gradually increased from the 2 input channels to 256 channels, realizing the layer-by-layer abstraction of features.

[0225] Where Conv1D represents a one-dimensional convolutional layer; k is an abbreviation for kernel_size, which is the kernel size and represents the length of the convolutional kernel; s is an abbreviation for stride, which is the stride and represents the distance the convolutional kernel slides each time; InstanceNorm represents instance normalization; LeakyReLU is the LeakyReLU activation function, and a represents the slope of the activation function; the two input channels are the HbO signal channel and the HbR signal channel, respectively.

[0226] The residual unit contains 9 residual blocks, and the mathematical expression for each residual block is as follows:

[0227] ResBlock(f in )=f in +Conv1D(Conv1D(f in ))

[0228] Among them, ResBlock(f in ) represents the output of the residual block, Conv1D(·) is the one-dimensional convolution operation function, and f in For the input features of the residual block, the Conv1D convolution kernel size is 3, the stride is 1, and the number of channels is 256.

[0229] The decoder contains three upsampling modules, each with the structure: TransposeConv1D(k=3,s=2)+InstanceNorm+ReLU. The number of channels can be gradually reduced from 256 to 2, and finally outputs enhanced HbO and HbR signals.

[0230] Where TransposeConv1D represents a one-dimensional deconvolution layer, which is the inverse operation of Conv1D; ReLU is the ReLU activation function.

[0231] Discriminator network construction steps: A discriminator network is constructed using a 1D-PatchGAN structure to achieve multi-scale discrimination;

[0232] The discriminator network consists of four convolutional layers:

[0233] First layer: Conv1D(kernel_size=4, stride=2)→LeakyReLU(a=0.2);

[0234] Second layer: Conv1D(kernel_size=4, stride=2)→InstanceNorm→LeakyReLU(a=0.2);

[0235] Third layer: Conv1D(kernel_size=4, stride=1)→InstanceNorm→LeakyReLU(a=0.2);

[0236] Fourth layer: Conv1D(kernel_size=l, stride=1);

[0237] Three independent discriminator networks were constructed for three different time window lengths of 128, 256, and 512, respectively, to enhance the perception of multi-scale features. The three discriminator networks have the same network architecture. The parameters of the three discriminator networks are independent of each other. The three discriminator networks can process signal features corresponding to their respective time window lengths.

[0238] In the convolutional layers of the discriminator network, spectral normalization is applied to constrain the spectral norm of the weight matrix. The mathematical expression for spectral normalization is:

[0239]

[0240] Among them, W SN σ(W) represents the weight matrix after spectral normalization, and σ(W) represents the maximum singular value of the weight matrix W.

[0241] The steps for constructing a multi-component loss function are as follows: Design a comprehensive loss function that integrates seven key components to comprehensively constrain model learning. The comprehensive loss function consists of seven key components, each collaboratively optimizing different aspects of signal quality. The expression for the comprehensive loss function is:

[0242] L total =L adv +L cycle +λ freq ·L freq +λ physio ·L physio +λ temp ·L temp +λ peak ·L peak +λ denoise ·L denoise

[0243] Among them, L total To account for the overall loss, L adv To combat the losses, L cycle For the cycle consistency loss, λ freqL is the weight for the frequency domain consistency loss. freq For frequency domain consistency loss, λ physio L is the weight of the physiological signal constraint loss. physio For physiological signal-constrained loss, λ temp L is the weight for the temporal continuity loss. temp For temporal continuity loss, λ peak To maintain the weight of the loss at the peak, L peak To preserve peak value, λ denoise L is the weight for the noise perception loss. denoise For noise perception loss;

[0244] Combat loss L adv The least squares adversarial loss is expressed as follows:

[0245]

[0246] In the formula, L adv (G, D) Y (X, Y) is the adversarial loss function, G is the generator network, and D is the generator network. Y For the discriminator network, X represents the low-quality signal domain of the input, Y represents the high-quality signal domain of the target, and y ~ p data (y) represents the true high-quality signal sample variable y from the target domain, which follows the probability distribution p of the target domain data. data (y), D Y (·) represents the discriminator network function, x ~ p data (x) represents a low-quality signal sample variable x from the input domain, which follows the probability distribution p of the input domain data. data (x), where G(·) is the generator network function;

[0247] in, Make the discriminator network output close to 1 for the real signal y. Make the discriminator network's output of the generated signal G(x) close to 0, where E[·] represents the mathematical expectation, p data (·) indicates the data distribution;

[0248] Cyclic consistency loss L cycle The expression is:

[0249]

[0250] Among them, L cycle (G, F) is the cycle consistency loss function, F is the reverse generator network from the Y domain to the X domain, F(·) is the reverse generator network function, and |·|1 represents the L1 norm;

[0251] Frequency domain uniformity loss L freqThe expression is:

[0252]

[0253] Where |·|2 represents the L2 norm, The square of the L2 norm is represented by FFT(·), which is the Fast Fourier Transform function.

[0254] Physiological signal constraint loss L physio The expression is:

[0255] L physio =α corr ·L corr +β smooth ·L smooth

[0256] Among them, L corr and L smooth The expression is:

[0257] L corr =max(0,corr(HbO,HbR)+0.7)

[0258]

[0259] Among them, L corr L represents the correlation loss between HbO and HbR signals. smooth α represents the signal smoothness loss. corr For L corr The weighting coefficient, β smooth For L smooth The weighting coefficients, corr(HbO,HbR), represent the Pearson correlation coefficients of the HbO and HbR signals, where HbO and HbR represent the concentration changes of oxyhemoglobin and deoxyhemoglobin, respectively. Represents the gradient operator;

[0260] Temporal continuity loss L temp The expression is:

[0261]

[0262] Where t is the time index, x t Let x be the signal at time point t. t-1 The signal is from the previous time point;

[0263] Peak hold loss L peak The expression is:

[0264]

[0265] Where P(·) is the peak detection operator;

[0266] Noise perception loss L denoise The expression is:

[0267]

[0268] Where N(·) is the noise extraction operator, N est This represents the estimated noise level;

[0269] Progressive training steps: A multi-stage progressive training strategy is adopted to gradually increase the training difficulty and network complexity, enabling the network model to gradually transition from simple mapping relationship learning to complex signal enhancement tasks. Specifically, this includes the following stages:

[0270] The first stage is the basic mapping learning stage, which is used to establish the basic mapping relationship from low-quality to high-quality signals.

[0271] The second stage involves introducing a multi-scale discriminator architecture to improve the generation quality of different frequency components.

[0272] The third stage involves fine-tuning the signal at full resolution to improve detail and overall consistency.

[0273] Signal processing enhancement steps: Using the fNIRS-CycleGAN network model, and employing a multi-Iteration optimization mechanism and a multi-scale multiple-iteration optimization strategy, different frequency band components of the cerebral blood oxygenation signal are processed in parallel through convolutional kernels of different scales;

[0274] In the signal processing enhancement step, an attention mechanism is used to adaptively fuse multi-scale features to balance the effect and reduce computational cost.

[0275] The quality of cerebral blood oxygenation signal is gradually improved through five rounds of iteration: the first round focuses on basic noise reduction, the second round is used to restore physiological response patterns, the third round is to finely adjust the peak value, the fourth round is to carry out overall optimization, and the fifth round is to enhance optional details.

[0276] The signal processing enhancement steps specifically include the following steps:

[0277] Multi-scale convolutional kernel construction steps: Three convolutional kernels of different scales are used in parallel in the bidirectional generator network. The three scale convolutional kernels are 3-scale convolutional kernel, 5-scale convolutional kernel, and 7-scale convolutional kernel.

[0278] Three-scale convolutional kernels are used to capture high-frequency details, including noise components and rapid physiological changes; five-scale convolutional kernels are used to extract mid-frequency features, corresponding to normal blood oxygen dynamics response patterns; and seven-scale convolutional kernels are used to model low-frequency trends, handling slow baseline drift and long-term physiological changes.

[0279] The multi-scale convolutional kernel parallel processing architecture enables the network model to simultaneously focus on different frequency components of the signal;

[0280] Feature fusion steps: Multi-scale feature fusion is performed using a feature fusion mechanism. This mechanism assigns weights to features at different scales through an adaptive attention mechanism. The feature fusion formula is as follows:

[0281]

[0282] Among them, F fused L represents the fused feature representation; L represents the number of scales, α i For attention weights, This represents the feature map of the i-th scale at the l-th layer;

[0283] Attention weight α i The calculation uses Softmax normalization, and the formula is:

[0284]

[0285] in, This represents the original attention score of the i-th scale at the l-th layer. This represents the original attention score of the j-th scale at the l-th layer;

[0286] The formula for calculating the attention score is:

[0287]

[0288] in, Let W represent the feature map of the j-th scale at the l-th layer, and let GAP(·) represent the global average pooling operation. β and b β These are the learnable weight matrix and the bias term, respectively;

[0289] Iterative optimization process steps: A five-round progressive iterative strategy is adopted, with each round focusing on a different optimization objective. Through multiple rounds of iteration, the signal quality is gradually improved. Specifically, it includes the following five rounds of iteration:

[0290] First iteration: Perform basic noise reduction, remove high-frequency noise components, activate the weights of 3-scale convolutional kernels, reduce the influence of 5-scale and 7-scale convolutional kernels, and make the overall loss function mainly focus on the noise perception loss L. denoise ;

[0291] Second iteration: Enhance signal core features, restore typical physiological response patterns, extract mid-frequency features using 5-scale convolutional kernels, and apply physiological signal constraint loss L... physio Instruct the network model to learn the correct blood oxygen dynamics pattern;

[0292] Third iteration: Fine-tuning peak and phase information to preserve task-related activation features, building upon the first and second iterations, using peak preservation loss L... peak Ensure that important physiological responses are not overly smoothed;

[0293] Fourth iteration: Perform overall optimization to ensure signal integrity and consistency, comprehensively considering features at all scales, and applying the cyclic consistency loss L... cycle and temporal continuity loss L temp Ensure overall signal quality;

[0294] Fifth iteration: Optimize the details of task requirements, adjust the weight coefficients of each loss in the comprehensive loss function according to the requirements of specific application scenarios, and enhance the preset signal features;

[0295] The mathematical expression for each iteration is:

[0296] s (i+1 ) = G (i) (s (i) )

[0297] Among them, (s (i) G represents the input signal for the i-th iteration; (i) Let represent the generator network in the i-th iteration, whose parameters are adjusted according to the optimization objective of the current iteration; s (i+1) This represents the output of the i-th iteration and serves as the input for the next iteration.

[0298] Signal enhancement assessment steps: Use quantitative indicators to evaluate the enhancement effect of cerebral blood oxygenation signal processed by the fNIRS-CycleGAN network model;

[0299] The signal enhancement evaluation step includes technical indicator evaluation and physiological significance evaluation;

[0300] The technical indicators are evaluated using signal quantization evaluation indicators, physiological fidelity evaluation indicators, and time-domain and frequency-domain characteristic evaluation indicators.

[0301] The signal quantification evaluation indicators include: signal-to-noise ratio improvement, peak signal-to-noise ratio, and structural similarity index;

[0302] The signal-to-noise ratio improvement is defined as:

[0303]

[0304] Among them, SNR enhanced Represents the signal-to-noise ratio (SNR) of the enhanced signal. original The signal-to-noise ratio represents the original signal.

[0305] Wherein, SIR stands for Signal-to-Noise Ratio Improvement. SIR measures the strength of the useful signal relative to the noise, and its calculation formula is:

[0306]

[0307] Where, σ signal σ represents the standard deviation of the useful signal, signifying the change in signal strength or amplitude; noise The standard deviation of the noise component represents the unwanted random variation in the system;

[0308] The peak signal-to-noise ratio (PSNR) is defined as the ratio of the maximum possible power of the signal to the noise power, and is used to evaluate the signal reconstruction quality. The calculation formula is as follows:

[0309]

[0310] Where PSNR is the peak signal-to-noise ratio, and MAX is the maximum possible amplitude of the signal. 2 The maximum signal power is given by MSE, which is the mean square error. The formula for MSE is:

[0311]

[0312] Where N is the total number of signal samples, and x represents the length of the time series; enhanced [i] is the enhanced signal value at the i-th time point; x target [i] is the target signal value at the i-th time point;

[0313] The structural similarity index, used to evaluate the degree of structural similarity between two signals, is defined as follows:

[0314]

[0315] Where SSIM(x,y) is the structural similarity index; x is the enhanced signal, which is the enhanced brain oxygenation signal collected by the wearable fNIRS device; y is the target signal, which is the brain oxygenation signal collected by the clinical-grade fNIRS device; μ x denoted by μ, represents the mean of signal x, reflecting the average level of the enhanced signal; y Reflects the average level of the target signal; The variance represents the enhanced signal, reflecting the degree of signal change; σ represents the variance of the enhanced signal, reflecting the degree of change in the target signal; xy c1 is the covariance; c2 is the first stability constant; c3 is the second stability constant.

[0316] The physiological fidelity assessment indicators include: HbO-HbR correlation retention and blood oxygen dynamics response fidelity;

[0317] The HbO-HbR correlation retention degree is used to assess the degree to which the relationship between HbO and HbR is maintained after enhancement, and to verify whether the enhancement process maintains the correct physiological relationship. It is defined as follows:

[0318]

[0319] Where CPR represents the HbO-HbR correlation preservation; corr(·) is the Pearson correlation coefficient function, which calculates the degree of linear correlation between the two variables; HbO enhanced HbR enhanced These are the changes in oxyhemoglobin concentration and deoxyhemoglobin concentration in the enhanced signal, respectively; HbO target HbR target These are the oxyhemoglobin concentration change signal and the deoxyhemoglobin concentration change signal in the target signal, respectively.

[0320] The blood oxygen dynamics response fidelity, used to assess the degree of HRF shape preservation, is defined as:

[0321]

[0322] Where HRF(·) is the blood oxygen dynamics response function, HRF fidelity For blood oxygen kinetic response fidelity, used to assess the degree of HRF shape retention; HRF enhanced To enhance the blood oxygen dynamic response of the signal; HRF target (t) represents the hemodynamic response to the target signal;

[0323] The time-domain and frequency-domain performance evaluation indicators include: power spectral density retention, frequency domain consistency coefficient, timing smoothness index, and peak protection rate.

[0324] The power spectral density retention, used to evaluate the power retention of the signal before and after enhancement at a preset frequency, is defined as:

[0325]

[0326] Among them, PSDP freq PSD is the power spectral density retention at a preset frequency. enhanced (f) PSD target (f) represents the power spectral density values ​​of the enhanced signal and the target signal at frequency f, respectively;

[0327] The frequency domain consistency coefficient, used to quantify the preservation of frequency domain characteristics, is defined as follows:

[0328]

[0329] Among them, FFTenhanced (f) represents the Fourier transform of the enhanced signal at frequency f, FFT. target (f) represents the Fourier transform of the target signal at frequency f, and FDCC is the frequency domain consistency coefficient;

[0330] The temporal smoothness index, used to evaluate the temporal continuity of a signal, is defined as follows:

[0331]

[0332] Where TSI is the time series smoothness index, T is the total number of time points, and x enhanced [t+1]-x enhanced [t] and x target [t+1]-x target [t] represents the difference between the enhanced signal and the target signal at adjacent time points, x[·] represents the discrete-time signal, t represents the index of the current time point, and t+1 represents the index of the next time point;

[0333] The peak protection rate, used to evaluate the degree to which important activation responses are preserved, is defined as:

[0334]

[0335] Where PPR is the peak protection rate, and N peaks,preserved To enhance the number of peak values ​​held by the signal; N peaks,total The total number of peak values ​​in the target signal;

[0336] Based on the results of signal quantification evaluation indicators, a comprehensive evaluation model is established, and various indicators are weighted and scored. The comprehensive quality score is defined as follows:

[0337] Quality Score

[0338] =α signal Score signal +β physio Score phhysio +γ frequency Score frequency +δ temporal Score temporal

[0339] Among them, Quality Score For overall quality scoring;

[0340] α signal Weighting coefficients for the signal quality dimension score; Score signal The signal quality dimension is scored based on SNR, PSNR, and SSIM(x,y);

[0341] β physio The weighting coefficients for the physiological fidelity dimension score; Score physio Scoring for physiological fidelity dimension based on CPR and HRF fidelity To score;

[0342] γ frequency Weighting coefficients for the frequency domain characteristic dimension score; Score frequency Scoring is performed based on the frequency domain characteristics dimension, using PSDP. freq FDCC will score the scores.

[0343] δ temporal The weighting coefficients for the score in the temporal continuity dimension; Score temporal The score is based on the temporal continuity dimension, using TSI and PPR.

[0344] The physiological significance was assessed using the Bland-Altman test and clinical equivalence assessment.

[0345] For clinical equivalence assessment, the enhancement effect is verified by comparison with a clinical-grade fNIRS device, defined as:

[0346]

[0347] Clinical Equivalence S is the clinical equivalence assessment value; M is the total number of test samples; SSIM(·) is the structural similarity index function; S enhanced,m S clinical,m The images show the enhanced cerebral oxygenation signal of the m-th sample and the cerebral oxygenation signal acquired by a clinical-grade fNIRS device, respectively.

[0348] The present invention also provides a cerebral oxygenation signal enhancement system based on CycleGAN. The cerebral oxygenation signal enhancement system based on CycleGAN can be implemented by executing the process steps of the cerebral oxygenation signal enhancement method based on CycleGAN. That is, those skilled in the art can understand the cerebral oxygenation signal enhancement method based on CycleGAN as a preferred embodiment of the cerebral oxygenation signal enhancement system based on CycleGAN.

[0349] Example 2

[0350] This embodiment provides a cerebral oxygenation signal enhancement system based on CycleGAN, including the following modules:

[0351] Data acquisition and preprocessing module: Perform device calibration, establish the mapping relationship between wearable fNIRS devices and clinical-grade fNIRS devices, synchronously acquire cerebral blood oxygenation signals using wearable fNIRS devices and clinical-grade fNIRS devices, perform initial preprocessing on the acquired cerebral blood oxygenation signals, and construct a training dataset;

[0352] Signal preprocessing module: Before the brain blood oxygenation signal in the training dataset is input into the fNIRS-CycleGAN network model, a cascaded noise reduction module is used to perform secondary preprocessing on the brain blood oxygenation signal. The cascaded noise reduction module includes hysteresis cancellation filtering and adaptive wavelet threshold denoising.

[0353] Network model construction module: A CycleGAN network architecture is constructed using a bidirectional generator network and a discriminator network. The network parameters of the CycleGAN network architecture are optimized in stages using a progressive training strategy to obtain the CycleGAN network model. The CycleGAN network model is trained using brain blood oxygenation signals after secondary preprocessing to obtain the fNIRS-CycleGAN network model.

[0354] Signal processing enhancement module: Using the fNIRS-CycleGAN network model and employing a multi-Iteration optimization mechanism and a multi-scale multiple-iteration optimization strategy, different frequency band components of cerebral blood oxygenation signals are processed in parallel through convolutional kernels of different scales;

[0355] Signal enhancement assessment module: Uses quantitative indicators to evaluate the enhancement effect of cerebral blood oxygenation signal processed by the fNIRS-CycleGAN network model.

[0356] In the signal preprocessing module, the signal-to-noise ratio of the cerebral blood oxygenation signal input to the fNIRS-CycleGAN network model is improved through a five-step cascaded processing flow.

[0357] In the network model construction module, the bidirectional generator network adopts a U-Net architecture adapted to one-dimensional time-series signals, including an encoder, a residual, and a decoder, to achieve end-to-end signal quality mapping.

[0358] The discriminator network adopts a multi-scale 1D-PatchGAN structure, performs discrimination at multiple time windows of different lengths, and introduces spectral normalization technology to improve training stability.

[0359] In the network model construction module, a comprehensive loss function is used to fully constrain the training and learning of the network model; the comprehensive loss function includes adversarial loss, cycle consistency loss, frequency domain consistency loss, physiological signal constraint loss, temporal continuity loss, peak preservation loss, and noise perception loss.

[0360] The adversarial loss employs least squares loss to improve the realism of the generated signal; the cyclic consistency loss ensures the reversibility of the bidirectional mapping; and the frequency domain consistency loss maintains the spectral characteristics of the blood oxygen dynamics response.

[0361] The physiological signal constraint loss is used to force a negative correlation between HbO and HbR signals; HbO is oxyhemoglobin, which refers to hemoglobin that is bound to oxygen; HbR is deoxyhemoglobin, which refers to hemoglobin that is not bound to oxygen.

[0362] The temporal continuity loss is used to maintain the temporal smoothness of the signal; the peak hold loss is used to protect task-related activation responses; and the noise perception loss is used to constrain noise priors based on the preprocessing stage.

[0363] In the signal processing enhancement module, an attention mechanism is used to adaptively fuse multi-scale features to balance the effect and reduce computational cost.

[0364] The quality of cerebral blood oxygenation signal is gradually improved through five rounds of iteration: the first round focuses on basic noise reduction, the second round is used to restore physiological response patterns, the third round is used to finely adjust the peak value, the fourth round is used for overall optimization, and the fifth round is for optional detail enhancement.

[0365] The data acquisition and preprocessing module specifically includes the following modules:

[0366] Device calibration module: Establishes a mapping relationship between wearable fNIRS devices and clinical-grade fNIRS devices. Based on the modified Beer-Lambert law, the relationship between oxygen saturation (SO2) and optical density ratio (ODR) is as follows:

[0367] SO2=k0×ODR+b

[0368] Where k0 and b are calibration parameters obtained by fitting through hierarchical linear regression;

[0369] Synchronous acquisition module: The time stamp synchronization mechanism is used to align the data acquisition time of the wearable fNIRS device and the clinical fNIRS device that have established a mapping relationship, and to make the sampling frequency, acquisition duration and sampling method of the two devices the same, so as to synchronously acquire cerebral blood oxygenation signals through the two devices.

[0370] Data preprocessing module: Performs signal standardization, artifact detection, and quality grading on brain blood oxygenation signals collected by wearable fNIRS devices and clinical-grade fNIRS devices;

[0371] In the signal standardization process, the cerebral blood oxygenation signal is standardized using z-score. The z-score standardization formula is as follows:

[0372] x norm =(x-μ) / σ

[0373] Where, x norm The denoted ...

[0374] In the artifact detection process, motion artifacts of cerebral blood oxygenation signals are detected based on amplitude thresholds and rate of change.

[0375] In the quality grading process, the dataset of cerebral blood oxygenation signals is divided into multiple levels according to the signal-to-noise ratio;

[0376] Dataset construction module: Uses preprocessed brain blood oxygenation signal data from a pre-processed brain blood oxygenation signal dataset to construct a training dataset.

[0377] The signal preprocessing module specifically includes the following modules:

[0378] Hysteresis cancellation filter module: A hysteresis cancellation filter is used to process the time delay distortion in the transmission of cerebral blood oxygenation signals. The transfer function of the hysteresis cancellation filter is defined as:

[0379]

[0380] Where H(z) represents the system transfer function of the hysteresis cancellation filter, z represents the complex frequency domain variable, the complex frequency domain refers to the z-transform domain, α and β are the parameters of the hysteresis cancellation filter. The parameter α controls the zero position and affects the high-frequency response characteristics of the cancellation filter, while the parameter β controls the pole position and determines the stability and low-frequency characteristics of the cancellation filter.

[0381] Adaptive wavelet filtering module: Constructs a soft thresholding function based on the statistical characteristics of cerebral blood oxygenation signals. This function removes noise from the cerebral blood oxygenation signals. The soft thresholding function is defined as follows:

[0382] T soft (x) = sign(ω)·max(|x|-λ,0)

[0383] Among them, T soft (ω) represents the output value of the soft thresholding function, and in this formula, it represents the denoised wavelet coefficients. ω is the wavelet coefficient, and λ is the adaptive threshold. The formula for calculating the adaptive threshold λ is:

[0384]

[0385] Where, σ noise-std The value is an estimate of the noise standard deviation, log(L) signal L is the natural logarithm with base e. signalThe signal length and noise standard deviation are estimated using the robust median absolute deviation method.

[0386] The five-step cascaded noise reduction module adopts a progressive noise reduction strategy, sequentially executing five modules: original signal input of cerebral blood oxygenation signal, preliminary filtering processing, signal reversal processing, reversal and recovery processing, and secondary fine filtering processing. Through multiple iterations, it gradually suppresses noise in cerebral blood oxygenation signal.

[0387] The network model construction module specifically includes the following modules:

[0388] Bidirectional generator network construction module: It adopts a U-Net structure adapted to one-dimensional signals and uses three core parts, namely encoder, residual and decoder, to construct a bidirectional generator network;

[0389] The encoder contains a 3-layer downsampling module, with each layer having the structure: Conv1D(k=3,s=2)+InstanceNorm+LeakyReLU(a=0.2). The number of channels can be gradually increased from the 2 input channels to 256 channels, realizing the layer-by-layer abstraction of features.

[0390] Where Conv1D represents a one-dimensional convolutional layer; k is an abbreviation for kernel_size, which is the kernel size and represents the length of the convolutional kernel; s is an abbreviation for stride, which is the stride and represents the distance the convolutional kernel slides each time; InstanceNorm represents instance normalization; LeakyReLU is the LeakyReLU activation function, and a represents the slope of the activation function; the two input channels are the HbO signal channel and the HbR signal channel, respectively.

[0391] The residual unit contains 9 residual blocks, and the mathematical expression for each residual block is as follows:

[0392] ResBlock(f in )=f in +Conv1D(Conv1D(f in ))

[0393] Among them, ResBlock(f in ) represents the output of the residual block, Conv1D(·) is the one-dimensional convolution operation function, and f in For the input features of the residual block, the Conv1D convolution kernel size is 3, the stride is 1, and the number of channels is 256.

[0394] The decoder contains three upsampling modules, each with the structure: TransposeConv1D(k=3,s=2)+InstanceNorm+ReLU. The number of channels can be gradually reduced from 256 to 2, and finally outputs enhanced HbO and HbR signals.

[0395] Where TransposeConv1D represents a one-dimensional deconvolution layer, which is the inverse operation of Conv1D; ReLU is the ReLU activation function.

[0396] Discriminator network construction module: A discriminator network is constructed using a 1D-PatchGAN structure to achieve multi-scale discrimination;

[0397] The discriminator network consists of four convolutional layers:

[0398] First layer: Conv1D(kernel_size=4, stride=2)→LeakyReLU(a=0.2);

[0399] Second layer: Conv1D(kernel_size=4, stride=2)→InstanceNorm→LeakyReLU(a=0.2);

[0400] Third layer: Conv1D(kernel_size=4, stride=1)→InstanceNorm→LeakyReLU(a=0.2);

[0401] Fourth layer: Conv1D(kernel_size=1, stride=1);

[0402] Three independent discriminator networks were constructed for three different time window lengths of 128, 256, and 512, respectively, to enhance the perception of multi-scale features. The three discriminator networks have the same network architecture. The parameters of the three discriminator networks are independent of each other. The three discriminator networks can process signal features corresponding to their respective time window lengths.

[0403] In the convolutional layers of the discriminator network, spectral normalization is applied to constrain the spectral norm of the weight matrix. The mathematical expression for spectral normalization is:

[0404]

[0405] Among them, W SN σ(W) represents the weight matrix after spectral normalization, and σ(W) represents the maximum singular value of the weight matrix W.

[0406] Multi-component loss function construction module: Designs a comprehensive loss function that integrates seven key components for comprehensively constraining model learning; the comprehensive loss function consists of seven key components, each collaboratively optimizing different aspects of signal quality. The expression for the comprehensive loss function is:

[0407] L total =L adv +L cycle +λ freq ·L freq +λ physio ·L physio +λ temp ·L temp +λ peak ·L peak +λ denoise ·L denoise

[0408] Among them, L total To account for the overall loss, L adv To combat the losses, L cycle For the cycle consistency loss, λ freq L is the weight for the frequency domain consistency loss. freq For frequency domain consistency loss, λ physio L is the weight of the physiological signal constraint loss. physio For physiological signal-constrained loss, λ temp L is the weight for the temporal continuity loss. temp For temporal continuity loss, λ peak To maintain the weight of the loss at the peak, L peak To preserve peak value, λ denoise L is the weight for the noise perception loss. denoise For noise perception loss;

[0409] Combat loss L adv The least squares adversarial loss is expressed as follows:

[0410]

[0411] In the formula, L adv (G, D) Y (X, Y) is the adversarial loss function, G is the generator network, and D is the generator network. Y For the discriminator network, X represents the low-quality signal domain of the input, Y represents the high-quality signal domain of the target, and y ~ p data (y) represents the true high-quality signal sample variable y from the target domain, which follows the probability distribution p of the target domain data. data (y), D Y (·) represents the discriminator network function, x ~ p data(x) represents a low-quality signal sample variable x from the input domain, which follows the probability distribution p of the input domain data. data (x), where G(·) is the generator network function;

[0412] in, Make the discriminator network output close to 1 for the real signal y. Make the discriminator network's output of the generated signal G(x) close to 0, where E[·] represents the mathematical expectation, p data (·) indicates the data distribution;

[0413] Cyclic consistency loss L cycle The expression is:

[0414]

[0415] Among them, L cycle (G, F) is the cycle consistency loss function, F is the reverse generator network from the Y domain to the X domain, F(·) is the reverse generator network function, and |·|1 represents the L1 norm;

[0416] Frequency domain uniformity loss L freq The expression is:

[0417]

[0418] Where |·|2 represents the L2 norm, The square of the L2 norm is represented by FFT(·), which is the Fast Fourier Transform function.

[0419] Physiological signal constraint loss L physio The expression is:

[0420] L physio =α corr ·L corr +β smooth ·L smooth

[0421] Among them, L corr and L smooth The expression is:

[0422] L corr =max(0,corr(HbO,HbR)+0.7)

[0423]

[0424] Among them, L corr L represents the correlation loss between HbO and HbR signals. smooth α represents the signal smoothness loss. corr For L corrThe weighting coefficient, β smooth For L smooth The weighting coefficients, corr(HbO,HbR), represent the Pearson correlation coefficients of the HbO and HbR signals, where HbO and HbR represent the concentration changes of oxyhemoglobin and deoxyhemoglobin, respectively. Represents the gradient operator;

[0425] Temporal continuity loss L temp The expression is:

[0426]

[0427] Where t is the time index, x t Let x be the signal at time point t. t-1 The signal is from the previous time point;

[0428] Peak hold loss L peak The expression is:

[0429]

[0430] Where P(·) is the peak detection operator;

[0431] Noise perception loss L denoise The expression is:

[0432]

[0433] Where N(·) is the noise extraction operator, N est This represents the estimated noise level;

[0434] Progressive Training Module: Employing a multi-stage progressive training strategy, this module gradually increases training difficulty and network complexity, enabling the network model to transition from simple mapping relationship learning to complex signal enhancement tasks. Specifically, it includes the following stages:

[0435] The first stage is the basic mapping learning stage, which is used to establish the basic mapping relationship from low-quality to high-quality signals.

[0436] The second stage involves introducing a multi-scale discriminator architecture to improve the generation quality of different frequency components.

[0437] The third stage involves fine-tuning the signal at full resolution to improve detail and overall consistency.

[0438] The signal processing enhancement module specifically includes the following modules:

[0439] Multi-scale convolutional kernel building module: Three convolutional kernels of three scales are used in parallel in the bidirectional generator network. The three scale convolutional kernels are 3-scale convolutional kernel, 5-scale convolutional kernel, and 7-scale convolutional kernel.

[0440] Three-scale convolutional kernels are used to capture high-frequency details, including noise components and rapid physiological changes; five-scale convolutional kernels are used to extract mid-frequency features, corresponding to normal blood oxygen dynamics response patterns; and seven-scale convolutional kernels are used to model low-frequency trends, handling slow baseline drift and long-term physiological changes.

[0441] The multi-scale convolutional kernel parallel processing architecture enables the network model to simultaneously focus on different frequency components of the signal;

[0442] Feature fusion module: Employs a feature fusion mechanism for multi-scale feature fusion. This mechanism assigns weights to features at different scales through an adaptive attention mechanism. The feature fusion formula is as follows:

[0443]

[0444] Among them, F fused L represents the fused feature representation; L represents the number of scales, α i For attention weights, This represents the feature map of the i-th scale at the l-th layer;

[0445] Attention weight α i The calculation uses Softmax normalization, and the formula is:

[0446]

[0447] in, This represents the original attention score of the i-th scale at the l-th layer. This represents the raw attention score of the j-th scale at layer 1;

[0448] The formula for calculating the attention score is:

[0449]

[0450] in, Let W represent the feature map of the j-th scale in layer 1, and let GAP(·) represent the global average pooling operation. β and b β These are the learnable weight matrix and the bias term, respectively;

[0451] Iterative optimization process module: Employing a five-round progressive iterative strategy, each round focuses on a different optimization objective, achieving gradual improvement in signal quality through multiple rounds of iteration. Specifically, it includes the following five rounds of iteration:

[0452] First iteration: Perform basic noise reduction, remove high-frequency noise components, activate the weights of 3-scale convolutional kernels, reduce the influence of 5-scale and 7-scale convolutional kernels, and make the overall loss function mainly focus on the noise perception loss L. denoise ;

[0453] Second iteration: Enhance signal core features, restore typical physiological response patterns, extract mid-frequency features using 5-scale convolutional kernels, and apply physiological signal constraint loss L... physio Instruct the network model to learn the correct blood oxygen dynamics pattern;

[0454] Third iteration: Fine-tuning peak and phase information to preserve task-related activation features, building upon the first and second iterations, using peak preservation loss L... peak Ensure that important physiological responses are not overly smoothed;

[0455] Fourth iteration: Perform overall optimization to ensure signal integrity and consistency, comprehensively considering features at all scales, and applying the cyclic consistency loss L... cycle and temporal continuity loss L temp Ensure overall signal quality;

[0456] Fifth iteration: Optimize the details of task requirements, adjust the weight coefficients of each loss in the comprehensive loss function according to the requirements of specific application scenarios, and enhance the preset signal features;

[0457] The mathematical expression for each iteration is:

[0458] s (i+1) =G (i) (s (i) )

[0459] Among them, (s (i) G represents the input signal for the i-th iteration; (i) Let represent the generator network in the i-th iteration, whose parameters are adjusted according to the optimization objective of the current iteration; s (i+1) This represents the output of the i-th iteration and serves as the input for the next iteration.

[0460] The signal enhancement evaluation module includes technical indicator evaluation and physiological significance evaluation;

[0461] The technical indicators are evaluated using signal quantization evaluation indicators, physiological fidelity evaluation indicators, and time-domain and frequency-domain characteristic evaluation indicators.

[0462] The signal quantification evaluation indicators include: signal-to-noise ratio improvement, peak signal-to-noise ratio, and structural similarity index;

[0463] The signal-to-noise ratio improvement is defined as:

[0464]

[0465] Among them, SNR enhanced Represents the signal-to-noise ratio (SNR) of the enhanced signal. original The signal-to-noise ratio represents the original signal.

[0466] Wherein, SIR stands for Signal-to-Noise Ratio Improvement. SIR measures the strength of the useful signal relative to the noise, and its calculation formula is:

[0467]

[0468] Where, σ signal σ represents the standard deviation of the useful signal, signifying the change in signal strength or amplitude; noise The standard deviation of the noise component represents the unwanted random variation in the system;

[0469] The peak signal-to-noise ratio (PSNR) is defined as the ratio of the maximum possible power of the signal to the noise power, and is used to evaluate the signal reconstruction quality. The calculation formula is as follows:

[0470]

[0471] Where PSNR is the peak signal-to-noise ratio, and MAX is the maximum possible amplitude of the signal. 2 The maximum signal power is given by MSE, which is the mean square error. The formula for MSE is:

[0472]

[0473] Where N is the total number of signal samples, and x represents the length of the time series; enhanced [i] is the enhanced signal value at the i-th time point; x target [i] is the target signal value at the i-th time point;

[0474] The structural similarity index, used to evaluate the degree of structural similarity between two signals, is defined as follows:

[0475]

[0476] Where SSIM(x,y) is the structural similarity index; x is the enhanced signal, which is the enhanced brain oxygenation signal collected by the wearable fNIRS device; y is the target signal, which is the brain oxygenation signal collected by the clinical-grade fNIRS device; μ x denoted by μ, represents the mean of signal x, reflecting the average level of the enhanced signal; y Reflects the average level of the target signal; The variance represents the enhanced signal, reflecting the degree of signal change; σ represents the variance of the enhanced signal, reflecting the degree of change in the target signal; xy c1 is the covariance; c2 is the first stability constant; c3 is the second stability constant.

[0477] The physiological fidelity assessment indicators include: HbO-HbR correlation retention and blood oxygen dynamics response fidelity;

[0478] The HbO-HbR correlation retention degree is used to assess the degree to which the relationship between HbO and HbR is maintained after enhancement, and to verify whether the enhancement process maintains the correct physiological relationship. It is defined as follows:

[0479]

[0480] Where CPR represents the HbO-HbR correlation preservation; corr(·) is the Pearson correlation coefficient function, which calculates the degree of linear correlation between the two variables; HbO enhanced HbR enhanced These are the changes in oxyhemoglobin concentration and deoxyhemoglobin concentration in the enhanced signal, respectively; HbO target HbR target These are the oxyhemoglobin concentration change signal and the deoxyhemoglobin concentration change signal in the target signal, respectively.

[0481] The blood oxygen dynamics response fidelity, used to assess the degree of HRF shape preservation, is defined as:

[0482]

[0483] Where HRF(·) is the blood oxygen dynamics response function, HRF fidelity For blood oxygen kinetic response fidelity, used to assess the degree of HRF shape retention; HRF enhanced To enhance the blood oxygen dynamic response of the signal; HRF target (t) represents the hemodynamic response to the target signal;

[0484] The time-domain and frequency-domain performance evaluation indicators include: power spectral density retention, frequency domain consistency coefficient, timing smoothness index, and peak protection rate.

[0485] The power spectral density retention, used to evaluate the power retention of the signal before and after enhancement at a preset frequency, is defined as:

[0486]

[0487] Among them, PSDP freq PSD is the power spectral density retention at a preset frequency. enhanced (f) PSD target(f) represents the power spectral density values ​​of the enhanced signal and the target signal at frequency f, respectively;

[0488] The frequency domain consistency coefficient, used to quantify the preservation of frequency domain characteristics, is defined as follows:

[0489]

[0490] Among them, FFT enhanced (f) represents the Fourier transform of the enhanced signal at frequency f, FFT. target (f) represents the Fourier transform of the target signal at frequency f, and FDCC is the frequency domain consistency coefficient;

[0491] The temporal smoothness index, used to evaluate the temporal continuity of a signal, is defined as follows:

[0492]

[0493] Where TSI is the time series smoothness index, T is the total number of time points, and x enhanced [t+1]-x enhanced [t] and x target [t+1]-x target [t] represents the difference between the enhanced signal and the target signal at adjacent time points, x[·] represents the discrete-time signal, t represents the index of the current time point, and t+1 represents the index of the next time point;

[0494] The peak protection rate, used to evaluate the degree to which important activation responses are preserved, is defined as:

[0495]

[0496] Where PPR is the peak protection rate, and N peaks,preserved To enhance the number of peak values ​​held by the signal; N peaks,lotal The total number of peak values ​​in the target signal;

[0497] Based on the results of signal quantification evaluation indicators, a comprehensive evaluation model is established, and various indicators are weighted and scored. The comprehensive quality score is defined as follows:

[0498] Quality Score

[0499] =α signal Score signal +β physio Score physio +γ frequency Score frequency +δ temporal Score temporal

[0500] Among them, Quality Score For overall quality scoring;

[0501] α signal Weighting coefficients for the signal quality dimension score; Score signal The signal quality dimension is scored based on SNR, PSNR, and SSIM(x,y);

[0502] β physio The weighting coefficients for the physiological fidelity dimension score; Score physio Scoring for physiological fidelity dimension based on CPR and HRF fidelity To score;

[0503] γ frequency Weighting coefficients for the frequency domain characteristic dimension score; Score frequency Scoring is performed based on the frequency domain characteristics dimension, using PSDP. freq FDCC will score the scores.

[0504] δ temporal The weighting coefficients for the score in the temporal continuity dimension; Score temporal The score is based on the temporal continuity dimension, using TSI and PPR.

[0505] The physiological significance was assessed using the Bland-Altman test and clinical equivalence assessment.

[0506] For clinical equivalence assessment, the enhancement effect is verified by comparison with a clinical-grade fNIRS device, defined as:

[0507]

[0508] Clinical Equivalence S is the clinical equivalence assessment value; M is the total number of test samples; SSIM(·) is the structural similarity index function; S enhanced,m S clinical,m The images show the enhanced cerebral oxygenation signal of the m-th sample and the cerebral oxygenation signal acquired by a clinical-grade fNIRS device, respectively.

[0509] Example 3

[0510] Those skilled in the art can understand this embodiment as a more specific description of Embodiment 1 and Embodiment 2.

[0511] To address the aforementioned deficiencies in the existing technology, the purpose of this embodiment is to provide a wearable fNIRS brain oxygenation signal quality enhancement method based on an improved CycleGAN, so as to achieve intelligent conversion from low-quality wearable device signals to clinical-grade high-quality signals.

[0512] This embodiment provides a method for enhancing cerebral oxygenation signals based on CycleGAN, including the following steps:

[0513] S1. Data Acquisition and Preprocessing: Brain blood oxygenation signals are simultaneously acquired using wearable fNIRS devices and clinical-grade fNIRS devices to construct a training dataset; device calibration is performed to establish a mapping relationship between wearable devices and clinical-grade devices; and the acquired signals are preprocessed by time synchronization, standardization, and quality grading.

[0514] S2. Signal Preprocessing and Noise Reduction: A cascaded noise reduction module is designed to preprocess the input signal. This module includes hysteresis cancellation filtering and adaptive wavelet threshold denoising. The signal-to-noise ratio of the input signal is improved through a five-step cascaded processing flow, thereby providing high-quality input data for subsequent deep learning models.

[0515] S3. Constructing an improved network model fNIRS-CycleGAN: This model includes a bidirectional generator and discriminator network. The network architecture is optimized using a progressive training strategy, with network parameters optimized in stages. The generator network employs an improved U-Net architecture adapted to one-dimensional temporal signals, including an encoder, residual blocks, and a decoder, achieving end-to-end signal quality mapping. The discriminator network uses a multi-scale 1D-PatchGAN structure, performing discrimination at three scales: 128, 256, and 512, and introduces spectral normalization to improve training stability. To comprehensively constrain model learning, a comprehensive loss function is designed: adversarial loss uses least squares loss to improve the realism of the generated signal; cycle consistency loss ensures the reversibility of the bidirectional mapping; frequency domain consistency loss maintains the spectral characteristics of the blood oxygen dynamics response; physiological signal constraint loss forces a negative correlation between HbO and HbR; temporal continuity loss maintains the temporal smoothness of the signal; peak hold loss protects the task-related activation response; and noise perception loss is constrained based on noise priors from the preprocessing stage.

[0516] S4. Construct the trained fNIRS-CycleGAN network and design a multi-iteration optimization mechanism (Multi-Iteration). Employ a multi-scale, multi-iteration optimization strategy, using convolutional kernels of different scales (3 / 5 / 7) to process different frequency band components of the signal in parallel. An attention mechanism is used to adaptively fuse multi-scale features. To achieve the best balance between performance improvement and computational cost, signal quality is gradually improved through five iterations: the first round focuses on basic noise reduction, the second round restores physiological response patterns, the third round fine-tunes peak values, the fourth round performs overall optimization, and the fifth round provides optional detail enhancement.

[0517] S5. Model evaluation and application: Use multiple quantitative indicators to evaluate and enhance the effect.

[0518] Furthermore, in step S1, data acquisition specifically includes:

[0519] S11. Device Calibration: Establish the mapping relationship between wearable devices and clinical-grade devices. Based on the modified Beer-Lambert law, the relationship between oxygen saturation (SO2) and optical density ratio (ODR) is as follows:

[0520] SO2=k0×ODR+b

[0521] Where k0 and b are calibration parameters obtained by fitting through hierarchical linear regression.

[0522] S12. Synchronous Acquisition: A timestamp synchronization mechanism is adopted to ensure that the time of data acquisition by the two devices is aligned. Both devices are set to a sampling rate of 0.5Hz, and each acquisition lasts for 5 to 10 minutes. The acquisition paradigm includes various cognitive states such as resting state and task state (such as working memory and mental arithmetic tasks).

[0523] S13. Data Preprocessing: This includes signal normalization, artifact detection, and quality grading. The z-score normalization formula is:

[0524] x norm =(x-μ) / σ

[0525] Where, x norm σ represents the standardized brain oxygenation signal value, x represents the original brain oxygenation signal value, μ represents the mean of the brain oxygenation signal data, and σ represents the standard deviation of the brain oxygenation signal data.

[0526] Motion artifacts are detected based on amplitude thresholds and rate of change. Data is categorized into three levels—high (SNR>25dB), medium (15-25dB), and low (<15dB)—based on signal-to-noise ratio (SNR). The dataset is then further divided into three parts: training set (60%), validation set (20%), and test set (20%).

[0527] Furthermore, step S2 preprocessing is a crucial pre-processing step for signal enhancement, comprising three sub-steps:

[0528] S21. Hysteresis Cancellation Filter: A dedicated hysteresis cancellation filter is designed to address the time delay distortion problem in signal transmission. The filter's transfer function is defined as:

[0529]

[0530] Here, α and β are filter parameters that need to be adaptively adjusted based on the statistical characteristics of the input signal. Parameter α controls the zero position and affects the high-frequency response characteristics; parameter β controls the pole position and determines the stability and low-frequency characteristics of the filter.

[0531] S22. Adaptive Wavelet Filtering: Constructing a time-varying threshold function based on signal statistical characteristics to achieve accurate noise removal. The soft threshold function is defined as:

[0532] T soft (x) = sign(ω)·max(|x|-λ,0)

[0533] Where ω represents the wavelet coefficients, and λ is the adaptive threshold. The threshold calculation formula is:

[0534]

[0535] Here σ noise-std L is an estimate of the noise standard deviation. signal Let be the signal length. The noise standard deviation is estimated using the robust median absolute deviation method.

[0536] S23, Five-step cascaded noise reduction: Adopting a progressive noise reduction strategy, it sequentially performs five steps: original signal input, preliminary filtering, signal flipping, re-flipping and recovery, and secondary fine filtering, achieving gradual suppression of noise through multiple iterations.

[0537] Furthermore, the improved CycleGAN network model in step S3 includes:

[0538] S31. Generator Network Architecture: It adopts a U-Net structure specifically designed for one-dimensional signals, which includes three core parts: encoder, residual block and decoder.

[0539] The encoder contains three downsampling modules, each with the structure: Conv1D (k=3, s=2) + InstanceNorm + LeakyReLU (α=0.2). The number of channels gradually increases from the two input channels (HbO and HbR) to 256 channels, achieving layer-by-layer abstraction of features.

[0540] The residual block contains 9 ResBlocks, and the mathematical expression for each residual block is:

[0541] ResBlock(f in )=f in +Conv1D(Conv1D(f in ))

[0542] Both Conv1D layers have a kernel size of 3, a stride of 1, and maintain a constant number of channels (256). Residual connections ensure effective gradient propagation, preventing network degradation.

[0543] The decoder contains three upsampling modules, each with the structure: TransposeConv1D (k=3, s=2) + InstanceNorm + ReLU. The number of channels gradually decreases from 256 to 2, ultimately outputting enhanced HbO and HbR signals.

[0544] S32. The discriminator network architecture adopts a 1D-PatchGAN structure to achieve multi-scale discrimination:

[0545] The basic network structure of the discriminator consists of four convolutional layers:

[0546] First layer: Conv1D(kernel_size=4, stride=2)→LeakyReLU(α=0.2)

[0547] Second layer: Conv1D(kernel_size=4, stride=2)→InstanceNorm→LeakyReLU(α=0.2)

[0548] Third layer: Conv1D(kernel_size=4, stride=1)→InstanceNorm→LeakyReLU(α=0.2)

[0549] Fourth layer: Conv1D(kernel_size=1, stride=1)

[0550] To enhance the ability to perceive multi-scale features, independent discriminator networks were constructed for three different time window lengths: 128, 256, and 512. Each discriminator at each scale has the same network architecture but independent parameters, enabling it to specifically handle signal features at the corresponding scale. This multi-scale design allows the network to simultaneously focus on both local details and global patterns of the signal.

[0551] To stabilize the training process, spectral normalization is applied to the convolutional layers of the discriminator. This prevents mode collapse caused by excessively rapid training of the discriminator by constraining the spectral norm of the weight matrix. The mathematical expression for spectral normalization is:

[0552]

[0553] Among them, W SN σ(W) represents the weight matrix after spectral normalization, and σ(W) represents the maximum singular value of the weight matrix W.

[0554] S33. Multi-component loss function design: Design a comprehensive loss function that integrates seven key components to fully constrain model learning.

[0555] The total loss function consists of seven components, which work together to optimize different aspects of signal quality.

[0556] L total =L adv +L cycle +λ freq ·L freq +λ physio ·L physio +λ temp ·L temp +λ peak ·L peak +λ denoise ·L denoise

[0557] Among them, L total To account for the overall loss, L adv To combat the losses, L cycle For the cycle consistency loss, λ freq L is the weight for the frequency domain consistency loss. freq For frequency domain consistency loss, λ physio L is the weight of the physiological signal constraint loss. physio For physiological signal-constrained loss, λ temp L is the weight for the temporal continuity loss. temp For temporal continuity loss, λ peak To maintain the weight of the loss at the peak, L peak To preserve peak value, λ denoise L is the weight for the noise perception loss. denoise This is the noise perception loss.

[0558] Combat loss L adv The least squares adversarial loss is used to improve the authenticity of the generated signal, ensuring that the signal generated by the generator can deceive the discriminator, and the discriminator can accurately distinguish between the real signal and the generated signal.

[0559]

[0560] In the formula, L adv (G, D) Y (X, Y) is the adversarial loss function, G is the generator network, and D is the generator network. Y For the discriminator network, X represents the low-quality signal domain of the input, Y represents the high-quality signal domain of the target, and y ~ p data (y) represents the true high-quality signal sample variable y from the target domain, which follows the probability distribution p of the target domain data. data (y), D Y (·) represents the discriminator network function, x ~ p data (x) represents a low-quality signal sample variable x from the input domain, which follows the probability distribution p of the input domain data. data (x), G(·) are the generator network functions.

[0561] Make the discriminator's output for the true signal y close to 1. Make the discriminator's output for the generated signal G(x) close to 0. E represents the mathematical expectation, p data This indicates the data distribution.

[0562] Cyclic consistency loss L cycle Ensure the consistency of bidirectional mappings to prevent schema collapse.

[0563]

[0564] Among them, L cycle (G, F) is the cycle consistency loss function, F is the reverse generator network from the Y domain to the X domain, F(·) is the reverse generator network function, and |·|1 represents the L1 norm;

[0565] This ensures that a low-quality signal, after being transformed by the generator G and then inversely mapped by F, can be recovered to its original form, and also ensures the inverse consistency of the high-quality signal y. |·|1 represents the L1 norm, which preserves the detailed features of the signal.

[0566] Frequency domain uniformity loss L freQ Maintain the spectral characteristics of the blood oxygen dynamics response to ensure that the generated signal remains consistent with the target signal in the frequency domain:

[0567]

[0568] By comparing the Fast Fourier Transform results of the generated signal and the target signal, the distribution characteristics of the generated signal in the frequency domain are constrained. Let FFT(·) denote the square of the L2 norm, and FFT(·) is the Fast Fourier Transform function.

[0569] Physiological signal constraint loss L physio Ensure the generated signal conforms to the physiological characteristics of blood oxygenation signals, including the negative correlation between HbO and HbR and signal smoothness:

[0570] L physip =α corr ·L corr +β smooth ·L smooth

[0571] The correlation constraint ensures that oxyhemoglobin (HbO) and deoxyhemoglobin (HbR) exhibit a physiologically negative correlation:

[0572] L corr =max(0,corr(HbO,HbR)+0.7)

[0573]

[0574] A penalty is applied when the correlation coefficient between HbO and HbR is greater than -0.7, because they should be negatively correlated under normal physiological conditions. `max(0,·)` ensures that a loss only occurs when the correlation deviates from the physiological range. Smoothness constraints ensure the temporal continuity and physiological plausibility of the signal. This term represents the gradient operator, which constrains the time derivative of the generated signal to prevent non-physiological abrupt changes.

[0575] Temporal continuity loss L temp Maintain the temporal continuity of the signal and avoid abrupt jumps between adjacent time points:

[0576]

[0577] By comparing the rate of change of the generated signal with that of the original signal at adjacent time points, the original temporal dynamic characteristics of the generated signal are ensured to be maintained. The denominator is used as a normalization term to avoid the influence of the amplitude of changes in the original signal on the loss calculation.

[0578] Peak hold loss L peak Protect task-related activation peaks and ensure that important physiological responses are not excessively smoothed out:

[0579]

[0580] P(·) is a peak detection operator that extracts important peaks in the signal by detecting local maxima. This loss ensures that the generated signal maintains the same peak positions and amplitudes as the target signal.

[0581] The noise perception loss is based on the noise estimation in the preprocessing stage, guiding the network to learn an appropriate level of denoising.

[0582]

[0583] N(·) is a noise extraction operator that extracts noise components from the signal through high-pass filtering or wavelet decomposition; N est This is the target noise level estimated for the preprocessing stage. This loss ensures that the noise level of the generated signal reaches the expected cleanliness, avoiding signal distortion caused by excessive denoising.

[0584] S34, Progressive Training Strategy:

[0585] To ensure stable training and optimal performance of the network, this invention employs a multi-stage progressive training strategy. This strategy gradually increases the training difficulty and network complexity, enabling the model to transition from learning simple mapping relationships to complex signal enhancement tasks, effectively avoiding pattern collapse and gradient vanishing problems during training.

[0586] The core idea of ​​progressive training is to break down complex signal enhancement tasks into multiple sub-tasks, with each training phase focusing on a different optimization objective. Through this phased learning approach, the network can first establish basic signal mapping capabilities, and then gradually learn refined feature representations and high-quality signal reconstruction techniques.

[0587] The first stage is the basic mapping learning stage, which aims to establish a fundamental mapping relationship from low-quality to high-quality signals. In this stage, the network mainly learns the basic structural features of the signal and coarse-grained noise suppression patterns.

[0588] The training parameters are configured as follows: the batch size is set to 64 to ensure sufficient sample diversity for each update; the Adam optimizer is used, whose adaptive learning rate characteristic is beneficial to the stable convergence of the network; the total training epochs are 200, with 50 epochs for the first stage, 100 epochs for the second stage, and 50 epochs for the third stage; the initial learning rate is set to 0.0002, a value that has been verified through extensive experiments to achieve a good balance between convergence speed and stability.

[0589] To balance the training progress of the generator and discriminator, an asymmetric update strategy is adopted: for every 5 generator parameter updates, a corresponding discriminator parameter update is performed. This design prevents the discriminator from converging too quickly, which would prevent the generator from learning effectively, while also avoiding the pattern collapse problem caused by overtraining of the generator.

[0590] Regarding the weight settings for the loss function, the first stage primarily focuses on adversarial loss and cycle consistency loss, with weight coefficients set to L respectively. adv and L cycle =10.0. The weights of other auxiliary loss terms are relatively small to ensure that the network first learns basic signal conversion capabilities.

[0591] The second stage introduces a multi-scale discriminator architecture, focusing on improving the generation quality of different frequency components. The core innovation of this stage lies in the adoption of a progressive discriminator activation strategy, which improves the precision of signal generation by gradually increasing the complexity of the discriminator.

[0592] The specific progressive activation process is as follows:

[0593] Epochs 51-80: The discriminator with only a 256-point receptive field is activated. At this stage, the network primarily learns medium-scale signal features, including typical blood oxygen kinetic response patterns and suppression of mid-frequency noise. The 256-point window can cover most task-related blood oxygen responses, laying the foundation for subsequent multi-scale learning.

[0594] Epochs 81-110: While maintaining a 256-point discriminator, a discriminator with a 128-point receptive field is activated. The smaller receptive field allows the network to focus on local details and high-frequency features of the signal, including rapid physiological changes and subtle noise components. The synergistic effect of the two discriminators enables the generator to improve the accuracy of local features while maintaining overall signal quality.

[0595] Epochs 111-150: Activate all three discriminators (128, 256, and 512 receptive fields). The 512-point discriminator introduces global contextual information, enabling it to capture long-term signal trends and low-frequency baseline drift. Joint training of the three discriminators forces the generator to produce high-quality signals across multiple time scales.

[0596] At this stage, the weight configuration of the loss function is adjusted accordingly: the weight of the frequency domain consistency loss is increased to L. freq =0.5, the physiological signal constraint loss weight is set to L physio =0.3, to ensure that the generated signal meets higher standards in terms of frequency domain characteristics and physiological rationality. The loss function calculation of the multi-scale discriminator adopts a weighted average strategy, where the weight coefficients are dynamically adjusted according to the training progress of each scale discriminator to ensure balanced learning of features at different scales:

[0597]

[0598] in, This represents the total adversarial loss of the multi-scale discriminator. This represents the adversarial loss of the discriminator at receptive fields of 128, 256, and 512 points, w. 128 w 256 w 512 These represent the weight coefficients of the discriminator at different scales.

[0599] The third stage involves fine-tuning at the full signal resolution, with the primary goal of improving signal detail and overall consistency. The training focus in this stage shifts from coarse-grained feature learning to refined quality enhancement.

[0600] To enhance temporal consistency, the weight of the cyclic consistency loss is increased by 20.0, twice that of the first stage. This weight adjustment ensures that the generated signal not only has high quality at a single point in time, but also maintains good continuity and consistency over time.

[0601] The weights for temporal continuity constraints are simultaneously increased to 8.0, the peak hold loss weight is set to 6.0, and the noise perception loss weight is adjusted to 4.0. This weight configuration ensures that while pursuing overall signal quality, the network pays special attention to preserving key features of the physiological response.

[0602] The learning rate is adjusted using a cosine annealing strategy.

[0603]

[0604] lr(t) represents the learning rate for the t-th epoch; lr min ,lr max The minimum and maximum learning rates are represented by t, where t represents the current epoch number and T represents the total number of training epochs.

[0605] Furthermore, the Multi-Iteration optimization mechanism in step S4 is one of the core innovations of this invention. Through multi-scale convolutional kernel design, attention feature fusion, and iterative optimization, it achieves a gradual improvement in the quality of the fNIRS signal. This mechanism fully utilizes the feature representations of the signal at different time scales, gradually optimizing the signal quality through multiple iterations.

[0606] Multi-Iteration optimization mechanisms include:

[0607] S41, Multi-scale convolution kernel design: Using convolution kernels of three scales (3 / 5 / 7) in parallel in the generator:

[0608] 3-scale convolutional kernels: specifically designed to capture high-frequency detail information, including noise components and rapid physiological changes. Their small receptive field enables them to sensitively detect abrupt changes and anomalies in signals, making them a key component for noise identification and removal.

[0609] 5-scale convolution kernel: mainly extracts mid-frequency features, corresponding to the normal blood oxygenation dynamics response pattern. This scale can well cover the typical blood oxygenation response time window (about 10-20 seconds) and is the core for maintaining the integrity of physiological signals.

[0610] 7-scale convolutional kernels: Focused on modeling low-frequency trends, handling slow baseline drift and long-term physiological changes. Their large receptive field enables them to capture overall trend changes throughout the experiment.

[0611] This multi-scale parallel processing architecture enables the network to simultaneously focus on different frequency components of the signal, avoiding important features that may be missed by traditional single-scale methods.

[0612] S42. The feature fusion mechanism assigns weights to features at different scales through an adaptive attention mechanism to achieve the optimal feature combination:

[0613]

[0614] F fused The fused feature representation is represented by L; L represents the number of scales (L = 3 in this invention). This represents the feature mapping of the i-th scale at layer l. The formula fuses features from different scales through a weighted summation, with the weight coefficients dynamically reflecting the importance of features at each scale. The attention weights are calculated using Softmax normalization to ensure that the weight sum is 1.

[0615]

[0616] This represents the original attention score for the i-th scale at layer l, calculated from the features through a learnable linear transformation. The denominator is the exponential sum of the attention scores across all scales, serving a normalization function. The Softmax function ensures all weights are positive and sum to 1, while simultaneously amplifying the differences between different scales through an exponential function, enabling the network to explicitly select the most important feature scales. The formula for calculating the attention score is as follows:

[0617]

[0618] Where GAP(·) represents the global average pooling operation W β and b β These are the learnable weight matrix and the bias term, respectively.

[0619] S43. Iterative Optimization Process: A five-round progressive iterative strategy is adopted, with each round focusing on a different optimization objective. Through multiple iterations, the signal quality is gradually improved.

[0620] The first iteration focuses on the basic noise reduction task, primarily removing high-frequency noise components. This iteration activates the weights of the 3-scale convolutional kernels to reduce the influence of other scales. The loss function mainly focuses on the noise-perceived loss L. denoise This ensures that basic noise is effectively suppressed.

[0621] The second round of iterations enhances the main features of the signal, restoring typical physiological response patterns. This round primarily relies on mid-frequency features extracted using 5-scale convolutional kernels, and uses physiological signal-constrained loss L... physio Guide online learning of the correct blood oxygen dynamics mode.

[0622] The third iteration fine-tunes the peak and phase information to preserve task-relevant activation features. Building upon the first two iterations, this round uses a peak preservation loss L... peak Ensure that important physiological responses are not overly smoothed.

[0623] The fourth iteration, the overall optimization phase, ensures the integrity and consistency of the signal. This round comprehensively considers features at all scales and uses the cyclic consistency loss L... cycle and temporal continuity loss L temp Ensure the overall quality of the signal.

[0624] The fifth iteration focuses on detailed optimizations to meet specific task requirements. Based on the requirements of the specific application scenario, the weights of the loss function can be adjusted to enhance specific signal features.

[0625] The mathematical expression for each iteration is:

[0626] s (i+1) =G (i) (s (i) )

[0627] (s (i) G represents the input signal for the i-th iteration; (i) Let represent the generator network in the i-th iteration, whose parameters are adjusted according to the optimization objective of the current iteration; s (i+1) This represents the output of the i-th iteration and serves as the input for the next iteration. The recursive processing method allows the signal quality to be progressively improved in each iteration, ultimately achieving a high-quality enhancement effect.

[0628] Furthermore, step S5 is used to evaluate the enhancement effect of cerebral oxygenation signal based on CycleGAN. This invention establishes a multi-dimensional, multi-level quantitative evaluation index system. This index system involves dimensions such as signal quality, physiological fidelity, frequency domain characteristics, temporal continuity, and clinical applicability, used to verify that the enhanced signal meets technical indicators while possessing physiological significance.

[0629] S51. Signal quantization evaluation metrics include:

[0630] (1) Signal-to-noise ratio improvement (SNR Improvement Ratio, SIR) is defined as:

[0631]

[0632] The signal-to-noise ratio (SNR) measures the strength of the useful signal relative to the noise, and is calculated using the following formula:

[0633]

[0634] σ signal σ represents the standard deviation of the useful signal, signifying the variation in signal strength or amplitude. noise The standard deviation of the noise component represents the unwanted random variation in the system.

[0635] (2) Peak Signal-to-Noise Ratio (PSNR) is defined as the ratio of the maximum possible power of a signal to the power of noise. It is widely used in signal processing to evaluate the quality of signal reconstruction.

[0636]

[0637] Where MAX is the maximum possible amplitude of the signal. 2 The maximum signal power is given by MSE, which is the mean square error. The formula for MSE is:

[0638]

[0639] Where N is the total number of signal samples, i.e., the length of the time series; x enhanced [i] is the enhanced signal value at the i-th time point; x target [i] is the target signal value (clinical-grade device signal) at the i-th time point.

[0640] (3) Structural Similarity Index Measure (SSIM), which assesses the structural similarity between two signals, is defined as:

[0641]

[0642] Where x is the enhanced signal, and y is the target signal (clinical-grade device signal); μ x μ is the mean of signal x, reflecting the average level of the enhanced signal. y Reflects the average level of the enhanced signal; The variance representing the enhanced signal reflects the degree of change in the signal. Reflects the degree of change in the target signal; σ xy The covariance c1 is the first stability constant, and c2 is the second stability constant to prevent the denominator from being 0. The SSIM value ranges from [0,1], and the larger the value, the better the structure is preserved. The ideal value should be ≥0.85.

[0643] S52. Physiological fidelity assessment indicators include:

[0644] (1) HbO-HbR Correlation Preservation Ratio (CPR): This assesses the degree to which the relationship between HbO and HbR is maintained after enhancement. It is used to verify whether the enhancement process has maintained the correct physiological relationship and is defined as follows:

[0645]

[0646] Where corr(·) is the Pearson correlation coefficient function, which calculates the degree of linear correlation between the two variables; HbO enhanced HbR enhanced These represent the enhanced changes in oxyhemoglobin and deoxyhemoglobin concentrations, respectively; HbO2 target HbR targetThese represent the signals indicating changes in target oxyhemoglobin concentration and deoxyhemoglobin concentration, respectively. Under normal physiological conditions, HbO and HbR are negatively correlated, and a CPR close to 1 indicates that the enhancement process maintained the correct physiological relationship.

[0647] (2) Hemodynamic Response Fidelity (HRF): This assesses the degree of shape retention of the HRF and is defined as follows:

[0648]

[0649] Wherein, HRF is the fidelity of blood oxygen dynamic response, which assesses the degree of HRF shape retention. The numerator integral is used to enhance the overall difference area between the HRF and the target HRF; the denominator integral is the overall area of ​​the target HRF and the normalization factor.

[0650] S53. Time-domain and frequency-domain performance evaluation indicators include:

[0651] (1) Power Spectral Density Preservation (PSDP), used to evaluate the power preservation of the signal in a specific frequency band before and after enhancement, is defined as:

[0652]

[0653] Among them, PSDP freq For power spectral density retention at specific frequencies, the focus is on the 0.01–0.4 Hz blood oxygenation dynamics band. PSD enhanced (f) PSD target (f) represents the power spectral density values ​​of the enhanced signal and the target signal at frequency f, respectively.

[0654] (2) Frequency Domain Consistency Coefficient (FDCC), used to quantify the preservation of frequency domain characteristics, is defined as:

[0655]

[0656] (3) Temporal Smoothness Index (TSI), which evaluates the temporal continuity of a signal, is defined as:

[0657]

[0658] Where T is the total number of time points, x enhanced [t+1]-x enhanced [t] and x target [t+1]-xtarget [t] represents the difference between the boost signal and the target signal at adjacent time points. A TSI value close to 1 indicates good timing continuity.

[0659] (4) Peak protection rate: assesses the degree to which important activation responses are preserved.

[0660]

[0661] Where, N peaks,preserved N represents the number of peak values ​​retained after enhancement. peaks,tptal This represents the total number of peak values ​​in the original target signal.

[0662] S54. Based on the results of signal quantization evaluation indicators, establish a comprehensive evaluation model and assign weighted scores to various indicators. Define the comprehensive quality score:

[0663] Quality Score

[0664] =α signal Score signal +β physio Score physio +γ frequency Score frequency +δ temporal Score temporal

[0665] Where, α signal β physio γ frequency δ temporal The weighting coefficients are 0.35, 0.30, 0.20, and 0.15, respectively. This weighting design is to ensure high weighting for both signal quality and physiological fidelity, while also considering the completeness of the signal in both the time and frequency domains. Score signal The signal quality dimension is scored based on metrics such as SNR, PSNR, and SSIM; Score physio Scoring for physiological fidelity is based on metrics such as CPR and HRF. frequency Scoring is based on frequency domain characteristics, using PSDP and FDCC metrics; temporal The score is based on the time-domain continuity dimension, using the TSI and PPR indices.

[0666] Based on the comprehensive score, the signal quality is divided into three levels: good (80-100), medium (50-80), and poor (below 50). Statistical tests are performed on key evaluation indicators, including paired t-tests and repeated measures ANOVA. This allows for the comparison of significant differences in signals before and after enhancement while assessing the significance of differences among multiple groups of data, making the evaluation results statistically significant.

[0667] S55. To ensure the enhanced signal has practical application significance, clinical applicability assessment indicators include:

[0668] (1) Bland-Altman test

[0669] (2) Clinical equivalence assessment, verifying the enhancement effect through comparison with clinical-grade equipment:

[0670]

[0671] Clinical Equivalence S is the clinical equivalence assessment value; M is the total number of test samples; SSIM(...) is the structural similarity index function; S enhanced,m S clinical,m The enhanced signal and clinical-grade signal are for the m-th sample.

[0672] Clinical applicability assessment indicators can be used to evaluate whether the enhanced signal of wearable devices reaches the quality level of clinical-grade devices. A high equivalence value indicates that the enhancement method has clinical application value.

[0673] Example 4

[0674] Those skilled in the art can understand this embodiment as a more specific description of Embodiment 1 and Embodiment 2.

[0675] This embodiment provides a method for enhancing brain oxygenation signals based on CycleGAN, used to enhance low-quality signals collected by wearable fNIRS devices to clinical-grade quality. The specific implementation steps are as follows:

[0676] Step 1: Data Acquisition and Preprocessing

[0677] Twenty healthy volunteers, aged 22-30 years, with no history of neurological diseases, were selected. Resting-state and task-oriented cerebral oxygenation signals were simultaneously acquired using a self-developed dual-channel wearable fNIRS device (sampling rate 0.5Hz, wavelengths 760nm and 850nm) and an Aegean Medical TD25L clinical-grade device (sampling rate 0.5–20Hz, adjustable).

[0678] Equipment calibration: A mapping relationship from ODR to SO2 was established using hierarchical linear regression with 20 participants.

[0679] SO2=(0.458×ODR+0.305)×100%

[0680] During data preprocessing, the signal is precisely aligned based on the timestamp with an error of <10ms. The signal is then normalized using z-score and divided into three levels based on the signal-to-noise ratio: high (SNR>25dB), medium (15-25dB), and low (<15dB).

[0681] Step 2: Preprocessing and noise reduction:

[0682] A five-step cascaded noise reduction method is employed, as follows:

[0683] (1) Original signal input

[0684] (2) Hysteresis cancellation filtering, with parameters set to α = 0.95 and β = 0.85. These parameters were optimized based on a grid search of 100 test signals, achieving the best balance between signal fidelity and noise suppression.

[0685] (3) Signal Flipping Processing

[0686] (4) Adaptive wavelet soft thresholding denoising, using db4 wavelet, 4-level decomposition

[0687] (5) Flip again and filter a second time.

[0688] Step 3: Construct an improved CycleGAN network

[0689] In this embodiment, the traditional two-dimensional image CycleGAN architecture was deeply improved and adapted to the characteristics of one-dimensional fNIRS temporal signals. The generator network adopts an improved U-Net architecture, which retains the advantages of the original U-Net skip connections while being specifically optimized for temporal signal processing. Specifically, the generator's input layer uses a one-dimensional convolutional layer, mapping the 2-channel input signal to a 64-dimensional feature space. The kernel size is set to 7, and the stride is 1. This larger receptive field helps to capture the local temporal patterns of the signal.

[0690] The encoder consists of three downsampling layers, progressively increasing the feature dimensionality and decreasing the spatial resolution. The first downsampling layer maps 64-dimensional features to 128-dimensional features, and the second layer maps from 128-dimensional features to 256-dimensional features. Each layer uses a one-dimensional convolution with a kernel size of 3 and a stride of 2, combined with instance normalization and the LeakyReLU activation function (negative slope α = 0.2). This design ensures the effectiveness of feature extraction while avoiding the instability of batch normalization during small-batch training.

[0691] Nine residual blocks (ResBlocks) are set between the encoder and decoder as the core components for feature transformation. Each residual block is connected by an identity mapping and contains two one-dimensional convolutional layers with a kernel size of 3 and a stride of 1, while maintaining the number of channels at 256. The introduction of residual connections effectively alleviates the gradient vanishing problem in deep networks, enabling the network to learn more refined signal transformation patterns. Mathematically, this is represented as follows:

[0692] ResBlock(f in )=f in +F(f in )

[0693] Where F(f) in ) represents a combined transformation of two convolutional layers.

[0694] The decoder employs a symmetrical structure to the encoder, containing three upsampling layers. The number of channels gradually decreases from 256 to 128, then to 64, ultimately restoring a 2-channel output. Each upsampling layer uses transpose convolution (TransposeConv1D) with a kernel size of 3 and a stride of 2, along with instance normalization and ReLU activation. The output layer uses the Tanh activation function to normalize the output signal to the [-1, 1] interval, conforming to the normalized fNIRS signal range.

[0695] The discriminator network innovatively employs a multi-scale 1D-PatchGAN architecture, performing true / false signal discrimination at three time scales: 128, 256, and 512. The 128-point discriminator focuses on capturing high-frequency details, corresponding to a time window of approximately 4 seconds (sampling rate 0.5Hz), primarily identifying noise patterns and rapid changes; the 256-point discriminator covers a medium time scale of 8 seconds, capturing normal blood oxygen kinetic response characteristics; and the 512-point discriminator observes a long time window of 16 seconds, focusing on low-frequency trends and baseline drift. Each discriminator contains four convolutional layers, with the number of channels progressively increasing, ultimately outputting a local true / false probability map. This multi-scale design ensures the authenticity of the generated signal at different time scales.

[0696] The model training adopts a three-stage progressive strategy, totaling 200 epochs, with parameters adjusted in each stage for different optimization objectives.

[0697] The first phase (epochs 1-50) is the basic mapping learning phase, which focuses on establishing the basic mapping relationship between wearable device signals and clinical-grade signals. The loss function only includes adversarial loss and cycle consistency loss, with cycle consistency weight λ. cycleThe weight is set to 10, this high weight ensures the stability of the bidirectional mapping. The batch size is set to 64, the Adam optimizer is used, the initial learning rate is 0.0002, β1 = 0.5, β2 = 0.999. The update ratio of the generator to the discriminator is 5:1, that is, the discriminator is updated only once every 5 generator updates. This asymmetric update strategy helps prevent pattern collapse caused by an overly strong discriminator.

[0698] The second phase (epochs 51-150) is the multi-scale adversarial training phase, which gradually introduces frequency domain consistency loss and physiological signal constraint loss while maintaining the base loss. The frequency domain loss weight λ... freq =0.5, focusing on constraining the blood oxygen dynamics response frequency band of 0.01-0.4Hz to ensure the generated signal maintains the correct spectral characteristics. Physiological constraint weight λ physio =0.3, forcing the signal to maintain a physiologically negative correlation. This stage also employs a progressive discriminator activation strategy: epochs 51-80 use only a 256-point discriminator, epochs 81-120 add a 128-point discriminator, and epochs 121-150 enable discriminators at all three scales. This progressive activation avoids instability in the early stages of training.

[0699] The third stage (epochs 151-200) is the full-resolution fine-tuning stage, activating the complete seven-component loss function, including the temporal continuity loss (λ). temp =0.2) and peak hold loss (λ) peak =0.4). Temporal continuity loss ensures the temporal smoothness of the generated signal, avoiding unnatural jumps; peak hold loss specifically protects task-related activation responses, preventing signal feature loss due to over-smoothing. The learning rate employs a cosine annealing strategy, gradually decreasing from 0.0004 to 0.0001 to ensure the model converges to the optimal solution.

[0700] Step 4: Multi-Iteration Optimization

[0701] To further improve signal quality, this embodiment adopts an innovative Multi-Iteration optimization mechanism, which gradually improves signal characteristics in different aspects through five rounds of targeted iterative processing.

[0702] The first iteration focuses on basic noise reduction, setting an adaptive threshold T1 = 0.8σ to primarily remove high-frequency noise components. Here, σ is the noise standard deviation estimated based on the median absolute deviation (MAD). This round of processing mainly targets random noise and high-frequency interference in the signal, effectively suppressing noise components while preserving the main characteristics of the signal through the noise reduction capability of the generator network. Special care is taken to protect physiologically relevant frequency components above 0.01Hz during processing to avoid signal distortion caused by over-filtering.

[0703] The second round of iterations was used to restore the physiological response pattern, focusing on the 0.01–0.4 Hz frequency band. This is the core frequency band in the fNIRS signal containing the blood oxygen dynamics response. Frequency domain weighting was used to enhance the signal components in this band while suppressing physiological noise such as respiration and heartbeat above 0.4 Hz and baseline drift below 0.01 Hz. This round of processing also incorporated the physiological constraints of HbO and HbR to ensure a reasonable negative correlation between the two, improving the physiological reliability of the signal.

[0704] The third iteration performs fine-tuning, focusing on protecting and enhancing task-related activation peaks. A peak detection algorithm identifies significant activation regions in the signal, and additional protective constraints are applied to these regions to prevent peak attenuation that may have occurred in the first two iterations. Simultaneously, this round optimizes the overall dynamic range of the signal, ensuring that the amplitude distribution of the output signal conforms to the standard range of clinical-grade devices. The output of each iteration serves as the input for the next, forming a cascaded optimization structure, mathematically represented as s. (i+1) =G (i) (s (i) ), where G (i) Let represent the generator network in the i-th round.

[0705] The fourth iteration performs overall optimization to ensure signal integrity and temporal consistency. This round comprehensively considers feature representations from all three scales (3 / 5 / 7) and dynamically adjusts the fusion weights for each scale through an adaptive attention mechanism. Specifically, this iteration focuses on strengthening the cycle consistency loss (increasing the weight to λ). cycle =20.0) and temporal continuity loss (λ) temp =8.0), ensuring the continuity of the generated signal in the time dimension. During processing, the ratio of the rate of change of adjacent time points is calculated, i.e. This ensures that the enhanced signal retains the dynamic variation pattern of the original signal. Furthermore, this round performs global normalization on the entire signal sequence to ensure that the statistical characteristics (mean, variance) of the output signal are consistent with the standard distribution of clinical-grade equipment. For long-term recordings (>5 minutes), a sliding window mechanism is introduced, with a window size of 128 points and an overlap rate of 50%, to ensure the stability and continuity of long sequence processing.

[0706] The fifth iteration is an optional detail enhancement stage, customized for specific application scenarios. For cognitive task experiments, this round specifically enhances the signal components in the task-related frequency band (0.04–0.15 Hz), improving the signal-to-noise ratio of the task-evoked response through frequency-domain selective enhancement. For clinical diagnostic applications, the focus is on protecting pathological feature frequency bands, such as ultraslow oscillations (<0.01 Hz) related to mental illness. This iteration also provides user-configurable enhancement parameters: enhancement intensity factor (α = 1.0–2.0), frequency band selection range, feature protection threshold, etc. By introducing an adaptive adjustment mechanism for noise perception loss, the final denoising intensity is dynamically adjusted based on the residual noise level after the first four rounds of processing (estimated through high-frequency energy ratio), avoiding signal distortion caused by over-processing. For application scenarios requiring subsequent analysis (such as functional connectivity analysis), this round also specifically optimizes phase fidelity to ensure that the phase relationship between different channels is not disrupted.

[0707] Step 5: Enhance Outcome Evaluation

[0708] The enhancement effect on 20 volunteers was comprehensively evaluated using the above-mentioned quantitative evaluation indicators, and a quantitative evaluation score table was constructed.

[0709] In the data collection from 20 healthy volunteers, wearable device signals, clinical-grade device signals, and post-enhanced signals were recorded simultaneously to form a triplet assessment sample. A total of 960 valid assessment samples were obtained (48 segments per participant, 20 participants).

[0710] (1) Calculation of signal quantization evaluation index

[0711] First, the basic signal-to-noise ratio was calculated for 192 samples in the test set:

[0712]

[0713] In practical calculations, the bandpass filtered signal of 0.01–0.4 Hz is used as the useful signal, while the high-frequency component (>0.4 Hz) is used for noise estimation. This separation method is based on the spectral characteristics of the fNIRS signal.

[0714] Subsequently, SIR is calculated based on SNR:

[0715]

[0716] Based on the sample point information, calculate the mean squared error (MSE):

[0717]

[0718] Further calculation of peak signal-to-noise ratio (PSNR):

[0719]

[0720] Subsequently, the structural similarity index SSIM between the enhanced signal and the target signal is calculated:

[0721]

[0722] The stability constant is set as follows:

[0723] c1 = (k1 × L) 2 c2 = (k2 × L) 2

[0724] Where k1 = 0.01, k2 = 0.03, and L is the dynamic range of the signal.

[0725] (2) Physiological fidelity assessment indicators

[0726] First, calculate the Pearson correlation coefficient between the HbO and HbR signals:

[0727]

[0728] Where HbO[i] represents the oxyhemoglobin concentration value at the i-th sampling point, HbR[i] represents the mean of the oxyhemoglobin concentration sequence, and HbR[i] represents the deoxyhemoglobin concentration at the i-th sampling point. This represents the mean of the deoxyhemoglobin concentration sequence;

[0729] Further calculation of CPR:

[0730]

[0731] Subsequently, the blood oxygen dynamic response fidelity (HRF) was calculated. Event-related averaging was used to extract the HRF from the signal.

[0732]

[0733] Where M is the number of trials, Let be the time series of the m-th trial; t is the time variable, representing the time point relative to the start of the stimulus event.

[0734] Further calculation of HRF fidelity:

[0735]

[0736] (3) Calculation of time-domain and frequency-domain characteristic evaluation indicators

[0737] First, the power spectral density preservation (PSDP) is calculated. The Welch method is used to calculate the PSD for both the acquired and enhanced signals.

[0738]

[0739] Among them, f s Where L is the sampling frequency, L is the window length, and x is the sampling frequency. m [n] represents the signal value of the nth sampling point in the mth window, m is the window index from 0 to M-1, n is the sampling point index from 0 to L-1, j is the imaginary unit, fn is the product of frequency f and sampling point index n; M is the number of overlapping windows, and w[n] is the window function (Hanning window).

[0740] Further, calculate PSDP:

[0741]

[0742] Subsequently, frequency domain consistency coefficient (FDCC) evaluation is performed. Fourier transform is applied to the signal:

[0743]

[0744] Here, N is the total length of the signal sequence, i.e., the total number of sampling points.

[0745] FDCC calculation based on cosine similarity:

[0746]

[0747] Where f is the frequency variable, f low The lower limit of the blood oxygen dynamics frequency band, f high The upper limit of the blood oxygen dynamics frequency band, X enhanced To enhance the Fourier transform value of the signal at frequency f, X clinical Let f be the Fourier transform value of the clinical-grade signal at frequency f, and X(·) represent the function for performing the Fourier transform on the signal.

[0748] Here, based on the blood oxygen dynamics frequency band, f is set... low =0.01Hz,f high =0.4Hz.

[0749] Next, the Time Series Smoothness Index (TSI) is calculated. First, the signal is subjected to first-order difference calculation, and the total variation (TV) is calculated. Finally, the TSI is calculated:

[0750] Δx[i]=x[i]+1]-x[i],i=1,2,…,N-1

[0751]

[0752] Where Δx[·] is the first-order difference of the signal, representing the change between adjacent sampling points, i is the sampling point index, x[·] is the signal sequence, i+1 is the next position of the current index, TV(·) is the total variation function, which measures the degree of change of the signal, and x is the input signal sequence.

[0753] Finally, the peak protection ratio (PPR) is calculated using task-state data. A peak detection algorithm (findpeaks) is employed.

[0754] Peak detected ={i:x[i]>x[i-1]and x[i]>x[i+1]and x[i]>h threshold}

[0755] Match(p) based on matching criteria. enhanced,i ,p clinical,i After that, we get PPR:

[0756]

[0757] Peak detected The set of detected peak points contains all indices i that satisfy the peak condition; Match(·) is the peak matching function that determines whether two peaks match; p enhanced,i To enhance the i-th detected peak value in the signal, p clinical,i The i-th detected peak value in the clinical-grade signal, N peaks This represents the total number of peak values ​​detected in the clinical signal.

[0758] Among them, h threshold To minimize peak height, a time matching tolerance of 0.3s was set, and based on statistical analysis, an amplitude matching tolerance of 15% was set.

[0759] (4) Quantification of comprehensive evaluation model

[0760] Based on the results of the signal quantification evaluation index, the various indexes are first weighted and scored.

[0761]

[0762] Score physio =w CPR ·CPR+w HRF HRF fidelity

[0763] Score frequency =w PSDP PSDP avg +w FDCC FDCC

[0764]

[0765] W SIR The weighting coefficients for the signal improvement ratio (SIR), SIR max The maximum value of the signal improvement ratio, W PSNR The weighting coefficients for peak signal-to-noise ratio (PSNR), PSNR max The maximum value of the peak signal-to-noise ratio is used for normalization, W. SSIM The weighting coefficients of the Structural Similarity Index (SSIM), W CPR The weighting coefficients for correlation retention rate (CPR), W HRF Weighting coefficients for blood oxygen dynamic response fidelity (HRF), W PSDP The weighting factor for power spectral density preservation (PSDP), W FDCC The weighting coefficients for the Frequency Domain Coherence Coefficient (FDCC), W TSI The weighting coefficients of the Time Series Smoothness Index (TSI), W PPR This is the weighting factor for Peak Protection Rate (PPR).

[0766] The rating weights are set to w respectively. SIR =0.4; w PSNR =0.3; w SSIM =0.3; w CPR =0.55; w HRF =0.45; w PSDP =w FDCC =0.5; w TSI =0.6; w PPR =0.4. Meanwhile, all relevant indicators have been normalized.

[0767] Based on the scoring results, calculate the overall score:

[0768] Quality Score

[0769] =100×(α·score) signal +β·Score physio +γ·Score frequency +δ·Score temporal )

[0770] α, β, γ, and δ are weighting coefficients, set to 0.35, 0.30, 0.20, and 0.15, respectively.

[0771] (5) Statistical test

[0772] Paired t-tests and repeated measures ANOVA were performed on key quantitative indicators to verify the enhanced statistical significance.

[0773] (6) Clinical applicability verification

[0774] Bland-Altman test was performed on the enhanced signal and the target clinical-grade signal, and Bland-Altman plots were drawn to observe the correlation between the enhanced signal and the clinical-grade signal.

[0775] The enhanced signal was compared and evaluated with that of clinical-grade equipment:

[0776]

[0777] This invention enables intelligent conversion from low-quality wearable device signals to clinical-grade high-quality signals.

[0778] Those skilled in the art will understand that, besides implementing the system and its various devices, modules, and units provided by this invention in the form of purely computer-readable program code, the same functions can be achieved entirely through logical programming of the method steps, making the system and its various devices, modules, and units of this invention function in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, the system and its various devices, modules, and units provided by this invention can be considered as a hardware component, and the devices, modules, and units included therein for implementing various functions can also be considered as structures within the hardware component; alternatively, the devices, modules, and units for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.

[0779] Specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art can make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. Unless otherwise specified, the embodiments and features described in this application can be arbitrarily combined with each other.

Claims

1. A method for enhancing cerebral oxygenation signals based on CycleGAN, characterized in that, Includes the following steps: Data acquisition and preprocessing steps: Device calibration is performed to establish a mapping relationship between wearable fNIRS devices and clinical-grade fNIRS devices. Cerebral blood oxygenation signals are simultaneously acquired using both wearable and clinical-grade fNIRS devices. The acquired cerebral blood oxygenation signals are then preprocessed for the first time to construct a training dataset. Signal preprocessing steps: Before the brain blood oxygenation signal in the training dataset is input into the fNIRS-CycleGAN network model, a cascaded noise reduction module is used to perform secondary preprocessing on the brain blood oxygenation signal. The cascaded noise reduction module includes hysteresis cancellation filtering and adaptive wavelet threshold denoising. Network model construction steps: A CycleGAN network architecture is constructed using a bidirectional generator network and a discriminator network. The network parameters of the CycleGAN network architecture are optimized in stages using a progressive training strategy to obtain the CycleGAN network model. The CycleGAN network model is trained using brain blood oxygenation signals after secondary preprocessing to obtain the fNIRS-CycleGAN network model. Signal processing enhancement steps: Using the fNIRS-CycleGAN network model, and employing a multi-Iteration optimization mechanism and a multi-scale multiple-iteration optimization strategy, different frequency band components of the cerebral blood oxygenation signal are processed in parallel through convolutional kernels of different scales; Signal enhancement assessment steps: Use quantitative indicators to evaluate the enhancement effect of cerebral blood oxygenation signal processed by the fNIRS-CycleGAN network model.

2. The method for enhancing cerebral oxygenation signals based on CycleGAN according to claim 1, characterized in that, In the signal preprocessing step, the signal-to-noise ratio of the cerebral blood oxygenation signal input to the fNIRS-CycleGAN network model is improved through a five-step cascaded processing flow.

3. The method for enhancing cerebral oxygenation signals based on CycleGAN according to claim 1, characterized in that, In the network model construction step, the bidirectional generator network adopts a U-Net architecture adapted to one-dimensional time-series signals, including an encoder, a residual generator, and a decoder, to achieve end-to-end signal quality mapping. The discriminator network adopts a multi-scale 1D-PatchGAN structure, performs discrimination at multiple time windows of different lengths, and introduces spectral normalization technology to improve training stability. In the network model construction step, a comprehensive loss function is used to fully constrain the training and learning of the network model; the comprehensive loss function includes adversarial loss, cycle consistency loss, frequency domain consistency loss, physiological signal constraint loss, temporal continuity loss, peak preservation loss, and noise perception loss. The adversarial loss employs least squares loss to improve the realism of the generated signal; the cyclic consistency loss ensures the reversibility of the bidirectional mapping; and the frequency domain consistency loss maintains the spectral characteristics of the blood oxygen dynamics response. The physiological signal constraint loss is used to force a negative correlation between HbO and HbR signals; HbO is oxyhemoglobin, which refers to hemoglobin that is bound to oxygen; HbR is deoxyhemoglobin, which refers to hemoglobin that is not bound to oxygen. The temporal continuity loss is used to maintain the temporal smoothness of the signal; the peak hold loss is used to protect task-related activation responses; and the noise perception loss is used to constrain noise priors based on the preprocessing stage.

4. The method for enhancing cerebral oxygenation signals based on CycleGAN according to claim 1, characterized in that, In the signal processing enhancement step, an attention mechanism is used to adaptively fuse multi-scale features to balance the effect and reduce computational cost. The quality of cerebral blood oxygenation signal is gradually improved through five rounds of iteration: the first round focuses on basic noise reduction, the second round is used to restore physiological response patterns, the third round is used to finely adjust the peak value, the fourth round is used for overall optimization, and the fifth round is for optional detail enhancement.

5. The method for enhancing cerebral oxygenation signals based on CycleGAN according to claim 1, characterized in that, The data acquisition and preprocessing steps specifically include the following steps: Device calibration steps: Establish the mapping relationship between wearable fNIRS devices and clinical-grade fNIRS devices. Based on the modified Beer-Lambert law, the relationship between oxygen saturation (SO2) and optical density ratio (ODR) is as follows: SO2=k0×ODR+b Where k0 and b are calibration parameters obtained by fitting through hierarchical linear regression; Synchronous acquisition steps: A timestamp synchronization mechanism is used to align the time of data acquisition by the wearable fNIRS device and the clinical fNIRS device that have established a mapping relationship, and to ensure that the sampling frequency, the duration of each acquisition, and the sampling method of the two devices are the same, so as to synchronously acquire brain blood oxygenation signals through the two devices. Data preprocessing steps: Signal standardization, artifact detection, and quality grading are performed on the brain blood oxygenation signals collected by wearable fNIRS devices and clinical-grade fNIRS devices; In the signal standardization process, the cerebral blood oxygenation signal is standardized using z-score. The z-score standardization formula is as follows: x norm =(x-μ) / σ Where, x norm σ represents the standardized brain oxygenation signal value, x represents the original brain oxygenation signal value, μ represents the mean of the brain oxygenation signal data, and σ represents the standard deviation of the brain oxygenation signal data. In the artifact detection process, motion artifacts of cerebral blood oxygenation signals are detected based on amplitude thresholds and rate of change. In the quality grading process, the dataset of cerebral blood oxygenation signals is divided into multiple levels according to the signal-to-noise ratio; Dataset construction steps: Use preprocessed brain blood oxygenation signal data from a pre-processed brain blood oxygenation signal dataset with a preset percentage to construct the training dataset.

6. The method for enhancing cerebral oxygenation signals based on CycleGAN according to claim 1, characterized in that, The signal preprocessing steps specifically include the following steps: Hysteresis cancellation filtering steps: A hysteresis cancellation filter is used to process the time delay distortion in the transmission of cerebral oxygenation signals. The transfer function of the hysteresis cancellation filter is defined as follows: Where H(z) represents the system transfer function of the hysteresis cancellation filter, z represents the complex frequency domain variable, the complex frequency domain refers to the z-transform domain, α and β are the parameters of the hysteresis cancellation filter. The parameter α controls the zero position and affects the high-frequency response characteristics of the cancellation filter, while the parameter β controls the pole position and determines the stability and low-frequency characteristics of the cancellation filter. Adaptive wavelet filtering steps: Construct a soft thresholding function based on the statistical characteristics of cerebral blood oxygenation signals. The soft thresholding function is used to remove noise from the cerebral blood oxygenation signals. The soft thresholding function is defined as follows: T soft (x)=sign(ω)·max(|x|-λ,0) Among them, T soft (ω) represents the output value of the soft thresholding function, and in this formula, it represents the denoised wavelet coefficients. ω is the wavelet coefficient, and λ is the adaptive threshold. The formula for calculating the adaptive threshold λ is: Where, σ noise-std The value is an estimate of the noise standard deviation, log(L) signal L is the natural logarithm with base e. signal The signal length and noise standard deviation are estimated using the robust median absolute deviation method. The five-step cascaded noise reduction process employs a progressive noise reduction strategy, sequentially executing five steps: raw signal input of cerebral blood oxygenation signal, preliminary filtering, signal reversal processing, reversal and recovery processing, and secondary fine filtering. Through multiple iterations, noise in the cerebral blood oxygenation signal is gradually suppressed.

7. The method for enhancing cerebral oxygenation signals based on CycleGAN according to claim 1, characterized in that, The network model construction steps specifically include the following steps: The bidirectional generator network construction steps are as follows: A U-Net structure adapted to one-dimensional signals is adopted, and a bidirectional generator network is constructed using three core components: an encoder, a residual, and a decoder. The encoder contains a 3-layer downsampling module, with each layer having the structure: Conv1D(k=3,s=2)+InstanceNorm+LeakyReLU(a=0.2). The number of channels can be gradually increased from the 2 input channels to 256 channels, realizing the layer-by-layer abstraction of features. Where Conv1D represents a one-dimensional convolutional layer; k is an abbreviation for kernel_size, which is the kernel size and represents the length of the convolutional kernel; s is an abbreviation for stride, which is the stride and represents the distance the convolutional kernel slides each time; InstanceNorm represents instance normalization; LeakyReLU is the LeakyReLU activation function, and a represents the slope of the activation function; the two input channels are the HbO signal channel and the HbR signal channel, respectively. The residual unit contains 9 residual blocks, and the mathematical expression for each residual block is as follows: ResBlock(f in )=f in +Conv1D(Conv1D(f in )) Among them, ResBlock(f in ) represents the output of the residual block, Conv1D(·) is the one-dimensional convolution operation function, and f in For the input features of the residual block, the Conv1D convolution kernel size is 3, the stride is 1, and the number of channels is 256. The decoder contains three upsampling modules, each with the structure: TransposeConv1D(k=3,s=2)+InstanceNorm+ReLU. The number of channels can be gradually reduced from 256 to 2, and finally outputs enhanced HbO and HbR signals. Where TransposeConv1D represents a one-dimensional deconvolution layer, which is the inverse operation of Conv1D; ReLU is the ReLU activation function. Discriminator network construction steps: A discriminator network is constructed using a 1D-PatchGAN structure to achieve multi-scale discrimination; The discriminator network consists of four convolutional layers: First layer: Conv1D(kernel_size=4, stride=2)→LeakyReLU(a=0.2); Second layer: Conv1D(kernel_size=4, stride=2)→InstanceNorm→LeakyReLU(a=0.2); Third layer: Conv1D(kernel_size=4, stride=1)→InstanceNorm→LeakyReLU(a=0.2); Fourth layer: Conv1D(kernel_size=1, stride=1); Three independent discriminator networks were constructed for three different time window lengths of 128, 256, and 512, respectively, to enhance the perception of multi-scale features. The three discriminator networks have the same network architecture. The parameters of the three discriminator networks are independent of each other. The three discriminator networks can process signal features corresponding to their respective time window lengths. In the convolutional layers of the discriminator network, spectral normalization is applied to constrain the spectral norm of the weight matrix. The mathematical expression for spectral normalization is: Among them, W SN σ(W) represents the weight matrix after spectral normalization, and σ(W) represents the maximum singular value of the weight matrix W. The steps for constructing a multi-component loss function are as follows: Design a comprehensive loss function that integrates seven key components to comprehensively constrain model learning. The comprehensive loss function consists of seven key components, each collaboratively optimizing different aspects of signal quality. The expression for the comprehensive loss function is: L total =L adv +L cycle +λ freq ·L freq +λ physio ·L physio +λ temp ·L temp +λ peak ·L peak +λ denoise ·L denoise Among them, L total To account for the overall loss, L adv To combat the losses, L cycle For the cycle consistency loss, λ freq L is the weight for the frequency domain consistency loss. freq For frequency domain consistency loss, λ physio L is the weight of the physiological signal constraint loss. physio For physiological signal-constrained loss, λ temp L is the weight for the temporal continuity loss. temp For temporal continuity loss, λ peak To maintain the weight of the loss at the peak, L peak To preserve peak value, λ denoise L is the weight for the noise perception loss. denoise For noise perception loss; Combat loss L adv The least squares adversarial loss is expressed as follows: In the formula, L adv (G,D Y (X,Y) represents the adversarial loss function, G represents the generator network, and D represents the... Y For the discriminator network, X represents the low-quality signal domain of the input, Y represents the high-quality signal domain of the target, and y ~ p data (y) represents the true high-quality signal sample variable y from the target domain, which follows the probability distribution p of the target domain data. data (y), D Y (·) represents the discriminator network function, x ~ p data (x) represents a low-quality signal sample variable x from the input domain, which follows the probability distribution p of the input domain data. data (x), where G(·) is the generator network function; in, Make the discriminator network output close to 1 for the real signal y. Make the discriminator network's output of the generated signal G(x) close to 0, where E[·] represents the mathematical expectation, p data (·) indicates the data distribution; Cyclic consistency loss L cycle The expression is: Among them, L cycle (G,F) is the cycle consistency loss function, F is the reverse generator network from the Y domain to the X domain, F(·) is the reverse generator network function, and |·|1 represents the L1 norm; Frequency domain uniformity loss L freq The expression is: Where |·|2 represents the L2 norm, The square of the L2 norm is represented by FFT(·), which is the Fast Fourier Transform function. Physiological signal constraint loss L physio The expression is: Among them, L corr and L smooth The expression is: L corr =max(0,corr(HbO,HbR)+0.7) Among them, L corr L represents the correlation loss between HbO and HbR signals. smooth α represents the signal smoothness loss. corr For L corr The weighting coefficient, β smooth For L smooth The weighting coefficient, corr(HbO,HbR), represents the Pearson correlation coefficient between the HbO and HbR signals, where HbO and HbR represent the concentration changes of oxyhemoglobin and deoxyhemoglobin, respectively. Represents the gradient operator; Temporal continuity loss L temp The expression is: Where t is the time index, x t Let x be the signal at time point t. t-1 The signal is from the previous time point; Peak hold loss L peak The expression is: Where P(·) is the peak detection operator; Noise perception loss L denoise The expression is: Where N(·) is the noise extraction operator, N est This represents the estimated noise level; Progressive training steps: A multi-stage progressive training strategy is adopted to gradually increase the training difficulty and network complexity, enabling the network model to gradually transition from simple mapping relationship learning to complex signal enhancement tasks. Specifically, this includes the following stages: The first stage is the basic mapping learning stage, which is used to establish the basic mapping relationship from low-quality to high-quality signals. The second stage involves introducing a multi-scale discriminator architecture to improve the generation quality of different frequency components. The third stage involves fine-tuning the signal at full resolution to improve detail and overall consistency.

8. The method for enhancing cerebral oxygenation signals based on CycleGAN according to claim 1, characterized in that, The signal processing enhancement steps specifically include the following steps: Multi-scale convolutional kernel construction steps: Three convolutional kernels of different scales are used in parallel in the bidirectional generator network. The three scale convolutional kernels are 3-scale convolutional kernel, 5-scale convolutional kernel, and 7-scale convolutional kernel. Three-scale convolutional kernels are used to capture high-frequency details, including noise components and rapid physiological changes; five-scale convolutional kernels are used to extract mid-frequency features, corresponding to normal blood oxygen dynamics response patterns. 7-scale convolutional kernels are used to model low-frequency trends, handle slow baseline drift and long-term physiological changes; The multi-scale convolutional kernel parallel processing architecture enables the network model to simultaneously focus on different frequency components of the signal; Feature fusion steps: A feature fusion mechanism is employed for multi-scale feature fusion. This mechanism assigns weights to features at different scales through an adaptive attention mechanism. The feature fusion formula is as follows: Among them, F fused L represents the fused feature representation; L represents the number of scales, α i For attention weights, This represents the feature map of the i-th scale at the l-th layer; Attention weight α i The calculation uses Softmax normalization, and the formula is: in, This represents the original attention score of the i-th scale at the l-th layer. This represents the original attention score of the j-th scale at the l-th layer; The formula for calculating the attention score is: in, Let W represent the feature map of the j-th scale at the l-th layer, and let GAP(·) represent the global average pooling operation. β and b β These are the learnable weight matrix and the bias term, respectively; Iterative optimization process steps: A five-round progressive iterative strategy is adopted, with each round focusing on a different optimization objective. Through multiple rounds of iteration, the signal quality is gradually improved. Specifically, it includes the following five rounds of iteration: First iteration: Perform basic noise reduction, remove high-frequency noise components, activate the weights of 3-scale convolutional kernels, reduce the influence of 5-scale and 7-scale convolutional kernels, and make the overall loss function mainly focus on the noise perception loss L. denoise ; Second iteration: Enhance signal core features, restore typical physiological response patterns, extract mid-frequency features using 5-scale convolutional kernels, and apply physiological signal constraint loss L... physio Instruct the network model to learn the correct blood oxygen dynamics pattern; Third iteration: Fine-tuning peak and phase information to preserve task-related activation features, building upon the first and second iterations, using peak preservation loss L... peak Ensure that important physiological responses are not overly smoothed; Fourth iteration: Perform overall optimization to ensure signal integrity and consistency, comprehensively considering features at all scales, and applying the cyclic consistency loss L... cycle and temporal continuity loss L temp Ensure overall signal quality; Fifth iteration: Optimize the details of task requirements, adjust the weight coefficients of each loss in the comprehensive loss function according to the requirements of specific application scenarios, and enhance the preset signal features; The mathematical expression for each iteration is: s (i+1) =G (i) (s (i) ) Among them, (s (i) G represents the input signal for the i-th iteration; (i) Let represent the generator network in the i-th iteration, whose parameters are adjusted according to the optimization objective of the current iteration; s (i+1) This represents the output of the i-th iteration and serves as the input for the next iteration.

9. The method for enhancing cerebral oxygenation signals based on CycleGAN according to claim 1, characterized in that, The signal enhancement evaluation step includes technical indicator evaluation and physiological significance evaluation; The technical indicators are evaluated using signal quantization evaluation indicators, physiological fidelity evaluation indicators, and time-domain and frequency-domain characteristic evaluation indicators. The signal quantification evaluation indicators include: signal-to-noise ratio improvement, peak signal-to-noise ratio, and structural similarity index; The signal-to-noise ratio improvement is defined as: Among them, SNR enhanced Represents the signal-to-noise ratio (SNR) of the enhanced signal. original The signal-to-noise ratio represents the original signal. Wherein, SIR stands for Signal-to-Noise Ratio Improvement. SIR measures the strength of the useful signal relative to the noise, and its calculation formula is: Where, σ signal σ represents the standard deviation of the useful signal, signifying the change in signal strength or amplitude; noise The standard deviation of the noise component represents the unwanted random variation in the system; The peak signal-to-noise ratio (PSNR) is defined as the ratio of the maximum possible power of the signal to the noise power, and is used to evaluate the signal reconstruction quality. The calculation formula is as follows: Where PSNR is the peak signal-to-noise ratio, and MAX is the maximum possible amplitude of the signal. 2 The maximum signal power is given by MSE, which is the mean square error. The formula for MSE is: Where N is the total number of signal samples, and x represents the length of the time series; enhanced [i] is the enhanced signal value at the i-th time point; x target [i] is the target signal value at the i-th time point; The structural similarity index, used to evaluate the degree of structural similarity between two signals, is defined as follows: Where SSIM(x,y) is the structural similarity index; x is the enhanced signal, which is the enhanced brain oxygenation signal collected by the wearable fNIRS device; y is the target signal, which is the brain oxygenation signal collected by the clinical-grade fNIRS device; μ x denoted by μ, represents the mean of signal x, reflecting the average level of the enhanced signal; y Reflects the average level of the target signal; The variance represents the enhanced signal, reflecting the degree of signal change; σ represents the variance of the enhanced signal, reflecting the degree of change in the target signal; xy c1 is the covariance; c2 is the first stability constant; c3 is the second stability constant. The physiological fidelity assessment indicators include: HbO-HbR correlation retention and blood oxygen dynamics response fidelity; The HbO-HbR correlation retention degree is used to assess the degree to which the relationship between HbO and HbR is maintained after enhancement, and to verify whether the enhancement process maintains the correct physiological relationship. It is defined as follows: Where CPR represents the HbO-HbR correlation preservation; corr(·) is the Pearson correlation coefficient function, which calculates the degree of linear correlation between the two variables; HbO enhanced HbR enhanced These are the changes in oxyhemoglobin concentration and deoxyhemoglobin concentration in the enhanced signal, respectively; HbO target HbR target These are the oxyhemoglobin concentration change signal and the deoxyhemoglobin concentration change signal in the target signal, respectively. The blood oxygen dynamics response fidelity, used to assess the degree of HRF shape preservation, is defined as: Where HRF(·) is the blood oxygen dynamics response function, HRF fidelity For blood oxygen kinetic response fidelity, used to assess the degree of HRF shape retention; HRF enhanced To enhance the blood oxygen dynamic response of the signal; HRF target (t) represents the hemodynamic response to the target signal; The time-domain and frequency-domain performance evaluation indicators include: power spectral density retention, frequency domain consistency coefficient, timing smoothness index, and peak protection rate. The power spectral density retention, used to evaluate the power retention of the signal before and after enhancement at a preset frequency, is defined as: Among them, PSDP freq PSD is the power spectral density retention at a preset frequency. enhanced (f) PSD tdrget (f) represents the power spectral density values ​​of the enhanced signal and the target signal at frequency f, respectively; The frequency domain consistency coefficient, used to quantify the preservation of frequency domain characteristics, is defined as follows: Among them, FFT enhanced (f) represents the Fourier transform of the enhanced signal at frequency f, FFT. target (f) represents the Fourier transform of the target signal at frequency f, and FDCC is the frequency domain consistency coefficient; The temporal smoothness index, used to evaluate the temporal continuity of a signal, is defined as follows: Where TSI is the time series smoothness index, T is the total number of time points, and x enhanced [t+1]-x enhanced [t] and x target [t+1]-x target [t] represents the difference between the enhanced signal and the target signal at adjacent time points, x[·] represents the discrete-time signal, t represents the index of the current time point, and t+1 represents the index of the next time point; The peak protection rate, used to evaluate the degree to which important activation responses are preserved, is defined as: Where PPR is the peak protection rate, and N peaks,preserved To enhance the number of peak values ​​held by the signal; N peaks,total The total number of peak values ​​in the target signal; Based on the results of signal quantification evaluation indicators, a comprehensive evaluation model is established, and various indicators are weighted and scored. The comprehensive quality score is defined as follows: Quality Score =α signal ·Score signal +β physio ·Score physio +γ frequency ·Score frequency +δ temporal ·Score temporal Among them, Quality Score For overall quality scoring; α signal Weighting coefficients for the signal quality dimension score; Score signal The signal quality dimension is scored based on SNR, PSNR, and SSIM(x,y); β physio The weighting coefficients for the physiological fidelity dimension score; Score physio Scoring for physiological fidelity dimension based on CPR and HRF fidelity To score; γ frequency Weighting coefficients for the frequency domain characteristic dimension score; Score frequency Scoring is performed based on the frequency domain characteristics dimension, using PSDP. freq PDCC scores are used; δ temporal The weighting coefficients for the score in the temporal continuity dimension; Score temporal The score is based on the temporal continuity dimension, using TSI and PPR. The physiological significance was assessed using the Bland-Altman test and clinical equivalence assessment. For clinical equivalence assessment, the enhancement effect is verified by comparison with a clinical-grade fNIRS device, defined as: Clinical Equivalence S is the clinical equivalence assessment value; M is the total number of test samples; SSIM(·) is the structural similarity index function; S enhanced,m S clinical,m The images show the enhanced cerebral oxygenation signal of the m-th sample and the cerebral oxygenation signal acquired by a clinical-grade fNIRS device, respectively.

10. A cerebral oxygenation signal enhancement system based on CycleGAN, characterized in that, Includes the following modules: Data acquisition and preprocessing module: Performs device calibration, establishes a mapping relationship between wearable fNIRS devices and clinical-grade fNIRS devices, enables wearable fNIRS devices and clinical-grade fNIRS devices to synchronously acquire cerebral blood oxygenation signals, and performs initial preprocessing on the acquired cerebral blood oxygenation signals to construct a training dataset; Signal preprocessing module: Before the brain blood oxygenation signal in the training dataset is input into the fNIRS-CycleGAN network model, the cascaded denoising module performs secondary preprocessing on the brain blood oxygenation signal. The cascaded denoising module includes hysteresis cancellation filtering and adaptive wavelet threshold denoising. Network model construction module: The CycleGAN network architecture is constructed based on the bidirectional generator network and the discriminator network. The network parameters of the CycleGAN network architecture are optimized in stages based on the progressive training strategy to obtain the CycleGAN network model. The CycleGAN network model is trained through the brain blood oxygenation signal after secondary preprocessing to obtain the fNIRS-CycleGAN network model. Signal processing enhancement module: The fNIRS-CycleGAN network model is used with a multi-Iteration optimization mechanism and a multi-scale multiple iteration optimization strategy to process different frequency band components of cerebral blood oxygenation signals in parallel through convolutional kernels of different scales; Signal enhancement assessment module: Uses quantitative indicators to evaluate the enhancement effect of cerebral blood oxygenation signal processed by the fNIRS-CycleGAN network model.

Citation Information

Patent Citations

  • Brain data enhancement method and device based on generative artificial intelligence

    CN118216931A

Cited By

  • Unified conversion and analysis method and system for fault signals of sampling unit of electric energy meter

    CN121633974A

  • A method and device for detecting local cerebral tissue oxygen saturation by near-infrared

    CN122642901A