A water quality index fusion data anomaly detection method, system, device and medium

CN120930040BActive Publication Date: 2026-09-11YANGZHOU POLYTECHNIC INST +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510832098.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-20
Publication Date
2026-09-11
Estimated Expiration
2045-06-20

AI Technical Summary

Technical Problem

例如,现有技术通常通过熵权法融合多参数构建WQI,再结合LSTM模型预测指数趋势,当预测偏差超过经验阈值时触发告警,此类方法在市政供水和水污染应急监测中广泛应用,但存在显著缺陷

Benefits of technology

本发明提供的水质指标融合数据异常检测方法,针对背景技术中仅依赖单一参数变化阈值,难以准确识别多参数耦合扰动下的污染异常,且对突发污染事件响应迟缓、定位模糊等问题,提出了一种融合多模态特征重构、动态基线建模与跨参数关联感知的系统性解决方案,通过保留原始参数的同时,构建反映物理、化学、生物类指标间耦合关系的动态特征体系,能够有效弥补传统异常检测对参数间隐性关联变化敏感性不足的缺陷;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120930040B_ABST
    Figure CN120930040B_ABST
Patent Text Reader

Abstract

This invention provides a method, system, device, and medium for detecting anomalies in water quality index fusion data, relating to the field of water quality testing technology. The invention acquires physical, chemical, and biological parameters in real time from a water source station. Then, while retaining the original data, it constructs cross-parameter correlation features through multimodal feature reconstruction and simultaneously calculates an adaptive sensitivity factor. This factor integrates the degree to which the parameters deviate from the dynamic baseline and the degree of abrupt change in the multi-parameter coupling relationship. The original parameters and correlation features are then input into a multi-task time-series prediction model. The adaptive sensitivity factor guides an attention mechanism to prioritize anomaly signals, simultaneously predicting the future evolution trend of the indicators and the changing trend of the relationships between parameters. Finally, anomaly diagnosis is achieved through a triple criterion: detecting whether the original parameters exceed safety thresholds, analyzing model prediction bias, and assessing the degree of coupling feature breakdown. Based on this, pollution levels are classified, and core anomaly parameters are located based on attention weights.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of water quality testing technology, specifically to a method, system, equipment, and medium for detecting anomalies in water quality index fusion data. Background Technology

[0002] With the increasing severity of global water scarcity and water pollution, water quality monitoring has become a crucial component of ecological environmental protection and public health. Anomaly detection is a core technology for ensuring drinking water safety and aquatic ecosystem health, especially in monitoring water sources such as lakes, reservoirs, and rivers, where real-time identification of risks such as industrial pollution, agricultural runoff, or algal blooms is necessary. Traditional methods primarily rely on single-parameter threshold alarms, such as detecting ammonia nitrogen levels greater than 1.5 mg / L or statistical deviations in the Comprehensive Water Quality Index (WQI). For example, existing technologies typically construct the WQI by fusing multiple parameters using the entropy weight method, then combine it with an LSTM model to predict the index trend. An alarm is triggered when the prediction deviation exceeds an empirical threshold. While this type of method is widely used in municipal water supply and emergency water pollution monitoring, it has significant drawbacks.

[0003] First, parameter fusion leads to the loss of microscopic anomaly signals. The comprehensive index generated by the entropy weight method can mask sudden anomalies in a single parameter. For example, when chlorophyll a concentration rises sharply (a precursor to algal bloom) but other parameters are normal, the WQI may still be within a reasonable fluctuation range. Experiments show that this type of method has a false negative rate of up to 35% for slowly changing pollution, such as eutrophication. Second, it ignores the ecological correlation between parameters. Water quality parameters, such as dissolved oxygen and water temperature, and ammonia nitrogen and total phosphorus, have inherent ecological synergistic patterns. However, existing technologies only monitor independent parameter thresholds or static weights, and cannot capture broken correlations, such as thermal pollution signals where water temperature rises but dissolved oxygen does not decrease synchronously. Actual measurement data from a reservoir shows that traditional methods have a detection delay of 6-48 hours for cross-parameter synergistic anomalies.

[0004] While existing technologies have achieved water quality monitoring and anomaly detection to some extent, they have significant shortcomings. For example, the predictive model is disconnected from anomaly decision-making. Although models like LSTM can predict trends, their outputs, such as the predicted comprehensive index, are not correlated with the dynamic coupling relationship between parameters, leading to a higher false alarm rate. For instance, a natural increase in turbidity after rainfall might trigger a WQI bias alarm, even when no pollution has actually occurred—the root cause being that the model has not integrated the ecological negative correlation between turbidity and chlorophyll a for joint discrimination. Therefore, there is an urgent need for a water quality anomaly detection technology that can simultaneously preserve parameter independence, quantify the breakdown of ecological associations, and achieve a closed-loop prediction-decision system to solve the problem of early and accurate warning in complex pollution scenarios.

[0005] The information disclosed in the background section is only intended to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0006] The purpose of this invention is to provide a method, system, device, and medium for detecting anomalies in water quality index fusion data, so as to solve the problems mentioned in the background art.

[0007] To achieve the above objectives, the present invention provides the following technical solution: A method for detecting anomalies in fused water quality index data, comprising the following steps: Step 1: Obtain three types of parameters affecting water quality from the water source station to be monitored, including physical parameters, chemical parameters and biological parameters. The physical parameters include water source temperature, turbidity and conductivity. The chemical parameters include dissolved oxygen, pH value, chemical oxygen demand, ammonia nitrogen and total phosphorus. The biological parameters include chlorophyll a concentration, Escherichia coli count and biotoxicity. Step 2: While retaining the original parameter data, multimodal feature reconstruction is performed on the acquired three types of parameter data to construct cross-parameter correlation features that characterize the dynamic correlation between parameters. At the same time, based on the degree of deviation of each parameter from its dynamic baseline and the degree of abrupt change in the multi-parameter coupling relationship, an adaptive sensitivity factor is generated in real time. Step 3: Input the original parameters and the constructed cross-parameter correlation features into the multi-task time series prediction model to predict the future evolution trend of various indicators and the changing trend of their relationships. During the prediction process, the attention mechanism is guided by the adaptive sensitivity factor to prioritize potential abnormal signals and output multi-dimensional prediction results. Step 4: First, check whether the original parameter data exceeds the set safety threshold. Then, combine the model prediction deviation and the degree of coupling feature breakdown to comprehensively judge the water quality anomaly level, classify the pollution level according to the abnormal signal, and locate the core abnormal parameters by combining attention weight.

[0008] Furthermore, the logic for obtaining three types of parameters affecting water quality from the water source to be monitored is as follows: Establish a space-time-feature correlation matrix, where the spatial dimension is constructed based on the three-dimensional deployment coordinates of the monitoring nodes, including longitude X, latitude Y and water depth Z axis, which are used to locate the spatial distribution of the monitoring nodes; The feature dimension includes raw parameter channels and cross-parameter correlation channels. The raw parameter channels include physical, chemical, and biological parameter data. The cross-parameter correlation channels construct cross-parameter correlation features reflecting ecological coupling relationships. The set of cross-parameter correlation features is defined as follows: Each element Represents a cross-parameter association pair, which includes Dissolved oxygen / water temperature Ammonia nitrogen / total phosphorus Chlorophyll a / turbidity, i.e. The time dimension is At the current sampling time, record the monitoring variables for each raw parameter channel. The index of the original parameter , This represents the total number of original parameter types, used to characterize the dynamic process of water quality changes.

[0009] Furthermore, the method for identifying the normal fluctuation range of each parameter is as follows: based on the current sampling time... For reference, the sliding window length based on dynamic baseline modeling is W, and the historical observation sequence of the original parameter i is extracted. The sequence is then decomposed into time series components to separate its trend, periodic, and residual components. Furthermore, based on this, the original parameter i is constructed at the current time. dynamic baseline And define its normal fluctuation range as ,in This represents the standard deviation of the residuals within this window; For cross-parameter association pairs Real-time calculation of two key anomaly detection indicators: cross-parameter correlation rupture index and adaptive sensitivity factor, specifically including: The cross-parameter associated rupture index The expression used to reflect the degree of mutation in each cross-parameter association pair is as follows: in, For cross-parameter association pairs, The primary parameter of the cross-parameter association pair, i.e. For dissolved oxygen, ammonia nitrogen, It is chlorophyll a; To correlate the fracture index across parameters, For cross-parameter association pairs in the window The Pearson correlation coefficient within the range, The median of the Pearson correlation coefficient for cross-parameter association pairs at the baseline stage. The main parameter of the cross-parameter association pair in the window within the standard deviation, The median standard deviation of the principal parameters of the cross-parameter correlation pair during the baseline phase; The baseline period is a historical time period in which the monitored object is stable, unpolluted, and without significant disturbance. This historical time period is divided into several equal-length sub-windows, and statistics are calculated independently for each sub-window: the Pearson correlation coefficient of each cross-parameter correlation pair is calculated for each sub-window, and the standard deviation of the principal parameter is calculated for each sub-window. The adaptive sensitivity factor The calculation expression is as follows: in, For the set of cross-parameter association pairs containing the original parameter i, This represents the absolute value of the original parameter i's deviation from the dynamic baseline. It is the measured value of the original parameter i. These are adjustable weighting coefficients, which control the response strength to coupling abrupt changes in single-parameter deviation and cross-parameter correlation, respectively.

[0010] Furthermore, the historical sequence of the original parameters and its corresponding cross-parameter correlation feature sequence are input into the multi-task time series prediction model. The length of the historical sequence input to the prediction model is set to L, then the historical sequence of the original parameters is... The model includes a shared encoder and three decoder branches, which are used to predict the trends of physical, chemical and biological parameters over the next H time steps, and to predict the cross-parameter coupling feature anomaly probability. During training and inference, the adaptive sensitivity factor will be used. Inject a channel attention module to improve the model's attention to channels with significant cross-parameter correlation breakdowns, thereby enhancing the early identification capability of potential anomalous signals; The model outputs the prediction at the current time. Used for current anomaly detection and future trend prediction. and cross-parameter correlation anomaly probability .

[0011] Furthermore, the logic for first checking whether the original parameter data exceeds the set safety threshold is as follows: Detect raw parameters Has the set static security threshold been exceeded? Based on model predictions Compared with actual observed values The deviation between the two values ​​is calculated using the model's prediction of the current time: in, The original parameter i at time i The actual value, For the model in Generated in time Predicted value at any time This is a measure of the prediction error for this parameter; Combining cross-parameter correlation fracture index To determine whether there is a break or abrupt change in the ecological coupling relationship between different parameters, if a certain original parameter i simultaneously satisfies one of the following conditions, prediction bias is considered. ,in The dynamic weighting mechanism, and its cross-parameter correlation with other parameters, leads to the rupture index. , III. Probability of Correlation Anomalies This will trigger a potential pollution risk warning; An anomaly risk score is generated by combining the prediction biases of various parameters and the cross-parameter rupture index. The calculation formula is as follows: in, For comprehensive anomaly scoring, Calculation based on historical 30-day prediction residuals.

[0012] Furthermore, based on the comprehensive anomaly score Compared with the set pollution level judgment threshold , It determines whether the current water quality is normal, slightly abnormal, or moderately polluted, and automatically classifies the pollution level. when If it is a normal or slight fluctuation, record it in the log. If it reaches a certain level, it indicates moderate pollution, and an alert will be issued. If so, it indicates severe pollution, and high-frequency sampling and manual verification will be initiated; Simultaneously, by combining the output weights of the attention mechanism, the feature channel with the highest contribution to the anomaly score is located, and the core factor causing the pollution is identified, i.e., the pollution source is located as follows: , ,in It is considered the most critical single pollutant factor. These are considered the most significant cross-parameter correlation anomaly channels and are marked and recorded as core anomaly indicators. , The threshold is set based on the distribution of historical pollution events.

[0013] The present invention also provides a water quality index fusion data anomaly detection system, the system being used to execute the above-described water quality index fusion data anomaly detection method, comprising: The data acquisition module is used to acquire three types of parameters affecting water quality from the water source station to be monitored, including physical parameters, chemical parameters and biological parameters. The physical parameters include water source temperature, turbidity and conductivity. The chemical parameters include dissolved oxygen, pH value, chemical oxygen demand, ammonia nitrogen and total phosphorus. The biological parameters include chlorophyll a concentration, Escherichia coli count and biotoxicity. The data calculation module is used to reconstruct multimodal features of the three types of parameter data while retaining the original parameter data, construct cross-parameter correlation features that characterize the dynamic correlation between parameters, and generate adaptive sensitivity factors in real time based on the degree of deviation of each parameter from its dynamic baseline and the degree of abrupt change in the multi-parameter coupling relationship. The prediction results module is used to input the original parameters and the constructed cross-parameter correlation features into the multi-task time series prediction model to predict the future evolution trend of various indicators and the changing trend of their relationships. During the prediction process, the adaptive sensitivity factor guides the attention mechanism to prioritize potential abnormal signals and outputs multi-dimensional prediction results. The anomaly detection module is used to first detect whether the original parameter data exceeds the set safety threshold, and then combine the model prediction deviation and the degree of coupling feature failure to comprehensively judge the water quality anomaly level. Based on the anomaly signal, the pollution level is divided, and the core anomaly parameters are located by combining attention weight.

[0014] A device and medium for detecting anomalies in fused water quality index data, comprising a processor and a memory, wherein the memory stores a computer program, and the computer program, when executed by the processor, can implement the aforementioned method for detecting anomalies in fused water quality index data.

[0015] Compared with the prior art, the beneficial effects of the present invention are: The water quality index fusion data anomaly detection method provided by this invention addresses the problems of relying solely on a single parameter change threshold, which makes it difficult to accurately identify pollution anomalies under multi-parameter coupled disturbances, and the slow response and ambiguous location of sudden pollution events. It proposes a systematic solution that integrates multimodal feature reconstruction, dynamic baseline modeling, and cross-parameter correlation perception. By preserving the original parameters, it constructs a dynamic feature system that reflects the coupling relationship between physical, chemical, and biological indicators, which can effectively make up for the lack of sensitivity of traditional anomaly detection to implicit correlation changes between parameters. This invention introduces a cross-parameter correlation rupture index and an adaptive sensitivity factor to dynamically characterize the deviation of the original index from its baseline and the intensity of abrupt changes in cross-parameter relationships, thereby achieving early detection of complex pollution symptoms. Simultaneously, the constructed multi-task time-series prediction model not only achieves multi-dimensional prediction of future trends for various water quality parameters but also guides the model to focus on high-risk characteristic channels by injecting the adaptive sensitivity factor index into the channel attention mechanism, effectively improving the response sensitivity and spatial positioning capability to abnormal signals. The prediction results, combined with current observations and the degree of change in the coupling structure, ultimately achieve a comprehensive determination of pollution levels and identification of core pollution factors, effectively solving key problems in existing technologies such as delayed anomaly judgment, ambiguous pollution source location, and strong subjectivity in anomaly level classification. Attached Figure Description

[0016] Figure 1 This is a schematic diagram of the overall method flow of the present invention; Figure 2 This is a fitted curve of the deviation between the cross-parameter correlation rupture index - current correlation and normal value in this invention; Figure 3 Scatter plot of cross-parameter correlation breakdown index - deviation of current correlation from normal value and scale factor; Figure 4 Adaptive sensitivity factor - absolute value of deviation from dynamic baseline and cross-parameter correlation fracture index histogram; Figure 5 Adaptive sensitivity factor - vertical line plot of absolute deviation from dynamic baseline; Figure 6 This is a flowchart of the overall system modules of the present invention. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments.

[0018] It should be noted that, unless otherwise defined, the technical or scientific terms used in this invention should have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in this invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0019] Example: Please see Figures 1-5 The present invention provides a technical solution: A method for detecting anomalies in fused water quality index data, comprising the following steps: Step 1: Obtain three types of parameters affecting water quality from the water source station to be monitored, including physical parameters, chemical parameters and biological parameters. The physical parameters include water source temperature, turbidity and conductivity. The chemical parameters include dissolved oxygen, pH value, chemical oxygen demand, ammonia nitrogen and total phosphorus. The biological parameters include chlorophyll a concentration, Escherichia coli count and biotoxicity. The logic for obtaining three types of parameters affecting water quality from the water source to be monitored is as follows: Establish a space-time-feature correlation matrix, where the spatial dimension is constructed based on the three-dimensional deployment coordinates of the monitoring nodes, including longitude X, latitude Y and water depth Z axis, which are used to locate the spatial distribution of the monitoring nodes; The feature dimension includes raw parameter channels and cross-parameter correlation channels. The raw parameter channels include physical, chemical, and biological parameter data. The cross-parameter correlation channels construct cross-parameter correlation features reflecting ecological coupling relationships. The set of cross-parameter correlation features is defined as follows: Each element Represents a cross-parameter association pair, which includes Dissolved oxygen / water temperature Ammonia nitrogen / total phosphorus Chlorophyll a / turbidity, i.e. The time dimension is At the current sampling time, record the monitoring variables for each raw parameter channel. The index of the original parameter , This represents the total number of original parameter types, used to characterize the dynamic process of water quality changes; Monitoring nodes are established, with the X / Y / Z axes corresponding to the longitude / latitude / water depth of the water source station to be monitored. Data records include location tags. The physical parameters include water source temperature, turbidity, and conductivity. For water source temperature, an immersion thermistor sensor is used, deployed at the surface, middle, and bottom layers of the water, with a measurement range of 0~50℃ and an accuracy of ±0.1℃. For turbidity, a 90° scattering light method turbidimeter is used, with the probe installed in a stable water flow area, a measurement range of 0~400 NTU, and an accuracy of ±2%. For conductivity, a four-electrode conductivity sensor is used, with a temperature compensation range of -10~60℃, employing a segmented compensation formula. The electrode polarization suppression method uses an AC excitation method with a frequency of 1kHz and an amplitude of 50mV, with a measurement range of 0~200mS / cm and an accuracy of ±0.5%. Conductivity reflects the ion concentration in water and is directly proportional to the dissolved solids in water. An increase in conductivity usually indicates an increase in dissolved ions in water, such as salts and minerals, which may indicate water pollution or salinization. Node positioning X and Y are determined by RTK-GPS (error less than or equal to 5cm), and Z is the real-time water depth measured by a pressure sensor. Node layout schemes can be as follows: Static deployment nodes: Node distribution is fixedly deployed by environmental protection / water conservancy departments, such as surface water section monitoring networks, such as national automatic water quality monitoring stations; Dynamic sampling nodes: such as water quality data collected by unmanned vessels / mobile buoys, which automatically record GPS coordinates during sampling and combine them with sonar / laser depth sounders to measure water depth, constructing a dynamic spatial grid. Water temperature is calibrated quarterly using a NIST-certified standard thermometer at three points: 0°C, 25°C, and 50°C. This affects the content of dissolved gases in the water, such as oxygen, and influences the metabolic rate and growth environment of aquatic organisms. Increased water temperature may indicate that the water body is subject to thermal pollution or the effects of climate warming, and may also affect the species and number of organisms. Turbidity reflects the concentration of suspended particulate matter in water, including silt, algae and other pollutants. Increased turbidity usually indicates that the water body is polluted or the water flow is weakened, which may affect the photosynthesis of aquatic organisms and the ecological balance. Anti-pollution design: Add a probe and add an ultrasonic self-cleaning module with a frequency of 40kHz, which is triggered once every 6 hours. The chemical parameters include dissolved oxygen, pH, chemical oxygen demand (COD), ammonia nitrogen, and total phosphorus. Dissolved oxygen is measured using an optical fluorescence sensor with an oxygen-sensitive membrane on the probe surface to prevent water flow impact. The measurement range is 0–20 mg / L, and the response time is 20 seconds. The pH is measured using a glass composite electrode pH sensor, which serves as an Ag / AgCl reference electrode. The measurement range is 0–14, and the calibration frequency is once a month with an accuracy of ±0.01. The external salt bridge is filled with 0.1 M KCI-agar gel to reduce liquid junction potential drift. The sensor automatically switches to pH 7.00 buffer solution for zero-point calibration every 12 hours. Chemical oxygen demand (COD) was measured online using ultraviolet (UV) digestion-spectrophotometry at a digestion temperature of 150℃ and a detection wavelength of 610nm. The measurement range was 0–1000 mg / L, with an accuracy of ±5%. Ammonia nitrogen was measured using salicylic acid spectrophotometry after the water sample was filtered through a 0.45μm membrane. The measurement range was 0–10 mg / L, with an accuracy of ±0.1 mg / L. Total phosphorus was measured using ammonium molybdate spectrophotometry at 120℃ for 30 minutes using high-temperature and high-pressure digestion. The detection wavelength was 880nm, and the measurement range was 0–5 mg / L, with an accuracy of ±0.01 mg / L. Anti-interference measures included adding potassium sodium tartrate to mask calcium and magnesium ions before ammonia nitrogen detection and adding 0.1 mol / L ascorbic acid reducing agent for total phosphorus detection. Dissolved oxygen is a basic condition for the survival of aquatic organisms and directly affects their respiration and growth. An increase in dissolved oxygen concentration usually indicates a healthy water body. Especially when the water body is eutrophic, insufficient dissolved oxygen will lead to fish hypoxia and aquatic ecological imbalance. The membrane material is easily covered by biofilm after long-term use. An automatic cleaning mechanism is set up: an integrated micro brushing mechanism rotates and cleans the membrane surface every 24 hours. pH value indicates the acidity or alkalinity of water, affecting chemical reactions and the survival of organisms. An elevated pH (alkaline) may indicate alkaline pollution, impacting the health of aquatic life. Chemical oxygen demand (COD) reflects the organic matter content in water and is an important indicator of water pollution levels. A higher COD value indicates a higher concentration of organic pollutants and poorer water quality. Ammonia nitrogen is a significant indicator of water pollution; excessive ammonia nitrogen is toxic to aquatic life. Ammonia nitrogen concentrations exceeding the standard value indicate organic or nitrogen source pollution, potentially leading to eutrophication. Total phosphorus is a crucial factor in eutrophication, affecting the ecological balance of water bodies. Increased total phosphorus concentration usually foreshadows algal blooms, impacting ecological health. The biological parameters include chlorophyll a concentration, Escherichia coli count, and biotoxicity. Chlorophyll a concentration was measured using a fluorescence excitation sensor with an excitation wavelength of 435 nm and a detection wavelength of 685 nm, a measurement range of 0–100 μg / L, and an accuracy of ±5%. The Escherichia coli count was measured using an ATP bioluminescence method with a detection limit of 1 CFU / 100 mL and a response time of 15 minutes. Biotoxicity was measured using a zebrafish embryo heart rate monitoring method, applicable to water samples with a salinity range of 0–35‰. Chlorophyll a is an indicator of algal concentration in water, indirectly reflecting the nutrient status of the water body. An increase in chlorophyll a concentration usually indicates eutrophication, which may lead to ecological imbalance. Escherichia coli is a marker of microbial pollution in water and is usually used to assess water quality safety. A significant increase in the number of E. coli indicates that the water body is polluted by human and animal excrement, which may endanger human health. Biotoxicity tests reflect the potential toxicity of water to organisms and are usually used to assess water quality health. The higher the biotoxicity, the more likely it is that there are substances in the water that are toxic to organisms, which may have a serious impact on the ecosystem.

[0020] Step 2: While retaining the original parameter data, multimodal feature reconstruction is performed on the acquired three types of parameter data to construct cross-parameter correlation features that characterize the dynamic correlation between parameters. At the same time, based on the degree of deviation of each parameter from its dynamic baseline and the degree of abrupt change in the multi-parameter coupling relationship, an adaptive sensitivity factor is generated in real time. The method for identifying the normal fluctuation range of each parameter is as follows: based on the current sampling time For reference, the sliding window length based on dynamic baseline modeling is W, and the historical observation sequence of the original parameter i is extracted. The sequence is then decomposed into time series components, separating its trend, periodic, and residual terms; the sliding window length is... ; Furthermore, based on this, a dynamic baseline of the original parameter i at the current time t is constructed. And define its normal fluctuation range as ,in This represents the standard deviation of the residuals within this window; These are the original parameters. At any moment The normal tolerance range, if Fluctuations falling within this range are considered normal; fluctuations falling outside this range are considered potential anomalies. The larger the value, the wider the normal range and the greater the system tolerance; conversely, the smaller the value, the narrower the range, making it more sensitive and easier to identify as abnormal. Dynamic baseline This represents the original parameters. At the present moment The normal or expected value is calculated as follows: Where, is the original parameter i at historical time. The observed values, This is a long-term trend term, reflecting the long-period, slowly changing components of the parameter. This is a periodic term, reflecting recurring patterns such as daily cycles and seasonal fluctuations. This is the residual term, reflecting short-term random fluctuations or local disturbances; This represents the reasonable level that the parameter should reach at the current moment under normal circumstances, similar to a background normal value, used to compare whether the current actual value is abnormal. These two values ​​at the current moment... Adding the values ​​at each time step results in the value of parameter i under normal circumstances at time 1. The expected level; The closer to the measured value This indicates that the system is operating normally. The greater the deviation from the measured value, the more likely there may be abnormal fluctuations or contamination events. The larger the value, the higher the trend value. The larger, The larger it is, the more it rises cyclically. The larger; For cross-parameter association pairs Real-time calculation of two key anomaly detection indicators: cross-parameter correlation rupture index and adaptive sensitivity factor, specifically including: The cross-parameter associated rupture index The expression used to reflect the degree of mutation in each cross-parameter association pair is as follows: in, For cross-parameter association pairs, The primary parameter of the cross-parameter association pair, i.e. For dissolved oxygen, ammonia nitrogen, It is chlorophyll a; To correlate the fracture index across parameters, For cross-parameter association pairs in the window The Pearson correlation coefficient within the range, The median of the Pearson correlation coefficient for cross-parameter association pairs at the baseline stage. The main parameter of the cross-parameter association pair in the window within the standard deviation, The median standard deviation of the principal parameters of the cross-parameter correlation pair during the baseline phase; To measure whether the coupling between a pair of indicators has broken down, the larger the value of the indicator, the more drastic the change in the correlation between the two parameters, that is, it deviates from the normal pattern. The main parameter itself also fluctuates more drastically than normal. The larger the value, the more likely a systemic abnormality will occur, such as an increase in ammonia nitrogen but no synchronous increase in total phosphorus, or abnormal changes in chlorophyll a but no response in turbidity. This indicates the deviation of the current correlation from the normal value. A larger value indicates a drastic change in the coupling between the two parameters, and its monotonically positive correlation is... ; This is a proportionality factor that reflects the intensity of abnormal fluctuations in the principal parameter. If the fluctuation of the principal parameter is greater than the normal value, this ratio is greater than 1. The larger the ratio, the more unstable the principal parameter, and the stronger the possibility of an anomaly. Therefore, both of these independent variables are positively correlated factors; increasing either one will amplify the anomaly. ; The parameters for calculating the cross-parameter correlation rupture index are shown in Table 1.

[0021] Table 1 Analysis of the data revealed that the deviation of the Pearson correlation coefficient from the baseline at the current moment significantly impacts the cross-parameter correlation breakdown index, reflecting changes in the stability of the ecological coupling relationship between parameters. For example, the correlation coefficient for sample number 1 was 0.502 at the baseline, decreasing to 0.412 at the current moment, with a deviation of 0.09 and a proportionality factor of 1.229 (indicating increased volatility of the principal parameter), resulting in a breakdown index of 0.11. These results suggest that when the correlation is significantly lower than normal and the standard deviation of the principal parameter increases, the coupling relationship between parameters is prone to breakdown, potentially indicating an increased risk of system anomalies. Most samples show that the current correlation is generally lower than the baseline value (8 out of 10 samples have a current correlation lower than the baseline), with deviations ranging from 0.011 to 0.09, indicating that the system as a whole is in a slightly unstable state. For example, the baseline correlation of sample number 6 was 0.421, which has now dropped to 0.338, with a deviation of 0.083, a proportionality factor of 1.177 (increased volatility of the principal parameter), and a breakdown index of 0.1. This further verifies the positive correlation between the decrease in correlation and the risk of breakdown. Samples with a proportionality factor greater than 1 (such as sample number 10 with a proportionality factor of 1.212) are often accompanied by a higher breakdown index, indicating that amplified volatility of the principal parameter is a key factor exacerbating correlation breakdown. In samples with smaller deviations, the breakdown index is also lower, indicating better system stability. For example, sample number 7 has a baseline correlation of 0.478, currently at 0.467, with a deviation of only 0.011, a scaling factor of 0.925 (slightly reduced principal parameter volatility), and a breakdown index of 0.01. This shows that when the correlation is close to normal levels, cross-parameter associations are maintained, contributing to the reliable operation of the overall system performance. These data highlight the importance of monitoring correlation deviations and principal parameter volatility in preventing system anomalies; maintaining the coupling relationship between parameters is key to avoiding cascading failures.

[0022] The baseline period is a historical time period in which the monitored object is stable, unpolluted, and without significant disturbance. This historical time period is divided into several equal-length sub-windows, and statistics are calculated independently for each sub-window: the Pearson correlation coefficient of each cross-parameter correlation pair is calculated for each sub-window, and the standard deviation of the principal parameter is calculated for each sub-window. The purpose of taking the median from the statistics of all historical sub-windows is to: resist outlier interference and avoid distortion of the baseline value by a few abnormal periods, such as equipment failure and sudden pollution; and represent typical state: the median reflects the typical correlation level of most stable periods in history; taking the median from the sub-windows can retain short-term dynamic characteristics and eliminate outlier interference, thus representing the stable state more scientifically. The essence of the median is to discretize the historical benchmark period into multiple sub-windows and take the median of the statistics of each window to achieve robust modeling of typical steady states. This method ensures that the benchmark value is not contaminated by a few abnormal periods and serves the anomaly detection of the current state more reliably. The median of the Pearson correlation coefficient for the cross-parameter association pair at the baseline stage reflects the typical correlation of the cross-parameter association pair k during the historical stable period. The main parameter of the cross-parameter association pair in the window The standard deviation within the main parameters reflects the standard deviation of the main parameters. Typical fluctuation range during historically stable periods; The adaptive sensitivity factor The calculation expression is as follows: in, For the set of cross-parameter association pairs containing the original parameter i, This represents the absolute value of the original parameter i's deviation from the dynamic baseline. It is the measured value of the original parameter i. These are adjustable weighting coefficients, which control the response strength to coupling abrupt changes in response to single-parameter deviation and cross-parameter correlation, respectively. subset Includes all association pairs associated with the original parameter i, each association pair representing the ecological coupling relationship between two indicators, subset This indicates which coupling relationships will be affected by changes in parameter i. When calculating the sensitivity factor, only the coupling breakdown index directly related to i is summarized to avoid interference from irrelevant correlations. In the calculation of the adaptive sensitivity factor, the first term Measure your own deviation, the second item The coupling relationship of the cross-parameter associated fracture index involved in the measurement is abruptly changed; after merging the two, This comprehensively reflects the abnormal sensitivity of parameter i itself and the cross-parameter association associated with parameter i to both aspects. For a certain original parameter i at time... The abnormal sensitivity score reflects whether the original parameter i deviates abnormally from the expected level (by...). (Description), and whether the coupling with other parameters is broken (by...) describe); The larger the value, the higher the likelihood of parameter anomalies, and the higher the warning level. The larger the value, the higher the measured value. Compared with normal values The greater the deviation, the more directly its increase will increase. ; The larger the value of i, the more fractures or the more severe the fractures in the cross-parameter associations involving the original parameter i. Together they determine the sensitivity to overall network coupling anomalies; It adjusts the degree of influence of its own deviation. This involves adjusting the degree of influence of cross-parameter correlations on the rupture term. Both settings are based on the actual situation; for example, for highly sensitive parameters such as ammonia nitrogen, the setting should be increased. For stable parameters, such as pH, increase The primary focus should be on controlling its own fluctuations.

[0023] The parameters for calculating the adaptive sensitivity factor are shown in Table 2.

[0024] Table 2 Analysis of the data revealed that the adaptive sensitivity factor is influenced by both the degree to which the parameter itself deviates from the dynamic baseline and the cross-parameter correlation breakdown index. Furthermore, the adjustable weighting coefficient modulates the contribution intensity of the parameter's own deviation. For example, sample number 3 exhibits a high degree of its own deviation and a significant cross-parameter correlation breakdown index. With a weighting coefficient of 0.593, the sensitivity factor rises to 1.967. This result indicates that when a parameter itself deviates abnormally and the correlation breakdown is severe, the overall system anomaly risk increases sharply, necessitating a corresponding increase in the warning level. Most samples show that the cross-parameter correlation breakdown index is the key factor driving the increase in sensitivity factor, especially when the breakdown index is high, even with small deviations, the sensitivity factor can still increase significantly. For example, sample number 5 has a breakdown index of 3.084, and although its own deviation is only 0.562 and its weighting coefficient is relatively low at 0.362, its sensitivity factor still reaches 2.325, demonstrating the dominant role of correlation breakdown in anomaly detection. This highlights the widespread impact of system coupling breakdown on overall stability; The amplification effect of adjustable weighting coefficients on self-deviation is particularly pronounced when the coefficients are large. For example, sample number 2 has a relatively high weighting coefficient, with a self-deviation of 0.543 (medium level), a rupture index of 2.853, and a sensitivity factor of 1.413. Among these, the high weighting coefficient significantly enhances the contribution of self-deviation (calculated contribution of approximately 26%), indicating that when monitoring stable parameters (such as pH), increasing the adjustable weighting coefficient can more sensitively capture self-fluctuations and optimize the early warning mechanism. These data highlight the importance of dynamically adjusting the weighting coefficients according to parameter characteristics (such as sensitivity or stability) to balance the response to single-parameter deviation and cross-parameter associated rupture.

[0025] Step 3: Input the original parameters and the constructed cross-parameter correlation features into the multi-task time series prediction model to predict the future evolution trend of various indicators and the changing trend of their relationships. During the prediction process, the attention mechanism is guided by the adaptive sensitivity factor to prioritize potential abnormal signals and output multi-dimensional prediction results. The historical sequence of the original parameters and its corresponding cross-parameter correlation feature sequence are input into a multi-task time series prediction model. The length of the historical sequence input to the prediction model is set to L. Then, the historical sequence of the original parameters is... The model includes a shared encoder and three decoder branches, which are used to predict the trends of physical, chemical and biological parameters over the next H time steps, and to predict the cross-parameter coupling feature anomaly probability. It refers to the original parameter i, such as dissolved oxygen, ammonia nitrogen, etc. at historical moments. The measured value, For indexing historical moments, the time range is from arrive There are a total of L historical moments. This constitutes the input sequence, serving as the basic temporal input to the model; The shared encoder is used to extract cross-parameter common features, such as the synergistic effect of temperature on dissolved oxygen and chlorophyll a. The encoder can be LSTM, Transformer, Temporal CNN, etc., and its role is to transform the original input into an intermediate state with temporal memory and semantic fusion capabilities. The branch decoder is used to specialize in predicting the evolution of parameters of a specific category. During training and inference, the adaptive sensitivity factor will be used. Inject a channel attention module to improve the model's attention to channels with significant cross-parameter correlation breakdowns, thereby enhancing the early identification capability of potential anomalous signals; The larger the value, the higher the attention weight, and the more the model focuses on that parameter channel. It is a sensitivity scaling factor that controls the focusing intensity, for example, when dissolved oxygen... From 0.5 to 1.0, the attention weight increased by approximately 300%; The model outputs the prediction at the current time. Used for current anomaly detection and future trend prediction. and cross-parameter correlation anomaly probability ; The higher the value, the higher the predicted concentration of that parameter, such as ammonia nitrogen. This indicates the relationship between predicted ammonia nitrogen exceedance and actual measured values. The larger the value, the higher the probability of an anomaly. If future trends are predicted A continuous increase indicates cumulative pollution of parameters, such as eutrophication; if chlorophyll a At that time, an early warning of algal bloom outbreaks in the next 24 hours will be generated; Cross-parameter correlation anomaly probability It is the probability of cross-parameter association pair k breaking; the calculation process is as follows: the shared encoder outputs the associated feature latent vector. Fully connected layer mapping Sigmoid activation , The closer it is to 1, the higher the probability of cross-parameter associated breakdown, such as the synergistic destruction of dissolved oxygen and water temperature. The closer the correlation coefficient is to 0, the more normal the correlation is; for example, when the real-time correlation coefficient between dissolved oxygen and water temperature drops sharply from 0.8 to 0.2, ,when This indicates an imbalance in the nitrogen-phosphorus ratio in the water body, occurring 12-48 hours earlier than an algal bloom.

[0026] Step 4: First, check whether the original parameter data exceeds the set safety threshold. Then, combine the model prediction deviation and the degree of coupling feature breakdown to comprehensively judge the water quality anomaly level, classify the pollution level according to the abnormal signal, and locate the core abnormal parameters by combining attention weight. The logic for first checking whether the original parameter data exceeds the set safety threshold is as follows: Detect raw parameters Has the set static security threshold been exceeded? If the value exceeds the limit, it indicates an acute pollution event, such as an industrial leak. If the value does not exceed the limit, the process proceeds to anomaly detection based on model predictions. Compared with actual observed values The deviation between the two values ​​is calculated using the model's prediction of the current time: in, The original parameter i at time i The actual value, For the model in Generated in time Predicted value at any time This is a measure of the prediction error for this parameter; The larger the value, the further the actual water quality deviates from the predicted normal evolution trajectory. Its essence is to quantify the difference between expectations and reality. Combining cross-parameter correlation fracture index To determine whether there is a break or abrupt change in the ecological coupling relationship between different parameters, if a certain original parameter i simultaneously satisfies one of the following conditions, prediction bias is considered. ,in The dynamic weighting mechanism, and its cross-parameter correlation with other parameters, leads to the rupture index. , III. Probability of Correlation Anomalies This will trigger a potential pollution risk warning; in, Used to represent the prediction error metric of the original parameter i Historical fluctuation levels The average value of the prediction error metric. The larger the value, the more stable the model prediction. The smaller the value, the stronger the natural fluctuation of the parameter; The larger the value, the more severe the cross-parameter correlation breakdown; This indicates that the model has a greater than 60% confidence in determining the breakdown of the relationship, which is essentially a quantitative assessment of the breakdown of ecological relationships by machine learning; when and hour, ; An anomaly risk score is generated by combining the prediction biases of various parameters and the cross-parameter rupture index. The calculation formula is as follows: in, For comprehensive anomaly scoring, Calculation based on historical 30-day forecast residuals; First item The first term represents the parametric outlier, which is the mean of the relative anomalies of all original parameters. The larger the value, the more significant the multi-parameter collaborative anomaly. Its essence is to eliminate differences in the dimensions and fluctuations of different parameters. The second term... For cross-parameter correlation terms, it is the average rupture intensity of all cross-parameter correlation pairs. The larger the value, the more serious the overall imbalance of the aquatic ecosystem. Its essence is to quantify the anomaly of the ecological relationship between parameters. Based on comprehensive anomaly score Compared with the set pollution level judgment threshold , It determines whether the current water quality is normal, slightly abnormal, or moderately polluted, and automatically classifies the pollution level. when If it is a normal or slight fluctuation, record it in the log. If it reaches a certain level, it indicates moderate pollution, and an alert will be issued. If so, it indicates severe pollution, and high-frequency sampling and manual verification will be initiated; Simultaneously, by combining the output weights of the attention mechanism, the feature channel with the highest contribution to the anomaly score is located, and the core factor causing the pollution is identified, i.e., the pollution source is located as follows: , ,in It is considered the most critical single pollutant factor. These are considered the most significant cross-parameter correlation anomaly channels and are marked and recorded as core anomaly indicators. , The threshold is set based on the distribution of historical pollution events; This is the standard prediction bias of the original parameter i. The larger the value, the more abnormal the parameter is compared to historical fluctuation levels. The larger or The smaller, Increase, then Point to this parameter; Used to identify the most severely broken cross-parameter ecological relationships. The larger the value, the more severe the disruption of ecological synergy among the parameters; The dissolved oxygen / water temperature imbalance is caused by the disruption of the oxygen saturation mechanism, and the pollution source is traced to thermal pollution / decomposition of organic matter. The imbalance of ammonia nitrogen / total phosphorus is a nutrient ratio imbalance, and the pollution source is traced to agricultural runoff / sewage leakage; The chlorophyll a / turbidity imbalance is due to abnormal algal growth, and the pollution source is traced to algal bloom / sediment disturbance. in, This is historical normal data. The 95th percentile, For historical pollution events the median; when When referring to ammonia nitrogen, the focus is on investigating chemical plants and livestock farms. When E. coli is detected, the sewage pipe network should be investigated; when This refers to an imbalance between ammonia nitrogen and total phosphorus, indicating the loss of agricultural fertilizers. The dissolved oxygen / water temperature is used to locate the power plant's temperature discharge outlet.

[0027] Please see Figure 6 The present invention also provides a water quality index fusion data anomaly detection system, the system being used to execute the above-described water quality index fusion data anomaly detection method, comprising: The data acquisition module is used to acquire three types of parameters affecting water quality from the water source station to be monitored, including physical parameters, chemical parameters and biological parameters. The physical parameters include water source temperature, turbidity and conductivity. The chemical parameters include dissolved oxygen, pH value, chemical oxygen demand, ammonia nitrogen and total phosphorus. The biological parameters include chlorophyll a concentration, Escherichia coli count and biotoxicity. The data calculation module is used to reconstruct multimodal features of the three types of parameter data while retaining the original parameter data, construct cross-parameter correlation features that characterize the dynamic correlation between parameters, and generate adaptive sensitivity factors in real time based on the degree of deviation of each parameter from its dynamic baseline and the degree of abrupt change in the multi-parameter coupling relationship. The prediction results module is used to input the original parameters and the constructed cross-parameter correlation features into the multi-task time series prediction model to predict the future evolution trend of various indicators and the changing trend of their relationships. During the prediction process, the adaptive sensitivity factor guides the attention mechanism to prioritize potential abnormal signals and outputs multi-dimensional prediction results. The anomaly detection module is used to first detect whether the original parameter data exceeds the set safety threshold, and then combine the model prediction deviation and the degree of coupling feature failure to comprehensively judge the water quality anomaly level. Based on the anomaly signal, the pollution level is divided, and the core anomaly parameters are located by combining attention weight.

[0028] A device and medium for detecting anomalies in fused water quality index data, comprising a processor and a memory, wherein the memory stores a computer program, and the computer program, when executed by the processor, can implement the aforementioned method for detecting anomalies in fused water quality index data.

[0029] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.

[0030] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented in software, the above embodiments can be implemented, in whole or in part, as a computer program product. Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution.

[0031] 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; they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0032] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. A water quality index fusion data anomaly detection method, characterized in that, The specific steps include: Step 1: Obtain three types of parameters affecting water quality from the water source station to be monitored, including physical parameters, chemical parameters and biological parameters. The physical parameters include water source temperature, turbidity and conductivity. The chemical parameters include dissolved oxygen, pH value, chemical oxygen demand, ammonia nitrogen and total phosphorus. The biological parameters include chlorophyll a concentration, Escherichia coli count and biotoxicity. Step 2: While retaining the original parameter data, multimodal feature reconstruction is performed on the acquired three types of parameter data to construct cross-parameter correlation features that characterize the dynamic correlation between parameters. At the same time, based on the degree of deviation of each parameter from its dynamic baseline and the degree of abrupt change in the multi-parameter coupling relationship, an adaptive sensitivity factor is generated in real time. Step 3: Input the original parameters and the constructed cross-parameter correlation features into the multi-task time series prediction model to predict the future evolution trend of various indicators and the changing trend of their relationships. During the prediction process, the attention mechanism is guided by the adaptive sensitivity factor to prioritize potential abnormal signals and output multi-dimensional prediction results. Step 4: First, check whether the original parameter data exceeds the set safety threshold. Then, combine the model prediction deviation and the degree of coupling feature breakdown to comprehensively judge the water quality anomaly level, classify the pollution level according to the abnormal signal, and locate the core abnormal parameters by combining attention weight. For cross-parameter correlation pair , two types of key anomaly perception indicators are calculated in real time, namely the cross-parameter correlation breakdown index and the adaptive sensitivity factor, which specifically include: The cross-parameter associated rupture index The expression used to reflect the degree of mutation in each cross-parameter association pair is as follows: in, For cross-parameter association pairs, The primary parameter of the cross-parameter association pair, i.e. For dissolved oxygen, ammonia nitrogen, It is chlorophyll a; To correlate the fracture index across parameters, For cross-parameter association pairs in the window The Pearson correlation coefficient within the range, The median of the Pearson correlation coefficient for cross-parameter association pairs at the baseline stage. The main parameter of the cross-parameter association pair in the window within the standard deviation, The median standard deviation of the principal parameters of the cross-parameter correlation pair during the baseline phase; The adaptive sensitivity factor The calculation expression is as follows: in, , This represents the absolute value of the original parameter i's deviation from the dynamic baseline. It is the measured value of the original parameter i. These are adjustable weighting coefficients, which control the response strength to coupling abrupt changes in single-parameter deviation and cross-parameter correlation, respectively.

2. The method for detecting anomalies in fused water quality index data according to claim 1, characterized in that: The logic for obtaining three types of parameters affecting water quality from the water source to be monitored is as follows: Establish a space-time-feature correlation matrix, where the spatial dimension is constructed based on the three-dimensional deployment coordinates of the monitoring nodes, including longitude X, latitude Y and water depth Z axis, which are used to locate the spatial distribution of the monitoring nodes; The feature dimension includes raw parameter channels and cross-parameter correlation channels. The raw parameter channels include physical, chemical, and biological parameter data. The cross-parameter correlation channels construct cross-parameter correlation features reflecting ecological coupling relationships. The set of cross-parameter correlation features is defined as follows: Each element Represents a cross-parameter association pair, which includes Dissolved oxygen / water temperature Ammonia nitrogen / total phosphorus Chlorophyll a / turbidity, i.e. The time dimension is At the current sampling time, record the monitoring variables for each raw parameter channel. The index of the original parameter , This represents the total number of original parameter types, used to characterize the dynamic process of water quality changes.

3. The method for detecting anomalies in fused water quality index data according to claim 2, characterized in that: The method for identifying the normal fluctuation range of each parameter is as follows: based on the current sampling time For reference, the sliding window length based on dynamic baseline modeling is W, and the historical observation sequence of the original parameter i is extracted. The sequence is then decomposed into time series components to separate its trend, periodic, and residual components. Furthermore, based on this, the original parameter i at the current time is constructed. dynamic baseline And define its normal fluctuation range as ,in This represents the standard deviation of the residuals within this window; The baseline period is a historical time period in which the monitored object is stable, uncontaminated, and without significant disturbance. This historical time period is divided into several equal-length sub-windows, and statistics are calculated independently for each sub-window: the Pearson correlation coefficient for each cross-parameter correlation pair is calculated for each sub-window, and the standard deviation of the principal parameter is calculated for each sub-window. .

4. The method for detecting anomalies in fused water quality index data according to claim 3, characterized in that: The historical sequence of the original parameters and its corresponding cross-parameter correlation feature sequence are input into a multi-task time series prediction model. The length of the historical sequence input to the prediction model is set to L. Then, the historical sequence of the original parameters is... The model includes a shared encoder and three decoder branches, which are used to predict the trends of physical, chemical and biological parameters over the next H time steps, and to predict the cross-parameter coupling feature anomaly probability. During training and inference, the adaptive sensitivity factor will be used. Inject a channel attention module to improve the model's attention to channels with significant cross-parameter correlation breakdowns, thereby enhancing the early identification capability of potential anomalous signals; The model outputs the prediction at the current time. Used for current anomaly detection and future trend prediction. and cross-parameter correlation anomaly probability .

5. The method for detecting anomalies in fused water quality index data according to claim 4, characterized in that: The logic for first checking whether the original parameter data exceeds the set safety threshold is as follows: Detect raw parameters Has the set static security threshold been exceeded? Based on model predictions Compared with actual observed values The deviation between the two values ​​is calculated using the model's prediction of the current time: in, The original parameter i at time i The actual value, For the model in Generated in time Predicted value at any time This is a measure of the prediction error for this parameter; Combining cross-parameter correlation fracture index To determine whether there is a break or abrupt change in the ecological coupling relationship between different parameters, if a certain original parameter i simultaneously satisfies one of the following conditions, prediction bias is considered. ,in The dynamic weighting mechanism, and its cross-parameter correlation with other parameters, leads to the rupture index. , III. Probability of Correlation Anomalies This will trigger a potential pollution risk warning; An anomaly risk score is generated by combining the prediction biases of various parameters and the cross-parameter rupture index. The calculation formula is as follows: in, For comprehensive anomaly scoring, Calculation based on historical 30-day prediction residuals.

6. The method for detecting anomalies in fused water quality index data according to claim 5, characterized in that: Based on comprehensive anomaly score Compared with the set pollution level judgment threshold , It determines whether the current water quality is normal, slightly abnormal, or moderately polluted, and automatically classifies the pollution level. when If it is a normal or slight fluctuation, record it in the log. If it reaches a certain level, it indicates moderate pollution, and an alert will be issued. If so, it indicates severe pollution, and high-frequency sampling and manual verification will be initiated; Simultaneously, by combining the output weights of the attention mechanism, the feature channel with the highest contribution to the anomaly score is located, and the core factor causing the pollution is identified, i.e., the pollution source is located as follows: , ,in It is considered the most critical single pollutant factor. These are considered the most significant cross-parameter correlation anomaly channels and are marked and recorded as core anomaly indicators. , The threshold is set based on the distribution of historical pollution events.

7. A water quality index fusion data anomaly detection system, characterized in that: The system is used to execute the water quality index fusion data anomaly detection method according to any one of claims 1-6, including: The data acquisition module is used to acquire three types of parameters affecting water quality from the water source station to be monitored, including physical parameters, chemical parameters and biological parameters. The physical parameters include water source temperature, turbidity and conductivity. The chemical parameters include dissolved oxygen, pH value, chemical oxygen demand, ammonia nitrogen and total phosphorus. The biological parameters include chlorophyll a concentration, Escherichia coli count and biotoxicity. The data calculation module is used to reconstruct multimodal features of the three types of parameter data while retaining the original parameter data, construct cross-parameter correlation features that characterize the dynamic correlation between parameters, and generate adaptive sensitivity factors in real time based on the degree of deviation of each parameter from its dynamic baseline and the degree of abrupt change in the multi-parameter coupling relationship. The prediction results module is used to input the original parameters and the constructed cross-parameter correlation features into the multi-task time series prediction model to predict the future evolution trend of various indicators and the changing trend of their relationships. During the prediction process, the adaptive sensitivity factor guides the attention mechanism to prioritize potential abnormal signals and outputs multi-dimensional prediction results. The anomaly detection module is used to first detect whether the original parameter data exceeds the set safety threshold, and then combine the model prediction deviation and the degree of coupling feature failure to comprehensively judge the water quality anomaly level. Based on the anomaly signal, the pollution level is divided, and the core anomaly parameters are located by combining attention weight.

8. A device and medium for detecting anomalies in water quality index fusion data, characterized in that, It includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement a method for detecting anomalies in water quality index fusion data as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Water quality online monitoring method and system based on multi-parameter coupling crossing

    CN109932496A

  • Water quality index fusion data anomaly detection method and system

    CN113435547A