A park water supply network water quality comprehensive monitoring and early warning method

By optimizing water quality sampling points using wavelet decomposition algorithm and bioflocculation impact assessment model, and combining them with linear regression model, the noise interference and monitoring point layout problems of the water quality monitoring system of the park's water supply network were solved, achieving efficient and accurate water quality monitoring.

CN120612197BActive Publication Date: 2025-11-11ZHEJIANG INST OF HYDRAULICS & ESTUARY +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511106482.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-08
Publication Date
2025-11-11
Estimated Expiration
2045-08-08

AI Technical Summary

Technical Problem

The existing water quality monitoring system of the park's water supply network suffers from problems such as inaccurate monitoring results and incomplete coverage due to noise interference and unreasonable layout of monitoring points.

Method used

Wavelet decomposition algorithm was used for energy assessment to construct a bioflocculation impact assessment model. The selection of water quality sampling points was optimized by ant colony algorithm and combined with linear regression model for accurate monitoring.

Benefits of technology

This improved the accuracy and coverage efficiency of water quality monitoring, reduced interference from abnormal data and waste of resources, and ensured the effectiveness of water quality data and the precision of monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120612197B_ABST
    Figure CN120612197B_ABST
Patent Text Reader

Abstract

This invention belongs to the field of water quality monitoring technology. It discloses a comprehensive monitoring and early warning method for water quality in a park's water supply network, comprising: identifying water quality collection points in the water supply network; collecting water quality data and corresponding water quality labels from these collection points in the same time series; performing energy assessment on the water quality data to obtain point energy; dividing the point energy into several point-level clusters; classifying these clusters for anomalies to obtain anomalous point clusters; removing anomalous data from the water quality data to obtain valid water quality data; correcting the valid water quality data for flocculation impact based on a pre-constructed bioflocculation impact assessment model to obtain corrected water quality data; constructing a water quality monitoring model based on the corrected water quality data and water quality labels; and achieving accurate monitoring of water quality in the water supply network through the water quality monitoring model. This significantly improves the accuracy and precision of water quality monitoring in the park's water supply network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of water quality monitoring technology, and more specifically, to a method for comprehensive monitoring and early warning of water quality in a park's water supply network. Background Technology

[0002] With the acceleration of industrialization and urbanization, the water supply system in the park is facing increasingly serious water quality safety issues. The water supply network is an important part of urban water supply and is directly related to the water safety of residents and enterprises. Therefore, real-time monitoring and early warning of water quality are particularly important. In order to ensure the water quality safety of the water supply system, modern water quality monitoring systems usually use various sensors to continuously monitor multiple important indicators in the water.

[0003] However, due to the limitations of the environment, microbial activity, and the sensors themselves, water quality monitoring systems may experience noise interference during data acquisition. This noise is often caused by seasonal microbial changes, bioflocculation, and other environmental factors, which affects the accuracy of sensor signals. In particular, during bioflocculation, microorganisms and organic matter in the water aggregate to form flocs, affecting the sensor data of water quality indicators and causing deviations in monitoring results. Traditional water quality monitoring systems for industrial park water supply networks usually rely on a small number of monitoring points to assess water quality. However, due to the complex structure, long pipe length, and numerous branch pipes of industrial park water supply networks, the layout of monitoring points is often unreasonable, resulting in defects in the existing water quality monitoring point layout, making it difficult to comprehensively and accurately reflect the water quality status of the network.

[0004] In view of this, the present invention proposes a comprehensive monitoring and early warning method for water quality in industrial park water supply networks to solve the above problems. Summary of the Invention

[0005] To overcome the aforementioned deficiencies of the prior art and to achieve the above objectives, the present invention provides the following technical solution: a method for comprehensive monitoring and early warning of water quality in a park water supply network, comprising:

[0006] S1. Determine the water quality collection points in the water supply network, and collect water quality data and corresponding water quality labels from the collection points in the same time series.

[0007] S2. An improved wavelet decomposition algorithm is used to perform energy assessment on water quality data to obtain point energy; the point energy is divided into several point hierarchical clusters, and anomalies are classified into point hierarchical clusters to obtain anomalous point clusters; the data corresponding to the anomalous point clusters in the water quality data are removed to obtain valid water quality data.

[0008] S3. Based on the constructed bioflocculation impact assessment model, the effective water quality data is corrected for flocculation impact to obtain corrected water quality data;

[0009] S4. Construct a water quality monitoring model based on corrected water quality data and water quality labels, and achieve accurate monitoring of water quality in the water supply network through the water quality monitoring model.

[0010] Furthermore, the method for determining the water quality collection points includes:

[0011] Construct a pipeline network topology map, pre-collect water flow at each pipeline node, and use water flow as the flow weight for each node in the pipeline network topology map; use a permutation and combination algorithm to combine graph nodes pairwise to obtain graph node groups, using one graph node in each group as the exploration start point and the other graph node as the exploration end point, and use a greedy algorithm to solve for the shortest path between the exploration start point and the exploration end point in the pipeline network topology map, recording the shortest path between each group of graph nodes; for graph nodes... , through The number of shortest paths divided by the total number of graph node groups is used as the shortest path number. The node centrality is determined; the importance of each graph node is evaluated based on the node centrality and flow weight to obtain the node importance; the path fitness of each group of shortest paths is evaluated based on the node importance, and the shortest path with the largest path fitness value is selected as the collection path. The graph nodes in the collection path are the water quality collection points.

[0012] Furthermore, the water quality data includes: turbidity, residual chlorine concentration, dissolved oxygen concentration, pH value, and conductivity; the water quality labels include: normal, slightly abnormal, moderately abnormal, and severely abnormal.

[0013] Furthermore, the method for energy assessment of water quality data includes:

[0014] Using water quality data from each water quality collection point as the data analysis point, the wavelet basis function and the number of decomposition levels are preset. Using each type of data in the data analysis points as a decomposition basis point, the decomposition basis points are processed based on wavelet basis functions. Layer decomposition, For each decomposition layer, the output of the previous decomposition layer is used as the input to obtain the result. Each level has a coefficient, which is an array containing detailed features of the data at different times. Energy assessment of the decomposition base points is performed based on the data frequency band coefficients. The formula for energy assessment of the decomposition base points is as follows: ;in, Represents energy value. Represents the number of decomposition levels. Representing the In the level coefficient, the th Each data point has an energy feature vector; the energy value of each type of data at the same time scale constitutes an energy feature vector, and the magnitude of the energy feature vector is used as the energy of the point.

[0015] Furthermore, the method of dividing the point energy into several point hierarchical clusters includes:

[0016] Preset The process involves classifying energy points into energy tiers, performing energy classification analysis based on these tiers, and obtaining membership degrees. Each energy point is then assigned to the energy tier with the highest membership degree, resulting in a cluster of energy tiers. Finally, the energy tiers are updated based on these clusters, using the following formula: ;in, Representing the New values ​​for each energy level classification. The first in the hierarchical cluster representing the point The data for the first... Membership degree of each energy level, Represents the fuzzy index. The first in the hierarchical cluster representing the point One data point; update the energy classification with the new classification value, repeat until the energy classification value no longer changes, and output the point classification cluster at this time.

[0017] Furthermore, the formula for energy classification analysis of point energy is as follows: ;in, Represents the energy of the point on the first Membership degree of each energy level, Represents the number of energy levels. Represents the energy of a point. Representing the Energy levels Representing the Each energy level, and , Represents the fuzzy index. It is an integer greater than 1.

[0018] Furthermore, the construction method of the bioflocculation impact assessment model includes:

[0019] Historical water quality data and corresponding historical flocculation impact values ​​are collected. The data types of the historical water quality data are consistent with those of the general water quality data. The historical flocculation impact values ​​include the flocculation impact values ​​corresponding to each type of data in the historical water quality data. An initial evaluation model is preset. M sets of parameter combinations are initialized, each set including: amplitude coefficient, time decay coefficient, period coefficient, and phase factor. Each set of parameter combinations is put into the initial evaluation model, and the model is trained using historical water quality data and corresponding historical flocculation impact values ​​as training data. The merits of the parameter combinations are evaluated based on the training results to obtain the combination excellence. Based on the combination excellence, the parameter combinations are optimized to obtain the globally optimal parameter combination. The globally optimal parameter combination is put into the initial evaluation model to obtain the bioflocculation impact evaluation model.

[0020] Furthermore, the formula for the initial evaluation model is: ;in, Represents the degree of flocculation influence. Represents the amplitude coefficient. Time decay coefficient, Represents a time scale. Represents the periodic coefficient. Represents the phase factor;

[0021] The formula for evaluating the merits of parameter combinations is as follows:

[0022] ;in, Represents the excellence of the group. Represents the number of training data. The total number of data categories representing historical water quality data. Representing the The first of the historical water quality data Historical flocculation impact corresponding to the data type Representing the The first of the historical water quality data Predicted flocculation impact degree corresponding to the data type.

[0023] Furthermore, the water quality monitoring model is constructed in the following ways:

[0024] Based on corrected water quality data and corresponding water quality labels, a linear regression model is used as the initial model for the water quality monitoring model. The corrected water quality data and corresponding water quality labels are used as training data, and the training data is used as the training sample set to train the linear regression model. The corrected water quality data and corresponding water quality labels are used as the input data of the water quality monitoring model, and the predicted water quality labels are used as the output data of the water quality monitoring model. The training objective is to minimize the error between the actual water quality labels and the water quality labels predicted by the water quality monitoring model. The recall function is used as the loss function of the water quality monitoring model. When the loss function converges, training stops and the water quality monitoring model is obtained.

[0025] The technical effects and advantages of the present invention regarding a comprehensive water quality monitoring and early warning method for industrial park water supply networks are as follows:

[0026] This invention utilizes an improved wavelet decomposition algorithm to assess the energy of water quality data. This effectively decomposes water quality monitoring signals into different frequency bands and calculates the energy characteristic value of each band, helping to capture different frequency variations in the monitoring signal and enhancing the multi-scale and accuracy of signal analysis. By dividing and analyzing the energy at monitoring points, abnormal points can be removed from the data, ensuring the validity of the water quality data and effectively avoiding erroneous predictions caused by abnormal data interference. By constructing a pipeline topology map and using an ant colony algorithm to optimize the selection of water quality collection points, the most representative water quality collection points are intelligently identified, improving monitoring efficiency and accuracy. Furthermore, by constructing a bioflocculation impact assessment model and optimizing the parameters using a perturbation algorithm, the bioflocculation impact assessment model is continuously improved, enhancing its accuracy and adaptability, and ensuring the high efficiency and accuracy of the bioflocculation impact assessment model. Attached Figure Description

[0027] Figure 1 This is a schematic diagram of a comprehensive water quality monitoring and early warning method for a park water supply network according to the present invention;

[0028] Figure 2 This is a schematic diagram of a comprehensive water quality monitoring and early warning system for a park water supply network according to the present invention. Detailed Implementation

[0029] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0030] Example 1;

[0031] Please see Figure 1As shown in this embodiment, a comprehensive water quality monitoring and early warning method for a park water supply network includes:

[0032] S1. Determine the water quality collection points in the water supply network, and collect water quality data and corresponding water quality labels from the collection points in the same time series.

[0033] S2. An improved wavelet decomposition algorithm is used to perform energy assessment on water quality data to obtain point energy; the point energy is divided into several point hierarchical clusters, and anomalies are classified into point hierarchical clusters to obtain anomalous point clusters; the data corresponding to the anomalous point clusters in the water quality data are removed to obtain valid water quality data.

[0034] S3. Based on the constructed bioflocculation impact assessment model, the effective water quality data is corrected for flocculation impact to obtain corrected water quality data;

[0035] S4. Construct a water quality monitoring model based on corrected water quality data and water quality labels, and realize accurate monitoring of water quality in the water supply network based on the water quality monitoring model;

[0036] Traditional monitoring point deployment methods suffer from redundancy or incomplete coverage, especially in complex, intersecting pipe networks with numerous branch pipes. Manual or experience-based deployment is rarely optimal, potentially leading to insufficient monitoring in critical areas or excessive monitoring in others, wasting resources. Algorithm optimization allows for monitoring point deployment that not only covers key areas of the entire pipe network but also avoids redundancy and duplicate monitoring, improving resource utilization efficiency and the coverage efficiency and accuracy of water quality monitoring. Specifically:

[0037] Using pipe nodes in the water supply network as graph nodes, the actual connections between pipe nodes as edges, and the pipe distances between pipe nodes as edge weights, the network topology is constructed. Water flow rates at each pipe node are pre-collected, and these flow rates are used as the flow weights for each node in the network topology. A permutation and combination algorithm is used to pair graph nodes to obtain node groups. One node in each group is used as the starting point, and the other as the ending point. A greedy algorithm is used to find the shortest path between the starting and ending points in the network topology, and the shortest path between each group of nodes is recorded. For each graph node… , through The number of shortest paths divided by the total number of graph node groups is used as the shortest path number. The node centrality; based on node centrality and flow weight, the importance of each graph node is evaluated. The formula for evaluating the importance of each graph node is:

[0038] ;in, Represents the importance of nodes. Represents the node degree (the number of edges connected to the node). Represents node centrality. Represents traffic weight;

[0039] Path evaluation is performed on each shortest path group based on node importance, with node importance serving as the initial pheromone concentration for each graph node. Just an ant. If the value is greater than the number of graph nodes, initialize the allocation constant. The pheromone concentration of each ant is , and All values ​​are greater than zero; ants are randomly assigned to different graph nodes in the pipeline topology graph;

[0040] Each ant explores nodes in the pipeline topology map. Each ant chooses its movement direction based on the node selection probability, and the formula for calculating the node selection probability is: ;in, Representing ants from graph nodes To graph nodes The probability of choosing, Representative graph node The initial pheromone concentration, Representative graph node The initial pheromone concentration, A graph node representing the location of an ant. The graph node that the ant chooses. Representative graph node Graph Nodes The weight of the edges between them. Representative graph node The importance of nodes, Representative graph node The importance of a node is determined by its selection probability; a higher probability indicates a greater likelihood that an ant will choose that node. After each ant chooses a direction to move, it moves, its position information is updated, and the pheromone levels of the edges traversed by the ant are updated. The formula for pheromone updates is: ;in, The updated value representing the pheromone. This represents the volatility coefficient, used to simulate the natural evaporation of pheromones. The initial pheromone of the edge (the pheromone concentration before the update). This represents the difference in traffic weight (the difference between the traffic weight of a graph node after the ant's location information is updated and the traffic weight of a graph node before the location information is updated). Represents traffic weight. This represents the pheromone increment, and the formula for calculating the pheromone increment is: ;in, This represents the importance of the selected graph nodes. This represents the weight of the edge corresponding to the selected path. This represents the allocation constant; after each pheromone update, the pheromone concentration of the ants is updated synchronously, by subtracting the pheromone increment from the ant's pheromone concentration. When the pheromone concentration of each ant is less than the pheromone increment, the ant's pheromone concentration is set to zero; by analyzing the topology, flow weight, and node centrality of the pipeline network, the layout of monitoring points is optimized, enabling resources to be efficiently allocated to the most important areas, reducing unnecessary duplicate monitoring, and improving the cost-effectiveness of water quality monitoring and the overall efficiency of the system;

[0041] When the pheromone concentration of an ant is zero, the ant stops moving. For the shortest path between each group of graph nodes in the pipeline topology graph, the path fitness is calculated by dividing the sum of the pheromone concentrations of all edges of the shortest path by the number of graph nodes in the shortest path. The shortest path with the highest path fitness is selected as the collection path. Through algorithm optimization, it can be ensured that the deployment of monitoring points can cover all key areas while avoiding the setting of redundant points. This method improves the spatial efficiency of pipeline monitoring, ensures that each monitoring point has its unique role, and avoids the waste of resources.

[0042] Using graph nodes in the acquisition path as water quality acquisition points, sensors are preset at each water quality acquisition point to collect water quality data. The water quality data includes: turbidity, residual chlorine concentration, dissolved oxygen concentration, pH value, and conductivity. Turbidity represents the degree of turbidity in water, usually caused by suspended particulate matter in the water, and is obtained through a turbidity sensor. Residual chlorine concentration represents the concentration of residual chlorine in the water, often used to judge the disinfection effect, and is obtained through a residual chlorine sensor. pH value represents the acidity or alkalinity of the water, and is obtained through a pH sensor. Conductivity represents the concentration of dissolved salts in the water, and is usually used to monitor inorganic matter in the water. Water quality labels are based on assessments made by those skilled in the art based on national or local water quality standards, and include: normal, slightly abnormal, moderately abnormal, and severely abnormal.

[0043] Raw water quality data collected by sensors is typically a time-series signal, containing noise and outliers. Directly using this data for analysis may lead to erroneous conclusions and warnings. Wavelet decomposition and outlier removal allow for more precise processing of information across different frequency ranges, avoiding misjudgments caused by low-frequency or high-frequency noise. This results in more accurate subsequent data correction and warning analysis, effectively reducing false alarms and missed alarms. Specifically:

[0044] Using water quality data from each water quality collection point as the data analysis point, the wavelet basis function and the number of decomposition levels are preset. Common wavelet basis functions include the db4 wavelet basis function and the Haar wavelet basis function. Each data category in the data analysis points is used as a decomposition basis point, and the decomposition basis points are then processed based on the wavelet basis function. Layer decomposition, For each decomposition layer, the output of the previous decomposition layer is used as the input to obtain the result. Each level has a coefficient, which is an array containing detailed features of the data at different times. Energy assessment of the decomposition base points is performed based on the data frequency band coefficients. The formula for energy assessment of the decomposition base points is as follows: ;in, Represents energy value. Represents the number of decomposition levels. Representing the In the level coefficient, the th Each data point has an energy feature vector, which is formed by the energy value of each type of data at the same time scale. The modulus of the energy feature vector is used as the energy of the point. Through wavelet decomposition algorithm, the water quality monitoring signal can be effectively decomposed into different frequency bands and the energy feature value of each frequency band can be calculated. This helps to capture different frequency changes in the monitoring signal and enhances the multi-scale and accuracy of signal analysis.

[0045] Preset Each energy level is defined by a specific value, based on historical experience established by those skilled in the art. Energy classification analysis is then performed on the energy points based on these energy levels. The formula for this energy classification analysis is as follows: ;in, Represents the energy of the point on the first Membership degree of each energy level, Represents the number of energy levels. Represents the energy of a point. Representing the Energy levels Representing the Each energy level, and , This represents the fuzziness index, used to control the fuzziness of fuzzy classification analysis. Higher values ​​result in smoother membership degrees, while lower values ​​result in sharper membership degrees for each data point. The value is an integer greater than 1; in this embodiment, the preferred value of the fuzzy index is 2. Based on membership degree, the energy of each point is assigned to the energy level with the highest membership degree, thus obtaining a point level cluster. The energy level is then updated based on the point level cluster. The formula for updating the energy level is as follows: ;in, Representing the New values ​​for each energy level classification. The first in the hierarchical cluster representing the point The data for the first... Membership degree of each energy level, Represents the fuzzy index. The first in the hierarchical cluster representing the point The data is analyzed; the energy classification is updated with the new classification value, and this process is repeated until the energy classification value no longer changes. The point classification cluster at this point is then output. Through energy assessment, outliers in water quality data can be identified more intuitively. This process not only improves the quality of the data but also reduces the impact of invalid data on subsequent analysis, making subsequent water quality correction and analysis more accurate.

[0046] A preset energy threshold is used to identify clusters of points with energy levels greater than the threshold as abnormal clusters. Data corresponding to these abnormal clusters in the water quality data is then removed to obtain valid water quality data.

[0047] Bioflocculation, caused by seasonal changes in microorganisms, can interfere with water quality monitoring data, particularly affecting sensor accuracy. These microbial changes lead to fluctuations in water quality parameters such as turbidity and pH, thus interfering with monitoring and impacting data reliability. This paper addresses this issue by establishing a bioflocculation-based assessment model to describe the impact of microbial activity on water quality data. Further optimization algorithms are used to solve for the model's parameters, accurately describing and compensating for the effects of bioflocculation. This effectively corrects the interference caused by bioflocculation, ensuring the accuracy of water quality monitoring data, reducing the impact of seasonal microbial changes, and enabling the water quality monitoring system to provide more accurate water quality information. Specifically:

[0048] Historical water quality data and corresponding historical flocculation impact values ​​are collected. The data types of the historical water quality data are consistent with those of the general water quality data. The historical flocculation impact values ​​include the flocculation impact values ​​corresponding to each type of data in the historical water quality data. An initial assessment model is preset, and the formula for the initial assessment model is:

[0049] ;in, Represents the degree of flocculation influence. The amplitude coefficient represents the intensity of flocculation, and its value ranges from (0, 10). The time decay coefficient is used to control the decay rate of the bioflocculation effect over time. The value range of the time decay coefficient is [0.1, 5]. Represents a time scale. The periodicity coefficient is used to control the periodic changes in bioflocculation. The value range of the periodicity coefficient is [0.1, 2]. The phase factor is used to regulate the temporal sequence of bioflocculation changes. The value range of the phase factor is [0, ...]. ];

[0050] Initialize M sets of parameter combinations, each including: amplitude coefficient, time decay coefficient, period coefficient, and phase factor; input each parameter combination into the initial evaluation model, and train the initial evaluation model using historical water quality data and corresponding historical flocculation influence as training data; evaluate the merits of the parameter combinations based on the training results, using the following formula:

[0051] ;in, Represents the excellence of the group. Represents the number of training data. The total number of data categories representing historical water quality data. Representing the The first of the historical water quality data Historical flocculation impact corresponding to the data type Representing the The first of the historical water quality data The predicted flocculation impact degree corresponding to the data type; the parameter combination is optimized based on the combination excellence. The global optimal parameter combination and the self-optimal state of each parameter combination are preset to be empty. The parameter combination with the highest combination excellence is selected as the global candidate group. When the combination excellence of the global candidate group is greater than the combination excellence of the global optimal parameter combination, the global candidate group is used as the new global optimal parameter combination. For each parameter combination, when the combination excellence of the parameter combination is greater than the combination excellence of the corresponding self-optimal state, the parameter combination is used as the new self-optimal state.

[0052] Each parameter combination is updated based on the self-optimal state and the global optimal parameter combination. A perturbation random number is generated using a random number function, with the perturbation random number ranging from (0,1). Common random number functions include the rand function and the srand function. Each parameter combination is updated based on the perturbation random number. The formula for updating each parameter combination is as follows:

[0053] ;in, This represents the updated parameter combination. Represents the current parameter combination. This represents the optimal state of the parameter combination during iteration. This represents the updated weight, used to balance global and local searches. The updated weight's value ranges from [0.4, 0.9]. This represents the globally optimal combination of parameters. This represents an individual's learning factor, used to control the degree of dependence on the self-optimal state. This represents the global learning factor, used to control the dependence on the globally optimal parameter combination. Both the individual learning factor and the global learning factor have values ​​ranging from [1.5, 2.5]. and The perturbation random number is used to enhance the randomness of the search. The above steps are repeated until the globally optimal parameter combination no longer changes. This globally optimal parameter combination is then placed into the initial evaluation model to obtain the bioflocculation impact assessment model. The model parameters are optimized using an optimization algorithm, allowing the system to adaptively adjust and compensate for the impact of bioflocculation. This results in a model with higher accuracy and stronger generalization ability, capable of handling challenges from different seasons, environments, and water quality changes. The optimized model not only eliminates the current bioflocculation impact but also makes predictions and compensations based on historical data, ensuring more accurate corrected data.

[0054] Based on the constructed bioflocculation impact assessment model, effective water quality data is used as input to obtain the flocculation impact degree. It should be noted that the flocculation impact degree is an array, where each value represents the flocculation impact result of one type of data in the effective water quality data. Data correction is then applied to each type of data in the effective water quality data based on the flocculation impact degree. The formula for data correction for each type of data in the effective water quality data is as follows: ;in, Represents the correction value. Represents the original data. Represents the degree of flocculation influence; all corrected data constitute corrected water quality data;

[0055] The bioflocculation impact assessment model can effectively eliminate these interfering factors, remove water quality fluctuations caused by microorganisms, and restore the authenticity and stability of the data. Especially in seasons with poor water quality, bioflocculation may be more obvious. By correcting with the bioflocculation impact assessment model, these seasonal interferences can be reduced, ensuring the stability of the data throughout the year.

[0056] Based on corrected water quality data and corresponding water quality labels, a linear regression model is used as the initial model for the water quality monitoring model. The corrected water quality data and corresponding water quality labels are used as training data, and the training data serves as the training sample set. The linear regression model is trained using the training sample set. The corrected water quality data and corresponding water quality labels are used as the input data for the water quality monitoring model, and the predicted water quality labels are used as the output data. The training objective is to minimize the error between the actual water quality labels and the water quality labels predicted by the water quality monitoring model. The recall function is used as the loss function for the water quality monitoring model. Training stops when the loss function converges, resulting in the water quality monitoring model. This model enables accurate monitoring of water quality in the water supply network.

[0057] This embodiment utilizes an improved wavelet decomposition algorithm to assess the energy of water quality data. This effectively decomposes the water quality monitoring signal into different frequency bands and calculates the energy characteristic value of each band, helping to capture different frequency variations in the monitoring signal and enhancing the multi-scale and accuracy of signal analysis. By dividing and analyzing the energy at each point, abnormal points can be removed from the data, ensuring the validity of the water quality data and effectively avoiding erroneous predictions caused by abnormal data interference. By constructing a pipeline topology map and using an ant colony algorithm to optimize the selection of water quality collection points, the most representative water quality collection points are intelligently identified, improving monitoring efficiency and accuracy. By constructing a bioflocculation impact assessment model and optimizing the parameters through a perturbation algorithm, the bioflocculation impact assessment model is continuously improved, enhancing the accuracy and adaptability of the assessment and ensuring the high efficiency and accuracy of the bioflocculation impact assessment model.

[0058] Example 2;

[0059] Please see Figure 2 As shown, for parts not described in detail in this embodiment, please refer to the description in Embodiment 1. A comprehensive water quality monitoring and early warning system for a park water supply network is provided, including:

[0060] Data acquisition module: Identify water quality collection points in the water supply network and collect water quality data and corresponding water quality labels from these collection points in the same time series.

[0061] Data Analysis Module: An improved wavelet decomposition algorithm is used to assess the energy of water quality data and obtain the energy of the points; the energy of the points is divided into several point hierarchical clusters, anomalies are classified into the point hierarchical clusters to obtain anomalous point clusters, and the data corresponding to the anomalous point clusters in the water quality data are removed to obtain valid water quality data;

[0062] Impact assessment module: Based on the constructed bioflocculation impact assessment model, the effective water quality data is corrected for flocculation impact to obtain corrected water quality data;

[0063] Model building module: Based on corrected water quality data and water quality labels, a water quality monitoring model is built, and the water quality monitoring model is used to achieve accurate monitoring of water quality in the water supply network;

[0064] The modules are connected via wired and / or wireless means to enable data transmission between them.

[0065] Example 3;

[0066] This embodiment discloses an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the operation mode of the above-described method for comprehensive monitoring and early warning of water quality in a park water supply network.

[0067] Since the electronic device described in this embodiment is the electronic device used to implement the comprehensive monitoring and early warning method for water quality in a park water supply network according to the embodiments of this application, those skilled in the art can understand the specific implementation method and various variations of the electronic device in this embodiment based on the comprehensive monitoring and early warning method for water quality in a park water supply network described in the embodiments of this application. Therefore, how the electronic device implements the method in the embodiments of this application will not be described in detail here. As long as those skilled in the art implement the electronic device used in the comprehensive monitoring and early warning method for water quality in a park water supply network according to the embodiments of this application, it falls within the scope of protection of this application.

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

[0069] The above description is merely a preferred embodiment of the present invention, and the scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for users of ordinary technical skills, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.

Claims

1. A method for comprehensive monitoring and early warning of water quality in a park's water supply network, characterized in that, include: S1. Determine the water quality collection points in the water supply network, and collect water quality data and corresponding water quality labels from the collection points in the same time series. S2. An improved wavelet decomposition algorithm is used to perform energy assessment on water quality data to obtain point energy; the point energy is divided into several point hierarchical clusters, and anomalies are classified into point hierarchical clusters to obtain anomalous point clusters; the data corresponding to the anomalous point clusters in the water quality data are removed to obtain valid water quality data. S3. Based on the constructed bioflocculation impact assessment model, the effective water quality data is corrected for flocculation impact to obtain corrected water quality data; S4. Construct a water quality monitoring model based on corrected water quality data and water quality labels, and achieve accurate monitoring of water quality in the water supply network through the water quality monitoring model; The methods for determining the water quality collection points include: Construct a pipeline network topology map, pre-collect water flow at each pipeline node, and use water flow as the flow weight for each node in the pipeline network topology map; use a permutation and combination algorithm to combine graph nodes pairwise to obtain graph node groups, using one graph node in each group as the exploration start point and the other graph node as the exploration end point, and use a greedy algorithm to solve for the shortest path between the exploration start point and the exploration end point in the pipeline network topology map, recording the shortest path between each group of graph nodes; for graph nodes... , through The number of shortest paths divided by the total number of graph node groups is used as the shortest path number. The node centrality is determined; the importance of each graph node is evaluated based on the node centrality and flow weight to obtain the node importance; the path fitness of each group of shortest paths is evaluated based on the node importance, and the shortest path with the largest path fitness value is selected as the collection path. The graph nodes in the collection path are the water quality collection points. The construction method of the bioflocculation impact assessment model includes: Historical water quality data and corresponding historical flocculation impact values ​​are collected. The data types of the historical water quality data are consistent with those of the general water quality data. The historical flocculation impact values ​​include the flocculation impact values ​​corresponding to each type of data in the historical water quality data. An initial evaluation model is preset. M sets of parameter combinations are initialized, each set including: amplitude coefficient, time decay coefficient, period coefficient, and phase factor. Each set of parameter combinations is put into the initial evaluation model, and the model is trained using historical water quality data and corresponding historical flocculation impact values ​​as training data. The merits of the parameter combinations are evaluated based on the training results to obtain the combination excellence. Based on the combination excellence, the parameter combinations are optimized to obtain the globally optimal parameter combination. The globally optimal parameter combination is put into the initial evaluation model to obtain the bioflocculation impact evaluation model. The formula for the initial evaluation model is: ;in, Represents the degree of flocculation influence. Represents the amplitude coefficient. Time decay coefficient, Represents a time scale. Represents the periodic coefficient. Represents the phase factor; The formula for evaluating the merits of parameter combinations is as follows: ;in, Represents the excellence of the group. Represents the number of training data. The total number of data categories representing historical water quality data. Representing the The first of the historical water quality data Historical flocculation impact corresponding to the data type Representing the The first of the historical water quality data Predicted flocculation impact degree corresponding to the data type.

2. The method for comprehensive monitoring and early warning of water quality in the park's water supply network according to claim 1, characterized in that, The water quality data includes: turbidity, residual chlorine concentration, dissolved oxygen concentration, pH value, and conductivity; the water quality labels include: normal, slightly abnormal, moderately abnormal, and severely abnormal.

3. The method for comprehensive monitoring and early warning of water quality in the park's water supply network according to claim 2, characterized in that, The methods for energy assessment of water quality data include: Using water quality data from each water quality collection point as the data analysis point, the wavelet basis function and the number of decomposition levels are preset. Using each type of data in the data analysis points as a decomposition basis point, the decomposition basis points are processed based on wavelet basis functions. Layer decomposition, For each decomposition layer, the output of the previous decomposition layer is used as the input to obtain the result. Each level has a coefficient, which is an array containing detailed features of the data at different times. Energy assessment of the decomposition base points is performed based on the data frequency band coefficients. The formula for energy assessment of the decomposition base points is as follows: ;in, Represents energy value. Represents the number of decomposition levels. Representing the In the level coefficient, the th Each data point has an energy feature vector; the energy value of each type of data at the same time scale constitutes an energy feature vector, and the magnitude of the energy feature vector is used as the energy of the point.

4. The method for comprehensive monitoring and early warning of water quality in the park's water supply network according to claim 3, characterized in that, The method of dividing point energy into several point hierarchical clusters includes: Preset The process involves classifying energy points into energy tiers, performing energy classification analysis based on these tiers, and obtaining membership degrees. Each energy point is then assigned to the energy tier with the highest membership degree, resulting in a cluster of energy tiers. Finally, the energy tiers are updated based on these clusters, using the following formula: ;in, Representing the New values ​​for each energy level classification. The first in the hierarchical cluster representing the point The data for the first... Membership degree of each energy level, Represents the fuzzy index. The first in the hierarchical cluster representing the point One data point; update the energy classification with the new classification value, repeat until the energy classification value no longer changes, and output the point classification cluster at this time.

5. The method for comprehensive monitoring and early warning of water quality in the park's water supply network according to claim 4, characterized in that, The formula for energy classification analysis of point energy is as follows: ;in, Represents the energy of the point on the first Membership degree of each energy level, Represents the number of energy levels. Represents the energy of a point. Representing the Energy levels Representing the Each energy level, and , Represents the fuzzy index. It is an integer greater than 1.

6. The method for comprehensive monitoring and early warning of water quality in the park's water supply network according to claim 5, characterized in that, The water quality monitoring model is constructed in the following ways: Based on corrected water quality data and corresponding water quality labels, a linear regression model is used as the initial model for the water quality monitoring model. The corrected water quality data and corresponding water quality labels are used as training data, and the training data is used as the training sample set to train the linear regression model. The corrected water quality data and corresponding water quality labels are used as the input data of the water quality monitoring model, and the predicted water quality labels are used as the output data of the water quality monitoring model. The training objective is to minimize the error between the actual water quality labels and the water quality labels predicted by the water quality monitoring model. The recall function is used as the loss function of the water quality monitoring model. When the loss function converges, training stops and the water quality monitoring model is obtained.

Citation Information

Patent Citations

  • Shortest path planning method based on improved ant colony algorithm

    CN113850423A

  • Water quality prediction method and device, computer equipment and storage medium

    CN115456243A