Self-adaptive threshold method for sample learning

The adaptive thresholding method based on sample learning detects distribution drift in real time and updates the threshold dynamically, solving the problem of sample distribution drift in industrial equipment fault diagnosis, improving diagnostic accuracy and stability, and is suitable for fault diagnosis of industrial equipment.

CN121743718APending Publication Date: 2026-03-27MCC5 GROUP SHANGHAI CORPORATION LIMITED
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-28
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing technologies struggle to capture real-time sample distribution drift in industrial equipment, leading to decreased fault diagnosis accuracy and potentially causing production accidents.

Method used

An adaptive thresholding method based on sample learning is adopted. Distribution drift is detected by kernel density estimation. The threshold is dynamically updated by combining weighted incremental learning and the isolated forest model. The sliding window and exponential weight decay mechanism are integrated to construct an adaptive threshold update mechanism.

Benefits of technology

It achieves real-time adaptation to sample distribution drift, improves the long-term reliability and anti-interference capability of fault diagnosis, and meets the real-time requirements of industrial sites.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121743718A_ABST
    Figure CN121743718A_ABST
Patent Text Reader

Abstract

The invention discloses a self-adaptive threshold value method for sample learning. The method comprises five steps of sample feature extraction and distribution characterization, sample distribution drift detection, threshold value correction based on weighted incremental learning, abnormal sample filtering mechanism and threshold value update triggering and execution. Equipment operation data are collected in real time, features are extracted, kernel density estimation is combined with JS distance to detect sample distribution drift, a sliding window and an exponential weight attenuation mechanism are used for achieving sample weighting, a dynamic threshold value is calculated based on a confidence interval of a weighted regression model, and meanwhile abnormal samples are filtered through an isolated forest. According to the method, the dynamic change of sample distribution in an industrial scene can be adapted in real time, the long-term accuracy and robustness of fault diagnosis are improved, the engineering realizability is high, and the real-time requirement of the industrial scene is met.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing of industrial equipment fault diagnosis, and more particularly to a sample learning adaptive threshold method. BACKGROUND

[0002] In the field of industrial equipment fault diagnosis, threshold setting is the core link to distinguish between "normal state" and "fault state". In the prior art, the threshold is determined by the experience threshold method, the data-driven static threshold method and the simple dynamic threshold method. However, sample distribution drift exists universally in industrial field, and traditional methods are difficult to capture such changes in real time, resulting in a decline in diagnosis accuracy with the running time of the equipment, and even causing production accidents in serious cases. Therefore, there is an urgent need for a threshold updating method that can dynamically adapt to sample distribution drift to improve the long-term reliability of fault diagnosis. SUMMARY

[0003] In view of the problems existing in the prior art, the purpose of the present application is to provide a sample learning adaptive threshold method which can dynamically respond to sample distribution changes, has strong anti-interference ability and is easy to implement in engineering.

[0004] The present application adopts the following technical solutions:

[0005] The present application discloses a sample learning adaptive threshold method, comprising the following steps:

[0006] Step (1), sample feature extraction and distribution representation

[0007] Real-time acquisition of equipment operation data, extraction of high-dimensional feature vectors of samples through feature engineering, definition of sample distribution feature indexes as quantitative indexes for measuring sample distribution;

[0008] Step (2), sample distribution drift detection

[0009] A drift detection module is constructed, the distribution difference D (JS distance) between the current sample window and the reference window is calculated by kernel density estimation (KDE), a drift threshold D0 is set, when D>D0, it is determined that sample distribution drift occurs, and the threshold updating process is triggered;

[0010] Step (3), threshold correction based on weighted incremental learning

[0011] A sliding window containing N latest samples is maintained, and the weight of the sample in the window decays over time; based on the weighted samples in the window, the dynamic threshold T is calculated by a regression model combined with a weighted confidence interval;

[0012] Step (4), abnormal sample filtering mechanism

[0013] The isolated forest model composed of multiple decision trees is constructed, the isolated score of each sample is calculated, the novelty score threshold S0 is set, when the sample score S is greater than S0, the sample is marked as an abnormal sample and the weight of the sample in the threshold calculation is reduced;

[0014] Step (5), threshold updating triggering and execution

[0015] When the distribution drift is determined by the drift detection module, the step (3) is executed to calculate the new threshold If , the threshold is updated as , otherwise, the original threshold is kept to avoid frequent fluctuations.

[0016] In an embodiment of the present application, in step (1), the equipment operation data includes vibration, temperature, current data; the feature engineering extracts high-dimensional feature vectors by using time domain statistics and frequency domain peak value; and the sample distribution feature index includes first-order statistics (mean μ, variance σ²), second-order statistics (feature covariance matrix), and information entropy.

[0017] In an embodiment of the present application, in step (2), for a given sample set , the kernel density estimation value at the point is:

[0018]

[0019] Where N is the sample number, h is the bandwidth (controls the smoothness of the kernel function), is the Gaussian kernel function, , by placing a kernel function at each sample point and performing a weighted sum, the probability density estimation of the sample is obtained.

[0020] In an embodiment of the present application, in step (2), the probability density estimation of the reference window sample is set as , the probability density estimation of the current sample window is , and the JS divergence is:

[0021]

[0022] Where , is the probability density estimation of the reference window sample, is the probability density estimation of the current sample window, is divergence, the JS distance is used to measure the degree of distribution difference, and the value range is [0, 1], 0 indicates that the two distributions are completely the same, and 1 indicates that they are completely different.

[0023] In an embodiment of the present application, the drift threshold D0 is preset according to the device type, and D0=0.15 for mechanical devices.

[0024] In an embodiment of the present application, in step (3), the calculation formula of the sample weight is:

[0025]

[0026] wherein is a decay coefficient (0 ), is the sample collection time, is the current time.

[0027] In an embodiment of the present application, in step (3), the regression model is: wherein is the noise;

[0028] The weighted residual sum of squares is minimized

[0029] The weight is solved .

[0030] The weighted confidence interval is a 99% confidence interval, and the calculation formula is:

[0031]

[0032] wherein is the quantile of the standard normal distribution, is the number of model parameters, is the mean of the feature vector, is the predicted value, and the upper limit of the confidence interval is taken as the dynamic threshold T to adapt to the change range of the device operating parameter.

[0033] In an embodiment of the present application, in step (4), the calculation formula of the isolation score is:

[0034] wherein is the expected value of the path length of the sample on each decision tree, is a constant related to the number of samples . The closer the isolation score is to 1, the more likely the sample is an abnormal value.

[0035] The weight correction formula of the abnormal sample is: .

[0036] In an embodiment of the present application, in step (3), the number of samples N of the sliding window is set according to the device sampling frequency;

[0037] In step (5), the minimum update step ΔT is set according to the diagnostic accuracy requirement.

[0038] Advantages

[0039] Real-time adaptive sample distribution drift: accurate detection of sample distribution drift is realized through kernel density estimation and JS distance, combined with weighted incremental learning to dynamically update the threshold, suitable for fault diagnosis scenarios throughout the life cycle of the equipment.

[0040] Sample importance is clearly distinguished: a "sliding window + exponential weight decay" mechanism is used, which allows new samples to have a higher weight in threshold calculation, ensuring that the threshold can quickly respond to the latest operating condition changes, while preserving the reference value of historical samples, balancing real-time and stability.

[0041] Strong anti-outlier interference capability: an anomaly sample filtering mechanism is constructed by integrating the Isolation Forest model, which identifies and reduces the weight of abnormal samples through novelty score, avoiding threshold deviation caused by noise and improving the reliability of threshold calculation.

[0042] Strong engineering realizability: the algorithm has low complexity, and the sliding window and weighted calculation can be run in real time on edge devices without full-sample retraining, with an update delay of ≤50ms, fully meeting the real-time requirements of industrial sites. BRIEF DESCRIPTION OF DRAWINGS

[0043] Figure 1 An embodiment of the present application is a flowchart. DETAILED DESCRIPTION

[0044] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application is further described in detail below in combination with the drawings and examples. It should be understood that the specific examples described herein are only used to explain the present application and do not limit the present application.

[0045] As shown in the figure, the present application discloses an adaptive threshold method for sample learning, comprising the following steps:

[0046] Step (1), sample feature extraction and distribution representation

[0047] Real-time acquisition of equipment operation data (vibration, temperature, current), extraction of high-dimensional feature vectors of samples through feature engineering (time domain statistics, frequency domain peak value);

[0048] Define sample distribution feature indicators, including: first-order statistics (mean μ, variance σ²), second-order statistics (feature covariance matrix), information entropy (discrete degree of feature distribution), as quantitative indicators for measuring sample distribution.

[0049] Step (2), sample distribution drift detection

[0050] The drift detection module is constructed, and the kernel density estimation (KDE) is used to calculate the distribution difference D (JS distance) between the current sample window and the reference window (initial training set or last stable window);

[0051] For a given sample set , the kernel density estimation value at point

[0052] ,

[0053] where N is the number of samples, h is the bandwidth (controls the smoothness of the kernel function), is a Gaussian kernel function, ). By placing a kernel function at each sample point and performing a weighted sum, the probability density estimate of the sample is obtained.

[0054] Let the probability density estimate of the reference window sample be , and the probability density estimate of the current sample window be , and the JS divergence

[0055] ,

[0056] where . JS distance is used to measure the degree of distribution difference, and the value range is [0, 1], 0 means that the two distributions are completely the same, and 1 means that they are completely different.

[0057] Set the drift threshold (predefined according to device type, such as mechanical device ), when , it is determined that sample distribution drift occurs, and the threshold updating process is triggered.

[0058] Step (3), threshold correction based on weighted incremental learning

[0059] Sliding window and weight decay mechanism:

[0060] Maintain a sliding window containing N latest samples (N is set according to the sampling frequency of the device), and the weight of the sample in the window decays over time:

[0061] The weight , where is the decay coefficient ( ), is the sample collection time, is the current time. New sample weight is higher, which enhances the adaptability to the latest distribution.

[0062] Threshold calculation model:

[0063] ​Based on the weighted samples within the window, the dynamic threshold T is calculated by:

[0064] The regression model is where is the noise. By minimizing the weighted residual sum of squares

[0065]

[0066] The regression model based on the weighted samples is obtained by solving using matrix derivative method.

[0067] Based on the regression model, the confidence interval (99% confidence interval) of the weighted feature is calculated. For the predicted value , its confidence interval is:

[0068]

[0069] where is the quantile of the standard normal distribution (corresponding to 99% confidence level, is the number of model parameters, is the mean of the feature vector. The upper limit of the confidence interval is taken as the dynamic threshold T to adapt to the range of device operating parameters.

[0070] Step (4), anomaly sample filtering mechanism

[0071] Synchronously executed with threshold calculation, an isolated forest model composed of multiple decision trees is constructed. For each sample its path length on each decision tree is calculated , and the sample's isolation score:

[0072]

[0073] where is the expected value of the path length, is a constant related to the number of samples . The closer the isolation score is to 1, the more likely the sample is an outlier.

[0074] Set the novelty score threshold (determined by experiment), when the sample score , it is marked as an abnormal sample and its weight in threshold calculation is reduced , reducing the impact of abnormal samples on the threshold.

[0075] Step (5), threshold update trigger and execution

[0076] When the drift detection module determines that the distribution drifts (D>D0), automatically execute step (3) to calculate the new threshold ;

[0077] If ( is the minimum update step, set according to the diagnostic accuracy requirement), the update threshold is , otherwise keep the original threshold (avoid frequent fluctuations).

[0078] This embodiment takes the fault diagnosis of mechanical industrial equipment (such as motors) as an example to illustrate the specific implementation process of the present application:

[0079] 1. Sample feature extraction and distribution representation

[0080] Real-time acquisition of vibration acceleration (sampling frequency 1000Hz), stator temperature (sampling interval 1s), working current (sampling interval 1s) data during motor operation. Through time domain statistics (mean, variance, peak value) and frequency domain peak value analysis, 12-dimensional high-dimensional feature vectors are extracted.

[0081] Calculate the first-order statistics (mean μ, variance σ²) of the feature vector, the second-order statistics (12x12-dimensional feature covariance matrix), and the information entropy as the quantitative indicators of the sample distribution.

[0082] 2. Sample distribution drift detection

[0083] Set the reference window as the initial training set (containing 10000 normal operation samples), and the current sample window as the sliding window (N=1000 latest samples). The probability density distribution of the two windows is calculated using kernel density estimation, where the bandwidth h=0.5 (determined by cross-validation).

[0084] Set the drift threshold D0=0.15 for mechanical equipment, and calculate the distribution difference D between the current window and the reference window using JS divergence. When D=0.18>0.15, it is determined that sample distribution drift has occurred, triggering threshold update.

[0085] 3. Threshold correction based on weighted incremental learning

[0086] Set the sample number of the sliding window N=1000, and the decay coefficient λ=0.01. For samples in the window, calculate the weight according to the collection time, for example, the weight of samples collected 10s ago is ≈0.9048, and the weight of samples collected 1s ago is ≈0.9900.

[0087] Construct a linear regression model , solve the model parameters (12-dimensional weight vector) by minimizing the weighted residual sum of squares. Calculate the 99% confidence interval of the weighted features, where = 2.58, number of model parameters p = 12, eigenvector mean = 2.58, number of model parameters p = 12, eigenvector mean = 8.6.

[0088] 4. Abnormal sample filtering mechanism

[0089] An isolation forest model containing 100 decision trees is constructed, and the maximum depth of the decision tree is set to 8. For the 1000 samples in the current window, the isolation score of each sample is calculated, and the novelty score threshold S0=0.85 is set. Among them, 12 samples have an isolation score S>0.85, which are marked as abnormal samples, and the weight correction is 0.1 times the original weight.

[0090] 5. Threshold update trigger and execution

[0091] Set the minimum update step size ΔT=0.05, and the original threshold = 8.4. Since |8.6-8.4|=0.2>0.05, the threshold is updated to 8.6, and the threshold adaptive update is completed.

[0092] In this embodiment, the dynamic adaptive adjustment of the motor fault diagnosis threshold is realized through the above steps. Through testing, the fault diagnosis accuracy of this method remains above 98% within 12 months of equipment operation, which is much higher than the traditional static threshold method (the accuracy decreases to 82% after 12 months), and the update delay is stable at 35ms, meeting the real-time requirements of industrial sites.

[0093] The above describes only the preferred specific embodiments of the present application; however, the protection scope of the present application is not limited thereto. Any skilled person in the art, according to the technical solution and improvement concept of the present application, makes equivalent replacement or change within the technical range disclosed by the present application, which should be covered within the protection scope of the present application.

Claims

1. An adaptive thresholding method for sample learning, characterized in that: Includes the following steps: Step (1): Sample feature extraction and distribution characterization Real-time acquisition of equipment operation data; extraction of high-dimensional feature vectors of samples through feature engineering; definition of sample distribution feature index as a quantitative indicator to measure sample distribution; Step (2) Sample distribution drift detection A drift detection module is constructed, which uses kernel density estimation to calculate the distribution difference D between the current sample window and the reference window; a drift threshold D0 is set, and when D > D0, it is determined that sample distribution drift has occurred, triggering the threshold update process; Step (3): Threshold correction based on weighted incremental learning Maintain a sliding window containing N latest samples, where the weights of samples within the window decay over time; calculate a dynamic threshold T based on the weighted samples within the window using a regression model combined with weighted confidence intervals. Step (4), Abnormal Sample Filtering Mechanism Construct an isolated forest model consisting of multiple decision trees, calculate the isolation score of each sample, set a novelty score threshold S0, and mark a sample as an anomalous sample when the sample score S > S0 and reduce its weight in the threshold calculation. Step (5): Threshold update triggering and execution When the drift detection module determines that there is a distribution drift, step (3) is executed to calculate the new threshold. ;like Then the updated threshold is Otherwise, keep the original threshold.

2. The adaptive thresholding method for sample learning according to claim 1, characterized in that: In step (1), the equipment operation data includes vibration, temperature, and current data; the feature engineering uses time-domain statistics and frequency-domain peak values ​​to extract high-dimensional feature vectors; the sample distribution feature indicators include first-order statistics, second-order statistics, and information entropy.

3. The adaptive thresholding method for sample learning according to claim 1, characterized in that: In step (2), for a given sample set At point The kernel density estimate at that location is: , Where N is the number of samples and h is the bandwidth. For Gaussian kernel function, The probability density estimate of a sample is obtained by placing a kernel function on each sample point and summing them in weights.

4. The adaptive thresholding method for sample learning according to claim 3, characterized in that: In step (2), let the probability density estimate of the reference window sample be... The probability density estimate of the current sample window is: The JS divergence is: , in , For probability density estimation of the reference window sample, For the probability density estimation of the current sample window, for Divergence.

5. The adaptive thresholding method for sample learning according to claim 4, characterized in that: The drift threshold D0 is preset according to the equipment type; for mechanical equipment, D0=0.

15.

6. The adaptive thresholding method for sample learning according to claim 1, characterized in that: In step (3), the formula for calculating the sample weight is: , in The attenuation coefficient ( ), For sample collection time, This is the current time.

7. The adaptive thresholding method for sample learning according to claim 1, characterized in that: In step (3), the regression model is: ,in For noise; By minimizing the weighted sum of squared residuals , Solving for weights ; The weighted confidence interval is the 99% confidence interval, and its calculation formula is as follows: , in The quantiles of the standard normal distribution The number of model parameters. The mean of the eigenvectors, The upper limit of the confidence interval is taken as the dynamic threshold T for the predicted value.

8. The adaptive thresholding method for sample learning according to claim 1, characterized in that: In step (4), the formula for calculating the isolated fraction is: , in Let be the expected value of the path length of the sample on each decision tree. To the size of the sample The relevant constants; the weight correction formula for the outlier samples is: .

9. The adaptive thresholding method for sample learning according to claim 1, characterized in that: In step (3), the number of samples N in the sliding window is set according to the device sampling frequency; In step (5), the minimum update step size ΔT is set according to the diagnostic accuracy requirements.

Citation Information

Patent Citations

  • Adaptive calculation method for threshold value of ship system equipment

    CN113158448A