Dynamic threshold monitoring method based on real-time data flow
By leveraging Kafka Streams' real-time stream processing technology, combined with dynamic window adjustment and a composite threshold model, the problems of real-time monitoring latency and resource consumption in computing centers were solved. This enabled efficient and accurate dynamic threshold monitoring, improving cloud computing resource utilization and equipment fault prediction capabilities.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-26
- Publication Date
- 2026-03-10
AI Technical Summary
Existing computing centers use preset static thresholds or offline batch statistics for host monitoring, which cannot respond in real time to sudden fluctuations in business load, resulting in false alarms, missed alarms, and delays. Furthermore, offline machine learning modeling solutions have high resource consumption and are difficult to respond in real time at a scale of tens of thousands of nodes.
We employ real-time stream processing technology based on Kafka Streams, segmenting real-time data using sliding window technology. By combining dynamic window adjustment and a composite threshold model, we dynamically generate monitoring thresholds and leverage Kafka's high throughput and low latency to monitor and trigger alarms in real time.
It achieves real-time and accurate dynamic monitoring, reduces computing resource consumption, supports edge device deployment, and improves cloud computing resource utilization and device fault prediction accuracy.
Abstract
Description
Technical Field
[0001] This invention relates to the fields of intelligent operation and maintenance and streaming data processing technology, and in particular to a dynamic threshold monitoring method based on real-time data streams. It is applicable to real-time health monitoring and elastic scheduling scenarios for computing hosts and management and operation support in cloud data centers and high-performance computing clusters. Background Technology
[0002] Currently, computing centers generally use preset static thresholds or offline batch statistics for host monitoring. When faced with instantaneous fluctuations in business load, fixed thresholds are prone to false alarms and missed alarms; offline computing has a latency of minutes, making it impossible to detect anomalies at the second level. Although there are machine learning-based offline modeling and prediction solutions, the training and update cycles are long, the resource consumption is high, and it is difficult to respond in real time at a scale of tens of thousands of nodes. There is an urgent need for a dynamic threshold monitoring technology with low latency, high throughput, and the ability to adaptively adjust with data flow. Summary of the Invention
[0003] To address the aforementioned technical issues, this invention provides a dynamic threshold monitoring method based on real-time data streams. Combining the high throughput and low latency characteristics of Kafka, it can efficiently process large-scale real-time data streams, ensuring the real-time performance and accuracy of dynamic monitoring.
[0004] The technical solution of this invention is: A dynamic threshold monitoring method based on real-time data streams is proposed. Based on Kafka Streams real-time stream processing technology, the method segments real-time data using sliding window technology, calculates statistical features within the window, and dynamically generates monitoring thresholds based on these features.
[0005] By using Kafka Streams to build a stream processing topology, key metrics of the computing host are read from the input topic, dynamic thresholds are calculated by aggregating them through time windows, and the current data is compared with the threshold range in real time; once the data exceeds the threshold, an alarm is triggered immediately.
[0006] Furthermore, Key metrics include CPU utilization and memory usage.
[0007] Four-layer modular design Data access layer: Supports multiple protocol data sources, with a throughput of up to 100,000 records per second; Computation engine layer: Integrates the Flink stream processing framework, with a latency of <50ms; Decision-making level: Includes the core module for dynamic threshold calculation; Interaction layer: Includes Grafana visualization dashboards and multi-channel alarm system.
[0008] Furthermore, The core module for dynamic threshold calculation includes dynamic window adjustment and a composite threshold model.
[0009] Furthermore, An adaptive window adjustment algorithm, T_w = T_min + (T_max - T_min)*(σ-σ_min) / (σ_max-σ_min), is used to optimize the analysis window.
[0010] Furthermore, A composite threshold model is constructed that integrates multi-dimensional indicators such as mean, standard deviation, EWMA, and percentiles, and the weight parameters α, β, γ, and δ are dynamically optimized through machine learning.
[0011] Establish a tiered alarm mechanism to achieve a three-level response: when the threshold deviation is ≤10%, a warning is issued; when it is 10%-30%, an alarm is triggered; and when it is >30%, an emergency response is initiated.
[0012] The beneficial effects of this invention are Dynamic adaptability: The window size and threshold parameters are automatically adjusted as the data fluctuates, without the need for manual intervention.
[0013] Multimodal fusion: For the first time, time series statistics are combined with probability distribution to improve adaptability to complex scenarios.
[0014] Resource optimization: Reduces computing resource consumption by 60% compared to traditional solutions, and supports deployment on edge devices.
[0015] Application value In the financial sector: the accuracy rate of transaction fraud detection has been improved to 92%.
[0016] Industrial scenarios: Equipment failure prediction leads to 4-8 hours in advance.
[0017] Cloud computing: resource utilization increases by 30%, and costs decrease by 25%. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] This invention provides a dynamic threshold monitoring method based on real-time data streams, employing real-time stream processing technology based on Kafka Streams. It segments real-time data using a sliding window technique, calculates statistical characteristics (such as mean and standard deviation) within the window, and dynamically generates monitoring thresholds based on these characteristics. Specifically, it utilizes Kafka Streams to construct a stream processing topology, reads key metrics of the computing host (such as CPU utilization and memory utilization) from the input topic, aggregates and calculates dynamic thresholds through time windows, and compares the current data with the threshold range in real time. Once the data exceeds the threshold, an alarm is immediately triggered. This method combines the high throughput and low latency characteristics of Kafka, enabling efficient processing of large-scale real-time data streams and ensuring the real-time performance and accuracy of dynamic monitoring.
[0020] System architecture: adopts a four-layer modular design. Data access layer: Supports multiple data sources such as Kafka / Prometheus, with a throughput of up to 100,000 records per second. Computation engine layer: Integrates the Flink stream processing framework, latency <50ms Decision-making level: Core module for dynamic threshold calculation (including dynamic window adjustment and composite threshold model) Interaction Layer: Grafana Visualization Dashboard and Multi-channel Alarm System Core Algorithm Dynamic window adjustment algorithm: T_w = T_min + (T_max - T_min) × (σ - σ_min) / (σ_max - σ_min). Supports automatic window scaling from 10ms to 60s, adapting to high-frequency trading / slow-changing industrial data. Composite threshold model: Four-dimensional feature fusion: mean (μ), standard deviation (σ), EWMA (γ), percentile (δ) Adaptive weight allocation: Dynamically adjust α+β+γ+δ=1 through Bayesian optimization. Implementation process 1. Real-time data stream sampling → 2. Volatility calculation → 3. Adaptive window adjustment → 4. Multidimensional feature extraction → 5. Dynamic threshold calculation → 6. Gradient alarm triggering → 7. Online model learning 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 threshold monitoring method based on real-time data stream, characterized in that, Based on Kafka Streams real-time stream processing technology, the real-time data is segmented and processed by sliding window technology, the statistical characteristics in the window are calculated, and the monitoring threshold is dynamically generated according to these characteristics.
2. The method of claim 1, characterized in that, Using Kafka Streams to build a stream processing topology, read the key indicators of the computing power host from the input topic, calculate the dynamic threshold through time window aggregation, and compare the current data with the threshold range in real time; once the data exceeds the threshold, an alarm is triggered immediately.
3. The method of claim 2, characterized in that, The key indicators include CPU utilization and memory usage.
4. The method of claim 2, characterized in that, Adopting four-layer modular design Data access layer: supports multiple protocol data sources, with a throughput of 100,000 per second; Computing engine layer: integrates Flink stream processing framework, with a delay of <50ms; Decision layer: includes dynamic threshold calculation core module; Interactive layer: includes Grafana visualization dashboard and multi-channel alarm system.
5. The method of claim 4, characterized in that, The dynamic threshold calculation core module contains dynamic window adjustment and composite threshold model.
6. The method of claim 2, characterized in that, Adopting adaptive window adjustment algorithm T_w = T_min + (T_max - T_min)*(σ-σ_min) / (σ_max-σ_min) to optimize the analysis window.
7. The method of claim 2, characterized in that, Building a composite threshold model to fuse multiple dimensions of indicators such as mean, standard deviation, EWMA, and percentile, and dynamically optimizing weight parameters α, β, γ, δ through machine learning.
8. The method of claim 2 or 7, characterized in that, Establishing a gradient alarm mechanism to realize three-level response, with early warning when the threshold deviation is ≤10%, alarm when it is 10%-30%, and emergency response when it is >30%.