Dynamic reference learning and adaptive threshold adjustment method
By employing dynamic benchmark learning and adaptive threshold adjustment methods, the accuracy and robustness issues of micro-motion recognition technology in real-world scenarios are addressed, achieving high-precision individual and environmental adaptation and enhancing the system's practicality and reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-03
- Publication Date
- 2026-03-27
AI Technical Summary
Existing micro-motion recognition technologies have low accuracy and poor robustness in real uncontrolled scenarios, and lack adaptability. They are prone to misjudgment, especially when there are changes in facial anatomy and physiological state, and have weak anti-interference ability.
By employing a dynamic benchmark learning and adaptive threshold adjustment method, a complete technical loop is formed through data buffer construction, robust benchmark calculation, benchmark dynamic updating and drift suppression, context-aware adaptive threshold generation, and abnormal state monitoring and system reset, adapting to individual differences and environmental changes.
It significantly improves the accuracy and robustness of micro-motion recognition, reducing the false positive rate to 10.5% and increasing the detection rate to 92.3%, while maintaining stable operation in complex environments and possessing strong self-recovery capabilities.
Smart Images

Figure CN121747166A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer vision and intelligent monitoring, and in particular to a dynamic benchmark learning and adaptive threshold adjustment method, which is applicable to scenarios that require real-time and accurate recognition of micro-movements, such as facial micro-movement recognition and fatigue driving monitoring. Background Technology
[0002] Micro-motion recognition technology has significant application value in scenarios such as human-computer interaction, fatigue driving monitoring, and clinical diagnosis. However, when the two existing technologies are deployed in real-world uncontrolled scenarios, their recognition accuracy, robustness, adaptability, and practicality still face serious challenges.
[0003] The first type of technology relies on a controlled laboratory environment, utilizing specialized high-precision acquisition equipment (such as high-speed infrared cameras, near-infrared spectrometers, and surface electromyography) to construct labeled datasets, and then training recognition models based on these datasets. While high recognition accuracy can be achieved under ideal conditions, its application boundaries are extremely limited.
[0004] Device dependence and scalability bottlenecks: Relying on dedicated sensing devices results in high system costs and complex deployment, making it difficult to achieve large-scale adoption on consumer-grade hardware platforms based on ordinary optical cameras.
[0005] The model has weak generalization ability: the data distribution collected under controlled laboratory conditions is significantly different from that in real-world scenarios (i.e., the "domain adaptation problem"). The model is easily affected by confounding factors such as changes in lighting, head posture shifts, and individual physiological differences, which leads to a sharp decline in its recognition performance in open environments.
[0006] To overcome the limitations of the aforementioned model-driven techniques, the second type of technique shifts to a decision mechanism based on fixed thresholds or static benchmarks. While it offers advantages in computational efficiency, its core drawback lies in its lack of dynamic adaptability.
[0007] Sensitive to individual differences: A uniform static threshold cannot be adapted to the unique facial anatomy, micro-behavioral habits and range of motion of different users, resulting in low accuracy of personalized recognition.
[0008] State drift: During long-term continuous monitoring tasks, the user's physiological state (such as eyelid opening and blinking frequency) will slowly drift over time. Static benchmarks cannot track this non-stationary change, causing the system's misjudgment rate to increase cumulatively.
[0009] It is not robust to transient noise: sudden changes in ambient light and momentary occlusion can cause abnormal fluctuations in the measured values of physiological parameters. Fixed thresholds lack the ability to identify and suppress such outliers, which can easily lead to false alarms. Summary of the Invention
[0010] To address the aforementioned technical challenges, this invention provides a highly practical dynamic benchmark learning and adaptive threshold adjustment method that balances high-precision recognition with strong environmental adaptability. It integrates dynamic benchmark learning, adaptive threshold adjustment, and intelligent drift suppression to support high-precision, robust, and highly adaptive recognition of micro-movements in real-world, complex application scenarios.
[0011] The technical solution of this invention is:
[0012] A dynamic benchmark learning and adaptive threshold adjustment method includes the following steps:
[0013] S1. Data buffer construction: This involves constructing a pre-defined set of physiological parameters {P = {p1, p2, ..., p...}. n Each parameter p in} (where n represents the number of physiological parameters) i Create independent data buffers; adaptively allocate buffer length L based on the noise sensitivity and frequency of change of each parameter. i The state machine monitors the buffer filling status, and when the filling ratio reaches a set threshold (such as when any buffer filling ratio reaches 100%), a baseline calculation ready signal is triggered.
[0014] S2. Robust baseline calculation: For the parameter buffer in the ready state, the weighted median algorithm and segmented calculation strategy are used to calculate the baseline value; and the improved Tukey fences algorithm is used to perform three-level outlier filtering and data correction to improve the stability of the baseline.
[0015] S3. Benchmark Dynamic Update and Drift Suppression: A weighted moving average algorithm with a dynamic learning rate α is used to continuously update the benchmark; benchmark drift caused by transient interference is suppressed through a long-short-term state separation mechanism and a conditional update protection strategy; and the statistical reliability of benchmark updates is ensured by using multi-frame consistency checks and confidence interval assessments.
[0016] S4. Context-aware adaptive threshold generation: Based on the type of facial micro-movements (such as opening the mouth, pursing the lips, blinking), preset dynamic proportional coefficients k_open, k_close, k_blink, etc.; combined with the dynamic baseline value Bi_i_current, a threshold calculation unit with a dynamic compensation mechanism is introduced to generate a detection threshold resistant to jumps; and the threshold matching accuracy is optimized by using individual feature profile updates and dual verification strategies.
[0017] S5. Abnormal State Monitoring and System Reset: Real-time calculation of the smooth deviation δ_smooth between the observed data and the current benchmark; hierarchical anomaly detection is achieved through a multi-level threshold system and a state accumulation counter; when an anomaly is confirmed, benchmark learning is frozen and a three-step reset process including buffer clearing, data reacquisition, and benchmark reconstruction is executed until the system recovers.
[0018] Furthermore, step S1 further includes:
[0019] S101, The parameter queue creation submodule allocates a contiguous memory block for each parameter through a dynamic memory allocation unit, and maintains an independent read / write pointer at the head of each queue.
[0020] S102. The queue isolation management unit establishes independent data access interfaces and mutex locks for each parameter queue to ensure the data integrity of multi-parameter parallel acquisition.
[0021] S103, the buffer length allocation submodule adaptively allocates the buffer length based on the analysis results of noise sensitivity and frequency of change by the parameter characteristic analysis unit;
[0022] S104, the baseline establishment delay control submodule realizes the switching control between the "filling" and "ready" states through the state machine management unit.
[0023] Furthermore, step S2 further includes:
[0024] S201. The data preprocessing unit uses a two-pointer quicksort algorithm to sort the parameter buffer in place and maintains the temporal continuity through a circular buffer structure.
[0025] S202, The median benchmark calculation unit introduces a weighted median algorithm, and in the buffer length L i When the value is >100, the segmented median calculation strategy is activated;
[0026] S203, the baseline stability enhancement unit adopts an improved threshold algorithm based on Tukey fences and implements a three-level outlier filtering mechanism.
[0027] Furthermore, step S3 further includes:
[0028] S301, the benchmark dynamic update unit dynamically calculates the learning rate α based on the signal-to-noise ratio SNR(t) and the environmental disturbance level δ_env(t), and adopts a dual weighting factor and a time decay factor;
[0029] S302, The drift suppression unit uses sliding window variance analysis to distinguish between long-term trends and short-term fluctuations, and sets a drift threshold to trigger conditional update protection;
[0030] S303, the benchmark calibration verification unit ensures update reliability through t-test, confidence interval evaluation and multi-sensor cross-validation.
[0031] Furthermore, step S4 further includes:
[0032] S401, The proportional coefficient preset unit classifies the action type based on the facial key point displacement pattern and motion frequency characteristics, and sets the amplitude sensitivity coefficient and duration coefficient.
[0033] S402, The dynamic threshold calculation unit obtains the baseline value through a sliding time window mechanism and activates a temporary stabilization algorithm when a sudden change in the baseline value is detected;
[0034] S403, the threshold adaptive execution unit improves the detection rate and reduces the false positive rate through an individual feature profile update mechanism and a dual verification strategy.
[0035] Furthermore, step S5 further includes:
[0036] S501, the deviation calculation unit uses a sliding window and a smoothing factor ξ to calculate the real-time deviation, and the anomaly judgment unit is set with a multi-level threshold system and a state accumulation counter.
[0037] S502, the benchmark learning pause unit freezes benchmark updates in case of an anomaly, the benchmark reinitialization unit executes a three-step reset process, and the recovery detection unit uses hysteresis comparison and confidence assessment to confirm system recovery.
[0038] The beneficial effects of this invention are
[0039] This invention effectively solves the problems of poor individual adaptability, weak state tracking ability and insufficient anti-interference ability caused by fixed thresholds and static benchmarks in traditional methods by constructing a complete technical closed loop from data acquisition, benchmark learning, threshold adjustment to anomaly handling, and significantly improves the accuracy and robustness of micro-motion recognition.
[0040] By introducing dynamic benchmark learning and context-aware adaptive thresholding mechanism, the system can accurately adapt to individual differences among different users and state drift during long-term use. Experimental results show that the false positive rate can be reduced from 15.2% of the traditional method to 10.5%, while the detection rate of subtle movements can be increased to 92.3%.
[0041] With its built-in anomaly monitoring and intelligent reset mechanism, the system is endowed with strong self-recovery capabilities, enabling it to maintain stable operation in complex environments and quickly recover from abnormal states. This greatly enhances the system's practicality and reliability, meeting the high standards required for real-world scenarios such as facial micro-motion recognition and driver fatigue monitoring. Attached Figure Description
[0042] Figure 1 This is a schematic diagram of the overall architecture and data processing flow of the present invention;
[0043] Figure 2 This is a schematic diagram of the robust benchmark calculation and dynamic update process;
[0044] Figure 3 This is a schematic diagram of the robust benchmark calculation and dynamic update process. Detailed Implementation
[0045] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0046] As attached Figure 1-3 As shown, this invention provides a dynamic benchmark learning and adaptive threshold adjustment method, comprising the following steps:
[0047] S1, Data Buffer Construction
[0048] To initialize a separate data buffer for the set of physiological parameters P = {p1 (mouth aspect ratio), p2 (eye aspect ratio), p3 (pupil size)} required for facial micro-motion recognition, the specific steps are as follows:
[0049] S101. Based on the data characteristics of each parameter, allocate a contiguous memory block for each parameter through a dynamic memory allocation unit. Each queue head maintains an independent read pointer RP_i and write pointer WP_i.
[0050] S102. Establish independent data access interfaces and mutex lock mechanisms for the three parameter queues to ensure data integrity during multi-threaded data acquisition.
[0051] S103. Based on parameter characteristic analysis, a shorter buffer L1=30 is allocated for the mouth aspect ratio (which changes frequently), a longer buffer L3=100 is allocated for the pupil size (which changes slowly), and a medium length L2=50 is allocated for the eye aspect ratio.
[0052] S104. Monitor the buffer filling status through the state machine. When any buffer filling ratio η_trigger reaches 100%, automatically switch to the "ready" state and trigger the baseline calculation.
[0053] S2, Robust baseline calculation
[0054] Perform robust benchmark calculations on the parameter buffer that is in the ready state. The specific steps are as follows:
[0055] S201. Use the two-pointer quicksort algorithm to sort parameter p. i The data buffer is sorted in place to generate an ordered sequence S, and the temporal continuity is maintained by a circular buffer structure;
[0056] S202. Introduce a weighted median algorithm, dynamically adjusting the quantile weights by calculating the kernel density estimate f_kde(x) of the data points. When L... i When the value is >100, the segmented calculation strategy is enabled;
[0057] S203. An improved threshold algorithm based on Tukey fences is adopted, setting the threshold coefficient k to be negatively correlated with the data skewness value γ, and implementing a three-level outlier filtering mechanism.
[0058] S3, Baseline Dynamic Update and Drift Suppression
[0059] To achieve continuous learning and drift suppression of the benchmark, the specific steps are as follows:
[0060] S301. The learning rate α is dynamically calculated based on the real-time signal-to-noise ratio SNR(t) and the environmental disturbance level δ_env(t). The steady-state segment (ω_steady=0.8) and the transient segment (ω_transient=0.3) data are processed separately using dual weighting factors.
[0061] S302. Use sliding window variance analysis to distinguish between long-term trends and short-term fluctuations, and set a drift threshold δ_drift=2.5σ. When short-term fluctuations exceed the threshold, the benchmark update is paused.
[0062] S303. Use a t-test to determine the significance of the new baseline value compared with the historical mean (p<0.05), calculate the 95% confidence interval, and update only if the new value falls within the interval.
[0063] S4. Context-aware adaptive threshold generation
[0064] Generate an adaptive threshold based on the micro-action type. The specific steps are as follows:
[0065] S401. Based on the facial key point displacement characteristics, set k_open=2.5 for the mouth opening action, k_close=0.7 for the lip pursing action, and k_blink=1.8 for the blinking action;
[0066] S402. Obtain the baseline value Bi_i_current through a sliding time window. The calculation formula is Bi_i_current=Σ(ω_t·p_t) / Σω_t, where ω_t is the time decay weight.
[0067] S403. Establish an individual feature profile update mechanism, optimize the ratio coefficient by continuously learning the user baseline change pattern, and improve the recognition accuracy by adopting a dual verification strategy.
[0068] S5, Abnormal Status Monitoring and System Reset
[0069] The specific steps to achieve system exception handling and self-recovery are as follows:
[0070] S501. Using a sliding window of length K = 15 frames, with a smoothing factor α = 0.7, calculate the smoothing deviation δ_smooth; set the warning threshold δ_warning = 2.0σ and the critical threshold δ_critical = 3.5σ, and use the state accumulation counter N_alert = 5 to implement hierarchical alarms;
[0071] S502. After an anomaly is confirmed, a three-step reset process is executed: clear the historical buffer, restart data acquisition with the current stable observation value, and construct a new baseline using the moving average algorithm; the recovery detection uses the hysteresis comparison algorithm and sets a safety margin of 0.12.
[0072] The above description is merely a preferred embodiment of the present invention and is used only to illustrate the technical solution of the present invention, and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.
Claims
1. A dynamic benchmark learning and adaptive threshold adjustment method, characterized in that, include The following steps are required: S1. Data Buffer Construction: In response to system startup, a set of physiological parameters to be monitored, {P={p1,p2,...,p...}, is constructed. n }(n represents the number of physiological parameters) Initialize independent data buffers; based on each parameter p i Based on its noise sensitivity and frequency variation characteristics, the buffer length L is adaptively allocated. i The state machine monitors the filling status of the buffer, and triggers the baseline calculation ready signal when the filling ratio reaches the set threshold. S2, Robust baseline calculation: For the parameter buffer in the ready state, execute the robust baseline calculation process based on the weighted median and the segmentation strategy; For the calculated initial baseline values, a three-level outlier filtering and data correction based on the improved Tukey fences algorithm is performed to enhance baseline stability; S3. Baseline Dynamic Update and Drift Suppression: A weighted moving average algorithm with a dynamic learning rate α is used to continuously learn and adaptively adjust the baseline of user physiological parameters. At the same time, the baseline drift caused by transient interference is suppressed through a long-short-term state separation mechanism and conditional update protection. The statistical reliability of the baseline update is verified by using multi-frame consistency test and confidence interval evaluation. S4. Context-aware adaptive threshold generation: Preset dynamic scaling coefficients according to the type of facial micro-movements; Combine the dynamic baseline value Bi_i_current generated in step S3, generate a detection threshold resistant to jumps by introducing a threshold calculation unit with a dynamic compensation mechanism; and optimize the matching accuracy of the threshold through individual feature profile updates and a dual verification strategy. S5. Abnormal State Monitoring and System Reset: Real-time calculation of the smooth deviation δ_smooth between the observed data and the current benchmark; hierarchical anomaly detection is achieved by setting a multi-level threshold system and a state accumulation counter; when the system is confirmed to have entered an abnormal state, benchmark learning is frozen, and a three-step reset process including buffer clearing, data re-acquisition, and benchmark reconstruction is initiated until the system recovery is confirmed.
2. The method according to claim 1, characterized in that, Step S1 further includes: S101. Parameter queue creation: Allocate a contiguous memory block for each parameter through dynamic memory allocation, and maintain an independent read / write pointer at the head of each queue. S102, queue isolation management, establishes independent data access interfaces and mutex locks for each parameter queue to ensure the data integrity of multi-parameter parallel acquisition; S103. Buffer length allocation: Based on the analysis results of noise sensitivity and frequency variation in parameter characteristic analysis, the buffer length is adaptively allocated. S104, Baseline establishment delay control, which is implemented through state machine management to control the switching between the filling and ready states.
3. The method according to claim 2, characterized in that, In S101, based on each parameter p in the parameter set P... i Data type and preset length L i The required memory space is calculated through dynamic memory allocation and allocated in contiguous memory blocks. Each queue head maintains independent read and write pointers. In S102, physically isolated storage areas are created for the aspect ratio of the mouth, the aspect ratio of the eyes, and the pupil size to ensure data integrity and thread safety during parallel acquisition of multiple parameters. In S103, the parameters p are analyzed based on historical frame data. i noise sensitivity σ_noise(p i ) and the frequency of change f_var(p i For f_var(p) i Parameters with higher σ_noise values are allocated shorter buffers; for σ_noise(p) i Parameters with high values and requiring strong anti-interference capabilities should be allocated a longer buffer. In S104, the state transition is triggered by the queue filling ratio η_trigger. When η_trigger≥100%, it automatically switches to the ready state and triggers the baseline calculation.
4. The method according to claim 1, characterized in that, Step S2 further includes: S201. Data preprocessing: The parameter buffer is sorted in-place using a two-pointer quicksort algorithm, and the temporal continuity is maintained by a circular buffer structure. S202, Median benchmark calculation, introducing a weighted median algorithm, and within a buffer length L i When the value is >100, the segmented median calculation strategy is activated; S203. Enhanced baseline stability by adopting an improved threshold algorithm based on Tukey fences and implementing a three-level outlier filtering mechanism.
5. The method according to claim 4, characterized in that, In S201, a two-pointer quicksort algorithm is used to sort the physiological parameter p. i The data buffer is sorted in-place to generate an ordered sequence S = {x1, x2, ..., x_L}. i The timestamp information of the data is retained during the sorting process for subsequent consistency verification; the update granularity of the sliding window is controlled by a circular buffer structure and an overlap coefficient β. In S202, the quantile weights are dynamically adjusted by calculating the kernel density estimate f_kde(x) of the data points; a segmented median calculation strategy is enabled, which divides the sequence S into K equal-length sub-segments, calculates the local medians in parallel, and then merges them; In S203, there is a three-level outlier filtering mechanism: the primary level uses the 3σ criterion, the intermediate level is based on the box plot rule, and the advanced level constructs a Markov chain prediction model based on historical benchmark values. When N_pred consecutive prediction deviations exceed the confidence interval, a data correction procedure based on exponentially weighted moving average is triggered.
6. The method according to claim 1, characterized in that, Step S3 further includes: S301, Baseline Dynamic Update: The dynamic learning rate α is dynamically calculated based on the real-time signal-to-noise ratio SNR(t) and the environmental disturbance level δ_env(t), i.e., α = f(SNR(t), δ_env(t)); a dual weighting factor (w_steady, w_transient) is used to process the steady-state and transient data respectively, where w_steady > w_transient; and a time decay factor λ_t is introduced to gradually reduce the influence of historical data with the number of iterations t. S302, Drift Suppression: A sliding window variance analysis is used to distinguish between long-term trends T_long and short-term fluctuations T_short. T_long is extracted by a large window weighted average, and T_short is isolated by a high-pass filter. A drift threshold δ_drift is set. When the amplitude of short-term fluctuations |T_short|>δ_drift, the benchmark update is paused and the interference counter C_interfere is started. S303, Benchmark Correction and Verification: Based on the distribution of historical benchmark data, a t-test is used to determine the significant difference between the new benchmark value B_new and the historical mean μ_historical; the 95% confidence interval CI_95 of the benchmark value is calculated through a sliding window, and the benchmark is updated only if B_new∈CI_95; when a single sensor benchmark is abnormal, a weighted correction is performed based on data from other sensors.
7. The method according to claim 1, characterized in that, Step S4 further includes: S401, Proportional Coefficient Preset: Action type classification is based on facial key point displacement patterns and motion frequency characteristics; coefficient mapping adopts a multi-dimensional weight allocation strategy, setting amplitude sensitivity coefficient β_amp and duration coefficient β_dur for each action type; S402, Dynamic Threshold Calculation: The benchmark acquisition uses a sliding time window mechanism and a weighted average algorithm to process the data from the most recent N sampling periods. The benchmark value calculation formula is Bi_i_current=Σ(w_t·p_t) / Σw_t, where w_t is the time decay weight and p_t is the characteristic decay value within a unit time t; When a sudden change in the benchmark value ΔB>Δ_max is detected within M consecutive periods, a temporary stabilization algorithm is automatically activated to prevent threshold jumps. S403, Threshold Adaptive Execution: Real-time adaptation establishes an individual feature profile update mechanism, continuously learning the user's facial baseline change patterns and dynamically optimizing the proportional coefficient set {O}; Performance optimization adopts a dual verification strategy, adding a temporal consistency check after dynamic threshold determination to ensure that the complete motion trajectory of micro-movements conforms to the preset mode.
8. The method according to claim 5, characterized in that, Step S5 further includes: S501, Deviation Calculation and Anomaly Detection: Deviation calculation uses a sliding window of length K frames. The smoothing deviation calculation formula is δ_smooth=ξ·δ_current+(1-ξ)·δ_previous, where the smoothing factor ξ∈[0.6,0.8]; Anomaly detection sets up a multi-level threshold system, including a warning threshold δ_warning and a critical threshold δ_critical, and uses a state accumulation counter C_alert. An anomaly is confirmed only when C_alert reaches a set number N_alert and is not cleared during the period. S502, Benchmark Reset and Recovery: Benchmark learning pauses immediately freezes the benchmark update weights upon receiving an abnormal signal and initiates a data verification procedure; recovery detection employs a hysteresis comparison algorithm and introduces a confidence assessment based on the distribution of historical normal data; benchmark reinitialization executes a three-step reset process: clearing the historical buffer, restarting data acquisition with the current stable observations, and gradually constructing a new benchmark through a moving average algorithm.