Early warning method, device and equipment of anaerobic digestion reactor and storage medium

CN122502013BActive Publication Date: 2026-10-30ZHUHAI GAOLAN PORT SINO FRENCH WATER CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610918767.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-24
Publication Date
2026-10-30
Estimated Expiration
2046-06-24

AI Technical Summary

Technical Problem

该类方法通常依赖于大量标注完整的失稳事件数据进行监督训练,而在工业实际中,失稳事件属于小概率事件,标注样本极度稀缺,导致模型在新场景下的泛化能力受限

Benefits of technology

[0018]本发明提供的厌氧消化反应器的预警方法、装置、设备及存储介质,本发明在获取多源监测数据后,通过特征提取并确定第一健康度和第一封顶值,能够基于工艺机理对反应器的运行状态进行量化评估,并在检测到特定危险模式时通过封顶值强制拉低健康度,有效防止因单一指标表现正常而导致的漏报;同时,基于预训练的孤立森林模型对特征提取结果进行异常检测并得到异常分数,能够从正常运行数据中无监督地学习个体化的正常边界,无需依赖任何失稳事件标注数据,显著降低了工业部署的门槛;在此基础上,根据异常分数确定第二健康度和第二封顶值,将模型的异常判断量化为健康度修正量,使数据驱动的检测结果能够与规则路径的结果进行有效融合;最终,根据第一健康度、第一封顶值、第二健康度和第二封顶值确定目标健康度并生成预警信息,通过取严融合策略确保任一路径发现的异常均能在最终预警结果中体现,兼顾了检测灵敏度与预警可靠性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122502013B_ABST
    Figure CN122502013B_ABST
Patent Text Reader

Abstract

The application provides a kind of early warning method, device, equipment and storage medium of anaerobic digestion reactor, after obtaining multi-source monitoring data, first health degree and first cap value are determined by feature extraction;At the same time, the feature extraction result is detected and the abnormal score is obtained based on the pre-trained isolation forest model;On this basis, the second health degree and the second cap value are determined according to the abnormal score, and the abnormal judgment of the model is quantified as the health degree correction amount, so that the data-driven detection result can be effectively fused with the rule path result;Finally, the target health degree is determined according to the first health degree, the first cap value, the second health degree and the second cap value, and the early warning information is generated, and the abnormality found by any path can be reflected in the final early warning result by taking the strict fusion strategy, and the detection sensitivity and early warning reliability are considered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of anaerobic digestion process monitoring technology, and in particular to an early warning method, device, equipment and storage medium for an anaerobic digestion reactor. Background Technology

[0002] Anaerobic digestion is one of the mainstream technologies for treating high-concentration organic wastewater, offering advantages such as energy recovery and low operating costs, and is widely used in industries such as pharmaceuticals, food fermentation, and livestock farming. However, anaerobic digester reactors are extremely sensitive to fluctuations in influent load, temperature changes, and shocks from toxic substances. Once the activity of methanogenic bacteria is impaired, acidification instability may occur, potentially leading to system collapse in severe cases. The recovery period is lengthy, resulting in significant economic losses.

[0003] Currently, the status monitoring of anaerobic digestion systems mainly relies on the following methods: First, the single threshold alarm method, which sets upper or lower thresholds for key indicators such as pH and volatile fatty acids, triggering an alarm when the indicators exceed these limits. While easy to implement, this method has significant lag, making it difficult to capture subtle trend changes in the early stages of instability. Furthermore, when the alkalinity buffer within the system is sufficient, the initial pH drop during acidification can be temporarily masked, leading to missed alarms. Second, soft measurement and prediction methods based on machine learning, using models such as neural networks and random forests to predict indicators that are difficult to measure online or to forecast gas production. These methods typically rely on a large amount of fully labeled instability event data for supervised training. However, in industrial practice, instability events are low-probability events, and labeled samples are extremely scarce, limiting the model's generalization ability in new scenarios. Third, outlier detection methods based on unsupervised learning, such as principal component analysis or isolated forests, while not requiring instability labeling, rely solely on data distribution characteristics for judgment, lacking interpretability of the process mechanism and failing to provide maintenance personnel with specific causes of failures and directions for handling.

[0004] In addition, existing methods often make judgments based on a single time scale or a single indicator dimension, failing to fully integrate the deep information contained in multi-source monitoring data, such as trend evolution, fluctuation changes, and the synergistic deterioration of multiple indicators. For complex scenarios such as the continuous accumulation of sub-health status and acidification masking when alkalinity rebounds, the identification accuracy and lead time are insufficient.

[0005] In summary, the shortcomings of the existing technology urgently need to be addressed. Summary of the Invention

[0006] This invention provides an early warning method, apparatus, equipment, and storage medium for anaerobic digester reactors, which addresses the shortcomings of existing technologies and balances detection sensitivity and early warning reliability.

[0007] This invention provides an early warning method for anaerobic digester reactors, comprising: Obtain multi-source monitoring data from the anaerobic digester; Feature extraction is performed on the multi-source monitoring data, and the feature extraction results are used to determine the first health level and the first cap value; Anomaly detection is performed on the feature extraction results based on a pre-trained isolated forest model to obtain anomaly scores; Based on the aforementioned anomaly score, determine the second health level and the second cap value; The target health of the anaerobic digester is determined based on the first health level, the first capping value, the second health level, and the second capping value, and an early warning message is generated based on the target health level.

[0008] According to the early warning method for an anaerobic digester provided by the present invention, the step of extracting features from the multi-source monitoring data and determining a first health level and a first capping value based on the feature extraction results specifically includes: For each indicator in the multi-source monitoring data, extract the original value feature, the rate of change feature, and the fluctuation feature, and extract the composite feature obtained by combining two or more indicators. The rate of change feature includes the reactor pH change rate and the CO2 volume change rate. The comprehensive score of each indicator is calculated based on its original value characteristics, rate of change characteristics, volatility characteristics, and composite characteristics. The first health score is obtained by weighting and integrating the comprehensive scores of all indicators; When the rate of change of pH in the reactor meets the preset decreasing condition and the rate of change of CO2 volume meets the preset increasing condition, the first capping value is taken as the first preset value; otherwise, the first capping value is taken as the second preset value, and the first capping value is lower than the second preset value.

[0009] According to the early warning method for an anaerobic digester provided by the present invention, the specific method for obtaining the first health status by weighted fusion of the comprehensive scores of all indicators is as follows: H_rule = Σ(w i × S i ) × (1 R v / 200) × P co Among them, w i Let Σw be the weight coefficient of the i-th indicator, and Σw i =1,S i R is the comprehensive score for the i-th indicator. v The VFA risk score is calculated based on the rate of change of reactor pH and the rate of change of CO2 volume fraction, and R v ∈[0,100],P coTo detect the penalty factor through multi-indicator collaborative detection, and P co ∈[0.8,1].

[0010] According to the early warning method for an anaerobic digester provided by the present invention, the pre-training of the isolated forest model includes: Collect monitoring data of the anaerobic digester during the steady-state period, extract features from the steady-state monitoring data, and construct a training feature vector. When the number of training feature vectors reaches a preset threshold, multiple isolated trees are constructed using sampling with replacement. Each isolated tree recursively divides the sampled data by randomly selecting feature dimensions and random split points until a preset stopping condition is met.

[0011] According to the early warning method for an anaerobic digester provided by the present invention, the step of performing anomaly detection on the feature extraction results based on a pre-trained isolated forest model to obtain anomaly scores specifically includes: The feature extraction results are input into a pre-trained isolated forest model, and the path length of the feature extraction results on each isolated tree in the isolated forest model is calculated. The anomaly score is determined by comparing the average path length of the feature vector across all isolated trees with a preset normalization factor.

[0012] According to the early warning method for an anaerobic digester provided by the present invention, the step of determining the second health level and the second capping value based on the anomaly score specifically includes: The anomaly score is compared with a preset anomaly threshold. When the abnormal score is greater than the preset abnormal threshold, the second health score takes a third preset value, and the second capping value takes a fourth preset value. When the abnormal score is not greater than the preset abnormal threshold, the second health level is set to the fifth preset value, and the second capping value is set to the sixth preset value.

[0013] According to the early warning method for an anaerobic digester provided by the present invention, the step of determining the target health of the anaerobic digester based on the first health level, the first capping value, the second health level, and the second capping value, and generating early warning information based on the target health level, specifically includes: The minimum value among the first health level, the difference between the first health level and the second health level, the first cap value, and the second cap value is taken as the target health level; Based on the comparison between the target health level and the preset health level threshold, the warning level is divided; The corresponding warning information is generated based on the warning level.

[0014] The present invention also provides an early warning device for an anaerobic digester, comprising: The data acquisition module is used to acquire multi-source monitoring data from the anaerobic digester. The first health module is used to extract features from the multi-source monitoring data and determine the first health level and the first capping value based on the feature extraction results. An anomaly detection module is used to perform anomaly detection on the feature extraction results based on a pre-trained isolated forest model to obtain anomaly scores; The second health module is used to determine a second health level and a second cap value based on the abnormality score. The early warning generation module is used to determine the target health of the anaerobic digester based on the first health level, the first capping value, the second health level, and the second capping value, and to generate early warning information based on the target health level.

[0015] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement an early warning method for any of the anaerobic digester described above.

[0016] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements an early warning method for an anaerobic digester as described above.

[0017] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements an early warning method for any of the anaerobic digester methods described above.

[0018] This invention provides an early warning method, apparatus, equipment, and storage medium for anaerobic digester reactors. After acquiring multi-source monitoring data, the invention extracts features and determines a first health level and a first capping value. This enables a quantitative assessment of the reactor's operating status based on the process mechanism. When a specific hazardous mode is detected, the health level is forcibly lowered through the capping value, effectively preventing missed detections due to a single indicator showing normal performance. Simultaneously, an anomaly detection and anomaly score are obtained based on a pre-trained isolated forest model of the feature extraction results. This allows for unsupervised learning of individualized normal boundaries from normal operation data, without relying on any unstable event labeled data, significantly lowering the threshold for industrial deployment. Based on this, a second health level and a second capping value are determined according to the anomaly score, quantifying the model's anomaly judgment as a health level correction, enabling effective fusion of data-driven detection results with results from rule-based paths. Finally, a target health level is determined based on the first health level, the first capping value, the second health level, and the second capping value, generating early warning information. A strict fusion strategy ensures that anomalies detected by any path are reflected in the final early warning result, balancing detection sensitivity and early warning reliability. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0020] Figure 1 This is a schematic flowchart of the early warning method for the anaerobic digester provided by the present invention; Figure 2 This is a schematic diagram of the early warning device for the anaerobic digester provided by the present invention; Figure 3 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0022] To address the problems in existing technologies, this invention proposes an early warning method for anaerobic digester reactors, balancing detection sensitivity and early warning reliability. The early warning method for anaerobic digester reactors is described below, as follows: Figure 1 As shown, including but not limited to the following steps: Step 110: Obtain multi-source monitoring data of the anaerobic digester.

[0023] In step 110, multi-source monitoring data refers to real-time data from various monitoring items collected during the operation of the anaerobic digester from different sensors or detection methods. This monitoring data covers at least several key parameters characterizing the activity of methanogenic bacteria, acid-base balance, and gas production efficiency within the reactor. It may also include parameters such as influent and effluent quality to aid in assessing reactor operating conditions and treatment effectiveness. Data acquisition can be done via online sensors in real-time or through offline sampling and testing followed by data entry. The data acquisition frequency can be set according to the actual operating characteristics of the reactor and the timeliness requirements for early warning, for example, collecting data every few hours.

[0024] Step 120: Extract features from the multi-source monitoring data and determine the first health level and the first capping value based on the feature extraction results.

[0025] In step 120, feature extraction is first performed on the multi-source monitoring data acquired in step 110. The purpose of feature extraction is to further extract information from the raw monitoring data that can more sensitively and proactively reflect changes in the reactor's operating status. This information includes not only the current values ​​of each monitoring item, but also their trends, fluctuations, and correlations over time. Through feature extraction, the raw time-series data can be transformed into a set of features that comprehensively characterize the current operating status.

[0026] Based on the extracted features, a pre-defined rule engine is used for processing to determine the first health level and the first cap value. The first health level is a quantitative assessment of the reactor's current overall operational health based on each monitoring item and its characteristics, according to a pre-defined scoring logic and weighting rules. The score reflects the degree to which the reactor is in normal operating condition or deviates from normal operating condition. The first cap value is a mandatory limit value independent of the first health level. When certain pre-defined hazardous conditions are detected, the first cap value is set to a lower value to enforce constraints on the final health level in subsequent fusion steps. When these pre-defined hazardous conditions are not triggered, the first cap value is set to an upper limit so that it has no limiting effect.

[0027] Step 130: Perform anomaly detection on the feature extraction results based on the pre-trained isolated forest model to obtain anomaly scores.

[0028] In step 130, a pre-trained isolated forest model is used to detect anomalies in the feature extraction results at the current moment. This isolated forest model is trained in advance using multi-source monitoring data collected by the reactor under stable operating conditions. It learns and defines the feature distribution boundary of the reactor during normal operation. The current feature extraction results are input into this model, and the model calculates an anomaly score based on the partitioning paths of the current feature samples on each isolated tree. This anomaly score characterizes the degree to which the current feature sample deviates from the normal distribution boundary: the higher the score, the greater the difference between the current operating state and the normal operating mode during the stable period, and the higher the probability of instability risk.

[0029] Step 140: Determine the second health level and the second cap value based on the abnormal score.

[0030] In step 140, based on the anomaly score obtained in step 130, a second health score and a second capping value are determined. Specifically, the anomaly score is compared with a preset judgment threshold. When the anomaly score indicates that the current operating state significantly deviates from the normal operating mode, the second health score is set to a preset positive value, representing a deduction correction amount applied to the final health score. Simultaneously, the second capping value is set to a lower value, forming a mandatory upper limit constraint. When the anomaly score indicates that the current operating state does not significantly deviate, the second health score is set to zero, indicating no correction is made, and the second capping value is set to the upper limit, so that it does not have a constraint effect. Through this step, the anomaly detection results of the isolated forest model are quantified into correction amounts and capping values ​​that can be uniformly calculated with the first health score.

[0031] Step 150: Determine the target health of the anaerobic digester based on the first health level, the first capping value, the second health level, and the second capping value, and generate early warning information based on the target health level.

[0032] In step 150, the first health score and first cap value obtained in step 120 are fused with the second health score and second cap value obtained in step 140 to obtain the final target health score. The fusion adopts a strict fusion principle, that is, it comprehensively considers the health scores output by each path, the corrected health scores, and the cap values ​​of each path, selecting the value that best reflects the current risk level as the target health score. The advantage of using strict fusion is that, regardless of whether it is the rule engine path or the isolated forest path, as long as either party believes that the reactor has an abnormal risk, it will be reflected in the target health score, thereby significantly reducing the probability of false negatives.

[0033] After obtaining the target health status, the alert level is determined based on the numerical range of the target health status and according to the preset level classification rules. Corresponding alert information is then generated. The alert information may include the current alert level, the specific reason for triggering the alert, and suggested maintenance intervention measures, so that maintenance personnel can promptly grasp the reactor status and take appropriate action.

[0034] As a further optional embodiment, the step of extracting features from the multi-source monitoring data and determining the first health level and the first capping value based on the feature extraction results specifically includes: For each indicator in the multi-source monitoring data, extract the original value feature, the rate of change feature, and the fluctuation feature, and extract the composite feature obtained by combining two or more indicators. The rate of change feature includes the reactor pH change rate and the CO2 volume change rate. The comprehensive score of each indicator is calculated based on its original value characteristics, rate of change characteristics, volatility characteristics, and composite characteristics. The first health score is obtained by weighting and integrating the comprehensive scores of all indicators; When the rate of change of pH in the reactor meets the preset decreasing condition and the rate of change of CO2 volume meets the preset increasing condition, the first capping value is taken as the first preset value; otherwise, the first capping value is taken as the second preset value, and the first capping value is lower than the second preset value.

[0035] In this embodiment, firstly, for each monitoring indicator included in the multi-source monitoring data, its feature information in different dimensions is extracted. The original value feature is the current collected value of the indicator, which directly reflects the indicator's immediate level; the rate of change feature is obtained by trend analysis of the indicator's numerical sequence over the most recent sampling periods, used to characterize the indicator's dynamic evolution direction and speed; the volatility feature is obtained by dispersion analysis of the indicator's numerical sequence over the most recent sampling periods, used to measure the indicator's short-term stability. It is particularly important to note that the rate of change feature includes at least the reactor pH change rate and the CO2 volume fraction change rate, which are key criteria for subsequently determining whether the reactor faces alkalinity masking risks. Furthermore, composite features calculated from the combination of two or more indicators are extracted. These composite features can reflect the correlation and synergistic changes between different monitoring indicators, providing operational status information that a single indicator cannot reveal.

[0036] Secondly, for each indicator, a comprehensive score is calculated based on its original value characteristics, rate of change characteristics, volatility characteristics, and related composite characteristics, according to a pre-defined scoring logic. This comprehensive score not only considers whether the current value of the indicator is within the normal range, but also takes into account factors such as whether its trend is deteriorating, whether volatility is increasing, and whether there are abnormalities in its correlation with other indicators, thereby providing a more comprehensive and sensitive assessment of the indicator's operating status.

[0037] After obtaining the comprehensive score for each indicator, the comprehensive scores of all enabled indicators are weighted and merged according to their respective weight coefficients to obtain a score that comprehensively reflects the overall operational health of the reactor, namely the first health score. The weight coefficients of each indicator can be set according to their importance in the anaerobic digestion process, and can be proportionally redistributed when some indicators are missing or disabled, so that the sum of weights always remains normalized.

[0038] Meanwhile, based on the aforementioned extracted reactor pH change rate and CO2 volume fraction change rate, a judgment is made as to whether the alkalinity masking condition has been triggered. When both the reactor pH change rate and CO2 volume fraction change rate show a continuous downward trend and a continuous upward trend, it indicates that an acidification process masked by the alkalinity buffer may be occurring in the reactor. In this case, the first capping value is set as the first preset value. This first preset value is lower than the minimum health requirement for normal operation and is used to forcibly limit the final health level to a low level in subsequent fusions, ensuring that this dangerous mode will inevitably trigger an early warning. When the above two conditions are not met simultaneously, the first capping value is set as the second preset value. The second preset value is usually set as the upper limit of the health value range so that it does not have a restrictive effect in subsequent fusions.

[0039] As a further optional embodiment, the specific method for obtaining the first health score by weighted fusion of the comprehensive scores of all indicators is as follows: H_rule = Σ(w i × S i ) × (1 R v / 200) × P co Among them, w i Let Σw be the weight coefficient of the i-th indicator, and Σw i =1,S i R is the comprehensive score for the i-th indicator. v The VFA risk score is calculated based on the rate of change of reactor pH and the rate of change of CO2 volume fraction, and R v ∈[0,100],P co To detect the penalty factor through multi-indicator collaborative detection, and P co ∈[0.8,1].

[0040] In this embodiment, the formula for calculating the first health level H_rule is: H_rule = Σ(w i × S i ) × (1 R v / 200) × P co Among them, w i Let be the weight coefficient of the i-th indicator. The sum of the weight coefficients of all enabled indicators is 1, i.e., Σw. i =1. The weight coefficients of each indicator can be preset according to their importance in the anaerobic digestion process. For example, the weights of core indicators such as reactor pH, CH4 volume fraction, and gas production can be set higher, while the weights of auxiliary indicators can be set lower. When some indicators are missing or disabled due to sensor failure or configuration limitations, the weight coefficients of these indicators are proportionally redistributed to other enabled indicators, so that the sum of the weights always remains 1, ensuring that the system can output health assessment results normally under different sensor configuration conditions.

[0041] S i The comprehensive score for the i-th indicator is calculated according to the indicator's original value characteristics, rate of change characteristics, volatility characteristics, and composite characteristics, based on a preset scoring rule, and reflects the current operating status level of the indicator.

[0042] R v The risk fraction for volatile fatty acids is indirectly calculated based on the reactor pH change rate and CO2 volume fraction change rate, and its value ranges from [0, 100]. Specifically, when the reactor pH change rate shows a decreasing trend and the CO2 volume fraction change rate shows an increasing trend, it indicates that acidification may be occurring in the reactor. v The corresponding increase; the greater the magnitude of the decrease and increase, the greater the increase in R. v The higher the value, the better. (1) in the formula R v The term / 200) is the VFA risk attenuation factor, when R... v When the value increases, the factor decreases, thus imposing a decay penalty on health, causing the initial health to decrease accordingly when the potential risk of acidification increases.

[0043] P co This is a multi-indicator collaborative detection penalty factor, with a value range of [0.8, 1]. This factor reflects the synergistic deterioration effect when multiple indicators deteriorate simultaneously. The more indicators with low scores, the greater the penalty factor P. coThe smaller the value, the greater the penalty to the weighted summation result. By introducing this factor, the First Health Index can more sensitively capture abnormal patterns of multi-indicator deterioration, avoiding situations where the overall score remains high even if only a few indicators are abnormal.

[0044] Through the weighted fusion formula described above, the first health rating H_rule integrates multiple layers of information, including independent scores of each indicator, VFA risk decay, and multi-indicator synergistic penalties, and can comprehensively and sensitively reflect the overall operational health status of the anaerobic digester.

[0045] In a preferred embodiment, calculating the comprehensive score of an indicator based on its original value characteristics, rate of change characteristics, volatility characteristics, and composite characteristics specifically includes: The overall score S of each indicator i Calculate using the following formula: S i = S (i) × (1 α) + (S (i) + Δtrend + Δvol + Δcum) × α Among them, S (i) This is an instant score calculated based on the characteristics of the original value of the indicator and a piecewise function of a preset threshold range. This instant score reflects the judgment of the indicator's state based solely on the current value itself; for example, a high score is given when the original value falls within the preset optimal operating range, and a low score is given when it falls into a severely deviated range.

[0046] Δtrend is a trend correction term based on the rate of change characteristic of this indicator, and its value range is [ [20, +10]. The trend correction item is used to dynamically adjust the real-time score based on the direction and magnitude of the indicator's change: when the rate of change moves in a deteriorating direction, a negative correction is applied to lower the score; when the rate of change moves in an improving direction, a positive correction can be applied to moderately increase the score, thereby achieving a sensitive response to trend changes.

[0047] Δvol is a volatility penalty term based on the volatility characteristics of this indicator, and its value range is [ [10,0]. The fluctuation penalty term usually only penalizes and does not reward. When the indicator fluctuates drastically and has a large standard deviation within the recent sampling window, it indicates that the system is in an unstable oscillating state. In this case, a negative penalty is assigned to reduce the score. When the fluctuation is small, this term takes a value of zero or close to zero and has no negative impact on the score.

[0048] Δcum is the cumulative trend penalty term, and its value range is [ [25,0]. The cumulative trend penalty term is used to identify a persistent unidirectional deterioration trend of the indicator: when the indicator continues to change monotonically in the direction of deterioration over multiple consecutive sampling periods, it indicates that the deterioration trend has strong continuity and inertia. At this time, an additional negative penalty is given to accelerate the decline in score; when there is no persistent monotonous deterioration, this term is zero and no additional penalty is applied.

[0049] α is a preset fusion weight, with a value range of [0.10, 0.40]. This weight is used to adjust the fusion ratio between the immediate score and the corrected score: when α is smaller, the overall score is more biased towards reflecting the immediate state (S). (i) With a larger α, the system performs more robustly; when α is larger, the overall score is more biased towards the combination of correction terms that reflect trend and fluctuation information, and the system is more sensitive to early changes. By setting α appropriately, a balance can be achieved between the lead time for warnings and the false alarm rate.

[0050] As a further optional embodiment, the pre-training of the isolated forest model includes: Collect monitoring data of the anaerobic digester during the steady-state period, extract features from the steady-state monitoring data, and construct a training feature vector. When the number of training feature vectors reaches a preset threshold, multiple isolated trees are constructed using sampling with replacement. Each isolated tree recursively divides the sampled data by randomly selecting feature dimensions and random split points until a preset stopping condition is met.

[0051] In this embodiment, multi-source monitoring data is collected from the anaerobic digester during its stable period. The "stable period" here refers to the operating phase during which the reactor is running normally, all key indicators remain within preset normal ranges, and no known signs of instability appear. Monitoring data during these periods can be automatically identified and collected using preset stable period criteria, such as normal reactor pH, minimal gas production fluctuations, and no triggering of any warning conditions over multiple consecutive sampling cycles. The purpose of collecting stable period data is to provide training samples that characterize the reactor's normal behavior patterns for the isolated forest model, enabling the model to learn "what is a normal state."

[0052] Secondly, the collected stable-period monitoring data undergoes the same feature extraction process as in step 120 to construct training feature vectors. Each training feature vector corresponds to a sampling time within the stable period, and each dimension of the vector represents the various features extracted from the multi-source monitoring data at that time, thereby transforming the original multi-dimensional time-series data into feature space samples that can be directly used by the isolated forest model.

[0053] Model training begins when the accumulated number of training feature vectors reaches a preset threshold. The preset threshold should be set to ensure that the training samples are rich enough to cover the normal fluctuation range during the stabilization period, but not so stringent that it would prevent the model from completing training for an extended period.

[0054] During training, multiple sample subsets are randomly selected from the training feature vector set using sampling with replacement. An isolated tree is constructed for each sample subset. The construction process for each isolated tree is as follows: a feature dimension is randomly selected from the feature space; a split point is randomly chosen between the minimum and maximum sample values ​​in that dimension; this split point divides the samples of the current node into left and right subsets. This process of randomly selecting dimensions and randomly splitting is then recursively repeated for each subset until a preset stopping condition is reached. The preset stopping condition may include reaching a preset maximum tree depth, or the number of samples in a child node decreasing to a preset minimum value (e.g., 1).

[0055] Multiple isolated trees are constructed using the above method to form an isolated forest model. Since normal samples typically cluster in the core region of the feature space and require multiple random segmentations to be isolated, while abnormal samples deviate from the core region and often require only a few segmentations to be isolated, this characteristic allows the isolated forest model to effectively distinguish between normal and abnormal states. This training process relies solely on data from normal operation during the stable period and does not depend on any labeled data from unstable events, making this method highly applicable in industrial settings where unstable events are rare.

[0056] As a further optional embodiment, the step of performing anomaly detection on the feature extraction results based on the pre-trained isolated forest model to obtain anomaly scores specifically includes: The feature extraction results are input into a pre-trained isolated forest model, and the path length of the feature extraction results on each isolated tree in the isolated forest model is calculated. The anomaly score is determined by comparing the average path length of the feature vector across all isolated trees with a preset normalization factor.

[0057] In this embodiment, the feature extraction result obtained after extracting features from the current monitoring data in step 120 is constructed into a feature vector with the same dimension as when training the isolated forest model, and the feature vector is input into the pre-trained isolated forest model.

[0058] An isolation forest model consists of multiple isolation trees. During the training phase, each isolation tree partitions the distribution space of training samples during the stable period by randomly selecting feature dimensions and random split points. When a current feature vector is input, it traverses down each isolation tree, starting from the root node, layer by layer, according to the feature dimensions and split thresholds determined during training, until it falls into a leaf node. The number of edges traversed by the feature vector in a single isolation tree is its path length within that tree.

[0059] After traversing the entire tree, we obtain the set of path lengths for the feature vector across all isolated trees in the isolated forest model. Then, we calculate the average of these path lengths to obtain the average path length.

[0060] Next, the calculated average path length is compared with a preset normalization factor. The preset normalization factor is usually the average failed search path length of a binary search tree with a given number of samples, and is used to standardize the expected path length under different sample numbers and tree structures.

[0061] Finally, the anomaly score is determined based on the comparison between the average path length and the preset normalization factor. The calculation logic of the anomaly score is based on the following principle: when the sample represented by the feature vector belongs to the normal operating state, its position in the feature space is usually in the core region of the stable training sample distribution, requiring multiple segmentations to be isolated. Therefore, the average path length is long and the anomaly score is low. Conversely, when the sample represented by the feature vector deviates from the normal distribution, it often only requires fewer segmentations to be isolated, resulting in a shorter average path length and a higher anomaly score. Through this mechanism, the anomaly score can effectively reflect the degree to which the current operating state deviates from the normal behavior pattern, providing a basis for subsequent steps to determine the second health score and the second capping value.

[0062] As a further optional embodiment, the step of determining the second health level and the second cap value based on the anomaly score specifically includes: The anomaly score is compared with a preset anomaly threshold. When the abnormal score is greater than the preset abnormal threshold, the second health score takes a third preset value, and the second capping value takes a fourth preset value. When the abnormal score is not greater than the preset abnormal threshold, the second health level is set to the fifth preset value, and the second capping value is set to the sixth preset value.

[0063] In this embodiment, firstly, the anomaly score calculated in step 130 is compared with a preset anomaly threshold. The preset anomaly threshold is a judgment boundary determined based on experience or through validation set tuning before model deployment, used to distinguish whether the current running state significantly deviates from the normal behavior boundary defined by the isolated forest model.

[0064] When the anomaly score exceeds the preset anomaly threshold, it indicates that the Isolation Forest model, with a high confidence level, determines a significant difference between its current operating state and the normal operating mode during the stable period, posing a substantial potential risk of instability. In this case, the second health score is set to a third preset value, a positive preset value representing a predetermined deduction correction to the final health score. Simultaneously, the second capping value is set to a fourth preset value, a preset value lower than the lower limit of the normal level. This fourth preset value is used to impose a mandatory upper limit constraint on the target health score in subsequent fusion steps, ensuring that even if the rule engine path's health score is acceptable when the Isolation Forest path determines anomalies with high confidence, the final output target health score can still be forcibly limited to the warning range, effectively preventing missed detections.

[0065] When the anomaly score is not greater than the preset anomaly threshold, it indicates that the Isolation Forest model judges that the current operating state has not significantly deviated from the normal behavior boundary and is relatively close to the normal operating mode during the stable period. At this time, the second health score is set to the fifth preset value, which is usually set to zero, indicating that no deduction correction is applied to the final health score. That is, the Isolation Forest path does not interfere with the scoring result of the rule engine path in this case. At the same time, the second capping value is set to the sixth preset value, which is usually set as the upper limit of the health score range, so that it does not have any limiting effect in subsequent fusion steps, and the determination of the final health score is completely dominated by the judgment of the rule engine path and other paths.

[0066] Through the above mechanism, the anomaly detection results of the isolated forest model are quantified into a second health correction amount and a second capping value that can be uniformly calculated with the first health score, providing a standardized input for the multi-path strict fusion in the subsequent step 150.

[0067] As a further optional embodiment, the step of determining the target health of the anaerobic digester based on the first health level, the first capping value, the second health level, and the second capping value, and generating early warning information based on the target health level, specifically includes: The minimum value among the first health level, the difference between the first health level and the second health level, the first cap value, and the second cap value is taken as the target health level; Based on the comparison between the target health level and the preset health level threshold, the warning level is divided; The corresponding warning information is generated based on the warning level.

[0068] In this embodiment, the target health score is first determined. The four values ​​obtained in step 120—the first health score, the first capping value, the second health score, and the second capping value—are aggregated, and the minimum value is selected as the target health score according to the strictest criteria. Specifically, the four values ​​compared include: the first health score itself, i.e., the health score directly output by the rule engine path; the difference between the first and second health scores, i.e., the result of the rule engine path's health score after deduction by the isolated forest path correction term; the first capping value, i.e., the forced capping value generated by the rule engine path when triggering preset dangerous conditions such as alkalinity masking; and the second capping value, i.e., the forced capping value generated by the isolated forest path when an anomaly is determined with high confidence. The core of the strictest fusion strategy is that regardless of which path the abnormal signal originates from, as long as one path makes a dangerous judgment on the current operating state, the target health score can be forcibly lowered to the warning range through the capping value, or the originally high health score can be substantially reduced through the correction term, thereby minimizing the risk of missed reports.

[0069] Secondly, based on the comparison between the target health level and the preset health threshold, warning levels are determined. The preset health threshold maps continuous health scores to discrete levels easily understood by maintenance personnel. For example, the target health level can be divided into four levels from high to low: Normal, Attention, Warning, and Severe. When the target health level is not lower than the first threshold representing normal operation, it is classified as Normal, indicating that the reactor is operating well and no intervention is required. When the target health level is lower than the first threshold but not lower than the second threshold, it is classified as Attention, indicating that the reactor may have an early, slight deterioration trend, and maintenance personnel are advised to strengthen inspections and indicator verification. When the target health level is lower than the second threshold but not lower than the third threshold, it is classified as Warning, indicating that the reactor has a significant risk of instability, and maintenance personnel are advised to take timely adjustment measures. When the target health level is lower than the third threshold, it is classified as Severe, indicating that the reactor is at high risk of instability, and immediate emergency intervention is recommended to prevent system collapse. This level classification transforms complex, continuous health scores into concise and clear risk levels, facilitating rapid decision-making by on-site maintenance personnel.

[0070] Finally, corresponding early warning information is generated based on the defined early warning levels. This information may include the name or identifier of the current warning level, the target health score that triggers that level, specific fault diagnosis guidelines (e.g., whether it's a risk masked by alkalinity or a synergistic deterioration of multiple indicators), and pre-defined operational intervention suggestions for that level. These intervention suggestions vary depending on the level; for example, a severe level might suggest immediately reducing the feed organic load and replenishing the alkalinity buffer, an early warning level might suggest moderately reducing the feed load and checking the temperature control system, and a high-priority level might suggest increasing the sampling frequency of volatile fatty acids and alkalinity. Early warning information can be delivered to maintenance personnel through various means, including monitoring interface display, audible and visual alarms, and SMS notifications, helping them to promptly grasp the reactor's operating status and take targeted actions.

[0071] In summary, the following are two preferred embodiments of the present invention: Example 1: Complete Sensor Mode This embodiment provides a stability early warning method for anaerobic digestion systems based on the integration of rule engines and isolated forests, which is applicable to complete monitoring scenarios where online sensors for reactor pH, CO2 volume fraction, and gas production are configured simultaneously.

[0072] For example, in the UASB anaerobic digester of a certain oxytetracycline pharmaceutical wastewater treatment plant, multi-source monitoring data was collected through a combination of online sensors and routine laboratory data, with a sampling frequency set to once every 4 hours. The monitoring indicators used in this embodiment include three mandatory indicators: reactor pH, CO2 volume fraction, and gas production, as well as extended indicators such as influent pH, CH4 volume fraction, redox potential, temperature, ammonia nitrogen, influent COD, effluent COD, and H2S concentration, totaling 11 indicators. These indicators together constitute a comprehensive monitoring of the reactor's operating status.

[0073] After acquiring the monitoring data, four types of features were extracted for each indicator. The first type is the raw value feature, i.e., the current collected value of each indicator. The second type is the rate of change feature, obtained by performing linear regression on the values ​​of the most recent 12 sampling points, with the resulting slope serving as the rate of change for that indicator. The reactor pH change rate and CO2 volume fraction change rate are key bases for subsequent alkalinity masking detection. The third type is the volatility feature, obtained by calculating the sliding standard deviation of the monitoring data from the most recent 12 sampling points, used to measure the short-term stability of each indicator. The fourth type is the composite feature, calculated by combining two or more indicators, including the difference between the influent pH and the reactor pH, the influent and effluent COD removal rates and COD inversion indication, and the volatile fatty acid risk score indirectly inferred based on CO2 and pH trends. This risk score is determined according to a preset accumulation rule; the higher the rate of decrease in reactor pH and the rate of increase in CO2, the higher the risk score, with its overall value range limited to 0 to 100.

[0074] Based on the extracted features, a first health score is calculated through a rule engine path. For each indicator, an original value score is determined based on whether its original value falls within a preset threshold range. Simultaneously, a trend correction term is determined based on its rate of change characteristics, a volatility penalty term based on its volatility characteristics, and a cumulative trend penalty term based on its monotonic changes over multiple consecutive sampling periods. These four terms are combined according to preset fusion weights to obtain a comprehensive score for each indicator. Then, the comprehensive scores of all indicators are weighted and summed according to preset weight coefficients, and a VFA risk attenuation factor and a multi-indicator collaborative detection penalty factor are introduced for attenuation correction to obtain the first health score. When some indicators are missing due to sensor failure or configuration limitations, the weight coefficients of the missing indicators are proportionally redistributed to the enabled indicators to ensure that the sum of weights remains normalized.

[0075] While calculating the first health level, an alkalinity masking detection is performed to determine the first capping value. Specifically, when the reactor pH change rate is less than a preset first negative threshold, the CO2 volume fraction change rate is greater than a preset first positive threshold, and the number of sampling cycles with continuous CO2 increases reaches a preset number, alkalinity masking is determined to exist, regardless of whether the current value of total alkalinity has returned to the preset normal range. In this case, the first capping value is set to a preset value lower than the lower limit of the normal level. If the above conditions are not met simultaneously, the first capping value is set to a preset upper limit value so that it does not have a limiting effect in subsequent fusion.

[0076] Regarding the isolated forest path, model training relies solely on monitoring data collected during the reactor's stable operation period. The stable period is determined by the reactor pH remaining within a preset normal range for multiple consecutive sampling periods, the gas production fluctuation coefficient being below a preset threshold, and no warning conditions triggered by the rule engine. When the accumulated number of stable period samples reaches a preset threshold, multiple sample subsets are randomly selected using sampling with replacement, and an isolated tree is constructed for each subset. The construction process for each isolated tree involves randomly selecting a dimension from the feature space, randomly selecting split points between the extreme values ​​of samples in that dimension, and recursively bisecting the samples until a preset maximum tree depth is reached or the number of child node samples decreases to a preset minimum. This process is repeated to construct multiple isolated trees, collectively forming the isolated forest model. The entire training process does not rely on any labeled data related to unstable events. The model periodically triggers incremental retraining to adapt to the slow drift of reactor operating characteristics.

[0077] After model training, the feature vector constructed from the current monitoring data through feature extraction is input into the isolated forest model. The average path length of this feature vector across all isolated trees is calculated and compared with a preset normalization factor to obtain an anomaly score. The higher the anomaly score, the greater the deviation of the current operating state from the normal behavior pattern during the stable period. When the anomaly score is greater than the preset anomaly threshold, it is judged as an anomaly. At this time, the second health score takes a preset positive value as the deduction correction amount, and the second capping value takes a preset value lower than the lower limit of the normal level as a mandatory upper limit constraint. When the anomaly score is not greater than the preset anomaly threshold, the second health score is zero, and the second capping value takes the preset upper limit value, so that the isolated forest path does not interfere with the final result.

[0078] Finally, the first health score and first cap value output by the rule engine path are combined with the second health score and second cap value output by the isolated forest path through a strict fusion process. Specifically, the minimum value among the first health score, the difference between the first and second health scores, the first cap value, and the second cap value is taken as the target health score. Warning levels are then assigned based on the preset range of the target health score. For example, a score of 80 or higher is considered normal, 60 to 80 is considered "attention," 40 to 60 is considered "warning," and below 40 is considered "serious." When the warning level is "attention," "warning," or "serious," corresponding tiered alarm signals and maintenance intervention suggestions are generated, including measures such as reducing the feed organic load, replenishing alkalinity buffers, and checking the temperature control system, to assist maintenance personnel in timely handling.

[0079] The method described in this embodiment was validated in an engineering study on a UASB reactor for oxytetracycline pharmaceutical wastewater. During operation, the reactor experienced a complete acidification instability event. The method issued a warning at the level of concern six days in advance, providing ample time for maintenance personnel to intervene. On another reactor undergoing commissioning for streptomycin fermentation wastewater, only six warnings and zero serious false alarms were issued during the 228-day commissioning period. All warnings corresponded to a genuine mild acidification trend, validating the accuracy and reliability of the method in real-world industrial scenarios.

[0080] Example 2: Minimum Indicator Degradation Operation Mode This embodiment provides an early warning method for anaerobic digester reactors applicable to scenarios with limited sensor configuration, namely, a minimum performance indicator degradation operation mode. This method can achieve early warning of reactor instability risks by relying solely on basic monitoring indicators such as influent and effluent pH and COD, even without simultaneously configuring online sensors for reactor pH, CO2 volume fraction, and gas production.

[0081] Taking the anaerobic digester of an industrial wastewater treatment plant as an example, this reactor was built a long time ago and is only equipped with an influent flow meter, an influent pH meter, an effluent pH meter, and routine sampling conditions for COD of the influent and effluent. It does not have a biogas analyzer or an online gas production metering device installed. As a result, the operation and maintenance personnel cannot obtain CO2 volume fraction and gas production data, so the alkalinity masking detection rule under the complete sensor mode cannot be used. The method in this embodiment is designed for such scenarios where sensor configuration is limited.

[0082] Minimum monitoring data for the anaerobic digester are acquired from on-site sensors and laboratory data according to a preset sampling cycle. This includes at least four parameters: influent pH, post-reaction pH, influent COD, and effluent COD. The post-reaction pH can be either the reactor pH or the effluent pH; this embodiment uses the effluent pH as the post-reaction pH. These four parameters are basic monitoring items present in most wastewater treatment facilities, eliminating the need for additional expensive online gas analyzers or flow meters, allowing this method to be deployed even in older facilities with limited hardware.

[0083] After acquiring the data, feature extraction was performed on the minimum indicator monitoring data to obtain the original value characteristics of each indicator, the difference between the post-reaction pH index and the influent pH, the influent and effluent COD removal rates, and the COD inversion indicator. Among them, the post-reaction pH index and the influent pH are used to indirectly reflect the degree of acid production inside the reactor, the influent and effluent COD removal rates are used to measure the reactor's organic matter removal efficiency, and the COD inversion indicator is used to indicate whether the removal rate is negative.

[0084] Since this embodiment cannot obtain CO2 volume fraction and gas production data, it cannot execute the alkalinity masking detection rule based on the combined determination of reactor pH change rate and CO2 volume fraction change rate in the full sensor mode, nor can it calculate the VFA risk score. Therefore, a degradation rule engine is used to calculate the first health level and the first capping value. For the calculation of the first health level, the same weighted fusion framework as in the full mode is used. However, due to the lack of CO2 and gas production indicators, the weight coefficients corresponding to these indicators are proportionally redistributed to the four enabled indicators, so that the sum of the weights remains 1. At the same time, the VFA risk score is set to zero, and no VFA risk decay is applied. The comprehensive score of each indicator is still calculated according to the preset scoring rules based on its original value characteristics, change rate characteristics, and volatility characteristics. Regarding the determination of the first capping value, the degradation rule engine includes two alternative rules: First, when the difference between the effluent pH and the influent pH is less than a preset negative threshold, it indicates that the acid production inside the reactor is too high and has exceeded the system's buffering capacity. In this case, the first capping value is set to a preset value lower than the lower limit of the normal level, forcing the target health level of subsequent fusion outputs into the warning range. Second, when the COD removal rate is negative for several consecutive sampling periods, that is, when the effluent COD is consistently higher than the influent COD, it indicates that the reactor's organic matter degradation function has been severely impaired. In this case, the first capping value is also set to a preset value lower than the lower limit of the normal level. When neither of the above two alternative rules is triggered, the first capping value is set to a preset upper limit, so that it does not have a limiting effect in subsequent fusions.

[0085] For training the isolated forest model, stable-period monitoring data were collected and feature vectors were constructed during the reactor's operation phase, when the minimum indicator stability criterion was met. The minimum indicator stability criterion was that the effluent pH remained within a preset normal range and the COD removal rate was non-negative for multiple consecutive sampling periods. When the accumulated number of feature vectors reached a preset threshold, the isolated forest model was trained in the same manner as the full sensor mode. The feature vectors consisted of the original value features and rate of change features of the four enabled minimum indicators. The training process also did not rely on any unstable event labeled data.

[0086] After the model training is completed, the feature vector constructed by feature extraction from the current minimum indicator monitoring data is input into the isolated forest model to calculate the anomaly score. When the anomaly score is greater than the preset anomaly threshold, the second health score is set to a preset positive value as the deduction correction amount, and the second capping value is set to a preset value lower than the lower limit of the normal level as a mandatory upper limit constraint; when the anomaly score is not greater than the preset anomaly threshold, the second health score is set to zero, and the second capping value is set to the preset upper limit value, so that it does not have a constraint effect.

[0087] Finally, the minimum value among the first health level, the difference between the first health level and the second health level, the first cap value and the second cap value is taken as the target health level. The warning level is divided according to the comparison result between the target health level and the preset health level threshold, and the corresponding warning information and operation and maintenance intervention suggestions are generated.

[0088] Although the minimum performance degradation operation mode described in this embodiment cannot obtain process parameters such as CO2 volume fraction and gas production that can reflect acidification trends earlier due to the limited sensor configuration, resulting in a slightly inferior early warning lead time compared to the full sensor mode, it can still effectively identify the reactor instability risk under the most unfavorable hardware conditions by introducing two alternative rules: influent and effluent pH difference detection and COD removal rate inversion detection.

[0089] To verify the effectiveness of the method described in this embodiment, a quantitative backtest was conducted based on the continuous monitoring data of the reactor. The performance comparison of each method, the effect of deterioration cycle identification, and the results of the ablation experiment are shown in Tables 1 to 3, respectively.

[0090]

[0091] Table 1

[0092] Table 2

[0093] Table 3 Quantitative backtesting was conducted based on continuous monitoring data from 398 data points over 15 months from a UASB reactor for industrial wastewater. Table 1 presents the confusion matrix comparison results of each method under the VFA independent gold standard. As shown in Table 1, for n=99 sample points with VFA measurements, the recall rate of this method was 0.726, the precision was 0.768, and the F1 score was 0.746. Compared with the simple rule engine (F1=0.556) and the simple isolated forest (F1=0.672), the F1 score was improved by 34.2% and 11.0%, respectively. It should be noted that although the strict pH threshold method (pH<6.8) in Table 1 achieved a high binary classification accuracy, this threshold of 6.8 was obtained through post-processing optimization based on the VFA gold label of this dataset and is not a universally pre-set deployment threshold in engineering. In cross-scenario applications, this could lead to high-frequency false positives during normal operation, making it unsuitable for direct use in actual engineering. Therefore, it is only listed as a non-deployment benchmark. In addition to the non-deployable benchmark, this method achieved a higher recall rate and a more balanced F1 score among deployable benchmark methods, making it suitable for engineering early warning scenarios where the cost of missed reports is high.

[0094] Table 2 further presents the identification results and early warning time of the nine deterioration cycles. The reactor was in a sub-healthy acidified state for a long period, and nine deterioration cycles were identified where the effluent pH was below 6.5 for more than three consecutive days, with an average duration of 10.0 days and a minimum average pH of 6.09. As shown in Table 2, this method achieved 100% coverage of all nine deterioration cycles, with an early warning coverage rate of over 83% in each cycle, averaging 92.5%. In the seven cycles where the proportion of early warnings in the first seven days could be statistically analyzed, a downward trend in health was observed before the onset of deterioration, with an average early warning time of 6.33 days.

[0095] Table 3 presents the ablation experiment results for the three core mechanisms of the minimum index degradation mode. As shown in Table 3, the complete method has an F1 score of 0.746, a cycle coverage rate of 100%, and an average lead time of 6.33 days. After removing the pH difference and COD inversion substitution rule, the F1 score decreased to 0.701, the cycle coverage rate decreased to 89%, and the average lead time decreased to 5.89 days. After removing the isolated forest path, the F1 score decreased to 0.556, the cycle coverage rate decreased to 78%, and the average lead time decreased to 5.57 days. After changing the strict fusion to arithmetic mean fusion, the F1 score decreased to 0.689, the cycle coverage rate decreased to 89%, and the average lead time decreased to 5.78 days. These results indicate that the three core mechanisms—pH difference and COD inversion substitution rule, isolated forest path, and strict fusion—all significantly contribute to the early warning performance. The absence of any one mechanism leads to a significant decrease in the F1 score and early warning time, verifying the synergistic effect of the various technical features in this method.

[0096] The early warning device for the anaerobic digester provided by the present invention will be described below, such as... Figure 2 As shown, the early warning device for the anaerobic digester described below and the early warning method for the anaerobic digester described above can be referred to in correspondence.

[0097] An early warning device for an anaerobic digester includes: Data acquisition module 210 is used to acquire multi-source monitoring data of the anaerobic digester; The first health module 220 is used to extract features from the multi-source monitoring data and determine the first health level and the first capping value based on the feature extraction results. Anomaly detection module 230 is used to perform anomaly detection on the feature extraction results based on a pre-trained isolated forest model to obtain anomaly scores; The second health module 240 is used to determine a second health level and a second cap value based on the abnormality score. The early warning generation module 250 is used to determine the target health of the anaerobic digester based on the first health level, the first capping value, the second health level, and the second capping value, and to generate early warning information based on the target health level.

[0098] Figure 3 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 3 As shown, the electronic device may include: a processor 310, a communications interface 320, a memory 330, and a communication bus 340, wherein the processor 310, the communications interface 320, and the memory 330 communicate with each other via the communication bus 340. The processor 310 can call logical instructions in the memory 330 to execute a pre-warning method for the anaerobic digester, the method including: Obtain multi-source monitoring data from the anaerobic digester; Feature extraction is performed on the multi-source monitoring data, and the feature extraction results are used to determine the first health level and the first cap value; Anomaly detection is performed on the feature extraction results based on a pre-trained isolated forest model to obtain anomaly scores; Based on the aforementioned anomaly score, determine the second health level and the second cap value; The target health of the anaerobic digester is determined based on the first health level, the first capping value, the second health level, and the second capping value, and an early warning message is generated based on the target health level.

[0099] Furthermore, the logical instructions in the aforementioned memory 330 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0100] On the other hand, the present invention also provides a computer program product, the computer program product comprising a computer program that can be stored on a non-transitory computer-readable storage medium, wherein when the computer program is executed by a processor, the computer is capable of executing the early warning method for the anaerobic digester provided by the above methods, the method comprising: Obtain multi-source monitoring data from the anaerobic digester; Feature extraction is performed on the multi-source monitoring data, and the feature extraction results are used to determine the first health level and the first capping value; Anomaly detection is performed on the feature extraction results based on a pre-trained isolated forest model to obtain anomaly scores; Based on the aforementioned anomaly score, determine the second health level and the second cap value; The target health of the anaerobic digester is determined based on the first health level, the first capping value, the second health level, and the second capping value, and an early warning message is generated based on the target health level.

[0101] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements an early warning method for an anaerobic digester provided by the methods described above, the method comprising: Obtain multi-source monitoring data from the anaerobic digester; Feature extraction is performed on the multi-source monitoring data, and the feature extraction results are used to determine the first health level and the first capping value; Anomaly detection is performed on the feature extraction results based on a pre-trained isolated forest model to obtain anomaly scores; Based on the aforementioned anomaly score, determine the second health level and the second cap value; The target health of the anaerobic digester is determined based on the first health level, the first capping value, the second health level, and the second capping value, and an early warning message is generated based on the target health level.

[0102] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0103] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0104] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for early warning of an anaerobic digester, characterized in that, include: Obtain multi-source monitoring data from the anaerobic digester; Feature extraction is performed on the multi-source monitoring data, and a first health level and a first capping value are determined based on the feature extraction results; Anomaly detection is performed on the feature extraction results based on a pre-trained isolated forest model to obtain anomaly scores; Based on the aforementioned anomaly score, determine the second health level and the second cap value; Based on the first health level, the first capping value, the second health level, and the second capping value, the target health level of the anaerobic digester is determined, and an early warning message is generated based on the target health level. The step of extracting features from the multi-source monitoring data and determining the first health level and the first cap value based on the feature extraction results specifically includes: For each indicator in the multi-source monitoring data, extract the original value feature, the rate of change feature, and the fluctuation feature, and extract the composite feature obtained by combining two or more indicators. The rate of change feature includes the reactor pH change rate and the CO2 volume change rate. The comprehensive score of each indicator is calculated based on its original value characteristics, rate of change characteristics, volatility characteristics, and composite characteristics. The first health score is obtained by weighting and integrating the comprehensive scores of all indicators; When the rate of change of pH in the reactor meets the preset decreasing condition and the rate of change of CO2 volume meets the preset increasing condition, the first capping value is taken as the first preset value; otherwise, the first capping value is taken as the second preset value, and the first preset value is lower than the second preset value. The specific method for obtaining the first health score by weighted fusion of all indicators is as follows: H_rule = Σ(w i × S i ) × (1 R v / 200) × P co Among them, w i Let Σw be the weight coefficient of the i-th indicator, and Σw i =1,S i R is the comprehensive score for the i-th indicator. v The VFA risk score is calculated based on the reactor pH change rate and CO2 volume change rate, and R v ∈[0,100],P co To detect the penalty factor through multi-indicator collaborative detection, and P co ∈[0.8,1]; The step of determining the target health of the anaerobic digester based on the first health level, the first capping value, the second health level, and the second capping value, and generating early warning information based on the target health level, specifically includes: The minimum value among the first health level, the difference between the first health level and the second health level, the first cap value, and the second cap value is taken as the target health level; Based on the comparison between the target health level and the preset health level threshold, the warning level is divided; The corresponding warning information is generated based on the warning level.

2. The early warning method for the anaerobic digester according to claim 1, characterized in that, The step of performing anomaly detection on the feature extraction results using the pre-trained isolated forest model to obtain anomaly scores specifically includes: The feature extraction results are input into a pre-trained isolated forest model, and the path length of the feature extraction results on each isolated tree in the isolated forest model is calculated. The anomaly score is determined by comparing the average path length on all isolated trees with a preset normalization factor based on the feature extraction results.

3. The early warning method for the anaerobic digester according to claim 1, characterized in that, The step of determining the second health level and the second cap value based on the abnormal score specifically includes: The anomaly score is compared with a preset anomaly threshold. When the abnormal score is greater than the preset abnormal threshold, the second health score takes a third preset value, and the second capping value takes a fourth preset value. When the abnormal score is not greater than the preset abnormal threshold, the second health score is set to the fifth preset value, and the second capping value is set to the sixth preset value. The third preset value is a preset positive value, which indicates that a certain amount of deduction correction is applied to the final health score. The fourth preset value is a preset value lower than the lower limit of the normal level, which is used to form a mandatory upper limit constraint on the target health in subsequent fusion steps; The fifth preset value is zero, which means that no penalty will be applied to the final health score. The sixth preset value is set as the upper limit of the health value range, so that it does not have any limiting effect in subsequent fusion steps.

4. An early warning device for an anaerobic digester, used to implement the early warning method for an anaerobic digester as described in any one of claims 1-3, characterized in that, include: The data acquisition module is used to acquire multi-source monitoring data from the anaerobic digester. The first health module is used to extract features from the multi-source monitoring data and determine a first health level and a first capping value based on the feature extraction results. An anomaly detection module is used to perform anomaly detection on the feature extraction results based on a pre-trained isolated forest model to obtain anomaly scores; The second health module is used to determine a second health level and a second cap value based on the abnormality score. The early warning generation module is used to determine the target health of the anaerobic digester based on the first health level, the first capping value, the second health level, and the second capping value, and to generate early warning information based on the target health level.

5. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the early warning method for the anaerobic digester as described in any one of claims 1 to 3.

6. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the early warning method for the anaerobic digester as described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Intelligent waste gas emission real-time monitoring and standard exceeding early warning method

    CN122200946A

  • Pollutant anomaly monitoring method and system, computer device, and storage medium

    WO2020010701A1