A Distributed Water Pollution Early Warning Method Based on Edge Computing

By deploying long short-term memory artificial neural networks and single-class support vector machine models at water quality monitoring nodes in industrial parks, and combining them with multidimensional residual analysis, the problems of response delay and false alarms/missed alarms in traditional water quality monitoring systems have been solved, enabling rapid and accurate identification of sudden pollution and covert illegal discharges.

CN122494036APending Publication Date: 2026-07-31LIAONING INST OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
LIAONING INST OF SCI & TECH
Filing Date
2026-04-09
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Traditional water quality monitoring systems suffer from delayed response, high false alarm rate, and high false alarm rate when facing sudden pollution in industrial parks. They are particularly difficult to accurately and quickly identify when faced with complex pollutants and illegal discharge activities disguised as legitimate emissions.

Method used

At each monitoring node, a long short-term memory artificial neural network time-series prediction model and a single-class support vector machine model are deployed. By calculating the fluctuation residual values ​​of water quality indicators locally and combining them with multi-dimensional collaborative judgment, abnormal behavior is identified and early warnings are generated.

Benefits of technology

It enables rapid and accurate identification of sudden trace pollution in the water bodies of industrial parks, reducing the false alarm rate to below 5%, shortening the response time to 0.5 seconds, and increasing the identification rate of covert illegal discharge behavior to over 95%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122494036A_ABST
    Figure CN122494036A_ABST
Patent Text Reader

Abstract

This invention discloses a distributed water pollution early warning method based on edge computing, belonging to the field of signal device technology. The method includes: deploying edge computing monitoring nodes at river cross-sections in industrial parks to collect historical data on multiple water quality indicators; training long short-term memory artificial neural network prediction models locally on each node for each indicator; during real-time monitoring, inputting data from several previous moments into the model to obtain the expected predicted value, and calculating the fluctuation residual between the measured value and the predicted value; combining the multidimensional residuals into a vector and inputting it into a pre-trained single-class support vector machine model; if the model is determined to be outside the normal fluctuation range, an early warning information is generated and reported. This invention achieves second-level response through edge computing, utilizes prediction residuals to remove normal fluctuations, and combines multidimensional collaborative analysis to accurately identify sudden pollution and concealed illegal discharges, significantly reducing the false alarm rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of signal device technology, and in particular to a distributed water pollution early warning method based on edge computing. Background Technology

[0002] With the rapid development of industrialization, chemical, dyeing, and electroplating enterprises often cluster in specific industrial parks. The water bodies surrounding these parks face an extremely high risk of sudden pollution, primarily stemming from workplace accidents, illegal discharges, and pipeline leaks. These pollution events are characterized by their instantaneous nature, high randomness, and complex pollutant composition (often containing heavy metals and toxic organic compounds), posing a serious threat to downstream drinking water sources and ecosystems. Traditional early warning methods rely on two main approaches: establishing centralized water quality monitoring stations to obtain data through chemical analysis every few hours; and having maintenance personnel manually sample water along rivers periodically. However, both methods suffer from significant "response vacuum periods" when facing sudden pollution. Pollutants may form clumps and rapidly migrate downstream within the sampling interval, and by the time the central station obtains the results, the optimal time for intervention has already passed.

[0003] In recent years, although real-time early warning technology based on online monitoring instruments has emerged, which involves deploying sensors in water bodies and transmitting data back to the cloud or central server for analysis, practical applications have revealed three major obstacles in industrial park scenarios: First, the latency in data transmission and processing. The high-frequency data reporting from numerous monitoring nodes (e.g., once per minute) places immense computational pressure on the central server, causing data processing queues to accumulate. There is often a delay of several minutes or even longer between data generation and the issuance of early warning information. For fast-flowing rivers, this allows the pollution plume to drift tens of meters. Second, the confusion between normal fluctuations and sudden pollution events. The wastewater received by industrial parks exhibits periodic fluctuations that meet discharge standards (e.g., higher discharges during the day and lower discharges at night). These normal fluctuations are easily misinterpreted as pollution events by simple threshold-triggered early warning systems, leading to frequent false alarms and a "crying wolf" mentality among management personnel, thus undermining the credibility of the early warning system. Third, existing early warning logic is mostly based on single-point independent triggering or simple time-series comparison, which cannot effectively detect "gradual illegal discharge" or "intermittent poisoning" that uses legitimate emission fluctuations as cover. These behaviors gradually increase the concentration or use water flow to dilute the pollutants, keeping the data changes at individual monitoring points within a seemingly "reasonable" fluctuation range, thereby evading supervision. Therefore, how to achieve accurate and rapid identification of sudden trace pollution behaviors in the highly volatile and dynamic water environment of industrial parks is a technical challenge that urgently needs to be solved in this field. Summary of the Invention

[0004] To achieve the above objectives, this invention provides a distributed water pollution early warning method based on edge computing, comprising the following steps:

[0005] Step 1: Deploy edge computing monitoring nodes at each preset monitoring section of the target river within the industrial park. Each edge computing monitoring node continuously collects multiple raw water quality indicators of the water body at the current monitoring section at multiple historical sampling times according to a preset sampling frequency, and stores the collected raw water quality indicators as a local historical time series dataset.

[0006] Step 2: Each edge computing monitoring node retrieves the historical time-series dataset and, based on the historical time-series dataset, trains a dedicated long short-term memory artificial neural network time-series prediction model for each type of raw water quality index data, thereby generating a multi-model combination prediction engine locally on the edge computing monitoring node.

[0007] Step 3: After completing the training of the prediction model, each edge computing monitoring node collects multiple raw water quality index data in real time at each real-time sampling moment through the sensor group to obtain the measured dataset;

[0008] Step 4: Each edge computing monitoring node inputs water quality index data from several consecutive sampling times prior to the current time into the long short-term memory artificial neural network time-series prediction model corresponding to the water quality index trained in Step 2, calculates and outputs the expected predicted value of the water quality index at the current time, then calculates the difference between the measured value of the water quality index at the current time and the expected predicted value, and marks the absolute value of the difference as the fluctuation residual value of the water quality index at the current time.

[0009] Step 5: Each edge computing monitoring node combines the multiple fluctuation residual values ​​corresponding to the calculated multiple water quality indicators into a multidimensional residual vector, and inputs the multidimensional residual vector into a pre-trained abnormal behavior judgment model based on a single-class support vector machine. If the single-class support vector machine model determines that the current multidimensional residual vector is within the normal fluctuation domain, then the current water state is determined to be normal fluctuation.

[0010] If the single-class support vector machine model determines that the current multidimensional residual vector is outside the normal fluctuation domain, it determines that there is abnormal pollution behavior in the current water body state, immediately generates pollution early warning information containing the location of the edge computing monitoring node, the time of the abnormality, and the measured dataset, and reports it to the monitoring center via the network.

[0011] Preferably, the specific process of training a dedicated long short-term memory artificial neural network time-series prediction model for each type of raw water quality index data in step 2 includes: first, normalizing each type of raw water quality index data in the historical time-series dataset to map the data range to the interval between 0 and 1;

[0012] Secondly, a sliding window method is used to construct a training sample set. Each training sample uses the index data of N consecutive sampling times as input features and the index data of the (N+1)th sampling time as the prediction label.

[0013] Then, a neural network structure is constructed that includes a sequence input layer, a long short-term memory layer, a dropout layer, and a fully connected output layer. The long short-term memory layer contains multiple memory units to learn long-term dependencies in the time series, and the dropout layer randomly discards some of the outputs of neurons at a preset dropout rate during training to prevent overfitting.

[0014] Finally, using the constructed training sample set, with mean squared error as the loss function, the neural network structure is iteratively trained using an adaptive time estimation optimizer until the loss function converges. The trained model weights are then saved to obtain the dedicated long short-term memory artificial neural network time-series prediction model.

[0015] Preferably, the training process of the pre-trained abnormal behavior judgment model based on single-class support vector machine in step 5 is completed locally on the edge computing monitoring node. Specifically, it includes: collecting the historical fluctuation residual vector sequence of the monitoring section when no sudden pollution event occurs in at least one complete production cycle. The historical fluctuation residual vector sequence is obtained by backtesting the original water quality index data of the historical period by executing steps 3 to 4.

[0016] All multidimensional residual vectors in the historical fluctuation residual vector sequence are used as training positive samples representing normal water body states. They are input into a single-class support vector machine algorithm for training. An optimization problem is solved to find a hypersphere that can encompass all the training positive samples as much as possible. The internal space of the hypersphere is defined as the normal fluctuation domain, and the center coordinates and radius of the hypersphere are saved as the decision boundary parameters of the abnormal behavior determination model.

[0017] Preferably, after generating the pollution warning information containing the location of the edge computing monitoring node, the abnormal time, and the measured dataset in step 5, a warning review process is also included: the edge computing monitoring node that triggered the warning immediately increases its sampling frequency to the preset maximum frequency, and repeats steps 3 to 5 for three consecutive sampling times after the frequency is increased, and performs fluctuation residual calculation and abnormal behavior judgment on the measured data of the subsequent three consecutive sampling times;

[0018] If the results of three consecutive assessments are all abnormal, the confidence level of this pollution warning information will be marked as high and reported to the monitoring center again.

[0019] If one or more of the three consecutive assessments result in a "normal" assessment, the confidence level of this pollution warning will be marked as "pending verification" and the information will be reported to the monitoring center again.

[0020] Preferably, in step 5, the multiple fluctuation residual values ​​corresponding to the calculated multiple water quality indicators are combined into a multidimensional residual vector. Specifically, the multiple water quality indicators include at least the concentration of characteristic heavy metal ions, the concentration of specific organic pollutants, the turbidity of the water body, and the pH value. The fluctuation residual values ​​of the characteristic heavy metal ion concentration, the fluctuation residual values ​​of the specific organic pollutant concentration, the fluctuation residual values ​​of the turbidity of the water body, and the fluctuation residual values ​​of the pH value are arranged in a fixed index order to form a four-dimensional or higher-dimensional residual vector.

[0021] The determination process of the multidimensional residual vector by the single-class support vector machine model is to comprehensively consider the degree of coordinated deviation between multiple indicators in a multidimensional space spanned by the fluctuation residual values ​​of each indicator, rather than to make an independent threshold judgment on a single indicator.

[0022] Preferably, in step 1, the multiple raw water quality index data collected by each edge computing monitoring node undergoes a data preprocessing step before being stored in the local historical time-series dataset: the edge computing monitoring node performs analog-to-digital conversion on the raw electrical signals collected by the sensor group to obtain raw readings, and then uses a median-based sliding window filtering method to remove outlier values ​​caused by instantaneous sensor interference in the raw readings. The filtered data is then stored as valid raw water quality index data to ensure the stability and reliability of the historical time-series dataset and the measured dataset.

[0023] Preferably, in step 2, after the edge computing monitoring node generates a multi-model combination prediction engine locally, it further includes a model adaptive update step: the edge computing monitoring node, with a preset update period T, combines the newly collected and judged normal fluctuation measured data within the update period T and the corresponding prediction input data of the previous moment into a new training sample, and performs incremental online fine-tuning training on the long short-term memory artificial neural network time-series prediction model, updates the model weights, so that the prediction engine can adaptively track the long-term trend changes of water bodies caused by seasonal changes or production process adjustments.

[0024] Preferably, the preset maximum frequency is three times the preset sampling frequency;

[0025] If, after completing the early warning review process, the edge computing monitoring node that triggered the early warning has three consecutive abnormal judgment results and has already reported the pollution early warning information with a high confidence level, it shall maintain the highest frequency of monitoring.

[0026] If the review process ends and no further report is submitted, meaning that the results of three consecutive judgments are not all abnormal, the edge computing monitoring node will restore the sampling frequency to the preset sampling frequency in order to balance monitoring sensitivity with node energy consumption and data storage pressure.

[0027] Preferably, the pollution warning information generated in step 5 is in the form of a structured self-describing data packet, which includes a message header field for identifying the data packet type, version number, and source node ID.

[0028] The timestamp field is used to record the precise moment when the alert was triggered;

[0029] The location field is used to store the preset geographic coordinates of the edge computing monitoring node;

[0030] The anomaly indicator field is used to record a list of specific indicator names corresponding to the multidimensional residual vectors that are judged as anomalies by the single-class support vector machine model.

[0031] The measured data field is used to store the raw readings and units of all indicators in the measured dataset at the time the warning is triggered;

[0032] The confidence level field is used to populate the review results after the review process.

[0033] Preferably, the reporting to the monitoring center via the network adopts the following communication mechanism: the edge computing monitoring node has at least two different types of communication modules built in, including a 5G communication module as the main link and a Beidou short message communication module as a backup link;

[0034] Under normal operating conditions, the pollution warning information is reported first via the 5G communication module in the form of User Datagram Protocol (UDP) data packets.

[0035] When the edge computing monitoring node detects that the 5G network signal strength is lower than a preset threshold or fails to send three consecutive messages, it automatically switches to the Beidou short message communication module to encode the pollution warning information into a message conforming to the Beidou short message format and send it. After the network is restored, it sends a request to the monitoring center to retransmit the logs during the network outage.

[0036] The beneficial effects of this invention are:

[0037] 1. This invention utilizes a long short-term memory artificial neural network time-series prediction model deployed locally at each edge computing monitoring node to deeply learn the periodic and regular water quality fluctuation characteristics of rivers in industrial parks caused by legitimate production activities. In real-time monitoring, this invention does not directly perform threshold judgments on the raw water quality data, but instead calculates the fluctuation residual value between the measured value and the model's predicted value. This process removes the predictable normal fluctuation component, focusing only on the abnormal deviations that cannot be predicted by the model. Subsequently, the fluctuation residual values ​​of multi-dimensional indicators are combined into a multi-dimensional residual vector, which is then input into a single-class support vector machine model for joint judgment. This mechanism can comprehensively identify collaborative abnormal patterns among multiple indicators in a high-dimensional space spanned by the residuals of multiple indicators, rather than making isolated judgments on a single indicator. Through two levels of filtering—"predictive removal of normal fluctuations" and "multi-dimensional collaborative judgment"—this invention can accurately distinguish between normal data changes caused by production fluctuations and abnormal changes caused by events such as illegal discharge and leakage, reducing the false alarm rate to below 5% of traditional methods, thus solving the long-standing problem of high false alarms in industrial park water quality early warning systems.

[0038] 2. This invention deploys all computationally intensive tasks, including the prediction of calls to long short-term memory artificial neural network models and the anomaly detection of single-class support vector machine models, locally on edge computing monitoring nodes close to the sensors. Each monitoring node independently executes the complete closed-loop process of data acquisition, residual calculation, anomaly identification, and early warning generation, only reporting a tiny structured early warning data packet to the monitoring center via the network when a pollution event is finally confirmed. This architecture completely abandons the traditional mode of real-time transmission of massive amounts of high-frequency raw data back to the central server for queuing and processing, eliminating the two major sources of latency: network transmission delay and central server computing queue accumulation. In practical applications, the entire process from sensor data acquisition to early warning information generation takes less than 0.5 seconds, a qualitative leap compared to the minute-level or even hour-level response delay of traditional centralized architectures, buying valuable time for downstream water source emergency response and pollution interception.

[0039] 3. Traditional early warning methods based on single-point thresholds or simple trend judgments are prone to miss detection when perpetrators use legal emission fluctuations as cover and gradually increase concentrations or use intermittent poisoning. This invention, through a multi-dimensional residual vector collaborative analysis mechanism, can keenly detect trend anomalies in multiple water quality indicators that simultaneously deviate from historical patterns. When illegal discharge causes a slow but continuous cumulative increase in the concentrations of indicators such as hexavalent chromium ions, aniline, and chemical oxygen demand over tens of minutes, even if the absolute value at each moment is lower than the emission standard limit, the residuals between these values ​​and the predicted values ​​from their respective long short-term memory artificial neural network models will remain positive and show a collaborative growth trend. The single-class support vector machine model can accurately identify such trajectories deviating from normal fluctuation ranges in the high-dimensional residual space, classifying them as outliers and triggering early warnings. This invention increases the detection rate of covert illegal discharge from less than 20% using traditional methods to over 95%, providing environmental regulatory departments with a powerful technical investigation tool. Attached Figure Description

[0040] To more clearly illustrate the technical solutions in this invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, those skilled in the art can obtain other drawings based on these drawings without creative effort.

[0041] Figure 1 This is a flowchart of the steps of the method of the present invention;

[0042] Figure 2 This is a flowchart illustrating the specific steps involved in step 2 of the method of the present invention: training a dedicated long short-term memory artificial neural network time-series prediction model for each type of raw water quality index data. Detailed Implementation

[0043] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. It should also be noted that, to make the embodiments more comprehensive, the following embodiments are the best and preferred embodiments, and those skilled in the art can use other alternative methods to implement some well-known technologies; moreover, the accompanying drawings are only for more specific description of the embodiments and are not intended to specifically limit the present invention.

[0044] Please see Figures 1-2 This invention provides a distributed water pollution early warning method based on edge computing, and its implementation is described in complete detail below:

[0045] Step 1: Deployment of edge computing monitoring nodes and water quality data acquisition

[0046] At each pre-defined monitoring section of the target river within the industrial park, an edge computing monitoring node is deployed. Each edge computing monitoring node integrates a sensor array for detecting multiple water quality indicators. Each edge computing monitoring node continuously collects raw water quality indicator data for the current monitoring section at multiple historical sampling times according to a pre-defined sampling frequency. Before storing the collected raw water quality indicator data into a local historical time-series dataset, a data preprocessing step is performed. This preprocessing step involves the edge computing monitoring node performing analog-to-digital conversion on the raw electrical signals collected by the sensor array to obtain raw readings for each water quality indicator. Subsequently, a median-based sliding window filtering method is used to process the raw readings to remove outliers caused by transient sensor interference. Specifically, a fixed-length sliding window is set for each water quality indicator. After sorting all raw readings within the window, the median value is taken as the valid value at the center of the window. If a raw reading is identified as an outlier, it is removed and supplemented by data from adjacent windows. The filtered data, serving as valid raw water quality indicator data, is stored locally on the edge computing monitoring node's storage medium, forming the node's historical time-series dataset. These multiple water quality indicators include at least the concentrations of characteristic heavy metal ions, specific organic pollutants, water turbidity, and pH value.

[0047] Step 2: Building a localized multi-model ensemble prediction engine

[0048] Each edge computing monitoring node retrieves a locally stored historical time-series dataset. Based on this dataset, a dedicated long short-term memory artificial neural network time-series prediction model is trained for each type of raw water quality indicator data. This generates a multi-model combined prediction engine composed of multiple independent models locally on the edge computing monitoring node. The specific process of training a dedicated model for each type of raw water quality indicator data includes the following sub-steps:

[0049] First, the raw water quality data for each indicator in the historical time series dataset is normalized, mapping the data range to the interval between 0 and 1.

[0050] Secondly, a sliding window method is used to construct the training sample set for this indicator. A fixed window length N is set, and each training sample uses the normalized data of this indicator at N consecutive sampling times as input features, and the normalized data of this indicator at the (N+1)th sampling time as the prediction label.

[0051] Then, a neural network structure for time series prediction is constructed. This network structure includes a sequence input layer, a long short-term memory layer, a dropout layer, and a fully connected output layer. The long short-term memory layer contains multiple memory units and learns long-term dependencies in the time series through its internal forget gate, input gate, and output gate mechanisms. The dropout layer randomly discards some neurons' outputs at a preset dropout rate during training to prevent overfitting. The fully connected output layer is used to output the predicted values.

[0052] Finally, using the constructed training sample set and the mean squared error as the loss function, an adaptive time estimation optimizer is employed to iteratively train the neural network structure until the loss function converges. The trained model weights are then saved, resulting in a long short-term memory artificial neural network time-series prediction model specifically designed for predicting this water quality indicator. This process is repeated for each water quality indicator to be monitored, training its respective prediction model.

[0053] After generating the multi-model combined prediction engine, a model adaptive update step is also included: the edge computing monitoring node, at a preset update period T, combines newly collected measured data (determined as normal fluctuations in subsequent steps) and their corresponding previous-time prediction input data into new training samples. These new samples are then used to incrementally fine-tune the existing long short-term memory artificial neural network time-series prediction model, updating the model weights. This enables the prediction engine to adaptively track long-term trend changes in water bodies caused by seasonal variations or adjustments in production processes.

[0054] Step 3: Real-time water quality data acquisition

[0055] After training the prediction model, the system enters the real-time monitoring phase. At each real-time sampling moment, each edge computing monitoring node synchronously collects multiple raw water quality indicators through its integrated sensor array, obtaining the measured dataset for that moment.

[0056] Step 4: Calculation of Fluctuation Residual Values

[0057] For each sampling moment acquired in real time, each edge computing monitoring node performs fluctuation residual value calculation. The specific process is as follows: For each water quality indicator, historical data from several consecutive sampling moments prior to the current moment are input into the long short-term memory artificial neural network time-series prediction model corresponding to that indicator, trained in step 2. The model calculates and outputs the expected predicted value of the water quality indicator at the current moment. Subsequently, the difference between the measured value of the water quality indicator at the current moment and the obtained expected predicted value is calculated, and the absolute value of this difference is marked as the fluctuation residual value of the water quality indicator at the current moment.

[0058] Step 5: Anomaly Detection and Early Warning Generation

[0059] Each edge computing monitoring node arranges the multiple fluctuation residual values ​​corresponding to the various water quality indicators calculated in step 4 according to a fixed indicator order and combines them into a multidimensional residual vector. For example, the fluctuation residual values ​​of characteristic heavy metal ion concentration, specific organic pollutant concentration, water turbidity, and pH value can be combined into a four-dimensional or higher-dimensional residual vector.

[0060] Subsequently, the multidimensional residual vector is input into a pre-trained abnormal behavior judgment model based on a single-class support vector machine. The training process of this abnormal behavior judgment model is completed locally at the edge computing monitoring node, specifically including: collecting historical data of the monitoring section within at least one complete production cycle, assuming no sudden pollution events; performing backtesting calculations by executing the methods described in steps 3 to 4 to obtain a series of historical fluctuation residual vectors. These historical fluctuation residual vectors are used as training positive samples representing normal water body states and input into the single-class support vector machine algorithm for training. By solving an optimization problem, a hypersphere that can encompass as many training positive samples as possible is found, and the internal space of this hypersphere is defined as the normal fluctuation domain. The coordinates of the hypersphere's center and radius are saved as the judgment boundary parameters of the abnormal behavior judgment model.

[0061] If the single-class support vector machine model determines that the current multidimensional residual vector is within the normal fluctuation domain, then the current water state is determined to be normal fluctuation, and the process ends.

[0062] If the single-class support vector machine model determines that the current multidimensional residual vector is outside the normal fluctuation domain, it indicates that the current water body exhibits abnormal pollution behavior. At this point, the edge computing monitoring node immediately generates a pollution warning message. This warning message is a structured self-describing data packet containing the following fields: a header field to identify the data packet type, version number, and source node identity; a timestamp field to record the precise time the warning was triggered; a location field to store the preset geographical coordinates of the edge computing monitoring node; an anomaly indicator field to record a list of specific indicator names corresponding to the multidimensional residual vector determined to be abnormal; a measured data field to store the original readings and units of all indicators in the measured dataset at the time the warning was triggered; and a confidence level field, initially empty.

[0063] After generating pollution early warning information, a warning verification process is also included: the edge computing monitoring node that triggered the warning immediately increases its sampling frequency to the preset maximum frequency, which is three times the preset sampling frequency. For the next three consecutive sampling times after increasing the sampling frequency, steps 3 to 5 are repeated to calculate fluctuation residuals and determine abnormal behavior based on the measured data at the subsequent three consecutive sampling times.

[0064] If the results of three consecutive assessments are all abnormal, the confidence level of this pollution warning information will be marked as high.

[0065] If one or more of the three consecutive judgments result in a judgment of normal, the confidence level of this pollution warning information will be marked as pending verification.

[0066] After completing the review process, the pollution warning information with the confidence level filled in will be reported again. If the three consecutive judgment results are all abnormal and a pollution warning information with a high confidence level has been reported, the node will continue monitoring at the highest frequency. If the review process ends and no high confidence level warning is reported again, that is, the three consecutive judgment results are not all abnormal, the edge computing monitoring node will restore the sampling frequency to the preset sampling frequency.

[0067] Finally, the edge computing monitoring nodes report the final pollution warning information to the monitoring center via the network. The specific communication mechanism is as follows: the edge computing monitoring nodes have at least two different types of communication modules built-in, including a 5G mobile communication technology module as the primary link and a BeiDou satellite navigation system short message communication module as a backup link. Under normal operating conditions, pollution warning information is reported first via the 5G mobile communication technology module in the form of User Datagram Protocol (UDP) data packets. When the edge computing monitoring node detects that the 5G mobile communication network signal strength is lower than a preset threshold or after three consecutive transmission failures, it automatically switches to the BeiDou satellite navigation system short message communication module, encodes the pollution warning information into a message conforming to the BeiDou short message format, and sends it. After the network is restored, it sends a request to the monitoring center to retransmit the logs from the period of network outage.

[0068] By fully implementing the above steps, rapid and accurate early warning of sudden water pollution incidents in the industrial park's river environment can be achieved.

[0069] Example

[0070] This embodiment uses a polluted river within a fine chemical industrial park in East China as an application scenario. This park houses dye, electroplating, and pesticide production enterprises, and a medium-sized drinking water source is located 15 kilometers downstream. Characteristic pollutants in the river water include hexavalent chromium ions, aniline, chemical oxygen demand (COD), and suspended solids. The pH value of the water exhibits regular daily variations due to the periodic discharge from the enterprises' acid and alkali washing processes. Historically, this river has experienced three instances of water supply disruptions to the downstream source due to illegal dumping by tanker trucks, none of which were detected in advance by traditional early warning systems.

[0071] The distributed water pollution early warning method based on edge computing of the present invention was fully deployed and verified on the river in the park. The specific implementation process is as follows.

[0072] I. Deployment and Data Acquisition of Edge Computing Monitoring Nodes

[0073] Three edge computing monitoring nodes with IP67 protection rating and stainless steel casings were deployed at the upstream inflow section of the river within the industrial park, 500 meters downstream of the core enterprise cluster area, and 200 meters upstream of the main discharge outlet. Each edge computing monitoring node integrates a hexavalent chromium ion selective electrode sensor, an aniline spectrometer, a chemical oxygen demand (COD) UV absorption sensor, a turbidimeter, and a pH glass electrode. The preset sampling frequency for each edge computing monitoring node was set to once per minute. Each edge computing monitoring node operated continuously for 30 days, collecting and locally storing historical data covering the entire production cycle (including weekdays, weekends, and nighttime shutdown periods), forming a historical time-series dataset.

[0074] Before data is stored in local memory, each edge computing monitoring node performs a data preprocessing step: the raw electrical signals collected by the sensor group are first converted into raw readings by a 24-bit analog-to-digital converter. Then, the edge computing monitoring node uses a median-based sliding window filtering method to remove outlier values ​​from the raw readings. Specifically, for each water quality indicator, a sliding window of length 5 is established, meaning five consecutive raw readings constitute one window. The five values ​​within this window are sorted, and the third value after sorting (i.e., the median) is taken as the valid raw water quality indicator data at the center of the window. If a jump of more than three times the variance occurs in the raw reading within the window, this jump point is identified as transient sensor interference and is removed, not participating in the median calculation; data is supplemented from adjacent windows. The filtered valid data is stored in key-value pairs in the node's built-in industrial-grade solid-state drive, forming a local historical time-series dataset, according to the indicator name and collection timestamp. The record format for each raw water quality indicator in the historical time-series dataset is as follows: {Timestamp: 2026-03-15T14:35:00Z, Hexavalent Chromium Ion Concentration: 0.023 mg / L, Aniline Concentration: 0.11 mg / L, Chemical Oxygen Demand: 45 mg / L, Turbidity: 12 NTU, pH: 7.8}. Units are based on national standard units of measurement: concentration in mg / L, turbidity in NTU, and pH as a dimensionless logarithmic exponent.

[0075] II. Construction of a Localized Multi-Model Combination Prediction Engine

[0076] After 30 days of historical data collection, each edge computing monitoring node enters a 2-day offline training phase. The training process is explained in detail using an edge computing monitoring node in the downstream section of a core enterprise cluster as an example.

[0077] First, the node processor retrieves the time-series data on hexavalent chromium ion concentration from its local storage. This data is then subjected to min-max normalization, using the following formula:

[0078]

[0079] Where x is the original hexavalent chromium ion concentration value. The lowest value of hexavalent chromium ions in the historical data for this node is 0.001 mg / L. The maximum value is 0.350 mg / L. These are values ​​normalized to the 0-1 range. After normalization, all data ranges are mapped to the 0-1 range.

[0080] Next, a sliding window method is used to construct the training sample set. The window length N is set to 12; since the sampling frequency is once per minute, a window length of 12 represents 12 minutes of historical data. Each training sample contains the normalized hexavalent chromium ion concentration values ​​at 12 consecutive sampling times as input features, represented as follows: The normalized hexavalent chromium ion concentration at the 13th sampling time (i.e., time t+1) was used as the prediction label. By sliding the data across all 30 days of historical time series data with a sliding step size of 1, approximately 42,000 training samples were constructed.

[0081] Then, a long short-term memory artificial neural network structure is constructed. This network structure is implemented using the Python programming language and the TensorFlow framework on the neural network processing units built into the nodes. The specific network structure is as follows:

[0082] The first layer is the sequence input layer, which accepts input data of shape (12, 1), that is, 12 time steps, with 1 feature at each time step.

[0083] The second layer is the Long Short-Term Memory (LSTM) layer, containing 32 memory units. Each memory unit contains a forget gate, an input gate, and an output gate, using a gating mechanism to learn long-term dependencies in the time series. The forget gate determines which information to discard from the cell state, the input gate determines which new information to update, and the output gate determines the output value based on the cell state. The mathematical expression is as follows:

[0084]

[0085]

[0086]

[0087]

[0088]

[0089]

[0090] in, , , These are the activation vectors for the forget gate, input gate, and output gate, respectively. Let be the cell state vector. Let W be the hidden state vector, and W and b be the trainable weight matrix and bias term, respectively. It is the sigmoid activation function. It is the hyperbolic tangent activation function.

[0091] The third layer is a dropout layer, which randomly discards some neuron outputs at a preset dropout rate of 0.2 during training to prevent overfitting. That is, in each training batch, 20% of the neuron outputs are randomly set to zero.

[0092] The fourth layer is a fully connected output layer containing one neuron, using a linear activation function to output a normalized predicted value. .

[0093] Using the constructed training sample set, and with mean squared error as the loss function, the loss function is defined as:

[0094]

[0095] Where M is the total number of training samples. Let i be the true label of the i-th sample. This is the network prediction output for the i-th sample. An adaptive time estimation optimizer is used for iterative training, with an initial learning rate of 0.001, 100 training epochs, and a batch size of 64. Training is stopped early when the loss function on the validation set no longer decreases for 10 consecutive epochs. After training, the current network weights are saved, resulting in a hexavalent chromium ion concentration prediction model specific to that node.

[0096] Following the exact same process, historical time-series data for aniline concentration, chemical oxygen demand (COD), turbidity, and pH were processed separately to construct their respective proprietary neural network structures. Specifically, the aniline concentration prediction model takes the aniline concentration of the past 12 minutes as input and outputs the predicted aniline concentration for the next minute; the COD prediction model takes the COD of the past 12 minutes as input and outputs the predicted COD for the next minute; the turbidity prediction model takes the turbidity of the past 12 minutes as input and outputs the predicted turbidity for the next minute; and the pH prediction model takes the pH of the past 12 minutes as input and outputs the predicted pH for the next minute. Thus, this node generates a multi-model combined prediction engine consisting of five independent long short-term memory (LSTM) artificial neural network models.

[0097] III. Real-time monitoring and calculation of fluctuation residual values

[0098] After the offline training phase ends, the edge computing monitoring node automatically switches to real-time monitoring mode. Taking the real-time sampling time of 9:00:00 AM on April 15, 2026 as an example, the monitoring process is explained in detail.

[0099] At 9:00:00, the sensor group on the node synchronously started collecting data to obtain the current water body measurement data and form a measurement dataset. The specific values ​​are: hexavalent chromium ion = 0.028 mg / L, aniline = 0.13 mg / L, chemical oxygen demand = 47 mg / L, turbidity = 13 NTU, pH = 7.9.

[0100] The node processor reads historical measured data from the local time-series database for the past 12 minutes, specifically the corresponding index data for 12 time points from 8:48:00 to 8:59:00. For the hexavalent chromium ion index, the concentration values ​​of hexavalent chromium ions for the past 12 time points are extracted, specifically: [0.021, 0.022, 0.021, 0.023, 0.024, 0.023, 0.025, 0.024, 0.026, 0.025, 0.027, 0.026] mg / L. These values ​​are normalized using the same minimum and maximum values ​​used in step 2 to obtain a normalized input vector. This normalized input vector is input into the hexavalent chromium ion concentration prediction model trained in step 2. After forward propagation calculation, the model outputs a normalized prediction value of 0.76. The processor then performs inverse normalization on this value, using the following formula:

[0101]

[0102] The expected predicted value of the hexavalent chromium ion concentration at the current moment was calculated to be 0.024 mg / L. Subsequently, the difference between the measured value of 0.028 mg / L and the expected predicted value of 0.024 mg / L was calculated, and the difference was 0.004 mg / L. Taking the absolute value of this difference, the fluctuation residual value of hexavalent chromium ions was obtained, which was 0.004 mg / L.

[0103] Repeat the above process to calculate the fluctuation residuals of the other four indicators in parallel:

[0104] Aniline concentration: Measured value 0.13 mg / L, predicted value 0.11 mg / L, residual fluctuation value 0.02 mg / L.

[0105] Chemical oxygen demand: measured value 47 mg / L, predicted value 44 mg / L, fluctuation residual value 3 mg / L.

[0106] Turbidity: Measured value 13 NTU, predicted value 12 NTU, fluctuation residual value 1 NTU.

[0107] pH value: measured value 7.9, predicted value 7.8, fluctuation residual value 0.1.

[0108] The above five fluctuation residual values ​​are arranged in a fixed index order to form a five-dimensional residual vector [0.004, 0.02, 3, 1, 0.1].

[0109] IV. Pre-training of the Abnormal Behavior Detection Model

[0110] While the prediction engine is being trained in step 2, the edge computing monitoring node simultaneously completes the pre-training of the abnormal behavior judgment model. The specific process is as follows:

[0111] A seven-day period without any pollution events was selected from historical data, for example, from 00:00 on March 10, 2026 to 24:00 on March 16, 2026. The five prediction models trained in step 2 were used to perform backtesting calculations on the historical data from this seven-day period. Specifically, for each minute within this seven-day period, the calculation process in step 4 was repeated to obtain a five-dimensional residual vector for that moment. A total of 10,080 minutes were generated over the seven days, resulting in 10,080 five-dimensional residual vectors, all of which represent the fluctuation patterns under normal water conditions.

[0112] These 10080 5D residual vectors are used as training positive samples and input into a single-class support vector machine (SVM) algorithm for training. The goal of the single-class SVM is to find a hypersphere that can encompass all training samples as much as possible. This hypersphere is formed by the center of the sphere... And the radius R is defined. The optimization problem is formulated as:

[0113]

[0114]

[0115] in, Let i be the i-th training sample (5-dimensional residual vector). The kernel function is used to map the input space to a high-dimensional feature space. In this embodiment, the Gaussian radial basis function is used, and the kernel function is defined as follows:

[0116]

[0117] in, This is a kernel function parameter, set to 0.1 in this embodiment. In this embodiment, the parameter for controlling the proportion of sample points outside the hypersphere is set to 0.05, which allows a maximum of 5% of normal samples to be located outside the hypersphere to tolerate minor noise. These are slack variables. After solving this optimization problem, the center of the hypersphere is obtained. and radius R, and determine the internal space of the hypersphere as the normal fluctuation domain. After training is completed, save the model parameters such as the center coordinates, radius, and support vectors to obtain the abnormal behavior determination model.

[0118] V. Abnormal determination and warning generation of multi-dimensional residual vectors

[0119] At the moment of 0 seconds, 0 minutes, and 9 o'clock, the processor inputs the calculated 5-dimensional residual vector [0.004, 0.02, 3, 1, 0.1] into the one-class support vector machine model pre-trained in Step IV. The model calculates the distance d between the image of this vector in the high-dimensional feature space and the center of the sphere The calculation formula is:

[0120] [[ID=~11]] [[ID=~12]] [[ID=~13]]

[0121] where is the Lagrange multiplier obtained through training. The calculated distance d = 0.35, while the hypersphere radius R = 0.50. Since d < R, the model determines that the current vector is within the normal fluctuation domain, that is, the fluctuation pattern of each index at the current moment conforms to the law of historical normal fluctuations and is determined as normal fluctuation. The current calculation cycle ends without generating any warnings, and the node enters the sleep waiting state until the next minute's sampling moment arrives.

[0122] [[ID=~19]]Suppose an illegal discharge event occurs at another moment, 0 seconds, 23 minutes, and 14 o'clock on April 15, 2026. The measured data set at this moment is: hexavalent chromium ion = 0.180 mg / L, aniline = 0.56 mg / L, chemical oxygen demand = 98 mg / L, turbidity = 28 NTU, pH = 6.5. The calculated fluctuation residuals according to Step IV are: hexavalent chromium ion 0.150 mg / L (predicted value 0.030 mg / L), aniline 0.45 mg / L (predicted value 0.11 mg / L), chemical oxygen demand 52 mg / L (predicted value 46 mg / L), turbidity 15 NTU (predicted value 13 NTU), pH value 1.2 (predicted value 7.7). These form a 5-dimensional residual vector [0.150, 0.45, 52, 15, 1.2].

[0123] Input this vector into the one-class support vector machine model, and the calculated distance d = 1.85, while the hypersphere radius R = 0.50. Since d > R, the model determines that the current multi-dimensional residual vector is outside the normal fluctuation domain and determines that there is abnormal pollution behavior in the current water body state.

[0124] The node immediately executes the early warning review process. First, the node increases the sampling frequency from the preset once per minute to the highest frequency. In this embodiment, the preset highest frequency is once every 20 seconds, which is three times the preset sampling frequency. At the next three times, 14:23:20, 14:23:40, and 14:24:00, data acquisition, fluctuation residual calculation, and abnormal behavior judgment are repeated. If all three judgments are abnormal, the confidence level of the pollution early warning information is marked as high. If any one of the judgments is normal, it is marked as pending verification.

[0125] Assuming three consecutive judgments are all abnormal, the node generates a structured pollution warning information data packet. This data packet is serialized using Protocol Buffers format, and the specific fields are as follows:

[0126] Message header fields: contain data packet type value 0x01 (indicating warning information), version number value 1.0, and source node ID value S02.

[0127] Timestamp field: in ISO8601 format, value is 2026-04-15T14:23:00Z.

[0128] Location field: Stores the preset geographic coordinates of this node, longitude 119.123456 degrees, latitude 31.654321 degrees.

[0129] Abnormal indicator field: Records a list of indicator names that are judged to be abnormal, with values ​​of [hexavalent chromium ion, aniline, chemical oxygen demand, turbidity, pH value].

[0130] Measured data fields: Stores the measured dataset at the moment the warning is triggered, in the format of {hexavalent chromium ion: 0.180 mg / L, aniline: 0.56 mg / L, chemical oxygen demand: 98 mg / L, turbidity: 28 NTU, pH value: 6.5}.

[0131] Confidence level field: value is high.

[0132] The node has a built-in 5G communication module and prioritizes sending the above information to the park monitoring center server via the 5G network in the form of User Datagram Protocol (UDP) data packets. The data packet size is approximately 512 bytes, and the transmission time is approximately 50 milliseconds. If the first transmission fails due to network congestion, the node will retry, up to a maximum of 3 times. If all 3 consecutive transmissions fail, the node automatically switches to the backup BeiDou short message communication module. The pollution warning information is encoded into a message conforming to the BeiDou short message format. The maximum length of a single BeiDou short message is 120 Chinese characters. The node encodes and sends key information (node ​​ID, time, and list of abnormal indicators) using an information compression algorithm, and sends a request to the monitoring center to retransmit the logs from the network outage period after the 5G network is restored.

[0133] After receiving the warning information, the monitoring center server will display a red alarm window on the large screen and automatically trigger the preset emergency response process, including notifying downstream water plants to stop water intake and dispatching drones to the abnormal section for verification.

[0134] VI. Adaptive Update of the Model

[0135] To adapt to water quality baseline drift caused by seasonal changes and adjustments in enterprise production processes, edge computing monitoring nodes perform adaptive model updates every 24 hours. Specifically, the nodes extract the measured data and input data corresponding to all moments identified as normal fluctuations within the past 24 hours. For each normal fluctuation moment, the input data consists of the indicator data from the previous 12 minutes, labeled with the measured value at that moment. These new data are combined into new training samples to incrementally fine-tune the existing Long Short-Term Memory (LSTM) artificial neural network model. The fine-tuning training uses a small learning rate of 0.0001, with 5 training epochs, updating only the model weights without changing the network structure. The updated model weights replace the old weights, enabling the prediction engine to adaptively track long-term trend changes in water bodies, thereby maintaining sensitivity to sudden pollution and robustness to normal fluctuations.

[0136] To verify the technical effectiveness of this invention, a traditional single-point threshold method early warning system was deployed as a comparative example at the same cross-section of a river in the same industrial park. This comparative system used the same sensor set, but all raw data was uploaded to a central server in real time via a 4G network. The central server ran a simple threshold triggering algorithm: when the real-time monitoring value of any water quality indicator exceeded a preset fixed threshold (hexavalent chromium ion > 0.05 mg / L, aniline > 0.2 mg / L, chemical oxygen demand > 60 mg / L, turbidity > 20 NTU, pH < 6.5, or pH > 8.5), an alarm was triggered. The system also sampled once per minute, and the data was uploaded to the central server for threshold determination. The entire process involved network transmission latency and server processing queue latency.

[0137] During a 30-day comparative testing period, five sudden pollution events were simulated (including instantaneous high-concentration emissions and a gradual, unauthorized discharge lasting two hours), and the system's response to normal production fluctuations was recorded. The comparison results are shown in the table below:

[0138] Response time to instantaneous high concentration emissions An alert was issued 8 seconds after the event occurred. An alert was issued 195 seconds after the incident occurred. Number of times the gradual illegal discharge was identified All 5 times recognized Only 1 out of 5 attempts was successful. Number of false alarms for normal production fluctuations 3 false alarms within 30 days 78 false alarms in 30 days Average processing delay per warning 0.3 seconds (local processing on the node) 45 seconds (including transmission and queuing) Communication network dependency Beidou backup is available during network outages. The network connection is lost.

[0139] As shown in the table above, the method of this invention significantly outperforms the traditional single-point threshold method in terms of response speed, ability to identify covert illegal discharges, anti-interference capability, and network dependency. Particularly in identifying gradual illegal discharges, traditional methods rely entirely on whether the absolute value of a single indicator exceeds the limit, while illegal dischargers often control the concentration just below the threshold, leading to missed detections. The method of this invention, through multi-dimensional residual joint analysis, captures weak signals of multiple indicators simultaneously deviating from historical patterns, achieving effective identification of covert illegal activities.

[0140] This invention encompasses any substitutions, modifications, equivalent methods, and solutions made within the spirit and scope of this invention. To provide the public with a thorough understanding of this invention, specific details are described in detail in the following preferred embodiments; however, those skilled in the art will fully understand the invention even without these details. Furthermore, to avoid unnecessary misunderstanding of the essence of this invention, well-known methods, processes, procedures, components, and circuits are not described in detail.

[0141] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. An edge-computing-based distributed water pollution early warning method, characterized in that, Includes the following steps: Step 1: Deploy edge computing monitoring nodes at each preset monitoring section of the target river within the industrial park. Each edge computing monitoring node continuously collects multiple raw water quality indicators of the water body at the current monitoring section at multiple historical sampling times according to a preset sampling frequency, and stores the collected raw water quality indicators as a local historical time series dataset. Step 2: Each edge computing monitoring node retrieves the historical time-series dataset and, based on the historical time-series dataset, trains a dedicated long short-term memory artificial neural network time-series prediction model for each type of raw water quality index data, thereby generating a multi-model combination prediction engine locally on the edge computing monitoring node. Step 3: After completing the training of the prediction model, each edge computing monitoring node collects multiple raw water quality index data in real time at each real-time sampling moment through the sensor group to obtain the measured dataset; Step 4: Each edge computing monitoring node inputs water quality index data from several consecutive sampling times prior to the current time into the long short-term memory artificial neural network time-series prediction model corresponding to the water quality index trained in Step 2, calculates and outputs the expected predicted value of the water quality index at the current time, then calculates the difference between the measured value of the water quality index at the current time and the expected predicted value, and marks the absolute value of the difference as the fluctuation residual value of the water quality index at the current time. Step 5: Each edge computing monitoring node combines the multiple fluctuation residual values ​​corresponding to the calculated multiple water quality indicators into a multidimensional residual vector, and inputs the multidimensional residual vector into a pre-trained abnormal behavior judgment model based on a single-class support vector machine. If the single-class support vector machine model determines that the current multidimensional residual vector is within the normal fluctuation domain, then the current water state is determined to be normal fluctuation. If the single-class support vector machine model determines that the current multidimensional residual vector is outside the normal fluctuation domain, it determines that there is abnormal pollution behavior in the current water body state, immediately generates pollution early warning information containing the location of the edge computing monitoring node, the time of the abnormality, and the measured dataset, and reports it to the monitoring center via the network. 2.The distributed water pollution early warning method based on edge computing according to claim 1, wherein, The specific process of training a dedicated long short-term memory artificial neural network time series prediction model for each type of raw water quality index data in step 2 includes: First, normalizing each type of raw water quality index data in the historical time series dataset to map the data range to the interval between 0 and 1. Secondly, a sliding window method is used to construct a training sample set. Each training sample uses the index data of N consecutive sampling times as input features and the index data of the (N+1)th sampling time as the prediction label. Then, a neural network structure is constructed that includes a sequence input layer, a long short-term memory layer, a dropout layer, and a fully connected output layer. The long short-term memory layer contains multiple memory units to learn long-term dependencies in the time series, and the dropout layer randomly discards some of the outputs of neurons at a preset dropout rate during training to prevent overfitting. Finally, using the constructed training sample set, with mean squared error as the loss function, the neural network structure is iteratively trained using an adaptive time estimation optimizer until the loss function converges. The trained model weights are then saved to obtain the dedicated long short-term memory artificial neural network time-series prediction model. 3.The distributed water pollution early warning method based on edge computing according to claim 1, characterized in that, The pre-trained abnormal behavior judgment model based on a single-class support vector machine in step 5 is trained locally on the edge computing monitoring node. Specifically, it includes: collecting the historical fluctuation residual vector sequence of the monitoring section when no sudden pollution event occurs within at least one complete production cycle. The historical fluctuation residual vector sequence is obtained by backtesting the original water quality index data of the historical period by executing steps 3 to 4. All multidimensional residual vectors in the historical fluctuation residual vector sequence are used as training positive samples representing normal water body states. They are input into a single-class support vector machine algorithm for training. An optimization problem is solved to find a hypersphere that can encompass all the training positive samples as much as possible. The internal space of the hypersphere is defined as the normal fluctuation domain, and the center coordinates and radius of the hypersphere are saved as the decision boundary parameters of the abnormal behavior determination model. 4.The distributed water pollution early warning method based on edge computing according to claim 1, wherein, After generating pollution warning information containing the location of the edge computing monitoring node, the abnormal time, and the measured dataset in step 5, a warning review process is also included: the edge computing monitoring node that triggered the warning immediately increases its sampling frequency to the preset maximum frequency, and repeats steps 3 to 5 for three consecutive sampling times after the frequency is increased, and performs fluctuation residual calculation and abnormal behavior judgment on the measured data of the subsequent three consecutive sampling times. If the results of three consecutive assessments are all abnormal, the confidence level of this pollution warning information will be marked as high and reported to the monitoring center again. If one or more of the three consecutive assessments result in a "normal" assessment, the confidence level of this pollution warning will be marked as "pending verification" and the information will be reported to the monitoring center again.

5. The distributed water pollution early warning method based on edge computing according to claim 1, characterized in that, In step 5, the calculated residual values ​​of multiple water quality indicators are combined into a multidimensional residual vector. Specifically, the multiple water quality indicators include at least the concentration of characteristic heavy metal ions, the concentration of specific organic pollutants, the turbidity of the water body, and the pH value. The residual values ​​of the characteristic heavy metal ion concentration, the concentration of specific organic pollutants, the turbidity of the water body, and the pH value are arranged in a fixed order to form a four-dimensional or higher-dimensional residual vector. The determination process of the multidimensional residual vector by the single-class support vector machine model is to comprehensively consider the degree of coordinated deviation between multiple indicators in a multidimensional space spanned by the fluctuation residual values ​​of each indicator, rather than to make an independent threshold judgment on a single indicator. 6.The distributed water pollution early warning method based on edge computing according to claim 1, wherein, In step 1, the multiple raw water quality index data collected by each edge computing monitoring node undergo a data preprocessing step before being stored in the local historical time-series dataset. The edge computing monitoring node performs analog-to-digital conversion on the raw electrical signals collected by the sensor group to obtain raw readings. Then, it uses a median-based sliding window filtering method to remove outlier values ​​caused by instantaneous sensor interference from the raw readings. The filtered data is then stored as valid raw water quality index data to ensure the stability and reliability of the historical time-series dataset and the measured dataset.

7. A distributed water pollution early warning method based on edge computing according to claim 1, characterized in that, Step 2, after generating a multi-model prediction engine locally at the edge computing monitoring node, also includes a model adaptive update step: the edge computing monitoring node, with a preset update period T, combines the newly collected and judged normal fluctuation measured data within the update period T with the corresponding prediction input data of the previous moment into a new training sample, and performs incremental online fine-tuning training on the long short-term memory artificial neural network time-series prediction model, updates the model weights, and enables the prediction engine to adaptively track the long-term trend changes of water bodies caused by seasonal changes or production process adjustments.

8. A distributed water pollution early warning method based on edge computing according to claim 4, characterized in that, The preset maximum frequency is 3 times the preset sampling frequency; If, after completing the early warning review process, the edge computing monitoring node that triggered the early warning has three consecutive abnormal judgment results and has already reported the pollution early warning information with a high confidence level, it shall maintain the highest frequency of monitoring. If the review process ends and no further report is submitted, meaning that the results of three consecutive judgments are not all abnormal, the edge computing monitoring node will restore the sampling frequency to the preset sampling frequency in order to balance monitoring sensitivity with node energy consumption and data storage pressure.

9. A distributed water pollution early warning method based on edge computing according to claim 1, characterized in that, The pollution warning information generated in step 5 is in the form of a structured self-describing data packet, which includes a message header field to identify the data packet type, version number and source node ID. The timestamp field is used to record the precise moment when the alert was triggered; The location field is used to store the preset geographic coordinates of the edge computing monitoring node; The anomaly indicator field is used to record a list of specific indicator names corresponding to the multidimensional residual vectors that are judged as anomalies by the single-class support vector machine model. The measured data field is used to store the raw readings and units of all indicators in the measured dataset at the time the warning is triggered; The confidence level field is used to populate the review results after the review process.

10. A distributed water pollution early warning method based on edge computing according to claim 1, characterized in that, The reporting to the monitoring center via the network specifically adopts the following communication mechanism: the edge computing monitoring node has at least two different types of communication modules built in, including a 5G communication module as the main link and a Beidou short message communication module as a backup link; Under normal operating conditions, the pollution warning information is reported first via the 5G communication module in the form of User Datagram Protocol (UDP) data packets. When the edge computing monitoring node detects that the 5G network signal strength is lower than a preset threshold or fails to send three consecutive messages, it automatically switches to the Beidou short message communication module to encode the pollution warning information into a message conforming to the Beidou short message format and send it. After the network is restored, it sends a request to the monitoring center to retransmit the logs during the network outage.