Machine learning univariate signal-to-noise ratio evaluation method and system
By employing machine learning and pattern recognition technologies, an automatic signal-to-noise separation framework is constructed, which solves the problems of accuracy and adaptability of univariate signal-to-noise ratio (SNR) assessment in complex environments. This framework achieves high-precision and robust SNR assessment, applicable to fields such as industrial equipment, biomedicine, and financial time series analysis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-24
- Publication Date
- 2026-03-13
AI Technical Summary
Existing technologies struggle to adapt to non-stationary noise interference in complex dynamic environments when evaluating univariate signal-to-noise ratios. They also lack the ability to identify potential patterns in signals, leading to significant biases in evaluation results. In particular, accuracy drops significantly under low signal-to-noise ratio conditions. Furthermore, they lack correlation modeling with downstream machine learning tasks, affecting the reliability and interpretability of the models.
Employing machine learning and pattern recognition mechanisms, this paper constructs modules for signal input, feature extraction, pattern recognition, noise estimation, and signal-to-noise ratio (SNR) calculation. By using multi-scale feature fusion and lightweight convolutional neural networks, it automatically separates signals and noise, and combines robust statistical methods for noise estimation, thereby achieving high-precision quantitative evaluation of the SNR.
It significantly improves the accuracy and adaptability of signal-to-noise ratio (SNR) assessment, maintaining a noise level estimation error of less than 15% in low SNR environments, meeting real-time assessment requirements, and possessing long-term stability and the ability to adapt to changes in new signal modes.
Smart Images

Figure CN121659110A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of artificial intelligence technology, specifically relating to a machine learning univariate signal-to-noise ratio evaluation method and system. Background Technology
[0002] With the rapid development of artificial intelligence technology, machine learning is increasingly widely used in pattern recognition, data classification and predictive analysis. Its performance is highly dependent on the quality of input data, especially the relative strength of signal and noise in the data. The signal-to-noise ratio, as a core indicator for measuring data quality, directly affects the training stability and generalization ability of the model.
[0003] In practical applications, univariate data is widely used in systems such as sensor signals, time series monitoring, and biometric identification. Accurately evaluating the signal-to-noise ratio of univariate data has become a key prerequisite for improving the robustness of machine learning models.
[0004] For the evaluation of univariate signal-to-noise ratio, traditional methods are usually based on statistical power analysis or frequency domain decomposition, aiming to calculate the ratio by separating the effective components of the signal from random noise.
[0005] These methods are effective under idealized assumptions. The basic idea is to model the signal trend through prior knowledge or stationarity assumptions and treat the residual as noise.
[0006] However, when faced with real-world data that is non-stationary, non-Gaussian, or contains structural disturbances, such methods often struggle to accurately distinguish the boundary between signal and noise, leading to significant deviations in the evaluation results.
[0007] Existing technologies for univariate signal-to-noise ratio (SNR) evaluation in machine learning scenarios exhibit multiple limitations: First, they are highly dependent on prior signal features, making it difficult to adapt to diverse input patterns and lacking versatility and adaptability. Second, they fail to fully consider the local structural features of data during dynamic temporal changes, ignoring the masking effect of noise on key patterns. Third, traditional methods often employ linear assumptions to model signal components, failing to effectively address complex coupling relationships in nonlinear and non-stationary data environments. Finally, existing evaluation mechanisms lack correlation modeling with downstream machine learning task performance, leading to a disconnect between SNR metrics and actual model performance, making it difficult to guide feature selection and preprocessing optimization. These problems are particularly prominent in high-precision pattern recognition tasks, severely restricting the reliability and interpretability of model evaluation systems. Therefore, a context-aware univariate SNR evaluation method is urgently needed for machine learning applications. Summary of the Invention
[0008] The purpose of this invention is to overcome the shortcomings of existing technologies by providing a machine learning-based method and system for evaluating the signal-to-noise ratio (SNR) of a single variable signal, which can effectively solve the problems in the background technology. Existing technologies, when processing single-variable signals, generally rely on fixed thresholds or statistical assumption models to estimate noise, which is difficult to adapt to non-stationary noise interference in complex dynamic environments, resulting in significant deviations in SNR evaluation results. At the same time, traditional methods lack the ability to effectively identify potential patterns in signals and cannot distinguish between real signal fluctuations and noise disturbances, especially under low SNR conditions where evaluation accuracy drops significantly. This invention introduces machine learning and pattern recognition mechanisms to construct an evaluation framework that can adaptively learn signal features and accurately separate signals from noise, achieving high-precision and robust quantitative evaluation of the SNR of single-variable signals.
[0009] To achieve the above objectives, the present invention provides the following technical solution: On one hand, a machine learning univariate signal-to-noise ratio (SNR) evaluation system, comprising the following components: a signal input module for receiving the univariate time-series signal to be evaluated and preprocessing the signal to remove baseline drift and outliers; a feature extraction module for extracting multi-scale time-domain, frequency-domain, and time-frequency-domain features from the preprocessed signal to form an initial feature vector set; a pattern recognition module for performing local pattern discrimination on signal segments based on a trained classification model, identifying three basic patterns: trend changes, periodic fluctuations, and random disturbances; a noise estimation module for dynamically estimating the noise level and its statistical characteristics in non-signal-dominant regions by combining pattern recognition results with residual analysis methods; a SNR calculation module for calculating the SNR numerical sequence within a continuous time window based on the identified effective signal energy and estimated noise energy; a model training module for jointly optimizing and training the pattern recognition model and noise estimation parameters using a labeled sample dataset; and a data storage module for storing the original signal, intermediate features, pattern labels, noise estimates, and the final SNR output result; the modules interact and synchronize with each other via an internal data bus.
[0010] Preferably, the signal input module performs zero-mean normalization on the received univariate time series signal, with a normalization interval length of 128 sampling points and a sliding step size of 64. The normalization coefficient is dynamically adjusted according to the standard deviation of the signal within the current window to eliminate the influence of different signal amplitude ranges.
[0011] Preferably, the feature extraction module decomposes the signal to the 5th layer using Discrete Wavelet Transform (DWT), selects the db4 wavelet basis function, and extracts the energy, entropy value, and peak factor of the approximation coefficients and detail coefficients of each layer as time-frequency features. At the same time, it calculates time-domain features such as autocorrelation coefficient (lag=1 to lag=10), zero-crossing rate, and variance change rate within the sliding window, and obtains frequency-domain features such as the energy proportion of the main frequency component and spectral flatness through Fast Fourier Transform, forming an initial feature vector with a dimension of 32.
[0012] Furthermore, the feature extraction module introduces a sliding window overlap mechanism during the feature vector generation process, with a window overlap rate of 50%, to ensure continuity and correlation between adjacent feature vectors and improve the stability of subsequent pattern recognition.
[0013] In addition, the feature extraction module performs principal component analysis to reduce the dimensionality of the high-dimensional feature vectors, retaining principal components with a cumulative contribution rate of not less than 95%, compressing the feature dimension to 16 dimensions, reducing the computational complexity of the subsequent model and suppressing redundant information interference.
[0014] Preferably, the pattern recognition module uses a lightweight convolutional neural network (CNN) as the core classifier. The network structure includes three one-dimensional convolutional layers with kernel sizes of 5, 3, and 3, and the number of kernels are 16, 32, and 64, respectively. Each layer is followed by a batch normalization layer and a ReLU activation function. Finally, the feature representation is output through a global average pooling layer and connected to two fully connected layers to complete the three-class classification task.
[0015] Furthermore, the pattern recognition module employs a weighted cross-entropy loss function during the training phase, assigning a 1.5-fold class weight to samples with periodic fluctuations to alleviate the classification bias caused by an excessively high proportion of trend-changing samples in the training data.
[0016] In addition, the pattern recognition module introduces a sliding prediction fusion strategy during the inference stage, which makes a majority vote decision on the classification results of five consecutive overlapping windows, thereby improving the noise resistance and consistency of pattern discrimination.
[0017] Preferably, the noise estimation module performs noise parameter estimation only on signal segments that are determined by the pattern recognition module to be of the "random disturbance" category, so as to avoid the contamination of noise statistics by trend or periodic components.
[0018] Furthermore, the noise estimation module uses an improved median absolute deviation (MAD) method to estimate the noise standard deviation. Its calculation is based on the local residual sequence. The residuals are obtained by separating the trend term from the original signal through a moving average filter (window size k=7). The MAD estimate is multiplied by a constant 1.4826 as an unbiased estimate of the Gaussian noise standard deviation.
[0019] In addition, the noise estimation module also calculates the decay time constant of the autocorrelation function of the noise to determine whether the noise has colored noise characteristics, and dynamically selects a white noise model or a first-order autoregressive model (AR1) for noise modeling accordingly.
[0020] Preferably, the signal-to-noise ratio calculation module defines signal energy as the integral mean of the square of the signal amplitude within the "trend change" and "periodic fluctuation" category intervals, and noise energy as the moving average of the square of the noise standard deviation within the "random disturbance" category interval. The signal-to-noise ratio is expressed in decibels and the calculation formula is 10×log10(signal energy / noise energy).
[0021] Furthermore, the signal-to-noise ratio calculation module uses an exponentially weighted moving average (EWMA) to smooth the continuous signal-to-noise ratio output, with a smoothing coefficient α=0.2, in order to reduce the signal-to-noise ratio jump caused by short-term misclassification.
[0022] In addition, the signal-to-noise ratio calculation module supports two modes: outputting point-by-point signal-to-noise ratio trajectory and segmented average signal-to-noise ratio. Users can choose the output granularity according to the application scenario.
[0023] Preferably, the model training module adopts a supervised learning paradigm, and the training dataset consists of manually labeled signal segments. Each sample contains the original signal, feature vector, and corresponding real pattern label (trend / period / noise). The label is generated through dual verification by expert rules and spectrum analysis.
[0024] Furthermore, the model training module implements k-fold cross-validation (k=5) during training, monitors the F1-score on the validation set to prevent overfitting, and automatically terminates training when the maximum number of training epochs (epoch=200) is reached or the validation loss does not decrease for 10 consecutive epochs.
[0025] In addition, the model training module supports an online incremental learning mode. When more than 50 new labeled data are accumulated, the model fine-tuning process is triggered, and the network weights are updated with a smaller learning rate to maintain the model's adaptability to new signal patterns.
[0026] On the other hand, a machine learning univariate signal-to-noise ratio (SNR) evaluation method is provided, comprising the following steps: Step S110, receiving the univariate time series signal to be evaluated and performing denoising, detrending, and normalization preprocessing operations on the signal; Step S120, extracting multi-scale time-domain, frequency-domain, and time-frequency-domain features from the preprocessed signal to construct a feature vector sequence; Step S130, inputting the feature vectors into a trained pattern recognition model to classify each signal window as having trend changes, periodic fluctuations, or random disturbances; Step S140, filtering out pure noise segments based on the pattern recognition results and estimating the noise energy and its distribution parameters using residual analysis and robust statistical methods; Step S150, dividing the signal effective region and noise region according to the pattern classification results, calculating the signal energy and noise energy respectively, and then solving for the time-resolved SNR value; Step S160, smoothing and formatting the SNR output sequence to generate the final evaluation result and storing or transmitting it.
[0027] In step S110, the preprocessing includes applying a second-order Savitzky-Golay filter (window length 21 points) to remove high-frequency noise and low-frequency drift, followed by Z-score normalization of the signal, with the normalization parameters dynamically calculated based on the data within the current analysis window.
[0028] In step S120, feature extraction covers time-domain statistics (mean, standard deviation, skewness, kurtosis, zero-crossing rate), frequency-domain indices (dominant frequency energy ratio, spectral centroid, frequency band energy ratio), and time-frequency wavelet energy moments. All features are aligned on a unified time scale and form a joint feature vector.
[0029] In step S130, the pattern recognition model is a pre-trained lightweight convolutional neural network, whose output is a three-class probability distribution. The final classification result is determined by a dual mechanism of setting a threshold (>0.6) and context consistency verification.
[0030] In step S140, noise estimation prioritizes the "random perturbation" segment with a continuous length of no less than 32 points in the pattern recognition results, excludes regions with incomplete boundaries, and uses the MAD combined with AR model residual analysis method to obtain robust noise variance estimation.
[0031] In step S150, the signal energy calculation excludes the intervals that have been identified as noise, and integrates the signal power only in the confirmed trend rising / falling segments and the neighborhood of the periodic peak, to ensure that the signal energy assessment is not contaminated by noise.
[0032] In step S160, the signal-to-noise ratio (SNR) result is output in the form of a timestamp sequence, supporting both JSON and CSV formats. At the same time, a visual SNR change curve and a pattern classification heatmap are generated to assist in the analysis.
[0033] Compared with the prior art, the present invention has the following beneficial effects: By introducing a machine learning-based pattern recognition mechanism, the automatic separation of trend, periodic and noise components in univariate signals is achieved, overcoming the limitations of traditional methods that rely on prior assumptions and fixed thresholds, and significantly improving the accuracy and adaptability of signal-to-noise ratio evaluation.
[0034] By employing multi-scale feature fusion and a lightweight CNN classifier, the model complexity is controlled while ensuring classification accuracy, meeting real-time evaluation requirements, and achieving a model inference latency of less than 5ms (at a sampling rate of 1kHz).
[0035] The noise estimation module combines pattern recognition results with robust statistical methods, and can maintain a noise level estimation error of less than 15% even in low signal-to-noise ratio (<5dB) environments, which is better than traditional AR models and wavelet thresholding methods.
[0036] The system supports online incremental learning and model updates, enabling it to continuously adapt to new signal patterns and changes in noise environments, and possesses long-term operational stability and evolutionary capabilities.
[0037] The signal-to-noise ratio output has time resolution and can generate dynamic signal-to-noise ratio trajectories, providing fine-grained data support for subsequent signal quality monitoring, fault early warning, and adaptive filtering. Attached Figure Description
[0038] Figure 1 This is a schematic diagram of the overall technical architecture of a machine learning univariate signal-to-noise ratio evaluation method and system proposed in this invention. Detailed Implementation
[0039] To further illustrate the technical means and effects of the present invention in achieving its intended purpose, the following detailed description of the specific implementation methods, structures, features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided below.
[0040] Example 1 Please refer to Figure 1 This embodiment uses the single-axis accelerometer signal collected by an industrial equipment vibration monitoring system as the evaluation object to construct a complete machine learning univariate signal-to-noise ratio (SNR) evaluation process. In this scenario, the equipment generates vibration signals with periodic impact characteristics during normal operation. In the early stages of a fault, these signals exhibit weak trend changes superimposed on background noise. Environmental interference (such as the start-up and shutdown of nearby machinery) introduces non-stationary random disturbances, making it difficult for traditional SNR evaluation methods to accurately characterize the dynamics of signal quality. This invention introduces a pattern recognition mechanism based on a lightweight convolutional neural network, combined with multi-scale feature extraction and context-aware noise estimation strategies, to achieve high-precision, time-resolved evaluation of the SNR of vibration signals under complex operating conditions.
[0041] After system startup, the signal input module receives the raw univariate time-series signal from the accelerometer, with a sampling frequency set to 2000Hz to ensure coverage of the equipment's main vibration frequency band (0-800Hz). The received signal first undergoes baseline drift correction and outlier suppression. Specifically, a second-order Savitzky-Golay filter is used to smooth and denoise the raw signal, with a filtering window length of 21 sampling points corresponding to a time span of 10.5 milliseconds. This window length has been experimentally verified to effectively suppress high-frequency measurement noise while preserving the true impact characteristics. After filtering, zero-mean normalization is performed on the signal, with a normalization interval length of 128 sampling points (64 milliseconds) and a sliding step size of 64 points (32 milliseconds), forming an overlap analysis window. The normalization coefficient is dynamically calculated from the standard deviation of the signal within the current window, i.e., subtracting the mean from all sampled values within the window and then dividing by the standard deviation, thereby eliminating amplitude differences caused by different equipment or installation locations, ensuring cross-device consistency for subsequent feature extraction and model inference.
[0042] The preprocessed signal enters the feature extraction module, which performs multi-scale, multi-domain joint feature construction. First, a Discrete Wavelet Transform (DWT) is applied to each 128-point window signal, using the db4 wavelet basis function, decomposing to the 5th level to obtain the 5th level detail coefficients (D1-D5) and the 5th level approximation coefficients (A5). D1 corresponds to the highest frequency band (1000-2000Hz), D5 corresponds to the low frequency band (62.5-125Hz), and A5 represents the extremely low frequency trend components. For each layer of wavelet coefficients, its energy (sum of squared coefficients) and entropy (Shannon entropy, calculated using the formula...) are calculated. ,in First, 18 time-frequency domain features were extracted, including the probability distribution of the normalized coefficient amplitude and the peak factor (the ratio of the absolute maximum value to the root mean square value). Second, in the time domain, the autocorrelation coefficient within the sliding window was calculated, with lag orders from 1 to 10, forming a 10-dimensional vector. Simultaneously, four statistical features were extracted: zero-crossing rate (the number of times the signal crosses zeros per unit time), variance change rate (the ratio of the variance of the current window to the variance of the previous window), skewness (measuring distribution asymmetry), and kurtosis (measuring the sharpness of the distribution). Finally, in the frequency domain, a Fast Fourier Transform (FFT) was performed on the signal to obtain the amplitude spectrum. The proportion of energy of the dominant frequency component (the frequency point with the highest energy) to the total energy was calculated as an indicator of periodicity intensity. Spectral flatness (the ratio of geometric mean power to arithmetic mean power) was calculated to reflect the degree of spectral concentration. The signal was divided into three frequency bands (0-200Hz, 200-500Hz, and 500-800Hz), and the energy proportion of each band was calculated, forming five frequency domain features. The above three types of features total 18+14+5=37 dimensions, which are initially integrated to form an initial feature vector set.
[0043] To improve feature stability and reduce redundancy, the feature extraction module further introduces a sliding window overlap mechanism, with an overlap rate of 50% between adjacent windows (i.e., a step size of 64 points). This ensures the temporal continuity and correlation of adjacent feature vectors, avoiding feature jumps caused by window truncation. Subsequently, principal component analysis (PCA) is performed to reduce the dimensionality of the high-dimensional feature vectors. Specifically, feature data from the past week is collected to form a training set, the covariance matrix is calculated, and its eigenvalues and eigenvectors are solved. The eigenvalues are sorted in descending order, and the top 16 principal components with a cumulative contribution rate of 95% are selected as projection directions. The 16-dimensional feature vectors after dimensionality reduction are encapsulated into a standard data package containing fields such as timestamp, window index, and eigenvalue array, and transmitted to the pattern recognition module via the internal data bus.
[0044] The pattern recognition module uses a pre-trained lightweight one-dimensional convolutional neural network (CNN) to classify the signal window corresponding to each 16-dimensional feature vector, outputting one of three labels: "trend change," "periodic fluctuation," or "random perturbation." This CNN model structure contains three one-dimensional convolutional layers: the first layer has a kernel size of 5, 16 kernels, and a stride of 1, with the input being a 16-dimensional feature sequence (considered as a time series of length 1); the second layer has a kernel size of 3 and 32 kernels; and the third layer has a kernel size of 3 and 64 kernels. Each convolutional layer is followed by a batch normalization layer and a ReLU activation function to accelerate training convergence and mitigate internal covariate bias. The convolutional layers are then followed by a global average pooling layer, compressing the spatial dimension to 1 and outputting a 64-dimensional feature vector. This vector is then processed by two fully connected layers: the first layer contains 128 neurons, and the second layer contains 3 neurons. Finally, the softmax function outputs three probability distributions. During the training phase, the model uses a cross-entropy loss function with class weights. Since "trend changes" account for 60% of the actual labeled data, while "periodic fluctuations" only account for 20%, in order to prevent the model from being biased towards the majority class, the "periodic fluctuations" class is given a weight of 1.5 times, and the other two classes are given a weight of 1.0.
[0045] During the inference phase, to improve classification robustness, the pattern recognition module implements a sliding prediction fusion strategy. Specifically, it uses majority voting to determine the classification results of five consecutive overlapping windows (a total of five feature vectors). For example, if more than three of the five windows are classified as "periodic fluctuations," the final label of the central window is determined to be "periodic fluctuations." This strategy effectively suppresses the impact of short-term noise or edge misjudgments on the overall pattern recognition. Furthermore, the classification results must pass a contextual consistency check: if a window is identified as a "trend change," the trend direction (upward or downward) of its adjacent windows must remain consistent; otherwise, a local re-evaluation mechanism is triggered, calling higher-resolution short-term features for supplementary discrimination.
[0046] The pattern recognition results are synchronously transmitted to the noise estimation module, which performs noise parameter estimation only on signal segments marked as "random perturbations" to avoid contamination of noise statistics by trend or periodic components. The specific screening criteria are: selecting "random perturbation" segments with a continuous length of no less than 32 sampling points (16 milliseconds), excluding incomplete regions located at signal boundaries or adjacent to mode switching points. For noise segments meeting the criteria, the trend term is first separated from the original preprocessed signal using a moving average filter (window size k=7) to obtain a residual sequence. This residual sequence is considered a clean noise sample and used to estimate the noise level.
[0047] The noise estimation module uses a modified median absolute deviation (MAD) method to calculate the noise standard deviation. MAD is defined as the median of the absolute values of the differences between the residual sequence and its median. For white noise that follows a normal distribution, the standard deviation is... can be Unbiased estimation is The constant 1.4826 serves as a theoretical correction factor, ensuring that the estimated value is unbiased under the Gaussian assumption. To further determine whether the noise exhibits colored noise characteristics, the module also calculates the autocorrelation function (ACF) of the noise residuals and fits a first-order autoregressive model (AR1): ,in The noise is treated as white noise. The ACF decay time constant τ (the time required for the autocorrelation coefficient to decrease to 1 / e) is calculated. If τ > 3 sampling periods, the noise is considered significantly correlated, and its statistical characteristics are described using the AR1 model; otherwise, it is treated as white noise. The noise energy is expressed in variance, i.e., the estimated variance. value.
[0048] The signal-to-noise ratio (SNR) calculation module divides the signal effective region and noise region based on the pattern recognition results, and calculates the signal energy and noise energy separately. Signal energy is defined as the integral mean of the squared signal amplitude within the "trend change" and "periodic fluctuation" category intervals. Specifically, all intervals identified as "random disturbances" are excluded, and the signal power is integrated only within the confirmed trend rising / falling segments and the neighborhood of the periodic peak (a window centered on the dominant frequency period ± 1 / 4 of a period). The integration is performed numerically using the trapezoidal rule, and the result is divided by the corresponding time period length to obtain the average signal power. Noise energy is taken from the σ² value output by the noise estimation module and averaged over the time axis (window length of 5 analysis periods) to smooth short-term fluctuations. The final SNR is expressed in decibels, and the calculation formula is: To reduce signal-to-noise ratio (SNR) jumps caused by pattern misclassification, the SNR calculation module applies an exponentially weighted moving average (EWMA) smoothing process to the continuous SNR output sequence, with a smoothing coefficient α = 0.2. This means the current output is a weighted sum of 0.2 times the current calculated value and 0.8 times the smoothed value from the previous time step. This process makes the SNR trajectory more stable, facilitating trend analysis.
[0049] The final evaluation results are encapsulated and output by the signal-to-noise ratio (SNR) calculation module, supporting two modes: point-by-point SNR trajectory, outputting timestamps and SNR values at a granularity of one data point every 32 milliseconds (corresponding to the analysis window step size); or segmented average SNR, averaging and summarizing by minute or event interval (such as a single device start-up and shutdown process). Output formats support JSON and CSV, including fields such as: timestamp, original signal segment identifier, mode classification sequence, noise estimate, SNR value, and confidence score. Simultaneously, the system generates a visual SNR change curve and a mode classification heatmap, with the horizontal axis representing time and the vertical axis representing mode category, and color intensity indicating classification confidence, assisting users in intuitively analyzing the signal quality evolution process.
[0050] The model training module is responsible for the joint optimization of the pattern recognition model and noise estimation parameters. The training dataset consists of manually labeled signal segments, with each sample containing 128 original signal points, a 16-dimensional feature vector, and the corresponding true pattern label. Label generation employs dual verification using expert rules and spectral analysis: experts determine the presence of trend or periodic components based on the device mechanism, while spectral analysis confirms the presence of significant peaks in the dominant frequency. The training process uses a supervised learning paradigm, implementing 5-fold cross-validation (k=5). Each training round uses 4 / 5 of the data, and validation uses 1 / 5. The F1-score on the validation set is monitored to evaluate model performance. The maximum number of training rounds is set to 200. If the validation loss does not decrease for 10 consecutive rounds, training is terminated early to prevent overfitting. The optimizer used is Adam, with an initial learning rate of 3e-4 and a batch size of 32.
[0051] To adapt to signal pattern drift caused by equipment aging or changes in operating conditions, the model training module supports online incremental learning. When more than 50 new labeled data points accumulate, the system automatically triggers a fine-tuning process: loading the current optimal model weights, updating the network parameters with a small learning rate (1e-5), and training for only 10 epochs to avoid catastrophic forgetting. After fine-tuning, if the new model improves the F1-score by more than 0.5% on the validation set, the online model is replaced; otherwise, the original model is retained. All modules in the system interact via a high-speed internal data bus. Data transmission uses fixed-length message frames containing the source module ID, target module ID, data type, timestamp, and payload to ensure synchronization and traceability. The data storage module persistently saves the original signal, intermediate features, pattern labels, noise estimates, and the final signal-to-noise ratio output. The default storage period is 30 days, and on-demand export is supported.
[0052] Example 2 This embodiment focuses on the field of biomedical signal processing, specifically applying it to the dynamic evaluation of the signal-to-noise ratio (SNR) of single-channel electroencephalogram (EEG) signals. Unlike industrial vibration signals, EEG signals exhibit stronger non-stationarity and individual variability. Their effective signals (such as event-related potentials (ERPs)) are often submerged in electromyographic interference, eye-movement artifacts, and environmental power frequency noise, and the signal morphology is highly dependent on the cognitive task and the subject's state. Traditional SNR methods fail to effectively distinguish between physiological signals and artifacts, leading to distorted evaluation results. This embodiment, based on the technical framework of this invention, reconstructs the feature extraction and pattern recognition process according to the characteristics of EEG signals, demonstrating the system's adaptability to univariate signals with different modalities.
[0053] In this embodiment, the signal input module receives a single-channel EEG signal with a sampling rate of 500Hz. The preprocessing procedure adds a power frequency notch filter (50Hz±2Hz) to the Savitzky-Golay filter, and uses a second-order IIR notch filter to eliminate power grid interference. The normalization window length is adjusted to 256 points (512 milliseconds) to match the typical ERP response time scale, and the sliding step size is 128 points (256 milliseconds). Normalization still uses the Z-score method, and the parameters are dynamically calculated.
[0054] In this embodiment, the feature extraction module reconstructs its multi-scale feature system. Since the EEG signal frequency band is concentrated in the 0.5-45Hz range, the wavelet decomposition is adjusted to use the sym5 wavelet basis, decomposing to the 6th layer. D1-D6 correspond to different EEG rhythms: D1 (250-500Hz) is used to capture high-frequency artifacts, D2 (125-250Hz) monitors electromyographic activity, and D3-D6 cover physiological rhythms such as δ (0.5-4Hz), θ (4-8Hz), α (8-13Hz), and β (13-30Hz). Energy, logarithmic energy entropy, and spectral kurtosis are extracted from the coefficients of each layer, resulting in 18 time-frequency features. The time-domain features include a new Hjorth parameter (activity, mobility, complexity) to quantify the dynamic complexity of the signal; simultaneously, Lempel-Ziv complexity and sample entropy are calculated to reflect the signal's regularity. In terms of frequency domain features, after FFT, five physiological frequency bands were divided, and the energy proportion, spectral edge frequency (SEF), and main frequency stability index (standard deviation of main frequency offset in continuous window) of each band were calculated. The total number of features reached 42 dimensions, which were reduced to 18-dimensional feature vectors retaining 95% of the cumulative contribution rate by PCA, slightly higher than that in Example 1, to adapt to the higher mode complexity of EEG.
[0055] In this embodiment, the pattern recognition module redefines the semantics of the three types of patterns: "trend changes" correspond to slow potential drift (such as sustained attention changes), "periodic fluctuations" correspond to rhythmic oscillations (such as alpha wave rhythms), and "random perturbations" encompass EMG artifacts, blinking interference, and environmental noise. Since artifacts in EEG often manifest as short-duration, high-amplitude bursts, the classification model introduces a sample weighting mechanism during the training phase: artifact segments with a duration of less than 200 milliseconds are assigned a 2.0 times loss weight to enhance the model's sensitivity to transient noise. The inference phase still employs a 5-window majority voting fusion strategy, but the voting window time span is adjusted to 256 milliseconds × 5 = 1.28 seconds to adapt to the longer cognitive timescale of EEG.
[0056] In this embodiment, the noise estimation module introduces a dual verification mechanism. First, noise is estimated only on segments identified as "random perturbations" with a duration ≥100 milliseconds. Second, after using sliding window MAD estimation, independent component analysis (ICA) residual verification is performed: a fast ICA decomposition is performed on the original signal, extracting the top three components with the largest variance. If the spatial projection of these components has a correlation of less than 0.3 with the known artifact template, the current segment is considered close to clean noise, and the MAD estimation result is accepted; otherwise, the segment is rejected, and the next candidate segment is tried. Noise modeling still uses the AR1 model to fit the residuals, but the AR order is adaptively selected (order 1-3), and the optimal order is determined according to the AIC criterion.
[0057] The signal-to-noise ratio (SNR) calculation module adjusts the range of signal energy calculation: signal power is integrated only during the task-induced ERP response period (e.g., 100-500 ms after stimulation), while the remaining "periodic fluctuation" segments are only used for pattern recognition and are not included in the signal energy calculation, thus avoiding misclassification of spontaneous EEG signals as valid signals. Noise energy is taken from the MAD estimate σ² value verified by ICA. The SNR calculation still uses decibels, but the smoothing process is changed to a Savitzky-Golay smoother (3rd-order polynomial, 15-point window), which is superior to EWMA in preserving non-stationary trends.
[0058] In this embodiment, the model training module employs a cross-subject transfer learning strategy. First, pre-training is performed using a publicly available EEG dataset (such as BCI Competition IV Dataset 2a), freezing the weights of the first two convolutional layers and fine-tuning only the later layers. Then, fine-tuning is performed using a small amount of labeled data (≥30 data points) from the current subjects, significantly reducing labeling costs. The incremental learning trigger condition is adjusted to start when 30 new data points are available; due to significant individual differences, more frequent updates are required.
[0059] This embodiment demonstrates the applicability of the present invention in the field of biosignals. Its technical differences lie in: feature system reconstruction to match physiological rhythms, redefinition of pattern semantics, introduction of ICA-assisted noise verification, limiting signal energy calculation to the task response period, and employing transfer learning to reduce annotation requirements. These adjustments constitute a substantial difference in technical approach from Embodiment 1, rather than a simple scenario replacement.
[0060] Example 3 This embodiment addresses the signal-to-noise ratio (SNR) assessment of high-frequency financial time series (such as stock price per second), resolving the challenge of separating market microstructure noise from true price trends. Financial signals lack the stationarity of physical sensors; their "signals" are institutionally driven trends or cyclical arbitrage patterns, while the "noise" originates from liquidity fluctuations, order book disturbances, and high-frequency trading delays. This embodiment reconstructs the data preprocessing and feature extraction logic, demonstrating the invention's ability to assess non-physical, highly dynamic economic signals.
[0061] The signal input module receives the latest stock transaction price sequence updated every second. Preprocessing removes the Savitzky-Golay filter (because smoothing is not suitable for financial signals) and replaces it with a logarithmic return transformation. To eliminate the influence of price levels, normalization uses a rolling window Z-score with a window length of 60 seconds (60 points) and a step size of 1 second, dynamically calculating the mean and standard deviation.
[0062] The feature extraction module was completely reconstructed: wavelet transform was abandoned (due to the strong non-stationarity of financial signals), and empirical mode decomposition (EMD) was used instead to decompose the return series into five intrinsic mode functions (IMFs) and a residual trend. A Hilbert transform was calculated for each IMF to obtain the instantaneous frequency and amplitude, and then the energy, mean frequency, and band entropy of each IMF were calculated. Time-domain features included: return skewness, kurtosis, ARCH effect test statistic, and imbalance of buying and selling pressure (derived based on transaction-by-transaction data). Frequency-domain features were calculated by estimating the power spectrum using the periodogram method, and calculating the spectral index (reflecting 1 / f noise characteristics), fractal dimension (Higuchi algorithm), and multi-scale entropy. The total number of features reached 38 dimensions, which were reduced to 15 dimensions using PCA.
[0063] The pattern recognition module redefines three patterns: "trend changes" correspond to unidirectional price movements lasting more than 5 seconds, "periodic fluctuations" correspond to second-level oscillations caused by algorithmic trading, and "random disturbances" are price jumps caused by instantaneous imbalances in the order book. The classification model replaces the CNN with an LSTM network due to the strong time dependence of financial signals. The LSTM consists of two layers, each with 64 units, followed by an attention mechanism and a fully connected layer. Time-series cross-validation is used during training to prevent future information leakage.
[0064] The noise estimation module estimates the market microstructure noise variance only during the "random disturbance" segment. It employs a Realized Kernel estimation method, weighted by the sum of squared returns across multiple time scales (1 second, 5 seconds, and 15 seconds) to suppress jump contamination. In the signal-to-noise ratio (SNR) calculation, signal energy is the integral of the squared returns during the trend segment, and noise energy is the variance of the kernel estimate. The output SNR is used to quantify market liquidity quality.
[0065] This embodiment differs fundamentally from the previous two in its technical approach: the signal type is an economic variable, preprocessing uses logarithmic returns, feature extraction is based on EMD and fractal analysis, the classifier is replaced with LSTM, and noise estimation uses econometric methods. This is a substantial technical variation generated based on the scalability description in the case materials, satisfying the ironclad rule of uniqueness of embodiments.
[0066] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.
Claims
1. A method for evaluating the signal-to-noise ratio in univariate machine learning, characterized in that, Includes the following steps: Receive the univariate time series signal to be evaluated and perform baseline drift removal and outlier suppression preprocessing on the signal; extract multi-scale time domain, frequency domain and time-frequency domain features from the preprocessed signal to construct an initial feature vector set; The initial feature vector set is input into the trained pattern recognition model to classify each signal window as a trend change, periodic fluctuation, or random disturbance. Based on the pattern recognition results, signal segments marked as random disturbances are selected, and noise energy and its distribution parameters are estimated on the segments by combining residual analysis and robust statistical methods. Based on the pattern classification results, the effective signal region and the noise region are divided. The signal energy in the trend change and periodic fluctuation range and the noise energy in the random disturbance range are calculated respectively, and then the time-resolved signal-to-noise ratio numerical sequence is obtained. The signal-to-noise ratio numerical sequence is smoothed and formatted for encapsulation to generate the final evaluation result, which is then stored or transmitted. The pattern recognition model is a lightweight convolutional neural network, whose structure includes a one-dimensional convolutional layer, a batch normalization layer, and a ReLU activation function connected in sequence. The noise energy estimate is calculated based on the median absolute deviation method using the local residual sequence, and multiplied by a correction factor to obtain an unbiased estimate of the noise standard deviation; the signal-to-noise ratio is expressed in decibels and is calculated based on the logarithm of the ratio of signal energy to noise energy. The feature vectors are generated using a sliding window overlap mechanism, with temporal overlap between adjacent windows. Principal component analysis is performed on the high-dimensional feature vectors to reduce their dimensionality, retaining principal components whose cumulative contribution rate is not lower than a preset threshold.
2. The method according to claim 1, characterized in that, The preprocessing operations include applying a Savitzky-Golay filter to remove high-frequency noise and low-frequency drift, and performing Z-score normalization on the signal. The normalization parameters are dynamically calculated based on the data within the current analysis window.
3. The method according to claim 1, characterized in that, The multi-scale feature extraction encompasses time-domain statistics, frequency-domain indices, and time-frequency-domain wavelet energy features. The time-domain statistics include autocorrelation coefficient, zero-crossing rate, variance change rate, skewness, and kurtosis. The frequency-domain indices include the energy proportion of the dominant frequency component, spectral flatness, and band energy ratio. The time-frequency-domain features decompose the signal to the 5th layer through discrete wavelet transform and extract the energy, entropy, and peak factor of the approximation coefficients and detail coefficients of each layer.
4. The method according to claim 1, characterized in that, The pattern recognition model employs a sliding prediction fusion strategy during the inference phase, using majority voting to determine the final pattern label for the central window based on the classification results of multiple overlapping windows.
5. The method according to claim 1, characterized in that, The noise estimation is performed only on signal segments that are identified as random disturbances and have a continuous length of no less than a preset number of sampling points, excluding incomplete regions located near signal boundaries or mode switching points.
6. The method according to claim 1, characterized in that, The residual sequence is obtained by separating the trend term from the original signal through moving average filtering, and the calculation of the median absolute deviation is based on the median of the absolute value of the difference between the residual sequence and its own median.
7. The method according to claim 1, characterized in that, The noise estimation module further calculates the decay time constant of the autocorrelation function of the noise residual, and dynamically selects either a white noise model or a first-order autoregressive model for noise modeling based on the time constant.
8. The method according to claim 1, characterized in that, The signal energy calculation excludes intervals identified as random disturbances and only performs integral averaging on the squared signal amplitude within the confirmed upward / downward trend segment and the neighborhood of the periodic peak.
9. The method according to claim 1, characterized in that, The signal-to-noise ratio numerical sequence is smoothed using an exponentially weighted moving average method with a fixed smoothing coefficient. The current output is a weighted combination of the current calculated value and the smoothed value from the previous time step.
10. A machine learning univariate signal-to-noise ratio evaluation system, characterized in that, include: The signal input module is used to receive the univariate time series signal to be evaluated and to preprocess the signal to remove baseline drift and outliers. The feature extraction module is used to extract multi-scale time-domain, frequency-domain, and time-frequency-domain features from the preprocessed signal to form an initial feature vector set. The pattern recognition module is used to perform local pattern discrimination on signal segments based on the trained classification model, identifying three basic patterns: trend changes, periodic fluctuations, and random disturbances. The noise estimation module is used to dynamically estimate the noise level and its statistical characteristics in non-signal-dominant regions by combining the pattern recognition results with residual analysis methods. The signal-to-noise ratio (SNR) calculation module is used to calculate the SNR numerical sequence under continuous time windows based on the identified effective signal energy and the estimated noise energy. The model training module is used to jointly optimize and train the pattern recognition model and noise estimation parameters using a labeled sample dataset. The data storage module stores the original signal, intermediate features, pattern labels, noise estimates, and the final signal-to-noise ratio (SNR) output. Modules interact and synchronize via an internal data bus. The pattern recognition module uses a lightweight convolutional neural network as its core classifier. The network structure includes three one-dimensional convolutional layers, each followed by a batch normalization layer and a ReLU activation function. The kernel sizes are 5, 3, and 3, and the number of kernels is 16, 32, and 64 respectively. The final layer uses a global average pooling layer and a fully connected layer to complete the three-class classification task. The noise estimation module uses the median absolute deviation method to estimate the noise standard deviation. Its calculation is based on a local residual sequence and multiplied by a constant 1.4826 as an unbiased estimate of the Gaussian noise standard deviation. The SNR calculation module defines signal energy as the integral mean of the squared signal amplitude within the trend-change and periodic fluctuation category intervals, and noise energy as the moving average of the squared noise standard deviation within the random disturbance category interval. The SNR is expressed in decibels. The feature extraction module performs principal component analysis to reduce the dimensionality of the high-dimensional feature vectors, retaining principal components whose cumulative contribution rate is not lower than a preset threshold.