Digital twin water quality automatic monitoring intelligent early warning method
By deploying a multi-parameter sensor array in the water area to collect and analyze the time difference sequence of water quality parameters, and combining it with feature databases and index calculations, the problems of high false alarm rate and slow pollutant nature identification in existing water quality monitoring systems have been solved. This has enabled real-time and comprehensive monitoring of water quality status and accurate identification of pollution sources, thereby improving the scientific nature of water environment management and the efficiency of emergency response.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XIAN CENTN TECH
- Filing Date
- 2025-11-17
- Publication Date
- 2026-07-31
AI Technical Summary
Existing water quality monitoring systems rely on single-parameter threshold alarms, which have a high false alarm rate and cannot identify the type of pollution source. They also lack the ability to quickly determine the nature of pollutants, and traditional methods are time-consuming.
By deploying a multi-parameter sensor array in a physical water body to collect water quality parameter data, forming a parameter response time difference sequence, and matching it with a pollution source time difference feature database, the pollution characteristic coefficient is calculated. The water body state is determined by combining the dissolved oxygen oscillation index and the decoupling index, thus achieving stratified determination of pollution type and nature.
It enables real-time and comprehensive monitoring of water quality, rapid identification of pollution events, accurate determination of pollution source type and intensity, timely identification of eutrophication risks, and improves the scientific nature of water environment management and emergency response efficiency.
Smart Images

Figure CN121476555B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of water quality monitoring technology, and in particular to a digital twin-based intelligent early warning method for automatic water quality monitoring. Background Technology
[0002] Traditional water quality monitoring methods primarily rely on manual sampling and laboratory testing, resulting in significant data lag and an inability to reflect real-time dynamic changes in water bodies. While on-site monitoring instruments offer some real-time capability, they are limited by frequent sensor maintenance, insufficient detection accuracy, and sparse spatial deployment, making it difficult to cover large areas of water. Fixed automatic monitoring stations can only reflect localized information, and while remote sensing offers coverage advantages, it cannot directly measure key physicochemical indicators. In recent years, digital twin technology has been gradually applied to the water environment field, significantly improving the accuracy of intelligent early warning systems for water environments. However, existing automatic water quality monitoring systems still have the following shortcomings: Existing monitoring systems mostly use single-parameter threshold alarms, triggering an alarm when a certain water quality parameter exceeds a preset threshold. While this method is simple and easy to implement, it suffers from a high false alarm rate and an inability to identify the type of pollution source. In reality, different types of pollution sources (such as industrial wastewater, domestic sewage, and agricultural non-point source pollution) exhibit significantly different response times and change patterns for various water quality parameters after entering water bodies, making it difficult to accurately identify the nature of pollution by relying solely on threshold determination.
[0003] Current early warning methods lack the ability to rapidly identify the nature of pollutants. In the event of a pollution incident, timely determination of whether pollutants are inorganic, organic, or a mixture is crucial for developing emergency response plans. Traditional methods require sampling followed by laboratory analysis, which is time-consuming. While the nature of pollutants can be inferred through comprehensive analysis of multiple parameters, existing systems have not yet established effective methods for this determination. Summary of the Invention
[0004] Based on this, it is necessary for the present invention to provide a digital twin water quality automatic monitoring and intelligent early warning method to solve at least one of the above-mentioned technical problems.
[0005] To achieve the above objectives, a digital twin-based intelligent early warning method for automatic water quality monitoring includes the following steps: Step S1: Deploy a multi-parameter sensor array in the actual water body to collect real-time data of various water quality parameters, and record the starting time of each parameter's deviation from the baseline value to form a parameter response time difference sequence; Step S2: Match the parameter response time difference sequence with the preset pollution source time difference feature library to determine the pollution source type, and calculate the pollution feature coefficient according to the degree of deviation; Step S3: Extract the nighttime dissolved oxygen monitoring data from the real-time data, calculate the cumulative value of positive changes in dissolved oxygen as the nighttime oscillation index, and determine the eutrophication risk of the water body by combining the pollution characteristic coefficient when the nighttime oscillation index exceeds the preset oscillation threshold. Step S4: Calculate the difference between the historical correlation coefficient and the current correlation coefficient of pH value and conductivity using real-time data as the decoupling index, and determine the type of water quality steady-state anomaly based on the decoupling index; and calculate the ratio of conductivity to turbidity and the ratio of chlorophyll a to turbidity in real time, and determine the type of pollutant based on the range of the ratio. Step S5: Based on the risk of eutrophication, the type of water quality steady-state anomaly, and the nature and category of pollutants, a stratified judgment is made to trigger a water quality warning.
[0006] This invention achieves real-time, high-frequency acquisition of key water quality parameters such as dissolved oxygen, pH, conductivity, turbidity, and chlorophyll a by deploying a multi-parameter sensor array in physical water bodies, enabling continuous and comprehensive monitoring of water quality. By calculating the starting time of each parameter's deviation from the baseline value and forming a parameter response time difference sequence, the occurrence time and sequence of pollution events can be quickly identified, improving the response speed to sudden pollution events. Matching the time difference sequence with a pre-set pollution source feature database and calculating pollution characteristic coefficients based on the degree of deviation allows for accurate identification of pollution source types and quantification of pollution intensity, providing a scientific basis for water quality management and pollution source tracing. The calculation of the cumulative positive change in dissolved oxygen at night and the determination of the oscillation index enable the method to identify the risk of eutrophication, especially during the nighttime period when microbial activity is active and the water body's self-purification capacity changes significantly, allowing for timely detection of potential eutrophication problems and providing leading information to prevent water body deterioration.
[0007] By calculating the historical and current correlation differences between pH and conductivity and generating a decoupling index, the system can identify the type of water quality steady-state anomaly, enabling early detection of subtle changes or abnormal trends. Furthermore, it calculates the ratios of conductivity to turbidity and chlorophyll a to turbidity in real time, and determines the pollutant type based on the ratio range, allowing for dynamic identification of pollutant characteristics and supporting targeted treatment. The tiered judgment mechanism integrates multi-dimensional information into early warning levels through comprehensive analysis of eutrophication risk, water quality steady-state anomaly types, and pollutant types, ensuring that early warning judgments are both comprehensive and scientific, avoiding misjudgments or omissions based on single indicators. Simultaneously, the system can push early warning information to monitoring terminals in real time and record the trigger time, judgment results, and related data, providing management departments with operable and traceable decision-making basis.
[0008] Overall, this method enables intelligent, dynamic, and visual water quality monitoring, transforming the lagging and one-sided nature of traditional manual monitoring into an automated, continuous, and comprehensive monitoring system. This significantly improves the efficiency of water environment protection, pollution prevention and control, and emergency response. At the same time, it provides a solid data foundation for optimizing long-term water quality management strategies and making scientific decisions, reduces the risk of water quality deterioration, and improves management accuracy and reliability. Attached Figure Description
[0009] Other features, objects, and advantages of the invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 This is a flowchart illustrating the steps of the digital twin water quality automatic monitoring and intelligent early warning method of the present invention. Figure 2 This is a pollutant property determination matrix diagram according to an embodiment of the present invention; Figure 3 This is a schematic diagram illustrating the calculation of the water quality steady-state decoupling index according to an embodiment of the present invention. Detailed Implementation
[0010] The technical method of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0011] Furthermore, the accompanying drawings are merely illustrative of the invention and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor methods and / or microcontroller methods.
[0012] It should be understood that although the terms "first," "second," etc., may be used herein to describe various units, these units should not be limited by these terms. These terms are used merely to distinguish one unit from another. For example, without departing from the scope of the exemplary embodiments, a first unit may be referred to as a second unit, and similarly, a second unit may be referred to as a first unit. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0013] To achieve the above objectives, please refer to Figures 1 to 3This invention provides a digital twin-based intelligent early warning method for automatic water quality monitoring, the method comprising the following steps: Step S1: Deploy a multi-parameter sensor array in the actual water body to collect real-time data of various water quality parameters, and record the starting time of each parameter's deviation from the baseline value to form a parameter response time difference sequence; Step S2: Match the parameter response time difference sequence with the preset pollution source time difference feature library to determine the pollution source type, and calculate the pollution feature coefficient according to the degree of deviation; Step S3: Extract the nighttime dissolved oxygen monitoring data from the real-time data, calculate the cumulative value of positive changes in dissolved oxygen as the nighttime oscillation index, and determine the eutrophication risk of the water body by combining the pollution characteristic coefficient when the nighttime oscillation index exceeds the preset oscillation threshold. Step S4: Calculate the difference between the historical correlation coefficient and the current correlation coefficient of pH value and conductivity using real-time data as the decoupling index, and determine the type of water quality steady-state anomaly based on the decoupling index; and calculate the ratio of conductivity to turbidity and the ratio of chlorophyll a to turbidity in real time, and determine the type of pollutant based on the range of the ratio. Step S5: Based on the risk of eutrophication, the type of water quality steady-state anomaly, and the nature and category of pollutants, a stratified judgment is made to trigger a water quality warning.
[0014] Furthermore, step S1 includes the following steps: Step S11: Deploy a sensor array in the monitored water area, set the data acquisition frequency to once per minute, collect real-time data on dissolved oxygen, pH value, conductivity, turbidity, and chlorophyll a, and transmit the real-time data to the data aggregation node. In one embodiment, a multi-parameter sensor group consisting of five types of sensors—dissolved oxygen, pH, conductivity, turbidity, and chlorophyll a—is deployed within the monitored water area, and the data acquisition frequency is set to once per minute. Each sensor automatically adds a timestamp to the data after sampling, and the real-time data is transmitted to a data aggregation node for centralized storage and verification via a communication module (such as NB-IoT, 4G, or LoRa network).
[0015] For example, the sensors can be mounted on a floating platform or underwater support, and data aggregation and anomaly screening can be performed through an edge gateway. When data exceeding the normal range of the sensors or showing significant jumps is detected, the system automatically marks it as abnormal data.
[0016] Step S12: Select the data from the real-time data for the period of 72 hours before the start of monitoring where there is no rainfall or sewage discharge record, calculate the median of each parameter in that period as the baseline value of the parameter, and calculate the standard deviation as the fluctuation range. In one embodiment, stable data periods with no rainfall and no significant sewage discharge records within 72 consecutive hours prior to the start of monitoring are selected from the real-time collected data. The median of each water quality parameter within this period is calculated as the baseline value of the parameter, and the natural fluctuation range is represented by the standard deviation within this period.
[0017] For example, in a certain river section, if the dissolved oxygen data over a continuous 72-hour period is concentrated between 7.9 and 8.5 mg / L, the system automatically takes the median of 8.2 mg / L as the baseline value for dissolved oxygen, with a standard deviation of 0.3 mg / L, to define the allowable fluctuation range.
[0018] It should be noted that when complete 72-hour stable data cannot be obtained due to meteorological conditions or human activities, statistical data from historical pollution-free periods of the same period can be used as a substitute, and the data source should be marked in the system records.
[0019] Step S13: Calculate the difference between real-time data and real-time data. When the measured value exceeds the baseline value by ±2 times the standard deviation, mark it as a deviation state and record the moment when the parameter first enters the deviation state.
[0020] In one embodiment, the difference Δ = measured value − baseline value is calculated between the real-time sampled value and the baseline value of the corresponding parameter. When the measured value exceeds the baseline value ±2 × standard deviation, the moment is marked as the deviation state of the parameter, and the timestamp (first trigger time) of the parameter first entering the deviation state is recorded.
[0021] For example, when the baseline pH value is 7.4 and the standard deviation is 0.2, if the pH value is detected to rise to 7.9 in a certain minute, the system considers that moment to be the deviation of the pH value from the starting point and marks it.
[0022] Furthermore, step S1 also includes the following steps: Step S14: Taking the earliest deviation time among the five parameters as the zero point of time, calculate the delay time of the deviation time of the other four parameters relative to the zero point of time, and obtain four deviation time difference values; In one embodiment, among the five monitoring parameters, the system selects the parameter that first deviates from the state, defines its first deviation time as the zero point, and then calculates the delay time of the deviation time of the other four parameters relative to the zero point, thereby obtaining four deviation time difference values.
[0023] For example, if dissolved oxygen first deviates at 10:02, pH at 10:04, conductivity at 10:07, and turbidity at 10:12, while chlorophyll a remains normal during the monitoring period, the system will obtain four deviation time differences of 2 minutes, 5 minutes, 10 minutes, and null, respectively.
[0024] It should be noted that when two parameters deviate simultaneously within the same minute, the system can select one of them as the zero point of time according to a preset priority order (such as dissolved oxygen taking precedence over pH, conductivity, turbidity, and chlorophyll a).
[0025] Step S15: Combine the parameter names corresponding to the zero point of time and the four deviation time difference values according to the preset format to form the parameter response time difference sequence of the current pollution event.
[0026] In one embodiment, the parameter name corresponding to time zero is combined with the time difference values of the other four parameters in a unified format to form a parameter response time difference sequence for the current pollution event. This time difference sequence is used to describe the sequential relationship of the responses of each water quality parameter to the pollution event and serves as input data for subsequent pollution source type identification.
[0027] For example, if the zero point is dissolved oxygen, and the parameters delayed in sequence are pH, conductivity, turbidity, and chlorophyll a, with corresponding delay times of 2 minutes, 5 minutes, 10 minutes, and null, the system will generate a time difference sequence recorded as "DO-0, pH-2, EC-5, Turb-10, Chl-a-NA" and upload it to the cloud for feature matching.
[0028] Furthermore, step S2 includes the following steps: Step S21: Construct a pollution source time difference feature library, which includes standard time difference sequences of three types of pollution sources: industrial wastewater, domestic sewage, and agricultural non-point source pollution. In one embodiment, a pollution source time-varying characteristic database is established by analyzing historical monitoring data and typical pollution events. This database is divided into three categories of pollution sources: industrial wastewater, domestic sewage, and agricultural non-point source pollution. Each category contains a standard time-varying sequence reflecting the sequence and delay time patterns of water quality parameter responses. For example, in industrial wastewater pollution events, conductivity typically rises first, dissolved oxygen changes lag by approximately 30 minutes, while ammonia nitrogen and total phosphorus changes lag by approximately 60 minutes. By statistically analyzing the average response time differences of these parameters across multiple event samples, a standard time-varying sequence for that type of pollution source can be formed.
[0029] For example, when a sudden increase in conductivity is detected, followed by a decrease in dissolved oxygen 40 minutes later and an increase in ammonia nitrogen 60 minutes later, these delay times can be used to form a characteristic template for industrial wastewater pollution.
[0030] Step S22: Compare the parameter response time difference sequence with the feature patterns in the pollution source time difference feature library one by one, and calculate the sum of squared time difference deviations between the current time difference sequence and each feature pattern; In one embodiment, the real-time monitoring response time difference sequence of water quality parameters is obtained and compared one by one with the standard time difference sequence of each pollution source in the pollution source time difference feature database. During the comparison process, the squared deviation between the real-time time difference and the standard time difference is calculated and summed to quantify the similarity between the two.
[0031] For example, if the response interval between the real-time detected conductivity and dissolved oxygen is 35 minutes, while the interval in the standard characteristics of industrial wastewater is 30 minutes, then the deviation is the square of 5 minutes; by summing up the squared deviation values of all parameter combinations, the sum of the squared time difference deviations of the corresponding pollution source model can be obtained.
[0032] Step S23: Select the feature pattern with the smallest sum of squared time difference deviations as the best matching feature pattern. When the smallest sum of squared deviations is less than a preset threshold, determine the pollution source type corresponding to the feature pattern as the current pollution source type; when the smallest sum of squared deviations is greater than the preset threshold, mark it as an unknown pollution source type. In one embodiment, among the calculated sum of squared time difference deviations of each pollution source pattern, the one with the smallest value is selected as the best matching pattern, and its relationship with a preset threshold is determined. When the minimum sum of squared deviations is less than the threshold, it is considered that the current monitoring data has a high similarity to the feature pattern, and the pollution source type corresponding to the feature pattern can be determined as the current pollution source type; when the minimum sum of squared deviations is greater than the threshold, it indicates that the current response feature does not belong to a known pollution source type and should be marked as an unknown pollution source type.
[0033] For example, if the sum of squares of the deviations for the industrial wastewater pattern is 60, for the domestic sewage pattern it is 95, for the agricultural non-point source pattern it is 130, and the threshold is set to 80, then the current pollution source type is determined to be industrial wastewater.
[0034] Step S24: Extract the deviation factor of each parameter's real-time data relative to the baseline value, and calculate the arithmetic mean of the deviation factors of the five parameters as the overall deviation. In one embodiment, for each water quality parameter monitored in real time (the five parameters specified above: dissolved oxygen, pH, conductivity, turbidity, and chlorophyll a), its deviation factor relative to the long-term baseline value is calculated. The deviation factor can be calculated by dividing the current value by the baseline value to obtain the ratio, subtracting 1, and taking the absolute value to represent the relative change of the parameter. Subsequently, the deviation factors of these five parameters are arithmetically averaged to obtain the overall deviation degree, which serves as a quantitative indicator of the degree of water quality anomaly and is used for the subsequent generation of pollution characteristic coefficients and early warning determination.
[0035] For example, if the deviation factors of dissolved oxygen, pH, conductivity, turbidity and chlorophyll a are 0.4, 0.2, 0.5, 0.3 and 0.6 respectively, then the average of the five is 0.4, and the overall deviation recorded by the system is 0.4.
[0036] Step S25: Generate pollution characteristic coefficients based on the overall deviation and pollution source type using preset mapping rules.
[0037] In one embodiment, based on the overall deviation obtained in step S24 and the pollution source type determined in step S23, pollution characteristic coefficients are generated according to a preset mapping rule. The mapping rule can be in the form of a multidimensional table or an empirical formula, mapping the deviation intervals under different pollution source types to the corresponding pollution characteristic coefficients.
[0038] For example, for industrial wastewater pollution, the pollution characteristic coefficient is set to 0.5 when the overall deviation is less than 0.3; 0.8 when it is between 0.3 and 0.6; and 1.0 when it is greater than 0.6. The final output pollution characteristic coefficient can serve as a quantitative indicator of pollution intensity, providing a basis for subsequent risk assessment and dynamic adjustment of early warning thresholds.
[0039] Of particular importance, step S25 includes the following steps: A mapping relationship between pollution source types and basic coefficients is established through preset mapping rules, where industrial wastewater, domestic sewage, agricultural non-point source pollution and unknown pollution sources correspond to basic coefficients from high to low. The overall deviation is divided into multiple deviation levels, each level corresponding to a different adjustment factor, with the higher the degree of deviation, the larger the adjustment factor. Multiplying the base coefficients by the adjustment factor yields the preliminary characteristic values; The preliminary characteristic values are corrected based on the characteristics of the monitoring period, and the corrected values are normalized to the standard range to obtain the pollution characteristic coefficient.
[0040] In one embodiment, pollution source types are mapped to basic coefficients using preset mapping rules. The system maintains a pollution source-basic coefficient lookup table in the background. The table assigns different basic coefficients to industrial wastewater, domestic sewage, agricultural non-point source pollution, and unknown pollution sources in descending order. These coefficients reflect the prior weights of different pollution sources in judging pollution intensity under the same deviation conditions.
[0041] For example, the basic coefficients for industrial wastewater can be preset to 1.0, domestic sewage to 0.7, agricultural non-point source pollution to 0.5, and unknown pollution sources to 0.3. When step S23 determines that the match is industrial wastewater, the system takes the basic coefficient of 1.0 corresponding to industrial wastewater as the basic weight for subsequent calculations.
[0042] In one embodiment, the overall deviation is divided into several deviation levels, each corresponding to an adjustment factor. The higher the deviation, the larger the corresponding adjustment factor, thereby amplifying or reducing the initial value of the pollution characteristic after multiplying by the base coefficient. In practice, the overall deviation can be divided into three or four levels. For example, a deviation less than 0.3 is defined as a low deviation level, with a corresponding adjustment factor of 0.8; a deviation between 0.3 and 0.6 is defined as a medium deviation level, with a corresponding adjustment factor of 1.0; and a deviation greater than 0.6 is defined as a high deviation level, with a corresponding adjustment factor of 1.3.
[0043] For example, if it is determined to be domestic sewage (basic coefficient 0.7) and the overall deviation is 0.45, it falls into the medium deviation range. The adjustment factor is 1.0, and the two are multiplied to obtain the preliminary pollution characteristic value of 0.7.
[0044] Furthermore, step S3 includes the following steps: Step S31: Determine the nighttime period of the date as 22:00 to 6:00 the next day, and extract the continuous dissolved oxygen monitoring data for this period from the real-time data; In one embodiment, step S31 includes: the system defining the period from 22:00 to 6:00 the next day as the nighttime monitoring period, and extracting continuous dissolved oxygen monitoring data for this period from the real-time water quality monitoring database. This time range typically covers the typical cycle of nighttime light loss and cessation of photosynthesis in the water body; therefore, changes in dissolved oxygen mainly reflect the intensity of respiration and organic matter decomposition activities in the water body.
[0045] For example, at a monitoring point in a lake, the system automatically identifies the current date and continuously extracts dissolved oxygen data from 22:00 to 6:00 the next day, totaling 480 data points (sampling frequency once per minute).
[0046] Step S32: Process the continuous dissolved oxygen monitoring data during the nighttime period point by point in chronological order, calculate the difference between the dissolved oxygen value at each monitoring moment and the dissolved oxygen value at the previous moment, and obtain the dissolved oxygen change value sequence. In one embodiment, dissolved oxygen data extracted during the nighttime period is processed point by point in chronological order, and the difference in dissolved oxygen between each monitoring moment and the previous moment is calculated to form a continuous sequence of dissolved oxygen change values. This sequence can be used to identify the rising or falling trend of dissolved oxygen at night.
[0047] For example, when the dissolved oxygen is 7.0 mg / L at 22:00 and 7.1 mg / L at 22:01, the change is 0.1; this difference is recorded in the change sequence. By calculating point by point in this way, the complete dynamic trajectory of the nighttime dissolved oxygen change can be obtained.
[0048] Step S33: Filter out all positive values from the dissolved oxygen change value sequence and sum them up to obtain the cumulative positive change value of dissolved oxygen at night.
[0049] In one embodiment, all positive values are selected from the above dissolved oxygen change value sequence, and these positive change values are accumulated to obtain the cumulative positive change value of dissolved oxygen at night. This value reflects the overall magnitude of the rebound in dissolved oxygen during the night, which is usually related to the nocturnal reaction activity of algae in the water or external disturbances.
[0050] For example, if there are multiple small increases during nighttime monitoring, such as changes of 0.05, 0.03, and 0.07 respectively, the system adds them together to obtain a cumulative positive change value of 0.15.
[0051] Furthermore, step S3 also includes the following steps: Step S34: Divide the cumulative positive change value by the nighttime monitoring duration to obtain the average positive change per unit time, which is used as the nighttime oscillation index; In one embodiment, the cumulative positive change in dissolved oxygen at night is divided by the total nighttime monitoring duration to obtain the average positive change per unit time, which is defined as the nighttime oscillation index. This index quantitatively describes the intensity of nighttime dissolved oxygen fluctuations and is an important parameter for determining whether there are early signs of eutrophication in a water body.
[0052] For example, if the total nighttime monitoring duration is 480 minutes and the cumulative positive change value is 0.15, then the nighttime oscillation index is approximately 0.00031 mg / L / min.
[0053] Step S35: Compare the nighttime oscillation index with the preset oscillation threshold. When the nighttime oscillation index is greater than the oscillation threshold and the pollution characteristic coefficient is greater than the preset characteristic threshold, it is determined that there is a risk of eutrophication of the water body, and the eutrophication risk level is recorded. In one embodiment, the calculated nighttime oscillation index is compared with a preset oscillation threshold. When the nighttime oscillation index is greater than the oscillation threshold and the pollution characteristic coefficient is also greater than the preset characteristic threshold, the system determines that the water body has a risk of eutrophication and classifies the eutrophication risk level according to the combined range of the oscillation index and the pollution characteristic coefficient.
[0054] For example, when the nighttime oscillation index exceeds 0.0003 and the pollution characteristic coefficient is higher than 0.7, the system can mark the risk level as "moderate to high" and trigger a corresponding warning.
[0055] Step S36: When the nighttime oscillation index is greater than the oscillation threshold but the pollution characteristic coefficient is less than or equal to the characteristic threshold, it is determined to be a potential eutrophication risk.
[0056] In one embodiment, when the nighttime oscillation index is greater than the oscillation threshold but the pollution characteristic coefficient is less than or equal to the characteristic threshold, the system determines that the current state is one of potential eutrophication risk. This state typically indicates that the water body has experienced abnormal fluctuations in dissolved oxygen at night, but has not yet formed obvious aggregates of pollution characteristics.
[0057] For example, if the oscillation index is 0.0004 but the pollution characteristic coefficient is only 0.5, the system will mark the state as "potential risk" and recommend key monitoring.
[0058] It should be noted that potential risk conditions will not trigger an alarm immediately, but the system will increase the monitoring frequency or perform trend tracking in order to capture early signs of eutrophication in a timely manner.
[0059] Furthermore, step S4 includes the following steps: Step S41: Extract the pH and conductivity data sequences for the most recent 30 days, and calculate the Pearson correlation coefficient between the two sequences as the historical correlation coefficient; In one embodiment, continuous monitoring data of pH and conductivity over the past 30 days are extracted from a monitoring database, forming two time series. The system then calculates the Pearson correlation coefficient between these two series to quantify the long-term linear correlation between pH and conductivity, and uses this result as the historical correlation coefficient.
[0060] For example, at a monitoring point in a reservoir, the average pH value over the past 30 days fluctuated between 7.3 and 8.0, and the average conductivity varied between 380 and 420 microsiemens per centimeter. The system calculated a correlation coefficient of 0.85 between the two, and this value was recorded as the historical correlation coefficient.
[0061] Step S42: Extract the pH and conductivity data sequences from the previous 24 hours, and calculate the Pearson correlation coefficient between the two sequences as the current correlation coefficient; In one embodiment, a 24-hour data window is traced back from the current moment to extract real-time data sequences of pH and conductivity, and the Pearson correlation coefficient between the two is calculated as the current correlation coefficient. This coefficient is used to reflect the synchronous change relationship between the two parameters over a short period of time.
[0062] For example, if the pH value increases but the conductivity does not change significantly in the past 24 hours, the calculated correlation coefficient is 0.55, which represents the immediate correlation of the current chemical state of the water body.
[0063] Step S43: Calculate the absolute value of the difference between the historical correlation coefficient and the current correlation coefficient to obtain the decoupling index.
[0064] In one embodiment, the difference between historical and current correlation coefficients is calculated, and the absolute value is used as a decoupling index to reflect the degree of steady-state change in water quality. A sliding window analysis can be performed on the differences across different time periods to capture continuous trend changes.
[0065] For example, if the historical correlation coefficient is 0.85 and the current correlation coefficient is 0.55, then the decoupling index is 0.30, indicating that the water quality has shown a slight abnormality.
[0066] Furthermore, step S4 also includes the following steps: Step S44: When the decoupling index is less than 0.2, it is determined to be in steady state normal; when the decoupling index is between 0.2 and 0.5, it is determined to be slightly abnormal; when the decoupling index is between 0.5 and 0.8, it is determined to be moderately abnormal; when the decoupling index is greater than 0.8, it is determined to be severely abnormal, thus obtaining the water quality steady state abnormality type. In one embodiment, water quality steady-state anomalies are classified into four categories based on the magnitude of the decoupling index: steady-state normal, slight anomaly, moderate anomaly, and severe anomaly. During the determination process, the system first compares the decoupling index with a preset threshold and then dynamically adjusts it based on recent historical trends.
[0067] For example, when the decoupling index is 0.65, the system determines it to be a moderate anomaly and can mark the "warning color" as orange on the interface, while triggering the next step of the pollutant property determination process.
[0068] Step S45: Calculate the ratio of conductivity to turbidity and the ratio of chlorophyll a to turbidity in real time, and determine the nature and category of pollutants based on the range of ratios.
[0069] In one embodiment, the ratio of conductivity to turbidity and the ratio of chlorophyll a to turbidity are calculated in real time to determine the nature of pollutants. Sensor data at the current moment is acquired, and unit standardization and outlier correction are performed. Then, the ratios are calculated and compared with a preset reference range.
[0070] For example, if the conductivity-to-turbidity ratio is greater than the upper limit and the chlorophyll a-to-turbidity ratio is lower than the lower limit, it is classified as an inorganic pollutant; if the conductivity-to-turbidity ratio is lower than the lower limit and the chlorophyll a-to-turbidity ratio is higher than the upper limit, it is classified as an organic pollutant; if both ratios are within the normal range, it is classified as a mixed pollutant; other cases are marked as an unknown category.
[0071] Figure 3 As shown, this figure illustrates the calculation process and judgment criteria for the water quality steady-state decoupling index. The figure includes two scatter plots and a bottom color-coded indicator, comprehensively presenting the correlation change analysis from historical data to current data.
[0072] Figure 3The left subplot, titled "Correlation of Historical 30-Day Data," displays the correlation between pH (horizontal axis, range 7.0-8.5) and conductivity (vertical axis, unit...). The graph shows a long-term correlation between S / cm (approximately 350-450). About 80 blue scatter points exhibit a clear positive correlation trend, with the data points clustered closely around an upward trend line. A linear regression line (blue dashed line) is obtained by fitting these scatter points, with the correlation coefficient indicated in the upper right corner. =0.85, indicating a strong positive correlation between pH and conductivity under steady-state conditions.
[0073] Figure 3 The right-hand subplot, titled "Current 24-Hour Data Correlation," also shows the relationship between pH and conductivity, but the data points are in orange, and there are approximately 24 data points. Compared to historical data, the current data shows a significantly more dispersed scatter distribution, and the slope of the fitted line has changed. The correlation coefficient is indicated in the upper right corner. This indicates that the correlation between the two parameters has weakened significantly recently.
[0074] Figure 3 In the central area, a thick black arrow points from the left subplot to the right subplot, with the label "Time Shift" above it, visually representing the evolution from the historical steady state to the current state. Below the arrow is a calculation box with a yellow background, clearly displaying the formula and specific value for the decoupling index: Decoupling Index .
[0075] See Figure 2 At the bottom, a graded color-coded indicator is drawn across the entire width of the canvas, approximately 80px high. From left to right, it is divided into four gradient areas: The leftmost area is green (0-0.2), labeled "Steady-state normal," indicating that when the decoupling index is less than 0.2, the correlation between water quality parameters remains stable, and the system is operating normally. The second area is yellow (0.2-0.5), labeled "Slightly abnormal." The currently calculated decoupling index of 0.30 falls within this area, indicated by a red triangle, suggesting a slight deviation from the steady-state of water quality, requiring attention but not yet reaching the warning level. The third area is orange (0.5-0.8), labeled "Moderately abnormal," indicating that when the decoupling index is within this range, the correlation between pH and conductivity changes significantly, potentially indicating a significant change in water quality conditions or the occurrence of a pollution event. The rightmost area is the red zone (0.8-1.0), marked "severe anomaly". This indicates that when the decoupling index is close to or equal to 1.0, the historical correlation has been completely destroyed. There may be a negative correlation or no correlation between the two parameters, indicating a serious imbalance in the chemical balance of the water body, which requires immediate countermeasures.
[0076] Furthermore, step S45 includes the following steps: Step S451: Extract the conductivity value and turbidity at the current moment, and calculate the ratio of the conductivity value to the turbidity value as the first characteristic ratio; In one embodiment, the conductivity and turbidity values at the current moment are extracted from sensor data, and their ratio is calculated as a first characteristic ratio to reflect the relative content of inorganic salts or suspended solids in the water. For example, if the current conductivity is 400 microsiemens per centimeter and the turbidity is 20 milligrams per liter, then the first characteristic ratio is 400 divided by 20, which is 20.
[0077] Step S452: Extract the chlorophyll a value and turbidity value at the current moment, and calculate the ratio of the chlorophyll a value to the turbidity value as the second feature ratio; In one embodiment, the chlorophyll a value and turbidity value at the current moment are extracted, and the ratio of chlorophyll a to turbidity is calculated as a second characteristic ratio to reflect the relationship between the concentration of organic matter or algae in the water and suspended particles. For example, if the chlorophyll a value is 15 micrograms per liter and the turbidity is 20 milligrams per liter, then the second characteristic ratio is 15 divided by 20, which is 0.75.
[0078] Step S453: Determine the pollutant type based on the combination of the numerical ranges of the first characteristic ratio and the second characteristic ratio. When the first characteristic ratio is greater than a preset upper limit and the second characteristic ratio is less than a preset lower limit, it is determined to be an inorganic pollutant; when the first characteristic ratio is less than a preset lower limit and the second characteristic ratio is greater than a preset upper limit, it is determined to be an organic pollutant; when both ratios are within the preset range, it is determined to be a mixed pollutant; otherwise, it is determined to be an unknown category.
[0079] In one embodiment, the pollutant type is determined based on the numerical combination of a first characteristic ratio and a second characteristic ratio. First, the first and second ratios are compared with preset upper and lower thresholds, and then classification is performed according to ratio combination rules. When the first ratio is greater than the upper limit and the second ratio is less than the lower limit, it is determined to be an inorganic pollutant; when the first ratio is less than the lower limit and the second ratio is greater than the upper limit, it is determined to be an organic pollutant; when both ratios are within preset ranges, it is determined to be a mixed pollutant; otherwise, it is determined to be an unknown category.
[0080] For example, if the first ratio is 25 (greater than the upper limit of 20) and the second ratio is 0.5 (less than the lower limit of 0.7), the system determines that the pollutant is inorganic.
[0081] See Figure 2As shown, this figure illustrates the pollutant property classification matrix based on the first characteristic ratio (EC / turbidity) and the second characteristic ratio (Chl-a / turbidity). The horizontal axis represents the first characteristic ratio (EC / turbidity), ranging from 0 to 40; the vertical axis represents the second characteristic ratio (Chl-a / turbidity), ranging from 0.0 to 2.0.
[0082] The decision matrix is divided into multiple regions by two red dashed lines. The horizontal dashed lines are located at the lower limit (approximately 0.7) and upper limit (approximately 1.2), respectively, while the vertical dashed lines are located at the lower limit (approximately 15) and upper limit (approximately 25), respectively. The figure clearly identifies four main classification regions: the lower left green region (light green background) is labeled "Organic Pollutants," corresponding to cases where both the first and second feature ratios are below the lower limit. Two green data points (Case 2 - Organic) fall within this region, with coordinates approximately (10, 0.4), verifying the effectiveness of the decision rule. The central yellow region (light yellow background) is labeled "Mixed Pollutants," corresponding to cases where both feature ratios are within the normal range (15 ≤ EC / turbidity ≤ 25, 0.7 ≤ Chl-a / turbidity ≤ 1.2). The figure shows two data points (orange and yellow) falling within this area. One is labeled "Case 3 - Mixed," with coordinates approximately (20, 1.0) and (21, 0.9), indicating the simultaneous presence of organic and inorganic pollution characteristics in the water body. The upper right red area (light red background) is labeled "Inorganic Pollutants," corresponding to situations where both the first characteristic ratio and the second characteristic ratio are greater than their upper limits. This area indicates a significant increase in both conductivity and turbidity, as well as a significant increase in chlorophyll a relative turbidity, consistent with inorganic salt pollution characteristics. The lower right gray area is labeled "Unknown Category," containing a red data point (Case 1 - Inorganic), with coordinates approximately (32, 0.5). Although this point has a high conductivity ratio but a low chlorophyll ratio, it may represent a special type of pollution, and the system marks it as an unknown category requiring further analysis. The remaining gray background areas are all labeled "Unknown Category," indicating that data points falling within these areas do not conform to the known classification patterns of the three main pollutants and require comprehensive judgment based on other parameters. This decision matrix enables rapid classification of pollutant properties through a combination of two parameters, providing an important decision-making basis for water quality early warning systems.
[0083] Furthermore, step S5 includes the following steps: Step S51: Construct a water quality state feature vector based on the risk of eutrophication, the type of water quality steady-state anomaly, and the type of pollutant properties; In one embodiment, the eutrophication risk results, water quality steady-state anomaly type results, and pollutant property category results obtained in the preceding steps are collected. These three results are then combined into a water quality state feature vector according to a unified format. In practice, each result is assigned a code. For example, "eutrophication risk" is categorized as "no risk," "potential risk," and "high risk," corresponding to codes 0, 1, and 2; "water quality steady-state anomaly type" is categorized as "steady-state normal," "slightly abnormal," "moderately abnormal," and "severely abnormal," corresponding to codes 0, 1, 2, and 3; and "pollutant property category" is categorized as "inorganic pollution," "organic pollution," "mixed pollution," and "unknown category," corresponding to codes 0, 1, 2, and 3. These three codes are combined sequentially to form a three-dimensional vector for subsequent assessment.
[0084] For example, if the risk of eutrophication of water body is judged as "potential risk", the type of water quality steady state anomaly is "moderate anomaly" and the pollutant nature category is "mixed pollutants", then the corresponding coding vector is [1,2,2].
[0085] It should be noted that the encoding method can be adjusted according to actual management needs, but the order of each judgment result in the vector must be consistent so that it can be read correctly in subsequent hierarchical evaluation.
[0086] Step S52: Evaluate the water quality state feature vector layer by layer according to the preset stratified judgment rules, and determine the warning level based on the combination of the judgment results of each layer; Most importantly, the step-by-step assessment described in step S52 is as follows: the first layer determines whether the pollution source is industrial wastewater or an unknown pollution source; the second layer determines whether there is a risk of eutrophication of the water body; the third layer determines whether the water quality steady-state anomaly is moderate or severe; and the fourth layer determines whether the pollutant is organic or an unknown type.
[0087] In one embodiment, the system sequentially reads information from each dimension of the feature vector and assesses risk layer by layer according to preset rules. The first layer determines the type of pollution source; if the corresponding code in the vector is industrial wastewater or an unknown pollution source, the first layer is marked as high risk. The second layer determines the risk of eutrophication of the water body; if the code is potential risk or high risk, the second layer is marked as requiring close attention. The third layer determines the type of water quality stability anomaly; if the code is moderate or severe anomaly, the third layer increases the warning level. The fourth layer determines the nature and category of pollutants; if the code is organic pollutant or an unknown category, the fourth layer further increases the warning level. The system calculates the final warning level based on the four-layer assessment results according to preset combination rules, such as by accumulating the risk weights of each layer or setting a matrix correspondence.
[0088] For example, when the feature vector is [industrial wastewater, potential eutrophication risk, moderate anomaly, organic pollutants], the system obtains the final warning level as "Level 3 Alert" through layer-by-layer evaluation.
[0089] Step S53: Trigger the corresponding water quality warning according to the determined warning level, package the warning level, trigger time, various judgment results and related monitoring data into a warning information record, and push the warning information to the monitoring terminal.
[0090] In one embodiment, an early warning information package is generated, including the early warning level, trigger time, complete feature vector, judgment results at each level, and relevant monitoring parameter data (such as the current value and deviation information of dissolved oxygen, pH value, conductivity, turbidity, and chlorophyll a). The system pushes the early warning information to water management personnel in real time through a monitoring terminal platform, SMS, email, or mobile application, and records it in a database for subsequent analysis and auditing.
[0091] For example, when the warning level is "Level 3 Alert", a chart is generated to show the deviation trend of each parameter, the nighttime oscillation index, and the pollution characteristic coefficient, so as to help managers quickly determine the type of pollution and its possible impact.
[0092] Therefore, the embodiments should be considered as exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of the equivalents of the application are intended to be included within the invention.
[0093] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features of the invention herein.
Claims
1. A digital twin water quality automatic monitoring intelligent early warning method, characterized in that, Includes the following steps: Step S1: Deploy a multi-parameter sensor array in the actual water body to collect real-time data of various water quality parameters, and record the starting time of each parameter's deviation from the baseline value to form a parameter response time difference sequence; Step S2: Match the parameter response time difference sequence with the preset pollution source time difference feature library to determine the pollution source type, and calculate the pollution feature coefficient according to the degree of deviation; Step S3: Extract the nighttime dissolved oxygen monitoring data from the real-time data, calculate the cumulative value of positive changes in dissolved oxygen as the nighttime oscillation index, and determine the eutrophication risk of the water body by combining the pollution characteristic coefficient when the nighttime oscillation index exceeds the preset oscillation threshold. Step S4: Calculate the difference between the historical correlation coefficient and the current correlation coefficient between pH value and conductivity using real-time data as the decoupling index, and determine the type of water quality steady-state anomaly based on the decoupling index; It also calculates the ratio of conductivity to turbidity and the ratio of chlorophyll a to turbidity in real time, and determines the nature and category of pollutants based on the range of ratios; Step S5: Based on the risk of eutrophication, the type of water quality steady-state anomaly, and the nature and category of pollutants, a stratified judgment is made to trigger a water quality warning.
2. The digital twin water quality automatic monitoring and intelligent early warning method according to claim 1, characterized in that, Step S1 includes the following steps: Step S11: Deploy a sensor array in the monitored water area, set the data acquisition frequency to once per minute, collect real-time data on dissolved oxygen, pH value, conductivity, turbidity, and chlorophyll a, and transmit the real-time data to the data aggregation node. Step S12: Select the data from the real-time data for the period of 72 hours before the start of monitoring where there is no rainfall or sewage discharge record, calculate the median of each parameter in that period as the baseline value of the parameter, and calculate the standard deviation as the fluctuation range. Step S13: Calculate the difference between real-time data and real-time data. When the measured value exceeds the baseline value by ±2 times the standard deviation, mark it as a deviation state and record the moment when the parameter first enters the deviation state.
3. The digital twin water quality automatic monitoring intelligent early warning method according to claim 2, characterized in that, Step S1 also includes the following steps: Step S14: Taking the earliest deviation time among the five parameters as the zero point of time, calculate the delay time of the deviation time of the other four parameters relative to the zero point of time, and obtain four deviation time difference values; Step S15: Combine the parameter names corresponding to the zero point of time and the four deviation time difference values according to the preset format to form the parameter response time difference sequence of the current pollution event.
4. The digital twin water quality automatic monitoring intelligent early warning method according to claim 3, characterized in that, Step S2 includes the following steps: Step S21: Construct a pollution source time difference feature library, which includes standard time difference sequences of three types of pollution sources: industrial wastewater, domestic sewage, and agricultural non-point source pollution. Step S22: Compare the parameter response time difference sequence with the feature patterns in the pollution source time difference feature library one by one, and calculate the sum of squared time difference deviations between the current time difference sequence and each feature pattern; Step S23: Select the feature pattern with the smallest sum of squared time difference deviations as the best matching feature pattern. When the smallest sum of squared deviations is less than a preset threshold, determine the pollution source type corresponding to the feature pattern as the current pollution source type; when the smallest sum of squared deviations is greater than the preset threshold, mark it as an unknown pollution source type. Step S24: Extract the deviation factor of each parameter's real-time data relative to the baseline value, and calculate the arithmetic mean of the deviation factors of the five parameters as the overall deviation. Step S25: Generate pollution characteristic coefficients based on the overall deviation and pollution source type using preset mapping rules.
5. The digital twin water quality automatic monitoring intelligent early warning method according to claim 4, characterized in that, Step S3 includes the following steps: Step S31: Determine the nighttime period of the date as 22:00 to 6:00 the next day, and extract the continuous dissolved oxygen monitoring data for this period from the real-time data; Step S32: Process the continuous dissolved oxygen monitoring data during the nighttime period point by point in chronological order, calculate the difference between the dissolved oxygen value at each monitoring moment and the dissolved oxygen value at the previous moment, and obtain the dissolved oxygen change value sequence. Step S33: Filter out all positive values from the dissolved oxygen change value sequence and sum them up to obtain the cumulative positive change value of dissolved oxygen at night.
6. The digital twin water quality automatic monitoring intelligent early warning method according to claim 5, characterized in that, Step S3 also includes the following steps: Step S34: Divide the cumulative positive change value by the nighttime monitoring duration to obtain the average positive change per unit time, which is used as the nighttime oscillation index; Step S35: Compare the nighttime oscillation index with the preset oscillation threshold. When the nighttime oscillation index is greater than the oscillation threshold and the pollution characteristic coefficient is greater than the preset characteristic threshold, it is determined that there is a risk of eutrophication of the water body, and the eutrophication risk level is recorded. Step S36: When the nighttime oscillation index is greater than the oscillation threshold but the pollution characteristic coefficient is less than or equal to the characteristic threshold, it is determined to be a potential eutrophication risk.
7. The digital twin water quality automatic monitoring intelligent early warning method according to claim 6, characterized in that, Step S4 includes the following steps: Step S41: Extract the pH and conductivity data sequences for the most recent 30 days, and calculate the Pearson correlation coefficient between the two sequences as the historical correlation coefficient; Step S42: Extract the pH and conductivity data sequences from the previous 24 hours, and calculate the Pearson correlation coefficient between the two sequences as the current correlation coefficient; Step S43: Calculate the absolute value of the difference between the historical correlation coefficient and the current correlation coefficient to obtain the decoupling index.
8. The digital twin water quality automatic monitoring intelligent early warning method according to claim 7, characterized in that, Step S4 also includes the following steps: Step S44: When the decoupling index is less than 0.2, it is determined to be in steady state normal; when the decoupling index is between 0.2 and 0.5, it is determined to be slightly abnormal; when the decoupling index is between 0.5 and 0.8, it is determined to be moderately abnormal; when the decoupling index is greater than 0.8, it is determined to be severely abnormal, thus obtaining the water quality steady state abnormality type. Step S45: Calculate the ratio of conductivity to turbidity and the ratio of chlorophyll a to turbidity in real time, and determine the nature and category of pollutants based on the range of ratios.
9. The digital twin water quality automatic monitoring and intelligent early warning method according to claim 8, characterized in that, Step S45 includes the following steps: Step S451: Extract the conductivity value and turbidity at the current moment, and calculate the ratio of the conductivity value to the turbidity value as the first characteristic ratio; Step S452: Extract the chlorophyll a value and turbidity value at the current moment, and calculate the ratio of the chlorophyll a value to the turbidity value as the second feature ratio; Step S453: Determine the pollutant type based on the combination of the numerical ranges of the first characteristic ratio and the second characteristic ratio. When the first characteristic ratio is greater than a preset upper limit and the second characteristic ratio is less than a preset lower limit, it is determined to be an inorganic pollutant; when the first characteristic ratio is less than a preset lower limit and the second characteristic ratio is greater than a preset upper limit, it is determined to be an organic pollutant; when both ratios are within the preset range, it is determined to be a mixed pollutant; otherwise, it is determined to be an unknown category.
10. The digital twin water quality automatic monitoring and intelligent early warning method according to claim 9, characterized in that, Step S5 includes the following steps: Step S51: Construct a water quality state feature vector based on the risk of eutrophication, the type of water quality steady-state anomaly, and the type of pollutant properties; Step S52: Evaluate the water quality state feature vector layer by layer according to the preset stratified judgment rules, and determine the warning level based on the combination of the judgment results of each layer; Step S53: Trigger the corresponding water quality warning according to the determined warning level, package the warning level, trigger time, various judgment results and related monitoring data into a warning information record, and push the warning information to the monitoring terminal.