Urban water supply network water quality monitoring and early warning method

By using CEEMDAN technology and sample entropy method to process water quality data in the water quality monitoring system of the water supply pipeline network, the problem of modal aliasing and noise interference is solved, and accurate prediction and early warning of the water quality of the water supply pipeline network is achieved, reducing water quality The impact of the problem on residents' water use.

CN119151372AInactive Publication Date: 2024-12-17CHONGQING UNIV

Patent Information

Application Number
CN202411361136.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2024-12-17
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing water quality monitoring system of the water supply pipeline network is difficult to effectively predict water quality abnormalities, which leads to the impact of water quality problems on residents' water use, and there are modal aliasing and noise interference problems, affecting the accuracy of prediction.

Method used

The fully adaptive noise ensemble empirical modal decomposition (CEEMDAN) technology is used to feature decompose and denoise the water quality data, and the sample entropy is used to merge and reconstruct the decomposed subsequences to reduce noise interference and error, improve data quality and Model accuracy, and finally introduce the water quality prediction model for prediction.

Benefits of technology

It improves the accuracy and reliability of water quality prediction, can promptly trigger early warning mechanisms, reduce the impact of water quality problems on residents' water use, and ensure water supply safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119151372A_ABST
    Figure CN119151372A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of water quality monitoring, and particularly relates to an urban water supply network water quality monitoring and early warning method which comprises the following steps: S1, setting water quality monitoring points of a water supply network; s2, acquiring original time sequence data; s3, processing the original time sequence data through complete adaptive noise ensemble empirical mode decomposition CEEMDAN to obtain a plurality of IMF component subsequences; s4, calculating a sample entropy value of each IMF component sub-sequence by using a sample entropy SE, and carrying out merging reconstruction; s5, importing the merged and reconstructed IMF component subsequences into a water quality prediction model to obtain a prediction result of the water quality data; and S6, according to a prediction result of the water quality data, judging whether a water quality early warning condition is met, and if so, generating early warning information. According to the method, the water quality data of the water supply network can be effectively predicted, so that the water quality problem of the water supply network is effectively warned in advance, and the influence of the water quality problem on normal water use of residents is reduced as much as possible.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of water quality monitoring, and in particular relates to a water quality monitoring and early warning method for a city water supply network. Background Art

[0002] Water resources are essential elements for human production and life.

[0003] The construction years of urban water supply pipelines vary, and the degree of pipeline aging is also different. At the same time, they are also affected by various external forces and may cause pipeline damage. However, due to the large scale of the water supply network and the differences in the level of pipeline management and maintenance in different regions, it is difficult to achieve comprehensive monitoring and management. Therefore, they are always threatened by many risks, such as pipeline leakage, pipeline burst, and pipeline water quality pollution.

[0004] How to adopt effective means to solve various existing risks and improve the ability to detect water quality hazards in water supply networks and avoid risks has become a top priority for the high-quality development of urban water supply.

[0005] At present, the maintenance of water supply network and the monitoring of water quality in the network are mostly carried out by manual inspection and sampling monitoring, but this method is inefficient, and there is no way to timely discover and solve the existing problems of water supply network. At the same time, there will be certain omissions and monitoring blind spots. With the development of society and the advancement of science and technology, the monitoring system of water supply network has been further improved, which has improved the monitoring efficiency and accuracy to a certain extent, and is of great significance to the maintenance of water quality safety and stability of urban water supply network. The monitoring system of water supply network includes different modules such as data collection, transmission, analysis and early warning. Real-time data collection is carried out through sensors installed on some nodes in the water supply network system. The data may include pressure, flow, water quality, etc., and then the collected data is transmitted to the control terminal for real-time analysis and processing. In this way, not only can the workload of manual inspection be greatly reduced, but also problems in water supply network can be discovered in time and corresponding countermeasures can be taken, which can greatly ensure the safety and reliability of urban water supply network.

[0006] However, after the monitoring points are set up in the water supply network, the water quality monitoring system can only reflect the real-time water quality of the water supply network, but cannot reflect whether there is a risk of water quality indicators in the network exceeding the standard limit. According to this monitoring method, when the alarm is issued, the water quality is usually already greatly abnormal, which has had a great impact on the normal water use of residents. Thanks to the development of computer level, the application of smart water affairs has become more and more extensive, and the digital pipe network monitoring information has become more and more complete, and the information that can be provided is more comprehensive. How to tap its service value in the practice of pipe network operation and maintenance engineering and open up the application scenarios of smart water affairs is of great significance to the safety of water supply network. Therefore, if intelligent technology can be used to effectively predict the monitored water quality, it can be known in advance whether there is a water quality risk (such as residual chlorine, turbidity, etc.) according to the prediction results, so that risk warnings can be issued in advance and effective treatment can be carried out in time, thereby minimizing the impact on the normal water use of residents. However, when implementing water quality early warning technology, there are problems of modal aliasing and noise interference, which makes it difficult to ensure the accuracy of water quality prediction and difficult to effectively use it for water quality intervention treatment.

[0007] Therefore, how can we effectively predict the water quality data of the water supply network, so as to effectively provide early warning of water quality problems in the water supply network and minimize the impact of water quality problems on residents' normal water use. Summary of the invention

[0008] In view of the deficiencies of the above-mentioned prior art, the present invention provides a water quality monitoring and early warning method for an urban water supply network, which can effectively predict the water quality data of the water supply network, thereby effectively providing early warning of water quality problems in the water supply network and minimizing the impact of water quality problems on residents' normal water use.

[0009] In order to solve the above technical problems, the present invention adopts the following technical solutions:

[0010] A water quality monitoring and early warning method for a city water supply network comprises the following steps:

[0011] S1. Set up water quality monitoring points for the water supply network;

[0012] S2, obtaining the time series water quality data of the water quality monitoring points as the original time series data;

[0013] S3, through the fully adaptive noise ensemble empirical mode decomposition CEEMDAN, the original time series data is subjected to feature decomposition and noise reduction processing to obtain multiple IMF component subsequences;

[0014] S4, using the sample entropy SE to calculate the sample entropy value of each IMF component subsequence, and merging and reconstructing the IMF component subsequences based on the sample entropy value;

[0015] The sample entropy method is used to quantitatively measure the sample entropy value of each decomposed subsequence, and the sequences with similar entropy values ​​are superimposed and reconstructed to reduce the overall calculation amount of the subsequent model. Correspondingly, it can also offset some errors to a certain extent and improve the accuracy of the model.

[0016] S5, importing the merged and reconstructed IMF component subsequences into the water quality prediction model to obtain the prediction results of water quality data;

[0017] S6. Based on the prediction results of water quality data, determine whether the water quality warning conditions are met, and if so, generate warning information.

[0018] Compared with the prior art, the present invention has the following beneficial effects:

[0019] 1. This method sets water quality monitoring points in the water supply network and obtains the time series water quality data of the water quality monitoring points. After the water quality data is used as the original time series data, the original time series data will be characterized and denoised through the fully adaptive noise ensemble empirical mode decomposition (CEEMDAN). Through the fully adaptive noise ensemble empirical mode decomposition (CEEMDAN) technology, this method can effectively perform characteristic decomposition and denoise processing on the original time series water quality data. CEEMDAN can automatically identify and separate different frequency components (i.e., IMF component subsequences) in the data, while reducing the modal aliasing and false components generated during the decomposition process, thereby improving the data quality of subsequent analysis and providing a more accurate basis for water quality prediction. This method effectively solves the problems of modal aliasing and noise interference that may exist in traditional water quality prediction, and improves the accuracy and reliability of water quality prediction data.

[0020] 2. This method uses sample entropy (SE) to quantitatively evaluate and merge and reconstruct each IMF component subsequence, which is an innovative and effective data processing strategy. By calculating the sample entropy value of each subsequence, sequences with similar complexity and dynamic characteristics can be identified and merged and reconstructed. This step not only reduces data redundancy, but also reduces the complexity of model calculation. At the same time, it may smooth noise and errors to a certain extent, and improve the stability and accuracy of the prediction model. By merging and reconstructing the IMF component subsequences through sample entropy SE, the key features in the water quality data are further extracted. Combined with the water quality prediction model, accurate prediction of water quality parameters (such as residual chlorine, turbidity, and oxygen consumption) can be achieved. With the help of the sample entropy method, the sample entropy values ​​of each decomposed subsequence are quantitatively measured, and the sequences with similar entropy values ​​are superimposed and reconstructed to reduce the overall calculation amount of the subsequent model, which can also offset some errors to a certain extent and improve the accuracy of the model.

[0021] 3. By inputting the merged and reconstructed data into the water quality prediction model, more reliable water quality data prediction results can be obtained. These prediction results can reflect the changing trend of water quality in the water supply network in real time, and provide timely and accurate information support for water quality management departments. When the prediction results show that the water quality may deviate from the safety standard, the early warning mechanism can be quickly triggered to generate early warning information so that timely measures can be taken to ensure water supply safety.

[0022] In summary, this method can effectively predict the water quality data of the water supply network, thereby effectively providing early warning of water quality problems in the water supply network and minimizing the impact of water quality problems on residents' normal water use.

[0023] Preferably, in S3, the process of performing feature decomposition and noise reduction on the original time series data includes:

[0024] First, add white noise to the original time series data and perform the first EMD decomposition:

[0025]

[0026] Where, X i (t) represents the original sequence after adding white noise; X (t) represents the signal value of the original sequence; Indicates the standard deviation of white noise added to the signal sequence during first-order decomposition; ε i (t) Represents the white noise added to the i-th signal; IMF1 i Represents the IMF component after EMD decomposition; represents the mean of the IMF component after decomposition; C1(t) represents the residual sequence generated after decomposition;

[0027] Then, the first-order component obtained by decomposition is added to the residual sequence generated after decomposition, and the second-order component is further decomposed:

[0028]

[0029] In the formula, —The mean of the IMF components after the second-order decomposition; It represents the standard deviation of white noise added to the signal sequence during the second-order decomposition; E1 and E2 represent the formulas for obtaining the first and second IMF components by empirical mode decomposition, respectively;

[0030] After that, the residual sequence calculation and decomposition process is repeated to calculate the residual of the n-order sequence and the decomposition result of the n+1-order sequence:

[0031]

[0032]

[0033] In the formula, E n The formula for obtaining the nth IMF component by empirical mode decomposition, i = 1, 2, 3...n; It represents the standard deviation of white noise added to the signal sequence at the n+1 order decomposition;

[0034] Then, repeat the above steps until the residual sequence cannot be decomposed, and get the decomposition result of the original signal:

[0035]

[0036] Among them, S(t) represents the result after the original signal is decomposed; C(t) represents the residual sequence signal obtained by the final decomposition; K represents the number of times the signal is decomposed.

[0037] The basic principle of decomposition of fully adaptive noise ensemble empirical mode decomposition (CEEMDAN) is to add white noise and take the average value of its components to achieve the effect of noise reduction. However, this method not only adds white noise to the original sequence, but also adds white noise to the components and residuals of each order. At the same time, methods such as EEMD average the decomposed components, but the CEEMDAN method calculates the mean of each order of IMF components and uses the mean as the initial component of the order to enter the calculation of the next order, thereby effectively solving the influence of white noise residue and reducing the error of component reconstruction. For decomposition methods such as EEMD, the limitations of its application are mainly reflected in the influence of white noise residue on the decomposition accuracy of the original sequence and the large amount of calculation required for decomposition iteration. However, CEEMDAN can solve the above two problems well. After adjusting the position and object of white noise addition and the object of overall averaging operation, it can not only overcome the problem of white noise transmission between high and low frequency sequences, but also effectively reduce the amount of calculation of overall decomposition. The completeness of signal reconstruction is good, and the calculation speed and calculation accuracy are greatly improved.

[0038] Preferably, in S4, the process of calculating the sample entropy value of each IMF component subsequence includes:

[0039] In the IMF component subsequence X={x1, x2, x3...x n}, set an m value, and re-divide the original sequence according to the size of the m value to form an m-dimensional vector with a length of N-m+1, X m ={x i , x i+1 , x i+2 ……x i+m-1}, where the value range of i is [1, N-m+1];

[0040] Select two different vectors X after re-division i and X j , and calculate the absolute value of the difference between the two elements, and then record the largest difference as D(X i , X j ):

[0041]

[0042] Compare the difference calculated in the previous step with the set similarity tolerance r, and record the number less than r as B i , calculate the quantity B i The proportion of the total number of vectors is denoted as B i m (r); then, B i m (r) Take the average value and record it as B m (r) represents the probability that two vectors can match m points under this condition. The calculation formula is as follows:

[0043]

[0044]

[0045] Add 1 to the previously set m value and repeat the above calculation process to get B m+1 (r);

[0046] The sample entropy of the IMF component subsequence is calculated as:

[0047]

[0048] In this setting, sample entropy is a statistical method for quantifying the complexity of time series. It reflects the probability of generating new patterns in time series, that is, the unpredictability or irregularity of time series. The higher the sample entropy value, the more complex the time series is, and it contains more irregular changes or dynamic characteristics. This helps to analyze the intrinsic characteristics of time series. Compared with approximate entropy (ApEn), sample entropy is more rigorous in theory, less dependent on the length of data, and more robust to noise. Therefore, it can more effectively distinguish between random components and deterministic components in time series.

[0049] In addition, the change of sample entropy can reflect the change of dynamic characteristics of time series. By analyzing the sample entropy of IMF component subsequences of different lengths, the complexity and dynamic characteristics of time series at different time scales can be revealed. This helps to understand the internal structure and laws of time series more comprehensively.

[0050] Preferably, in S4, when the IMF component subsequences are merged and reconstructed based on the sample entropy values, the IMF component subsequences whose sample entropy value differences are less than a preset value are merged as a new subsequence.

[0051] Such a setting reduces the number of subsequences, greatly reduces the dimension of importing subsequent model processing, and reduces the model operation time and complexity. At the same time, this method takes into account the properties of the sequence itself when merging and reconstructing subsequences, and screens and merges them according to their similar complexity. It not only considers the relationship between the original subsequences, but also minimizes the impact of merging and reconstruction. At the same time, it can also offset the noise signals carried in the subsequences to a certain extent, thereby improving the accuracy of subsequent model predictions.

[0052] Preferably, in S5, the merged and reconstructed IMF component subsequences are normalized before being introduced into the water quality prediction model.

[0053] With this setting, normalization can convert data of different dimensions and ranges into values ​​of a unified scale, so that all features are within a similar range in terms of value. Through normalization, this effect can be eliminated, making the contribution of each feature in the model more balanced. This helps the model better capture the laws in the data, thereby improving the accuracy and reliability of predictions.

[0054] Preferably, in S5, the water quality prediction model is a CNN-BILSTM model; the working process of the CNN-BILSTM model includes: first, importing the input data into the CNN model to extract the local features of the signal sequence and mining its internal connections; then, importing the eigenvalues ​​output by the CNN into the BiLSTM model, deeply mining the features of the sequence information, and retaining useful information to the greatest extent; finally, processing the eigenvalues ​​obtained by the combined model and outputting the corresponding prediction values.

[0055] With this setting, the joint CNN-BILSTM model can give full play to the respective advantages of the CNN model and the BILSTM model, combining the convolutional structure and the loop structure to capture the multi-scale features of the original sequence at different levels. This method not only overcomes the problem that a single CNN model can only extract spatial features but cannot solve the dependency of longer information, but also solves the limitations of a single LSTM / BILSTM model in extracting and mining the spatial dimension features of the original sequence, enhances the ability to mine the original sequence information, and can effectively improve the accuracy of model prediction.

[0056] Preferably, the water quality data includes residual chlorine, turbidity, and oxygen consumption.

[0057] Preferably, in S6, when determining whether the water quality warning condition is met, the prediction result of the water quality data is compared with a preset risk threshold, and if the risk threshold is reached, it is determined that the water quality warning condition is met.

[0058] In this way, this early warning mechanism can ensure that relevant departments or institutions have enough time to take necessary measures to deal with water quality problems, thereby avoiding or reducing the impact of water quality deterioration on the environment and human health. Setting risk thresholds is an important part of risk management. It helps decision makers to clarify which changes in water quality indicators need to be paid attention to and to what extent these changes require action. By comparing the prediction results with the risk thresholds, water quality risks can be assessed more scientifically and reasonably, providing a basis for formulating effective risk management strategies.

[0059] Preferably, S1 includes:

[0060] Based on the preset comprehensive evaluation system for water supply safety, the safety risk index of each node in the pipeline network is obtained;

[0061] Safety risk index of each node in the pipeline network;

[0062] A multi-objective optimization model is constructed based on the safety risk index of each node to solve the monitoring point layout plan; the objective functions of the multi-objective optimization model include the maximum water volume covered by the monitoring point, the maximum risk of monitoring point coverage, and the minimum proportion of monitoring points;

[0063] Solve the safety risk index to build a multi-objective optimization model and obtain the monitoring point layout plan;

[0064] Based on the obtained monitoring point layout plan, water quality monitoring points are set up in the water supply network.

[0065] Based on the preset comprehensive evaluation system for water supply safety, the safety risk index of each node in the pipeline network can be obtained by using a variety of existing technologies, such as the combination of fuzzy analytic hierarchy process and entropy weight method to calculate the subjective and objective weights, so as to obtain the safety risk index of each node in the pipeline network. In this way, through the preset comprehensive evaluation system for water supply safety, combined with fuzzy analytic hierarchy process and entropy weight method, the safety risk index of each node in the pipeline network can be scientifically and systematically evaluated. This method not only considers the weights of different risk factors, but also deals with the ambiguity and uncertainty in the evaluation process, making the evaluation results more accurate and reliable. The multi-objective optimization model constructed based on the safety risk index of each node aims to find an optimization solution that balances the water volume covered by the monitoring point, the risk of monitoring point coverage, and the proportion of the number of monitoring points. This multi-objective optimization method can ensure the maximization of the monitoring effect under limited resources, while reducing unnecessary monitoring point settings and improving monitoring efficiency.

[0066] In addition, the monitoring point layout plan obtained by solving the multi-objective optimization model can ensure that the monitoring points can cover high-risk areas and key nodes, thereby more effectively monitoring water quality conditions. This targeted monitoring method can greatly improve monitoring efficiency and reduce the risk of missed detection and false alarms.

[0067] Preferably, the comprehensive evaluation system for water supply safety includes a hierarchical structure diagram of the comprehensive safety evaluation problem of pipeline network nodes; the hierarchical structure diagram includes a target layer, a criterion layer and an indicator layer from top to bottom; the target layer is the node with the greatest safety risk; the criterion layer includes pipeline factors, hydraulic factors, water quality factors, location factors and other factors; the indicator layer includes pipe material, pipe age and pipe diameter belonging to pipeline pressure; node water demand and node water pressure belonging to hydraulic factors; water age, residual chlorine, turbidity and oxygen consumption belonging to water quality factors; soil cover thickness, whether it is located at the water supply demarcation line and whether it is an important node belonging to location factors; maintenance records belonging to other factors.

[0068] With this setting, the evaluation system comprehensively covers various factors that affect the safety risks of pipeline nodes through the setting of criteria and indicators. This comprehensive consideration helps to more accurately assess the safety risks of nodes. The hierarchical structure diagram presents the complex comprehensive safety evaluation problems of pipeline nodes in a structured manner, making the logical relationship between each level clear. This structured presentation method helps decision makers and analysts better understand the problem, so as to make decisions and plans more scientifically.

[0069] In addition, in the fuzzy hierarchical analysis method, weights need to be allocated between elements at different levels (such as the various factors at the criterion level and the indicator level). Through the hierarchical structure diagram, weights can be allocated and adjusted more conveniently, thereby ensuring the accuracy and reliability of the evaluation results. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] In order to make the purpose, technical solution and advantages of the invention more clear, the present invention will be further described in detail below with reference to the accompanying drawings, in which:

[0071] Figure 1 A flowchart of the method is shown in FIG.

[0072] Figure 2 Schematic diagram of the comprehensive evaluation system for water supply safety in Example 1;

[0073] Figure 3 This is a schematic diagram of the CNN-LSTM residual chlorine prediction results in Example 2;

[0074] Figure 4 This is a schematic diagram of the CNN-LSTM turbidity prediction results in Example 2;

[0075] Figure 5This is a schematic diagram of the CNN-LSTM oxygen consumption prediction results in Example 2;

[0076] Figure 6 This is a schematic diagram of the CNN-BILSTM residual chlorine prediction results in Example 2;

[0077] Figure 7 This is a schematic diagram of the turbidity prediction results of CNN-BILSTM in Example 2;

[0078] Figure 8 This is a schematic diagram of the oxygen consumption prediction results of CNN-BILSTM in Example 2;

[0079] Fig. 9 This is a schematic diagram of the residual chlorine prediction results of CEEMD-CNN-BILSTM in Example 2;

[0080] Fig.10 This is a schematic diagram of the turbidity prediction results of CEEMD-CNN-BILSTM in Example 2;

[0081] Fig.11 This is a schematic diagram of the oxygen consumption prediction results of CEEMD-CNN-BILSTM in Example 2;

[0082] Fig.12 The residual chlorine prediction result of CEEMDAN-CNN-BILSTM in Example 2;

[0083] Fig.13 This is a schematic diagram of the turbidity prediction results of CEEMDAN-CNN-BILSTM in Example 2;

[0084] Fig.14 This is a schematic diagram of the oxygen consumption prediction results of CEEMDAN-CNN-BILSTM in Example 2. DETAILED DESCRIPTION

[0085] The following is a further detailed description through specific implementation methods:

[0086] Embodiment 1

[0087] like Figure 1 As shown, this embodiment discloses a water quality monitoring and early warning method for a city water supply network, comprising the following steps:

[0088] S1. Set up water quality monitoring points in the water supply network.

[0089] In specific implementation, S1 includes:

[0090] Based on the preset comprehensive evaluation system for water supply safety, the safety risk index of each node in the pipeline network is obtained. In specific implementation, based on the preset comprehensive evaluation system for water supply safety, the safety risk index of each node in the pipeline network is obtained. It can be achieved using a variety of existing technologies, such as by combining the fuzzy hierarchical analysis method and the entropy weight method to calculate the subjective and objective weights, thereby obtaining the safety risk index of each node in the pipeline network. The weight value of each indicator layer is calculated by the entropy weight method to ensure the effectiveness of the safety risk assessment of each node. In specific implementation, those skilled in the art may also use other technologies to achieve the above purpose, which will not be repeated here.

[0091] A multi-objective optimization model is constructed based on the safety risk index of each node to solve the monitoring point layout plan; the objective functions of the multi-objective optimization model include the maximum water volume covered by the monitoring point, the maximum risk of monitoring point coverage, and the minimum proportion of monitoring points;

[0092] Solve the safety risk index to build a multi-objective optimization model and obtain the monitoring point layout plan;

[0093] Based on the obtained monitoring point layout plan, water quality monitoring points are set up in the water supply network.

[0094] like Figure 2 As shown, the comprehensive evaluation system for water supply safety includes a hierarchical structure diagram of the comprehensive evaluation problem of pipeline node safety; the hierarchical structure diagram includes a target layer, a criterion layer and an indicator layer from top to bottom; the target layer is the node with the greatest safety risk; the criterion layer includes pipeline factors, hydraulic factors, water quality factors, location factors and other factors; the indicator layer includes pipe material, pipe age and pipe diameter belonging to pipeline pressure; node water demand and node water pressure belonging to hydraulic factors; water age, residual chlorine, turbidity and oxygen consumption belonging to water quality factors; soil cover thickness, whether it is located at the water supply demarcation line and whether it is an important node belonging to location factors; maintenance records belonging to other factors.

[0095] The evaluation system comprehensively covers various factors that affect the safety risks of pipeline nodes through the setting of criterion layer and indicator layer. This comprehensive consideration helps to more accurately evaluate the safety risks of nodes. The hierarchical structure diagram presents the complex comprehensive safety evaluation problem of pipeline nodes in a structured manner, making the logical relationship between each level clear. This structured presentation method helps decision makers and analysts to better understand the problem, so as to make decisions and plans more scientifically. In addition, in the fuzzy hierarchical analysis method, weights need to be assigned between elements at different levels (such as various factors at the criterion layer and the indicator layer). Through the hierarchical structure diagram, weights can be more conveniently assigned and adjusted, thereby ensuring the accuracy and reliability of the evaluation results.

[0096] Such a setting, through the preset comprehensive evaluation system of water supply safety, combined with the fuzzy hierarchical analysis method and the entropy weight method, can scientifically and systematically evaluate the safety risk index of each node in the pipeline network. This method not only takes into account the weights of different risk factors, but also handles the ambiguity and uncertainty in the evaluation process, making the evaluation results more accurate and reliable. The multi-objective optimization model constructed based on the safety risk index of each node aims to find an optimization solution that balances the water volume covered by the monitoring points, the risk of monitoring point coverage, and the proportion of the number of monitoring points. This multi-objective optimization method can ensure that the monitoring effect is maximized under limited resources, while reducing unnecessary monitoring point settings and improving monitoring efficiency. In addition, the monitoring point layout plan obtained by solving the multi-objective optimization model can ensure that the monitoring points can cover areas with higher risks and key nodes, so as to more effectively monitor the water quality. This targeted monitoring method can greatly improve the monitoring efficiency and reduce the risk of missed detection and false alarms.

[0097] The Entropy Weight Method (EWM) is an objective weighting method that can effectively avoid the influence of subjective initiative. It mainly uses entropy to measure the disorder of indicators, while information represents the order of the system. Therefore, when the information entropy of the indicator is smaller, the discrete degree of the indicator is greater, and the corresponding information is more, so this indicator has a greater impact on the weighting. On the contrary, the greater the information entropy, the smaller the impact of the indicator on the weighting. In the actual indicator system, combined with the basic data of the indicator, the objective weight of each indicator can be obtained through calculation. The entropy weight method only considers the original data when calculating. After the original data is input, it is necessary to divide and normalize the positive and negative indicators, calculate the proportion of the indicators in the plan, and finally output the objective weight result of the indicator.

[0098] Let the water volume covered by the monitoring point be Q1, and the selected water quality monitoring point be X i , the node water volume of each node in the pipe network is Y i The threshold of the number of monitoring points is set as C, which is set according to the actual situation of the study. The total number of nodes in the study network is N, J i is the coverage node number of each node, T is all selected monitoring points X i The intersection of the covered node ranges, P i is the corresponding node number in the covering set T. The specific objective function core constraints are as follows:

[0099]

[0100]

[0101] Monitoring point coverage risk

[0102] The solution method for node coverage risk is the same as that for node coverage water volume. It is also solved with the help of the coverage set matrix T constructed by the research institute. The risk value of each node in the network is quantitatively calculated according to the weight value of the comprehensive risk assessment system of the water supply network. Let the monitoring point coverage risk be Q2 and the node risk of each node in the network be Z. i , the specific objective function form is as follows:

[0103]

[0104] Percentage of monitoring points

[0105] In the actual process of optimizing the site selection of water quality monitoring points, under the premise of ensuring the representativeness of the monitoring points, in order to minimize the cost of engineering construction and operation and maintenance, the proportion of the number of monitoring points is also taken into consideration. The selected monitoring points are counted and their proportion in the total number of nodes in the pipe network is calculated to characterize the economy of each monitoring point layout scheme. Let the proportion of the number of monitoring points be Q3, and the specific objective function is as follows:

[0106]

[0107] S2. Obtain the time series water quality data of the water quality monitoring point as the original time series data. In specific implementation, the water quality data includes residual chlorine, turbidity, and oxygen consumption.

[0108] S3. Through the fully adaptive noise ensemble empirical mode decomposition (CEEMDAN), the original time series data is subjected to feature decomposition and denoising to obtain multiple IMF component subsequences.

[0109] In specific implementation, the process of feature decomposition and noise reduction of original time series data includes:

[0110] First, add white noise to the original time series data and perform the first EMD decomposition:

[0111]

[0112] Where, X i (t) represents the original sequence after adding white noise; X (t) represents the signal value of the original sequence; Indicates the standard deviation of white noise added to the signal sequence during first-order decomposition; ε i (t) Represents the white noise added to the i-th signal; IMF1 i Represents the IMF component after EMD decomposition; represents the mean of the IMF component after decomposition; C1(t) represents the residual sequence generated after decomposition;

[0113] Then, the first-order component obtained by decomposition is added to the residual sequence generated after decomposition, and the second-order component is further decomposed:

[0114]

[0115] In the formula, —The mean of the IMF components after the second-order decomposition; It represents the standard deviation of white noise added to the signal sequence during the second-order decomposition; E1 and E2 represent the formulas for obtaining the first and second IMF components by empirical mode decomposition, respectively;

[0116] After that, the residual sequence calculation and decomposition process is repeated to calculate the residual of the n-order sequence and the decomposition result of the n+1-order sequence:

[0117]

[0118]

[0119] In the formula, E n The formula for obtaining the nth IMF component by empirical mode decomposition, i = 1, 2, 3...n; It represents the standard deviation of white noise added to the signal sequence at the n+1 order decomposition;

[0120] Then, repeat the above steps until the residual sequence cannot be decomposed, and get the decomposition result of the original signal:

[0121]

[0122] Among them, S(t) represents the result after the original signal is decomposed; C(t) represents the residual sequence signal obtained by the final decomposition; K represents the number of times the signal is decomposed.

[0123] The basic principle of decomposition of fully adaptive noise ensemble empirical mode decomposition (CEEMDAN) is to add white noise and take the average value of its components to achieve the effect of noise reduction. However, this method not only adds white noise to the original sequence, but also adds white noise to the components and residuals of each order. At the same time, methods such as EEMD average the decomposed components, but the CEEMDAN method calculates the mean of each order of IMF components and uses the mean as the initial component of the order to enter the calculation of the next order, thereby effectively solving the influence of white noise residue and reducing the error of component reconstruction. For decomposition methods such as EEMD, the limitations of its application are mainly reflected in the influence of white noise residue on the decomposition accuracy of the original sequence and the large amount of calculation required for decomposition iteration. However, CEEMDAN can solve the above two problems well. After adjusting the position and object of white noise addition and the object of overall averaging operation, it can not only overcome the problem of white noise transmission between high and low frequency sequences, but also effectively reduce the amount of calculation of overall decomposition. The completeness of signal reconstruction is good, and the calculation speed and calculation accuracy are greatly improved.

[0124] S4. Use the sample entropy SE to calculate the sample entropy value of each IMF component subsequence, and merge and reconstruct the IMF component subsequences based on the sample entropy value.

[0125] The sample entropy method is used to quantitatively measure the sample entropy value of each decomposed subsequence, and the sequences with similar entropy values ​​are superimposed and reconstructed to reduce the overall calculation amount of the subsequent model. Correspondingly, it can also offset some errors to a certain extent and improve the accuracy of the model.

[0126] In specific implementation, the process of calculating the sample entropy value of each IMF component subsequence includes:

[0127] In the IMF component subsequence X={x1, x2, x3...x n}, set an m value, and re-divide the original sequence according to the size of the m value to form an m-dimensional vector with a length of N-m+1, X m ={x i , x i+1 , x i+2 ……x i+m -1}, where the value range of i is [1, N-m+1];

[0128] Select two different vectors X after re-division i and X j , and calculate the absolute value of the difference between the two elements, and then record the largest difference as D(X i , X j ):

[0129]

[0130] Compare the difference calculated in the previous step with the set similarity tolerance r, and record the number less than r as B i , calculate the quantity B i The proportion of the total number of vectors is denoted as B i m (r); then, B i m (r) Take the average value and record it as B m (r) represents the probability that two vectors can match m points under this condition. The calculation formula is as follows:

[0131]

[0132]

[0133] Add 1 to the previously set m value and repeat the above calculation process to get B m+1 (r);

[0134] The sample entropy of the IMF component subsequence is calculated as:

[0135]

[0136] In this setting, sample entropy is a statistical method for quantifying the complexity of time series. It reflects the probability of generating new patterns in time series, that is, the unpredictability or irregularity of time series. The higher the sample entropy value, the more complex the time series is, and it contains more irregular changes or dynamic characteristics. This helps to analyze the intrinsic characteristics of time series. Compared with approximate entropy (ApEn), sample entropy is more rigorous in theory, less dependent on the length of data, and more robust to noise. Therefore, it can more effectively distinguish between random components and deterministic components in time series. In addition, changes in sample entropy can reflect changes in the dynamic characteristics of time series. By performing sample entropy analysis on IMF component subsequences of different lengths, the complexity and dynamic characteristics of time series at different time scales can be revealed. This helps to understand the intrinsic structure and laws of time series more comprehensively.

[0137] When merging and reconstructing IMF component subsequences based on sample entropy values, IMF component subsequences whose sample entropy value difference is less than the preset value are merged as new subsequences. This setting reduces the number of subsequences, greatly reduces the dimension of importing subsequent model processing, and reduces the model operation time and complexity. At the same time, this method considers the properties of the sequence itself when merging and reconstructing subsequences, and screens and merges them according to their similar complexity. It not only considers the relationship between the original subsequences, but also minimizes the impact of merging and reconstructing. At the same time, it can also offset the noise signal carried in the subsequence to a certain extent, and improve the accuracy of subsequent model prediction.

[0138] S5. Import the merged and reconstructed IMF component subsequences into the water quality prediction model to obtain the prediction results of the water quality data.

[0139] Among them, the merged and reconstructed IMF component subsequences are normalized before being imported into the water quality prediction model. The decomposed data may have problems such as uneven data features and inconsistent dimensions, which will seriously affect the model's recognition and extraction of these data features, and will also affect the model's training and convergence speed. To avoid the impact of these problems, before using the relevant model for training and learning, the input training set and test set data features need to be normalized respectively. The min-max normalization method is generally used. This method maps all input feature sequences in the [0, 1] interval so that they fluctuate within a given unit and eliminate the dimensions of each data feature. In order to obtain the actual prediction value, the denormalization operation should be performed after the prediction result is obtained, and then the model prediction error can be quantitatively analyzed. The calculation formula is as follows:

[0140]

[0141] Among them, x0 represents the normalized value; x represents the actual value before normalization; x max 、x min Represent the maximum and minimum values ​​in the data sequence respectively.

[0142] In specific implementation, the water quality prediction model is a CNN-BILSTM model; the working process of the CNN-BILSTM model includes: first, the input data is imported into the CNN model to extract the local features of the signal sequence and mine its internal connections; then, the eigenvalues ​​output by CNN are imported into the BiLSTM model to deeply mine the features of the sequence information and retain useful information to the greatest extent; finally, the eigenvalues ​​obtained by the combined model are processed and the corresponding prediction values ​​are output.

[0143] Convolutional Neural Network (CNN) was proposed by Lecun Y et al. in the 1980s. It is a representative algorithm in deep learning. It not only contains convolution operations, but also is a feedforward neural network with a deep structure. The algorithm originated from the neurocognitive machine model, which is similar to the human brain's visual processing model. With the development of computer technology, after a long period of iteration and extension, the types of CNN models have become more and more abundant, and because of its outstanding image processing capabilities, it has been widely used in various fields. CNN includes five different modules: input layer, convolution layer, pooling layer, fully connected layer and output layer. By perceiving and convolving the local information of the input original signal, mining the feature information carried in the original signal, and then integrating the features of the local information, it can realize the feature extraction of the data. Finally, the features are pooled to reduce the dimension of the extracted features, and the features are output through the fully connected layer.

[0144] The Long Short-Term Memory (LSTM) neural network model evolved from the recurrent neural network (RNN) model. Compared with RNN, it introduces the concept of gates to filter and retain information in the sequence, which can effectively solve the problems of gradient explosion and gradient disappearance that may occur when RNN processes long sequences. The bidirectional long short-term memory network model BILST evolved from the long short-term memory network model LSTM. In essence, it is composed of a forward LSTM model and a backward LSTM model. The traditional LSTM model can only process time series in one direction, so some past information may be ignored in practical applications. The BILSTM model has an additional reverse processing model than the traditional LSTM model, which can realize bidirectional consideration of time series data information, mine useful information in time series data as much as possible, capture bidirectional dependencies in sequence data, and improve the accuracy of the model. The LSTM model mainly processes sequence data through three modules: input gate, forget gate and output gate. In the processing unit, the forget gate is responsible for screening whether the information is useful, retaining useful information and forgetting useless information. The input gate is responsible for updating important information in the system, and the output gate is responsible for calculating and outputting the specific values ​​of the hidden layer.

[0145] With this setting, the joint CNN-BILSTM model can give full play to the respective advantages of the CNN model and the BILSTM model, combining the convolutional structure and the loop structure to capture the multi-scale features of the original sequence at different levels. This method not only overcomes the problem that a single CNN model can only extract spatial features but cannot solve the dependency of longer information, but also solves the limitations of a single LSTM / BILSTM model in extracting and mining the spatial dimension features of the original sequence, enhances the ability to mine the original sequence information, and can effectively improve the accuracy of model prediction.

[0146] S6. Based on the prediction results of water quality data, determine whether the water quality warning conditions are met, and if so, generate warning information.

[0147] Among them, when judging whether the water quality warning conditions are met, the predicted results of the water quality data are compared with the preset risk threshold. If the risk threshold is reached, it is judged that the water quality warning conditions are met. In this way, this early warning mechanism can ensure that relevant departments or institutions have enough time to take necessary measures to deal with water quality problems, thereby avoiding or reducing the impact of water quality deterioration on the environment and human health. Setting risk thresholds is an important part of risk management. It helps decision makers clarify which changes in water quality indicators need to be paid attention to and to what extent these changes require action. By comparing the predicted results with the risk threshold, water quality risks can be evaluated more scientifically and reasonably, providing a basis for formulating effective risk management strategies.

[0148] In specific implementation, the risk thresholds of various indicators are shown in Table 1.

[0149] Table 1 Limits and risk thresholds of various indicators

[0150]

[0151] This method sets water quality monitoring points in the water supply network and obtains the time series water quality data of the water quality monitoring points. After the original time series data is used, the original time series data will be characterized and decomposed by the fully adaptive noise ensemble empirical mode decomposition (CEEMDAN). Through the fully adaptive noise ensemble empirical mode decomposition (CEEMDAN) technology, this method can effectively perform characteristic decomposition and noise reduction on the original time series water quality data. CEEMDAN can automatically identify and separate different frequency components (i.e., IMF component subsequences) in the data, while reducing the modal aliasing and false components generated during the decomposition process, thereby improving the data quality of subsequent analysis and providing a more accurate basis for water quality prediction. This method effectively solves the problems of modal aliasing and noise interference that may exist in traditional water quality monitoring, and improves the accuracy and reliability of water quality monitoring data. In addition, this method uses sample entropy (SE) to quantitatively evaluate and merge and reconstruct each IMF component subsequence, which is an innovative and effective data processing strategy. By calculating the sample entropy value of each subsequence, sequences with similar complexity and dynamic characteristics can be identified and merged and reconstructed. This step not only reduces data redundancy, but also reduces the complexity of model calculation. At the same time, it may smooth noise and errors to a certain extent, and improve the stability and accuracy of the prediction model. The IMF component subsequences are merged and reconstructed through sample entropy SE, and the key features in the water quality data are further extracted. Combined with the water quality prediction model, accurate prediction of water quality parameters (such as residual chlorine, turbidity, and oxygen consumption) can be achieved.

[0152] Moreover, by inputting the merged and reconstructed data into the water quality prediction model, more reliable water quality data prediction results can be obtained. These prediction results can reflect the changing trend of water quality in the water supply network in real time, and provide timely and accurate information support for water quality management departments. When the prediction results show that the water quality may deviate from the safety standard, the early warning mechanism can be quickly triggered to generate early warning information so that timely measures can be taken to ensure water supply safety. This method can effectively predict the water quality data of the water supply network, thereby effectively giving early warning of water quality problems in the water supply network and minimizing the impact of water quality problems on residents' normal water use.

[0153] Embodiment 2

[0154] In order to better illustrate the effect of this method, the following experimental verification is carried out.

[0155] Since there are many indicators that affect the water quality in the pipeline network, and considering the importance of pipeline water quality indicators in water supply safety and the limitations of existing monitoring equipment, in this experiment, turbidity, residual chlorine and oxygen consumption were selected to study the water quality prediction and early warning model of the water supply network. The selected data are the hourly monitoring data of the research site. The monitoring period is from November 1, 2023 to December 30, 2023. Each monitoring point returns 1440 groups of hourly monitoring data including residual chlorine, turbidity and oxygen consumption as the original signal sequence for subsequent prediction and early warning model research.

[0156] Construction of water quality early warning model for pipe network

[0157] (1) CNN-LSTM model

[0158] Before CNN-LSTM prediction, the original data set needs to be divided. Generally, 70% or 80% is used as the training set, and the rest is used as the test set. The training set ratio is set to 80%, and the test set ratio is set to 20%. Then the data of the training set and the test set are normalized respectively, and imported into the CNN-LSTM model for training and testing. The parameters related to the model are experimentally adjusted by trial and error. The specific settings are shown in Table 2:

[0159] Table 2 Settings of relevant parameters in CNN-LSTM model

[0160]

[0161] After setting the relevant parameters of the model, the residual chlorine, turbidity, and oxygen consumption data of the six research sites were imported as original time series for training and prediction. Due to limited space, only the prediction result fitting images of the high-zone pipeline network site 1 and the low-zone pipeline network site 4 are displayed and analyzed. The remaining research sites only summarize the results of the accuracy evaluation of each indicator after being processed by the model. The discussion and research of other models are similar to this model. The historical monitoring data of the residual chlorine, turbidity, and oxygen consumption indicators of sites 1 and 4 are imported into the model with initialized parameters. The fitting of the predicted values ​​and the true values ​​after model processing is shown in the figure. Figures 3 to 5 shown.

[0162] It can be seen from the result diagram that the CNN-LSTM model can predict the residual chlorine, turbidity and oxygen consumption indicators in the high and low zone pipe networks in the study area to a certain extent, but it may have certain limitations in the prediction accuracy. In order to intuitively represent its prediction accuracy, the model's various indicators are calculated accordingly, and the model accuracy evaluation of each indicator of the six stations is summarized in the following table. The specific situation is shown in Table 3:

[0163] Table 3 Prediction accuracy of CNN-LSTM model

[0164]

[0165] As can be seen from the table above, when the model is actually applied, the prediction accuracy of different research sites and different indicators will vary, and the overall prediction accuracy of the model is poor, especially R 2 The lowest index at the research site can only reach 0.524 1, which means that the model cannot be well applied to the prediction of residual chlorine, turbidity and oxygen consumption in the research area. Therefore, in order to ensure that the prediction accuracy of the model meets the requirements, further analysis and research on the remaining prediction models is needed.

[0166] (2) CNN-BILSTM model

[0167] Because the BILSTM model is composed of two LSTM models connected forward and backward, the model division training set and test set are consistent with the CNN-LSTM model. The initial parameters are still tested by trial and error according to the model structure. The parameters suitable for the model are shown in Table 4:

[0168] Table 4 Settings of relevant parameters in CNN-BILSTM model

[0169]

[0170] After setting the relevant parameters of the model, the original time series is imported into the model for training. The comparison between the predicted results and the actual values ​​of the residual chlorine, turbidity, and oxygen consumption indicators of Station 1 and Station 4 is shown in the figure below. Figure 6-Figure 8 shown.

[0171] According to the comparison chart of each indicator of station 1 and station 4, it can be seen that CNN-BILSTM performs better in predicting each indicator, because BILSTM has a structural advantage over LSTM and can filter and learn more data features from the original signal sequence. For example, in the starting section of the turbidity sequence prediction of station 1, the prediction result of CNN-BILSTM is obviously more in line with the actual prediction value and has a higher degree of fit. In order to more clearly distinguish the applicability of the two models in this study, the accuracy evaluation results of the CNN-BILSTM model are summarized, and the accuracy evaluation results of the CNN-BILSTM model are compared with those of the CNN-LSTM model. The specific situation is shown in Tables 5 and 6:

[0172] Table 5 Prediction accuracy of CNN-BILSTM model

[0173]

[0174]

[0175] Table 6 Comparison of CNN-BILSTM and CNN-LSTM models

[0176]

[0177]

[0178] By comparing the results of the two models, it can be seen that CNN-BILSTM has higher prediction accuracy for the three indicators of residual chlorine, turbidity, and oxygen consumption. In most cases, its prediction accuracy is higher than that of the CNN-LSTM model. 2 For indicators, the maximum improvement can reach 26.56%, for MAPE indicators, the maximum improvement can reach 20.18%, for MAE indicators, the maximum improvement can reach 22.35%, and for RMSE indicators, the maximum improvement can reach 22.22%. However, there are still some indicators in the results whose accuracy evaluation results are not as good as the CNN-LSTM model, and there will be negative growth, but the proportion of this part is small, so it can be said that the prediction accuracy of this model is generally better than that of the CNN-LSTM model, so this model is used for subsequent research on data decomposition and combination models.

[0179] (3) CEEMD-CNN-BILSTM model

[0180] This model adds a CEEMD decomposition and denoising process to the original signal sequence before the CNN-BILSTM model. First, the initial signal is decomposed by CEEMD to obtain the decomposed subsequences. Then, the original signal is reconstructed according to the sample entropy value of each subsequence. The decomposed and reconstructed subsequences are imported into the model for separate prediction, and then the prediction results of the subsequences are superimposed to obtain the final prediction result. The initial parameter settings are shown in Table 7.

[0181] Table 7 CEEMD-CNN-BILSTM model parameter setting table

[0182]

[0183] The original signal sequence is imported into the initialized model. The comparison between the predicted results and the actual values ​​of the residual chlorine, turbidity, and oxygen consumption indicators of stations 1 and 4 is shown in the figure below. Figures 9 to 11 shown.

[0184] Judging from the prediction results of the model, the degree of fit between the predicted value and the original signal sequence has been greatly improved, indicating that denoising decomposition and reconstruction of the original signal sequence can improve the prediction accuracy of the model to a certain extent. The evaluation results of the model accuracy and the improvement in accuracy compared with the CNN-BILSTM model without decomposition and reconstruction are shown in Tables 8 and 9.

[0185] Table 8 Prediction accuracy of CEEMD-CNN-BILSTM model

[0186]

[0187] Table 9 Comparison of CEEMD-CNN-BILSTM and CNN-BILSTM models

[0188]

[0189]

[0190] According to the accuracy evaluation comparison results of CEEMD-CNN-BILSTM and CNN-BILSTM models, it can be clearly seen that the prediction results of the original signal sequence after adding data decomposition and denoising are better than those before adding data decomposition and denoising in all indicators, such as R 2 The highest indicator increased by 24.83%, indicating that the combined model has better applicability to the original signal sequence of the experiment and is more suitable for predicting the sequence. To a certain extent, it proves the effect of data decomposition and reconstruction on improving the prediction accuracy of the original sequence.

[0191] (4) CEEMDAN-CNN-BILSTM model

[0192] This model adds the CEEMDAN decomposition denoising process to the original signal sequence before the CNN-BILSTM model. Like CEEMD decomposition, it also decomposes the original signal sequence into multiple subsequences. Its initial parameter settings are shown in Table 10.

[0193] Table 10 CEEMDAN-CNN-BILSTM model parameter setting table

[0194]

[0195]

[0196] The comparison between the predicted results and actual values ​​of residual chlorine, turbidity and oxygen consumption of stations 1 and 4 after being processed by the model is shown in the figure below. Figure 12 to Figure 14 shown.

[0197] According to the prediction result diagram of the CEEMDAN-CNN-BILSTM combined model, the combined prediction model has a relatively high prediction accuracy for different water quality indicators and different research sites, and the degree of fit between the predicted value and the true value is good. This further proves that when the original signal sequence is decomposed, denoised and reconstructed, the noise interference in the original signal sequence can be effectively reduced, which is more conducive to the subsequent model to extract the characteristics of the research signal sequence. The specific results of the accuracy evaluation of the model are shown in Table 11.

[0198] Table 11 Prediction accuracy of CEEMDAN-CNN-BILSTM model

[0199]

[0200] Through the previous comparison results, it can be preliminarily concluded that the accuracy of the model after adding decomposition is higher than that of the model without adding signal decomposition. In order to quantify the accuracy improvement of the combined model, only this model is compared with the combined model with the CEEMD decomposition method. The comparison results are shown in Table 12. According to the comparison results, it can be seen that the evaluation results of its accuracy indicators will be better, and the accuracy of each indicator has been improved to varying degrees. For example, R 2 The maximum improvement ratio of the index is 15%, and the maximum reduction ratio of the MAPE index is 46%, which shows that the combined prediction model constructed by CEEMDAN decomposition method has higher accuracy than the other three models introduced above, and is more applicable to the original time series used in the study.

[0201] Table 12 Comparison of CEEMDAN-CNN-BILSTM and CEEMD-CNN-BILSTM models

[0202]

[0203] Discussion and analysis of model prediction results

[0204] Based on the results of the accuracy evaluation of the four prediction models used in the previous article, it can be clearly seen that the CNN-LSTM model has obvious limitations in predicting residual chlorine, turbidity, and oxygen consumption. 2Generally, it can only reach about 0.6, and even the lowest is 0.52. Therefore, in terms of prediction effect, this method is not an ideal choice. It cannot achieve the desired effect in actual engineering applications, and inaccurate prediction models will also affect the subsequent early warning process of various indicators. For the CNN-BILSTM model, due to its structural advantages, it can obtain more feature information than the CNN-LSTM model, so theoretically, the corresponding accuracy will be higher than the CNN-LSTM model. From the comparison between the CNN-BILSTM and CNN-LSTM models, it can be seen that in the prediction process of different indicators at the six research sites, the accuracy of the CNN-BILSTM model is basically higher than that of the CNN-LSTM model. Only the accuracy evaluation results of very few indicators are reduced. The main reason is that although the BILSTM model can obtain more feature information, it will also retain more noise information to a certain extent, resulting in lower accuracy than the single LSTM model. Since this part accounts for a small proportion in the results, it can be judged that the overall performance of the model is higher than that of the CNN-LSTM model.

[0205] On this basis, the CNN-BILSTM model is coupled with two decomposition methods, CEEMD and CEEMDAN. In this way, the original signal is decomposed into multiple subsequences and sample entropy is reconstructed. Then the reconstructed subsequences are predicted and summed separately. According to the prediction results of the combined model, it can be seen that decomposing the original data can significantly improve the overall accuracy of the model. In the prediction process of the three indicators of residual chlorine, turbidity and oxygen consumption, each evaluation index has a significant decrease or increase, and the fitting accuracy is also concentrated above 0.8, indicating that both methods have good prediction accuracy. This is because in the process of decomposing the original signal sequence, on the one hand, some noise factors in the original signal are removed, and on the other hand, the time series features in the sequence are correspondingly extracted and analyzed in the decomposition process, which has an important impact on the improvement of subsequent prediction accuracy. In addition, according to the prediction results of the six stations studied, the accuracy of the CEEMDAN-CNN-BILSTM combination model is higher than that of the CEEMD-CNN-BILSTM combination model. This may be because the principles of CEEMDAN decomposition and CEEMD decomposition are different. CEEMDAN decomposition introduces an adaptive noise processing mechanism, which is more advantageous in noise processing. Although CEEMD decomposition adds a pair of positive and negative opposite white noises, which can reduce the impact of noise to a certain extent, it is still more sensitive to noise. Therefore, it may be more affected by noise. In comprehensive comparison, the CEEMDAN-CNN-BILSTM combination model constructed by this method has the highest prediction accuracy for the residual chlorine, turbidity, and oxygen consumption indicators in the pipe network of the study area.

[0206] In summary, in terms of the prediction of the three indicators of residual chlorine, turbidity, and oxygen consumption, the accuracy of the model is that the CEEMDAN-CNN-BILSTM combination model has the highest prediction accuracy, followed by the CEEMD-CNN-BILSTM combination model. The prediction accuracy of the other two models without decomposition is poor. The accuracy of the CNN-BILSTM model is higher than that of the CNN-LSTM model to a certain extent. Although there are differences in the prediction of different indicators at different sites by the CEEMD-CNN-BILSTM combination model, such as the fitting accuracy of the oxygen consumption indicator at site 5 is only 0.86, but overall, the model is ideal for the prediction of different sequences and has good applicability. Since the combined model has high accuracy in predicting water quality indicators, in the actual application process, combined with the risk thresholds of each indicator set, it will be more accurate when warning of potential risks in the pipe network.

[0207] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit the technical solution. Those skilled in the art should understand that those modifications or equivalent substitutions of the technical solution of the present invention that do not depart from the purpose and scope of the technical solution should be included in the scope of the claims of the present invention.

Claims

1. A water quality monitoring and early warning method for a city water supply network, characterized in that: The following steps are involved: S1. Set up water quality monitoring points for the water supply network; S2, obtaining the time series water quality data of the water quality monitoring points as the original time series data; S3, through the fully adaptive noise ensemble empirical mode decomposition CEEMDAN, the original time series data is subjected to feature decomposition and noise reduction processing to obtain multiple IMF component subsequences; S4, using the sample entropy SE to calculate the sample entropy value of each IMF component subsequence, and merging and reconstructing the IMF component subsequences based on the sample entropy value; S5, importing the merged and reconstructed IMF component subsequences into the water quality prediction model to obtain the prediction results of water quality data; S6. Based on the prediction results of water quality data, determine whether the water quality warning conditions are met, and if so, generate warning information.

2. The urban water supply network water quality monitoring and early warning method according to claim 1, characterized in that: In S3, the process of feature decomposition and noise reduction of original time series data includes: First, add white noise to the original time series data and perform the first EMD decomposition: In the formula, X i (t) represents the original sequence after adding white noise; X (t) represents the signal value of the original sequence; Indicates the standard deviation of white noise added to the signal sequence during first-order decomposition; ε i (t) Represents the white noise added to the i-th signal; IMF1 i Represents the IMF component after EMD decomposition; represents the mean of the IMF component after decomposition; C1(t) represents the residual sequence generated after decomposition; Then, the first-order component obtained by decomposition is added to the residual sequence generated after decomposition, and the second-order component is further decomposed: In the formula, —The mean of the IMF components after the second-order decomposition; It represents the standard deviation of white noise added to the signal sequence during the second-order decomposition; After that, the residual sequence calculation and decomposition process is repeated to calculate the residual of the n-order sequence and the decomposition result of the n+1-order sequence: In the formula, E n The formula for obtaining the nth IMF component by empirical mode decomposition, i = 1, 2, 3...n; It represents the standard deviation of white noise added to the signal sequence at the n+1 order decomposition; Then, repeat the above steps until the residual sequence cannot be decomposed, and get the decomposition result of the original signal: Among them, S(t) represents the result after the original signal is decomposed; C(t) represents the residual sequence signal obtained by the final decomposition; K represents the number of times the signal is decomposed.

3. The urban water supply network water quality monitoring and early warning method according to claim 2, characterized in that: In S4, the process of calculating the sample entropy value of each IMF component subsequence includes: In the IMF component subsequence X={x1, x2, x3...x n }, set an m value, and re-divide the original sequence according to the size of the m value to form an m-dimensional vector with a length of N-m+1, X m ={x i , x i+1 , x i+2 ……x i+m-1 }, where the value range of i is [1, N-m+1]; Select two different vectors X after re-division i and X j , and calculate the absolute value of the difference between the two elements, and then record the largest difference as D(X i , X j ): Compare the difference calculated in the previous step with the set similarity tolerance r, and record the number less than r as B i , calculate the quantity B i The proportion of the total number of vectors is denoted as B i m (r); then, B i m (r) Take the average value and record it as B m (r) represents the probability that two vectors can match m points under this condition. The calculation formula is as follows: Add 1 to the previously set m value and repeat the above calculation process to get B m+1 (r); The sample entropy of the IMF component subsequence is calculated as:

4. The urban water supply network water quality monitoring and early warning method according to claim 3, characterized in that: In S4, when the IMF component subsequences are merged and reconstructed based on the sample entropy values, the IMF component subsequences whose sample entropy value differences are less than a preset value are merged as a new subsequence.

5. The urban water supply network water quality monitoring and early warning method according to claim 1, characterized in that: In S5, the merged and reconstructed IMF component subsequences are normalized before being introduced into the water quality prediction model.

6. The urban water supply network water quality monitoring and early warning method according to claim 5, characterized in that: In S5, the water quality prediction model is the CNN-BILSTM model; the working process of the CNN-BILSTM model includes: first, the input data is imported into the CNN model to extract the local features of the signal sequence and mine its internal connections; then, the feature values ​​output by the CNN are imported into the BiLSTM model to deeply mine the features of the sequence information and retain the useful information to the greatest extent; finally, the feature values ​​obtained by the combined model are processed and the corresponding prediction values ​​are output.

7. The urban water supply network water quality monitoring and early warning method according to claim 1, characterized in that: Water quality data include residual chlorine, turbidity, and oxygen consumption.

8. The urban water supply network water quality monitoring and early warning method according to claim 7, characterized in that: In S6, when judging whether the water quality warning condition is met, the prediction result of the water quality data is compared with the preset risk threshold. If the risk threshold is reached, it is judged that the water quality warning condition is met.

9. The urban water supply network water quality monitoring and early warning method according to claim 1, characterized in that: S1 includes: Based on the preset comprehensive evaluation system for water supply safety, the safety risk index of each node in the pipeline network is obtained; A multi-objective optimization model is constructed based on the safety risk index of each node to solve the monitoring point layout plan; the objective functions of the multi-objective optimization model include the maximum water volume covered by the monitoring point, the maximum risk of monitoring point coverage, and the minimum proportion of monitoring points; Solve the safety risk index to build a multi-objective optimization model and obtain the monitoring point layout plan; Based on the obtained monitoring point layout plan, water quality monitoring points are set up in the water supply network.

10. The urban water supply network water quality monitoring and early warning method according to claim 9, characterized in that: The comprehensive evaluation system for water supply safety includes a hierarchical structure diagram for the comprehensive evaluation of pipeline node safety; the hierarchical structure diagram includes a target layer, a criterion layer and an indicator layer from top to bottom; the target layer is the node with the greatest safety risk; the criterion layer includes pipeline factors, hydraulic factors, water quality factors, location factors and other factors; the indicator layer includes pipe material, pipe age and pipe diameter belonging to pipeline pressure; node water demand and node water pressure belonging to hydraulic factors; water age, residual chlorine, turbidity and oxygen consumption belonging to water quality factors; soil cover thickness, whether it is located at the water supply demarcation line and whether it is an important node belonging to location factors; maintenance records belonging to other factors.

Citation Information

Patent Citations

  • Pipeline water quality risk evaluation method based on water supply network dynamic model

    CN106600094A

  • Ultra-short-term load dynamic prediction method based on load characteristic decomposition

    CN116258269A

  • Water supply prediction method for leakage integral reserve pool network based on quadratic modal reconstruction

    CN116341743A

  • Water quality prediction method

    CN117035155A

  • Comprehensive safety evaluation and monitoring point site selection method for urban water supply pipe network

    CN117522199A

Cited By

  • Sewage treatment safety management and control method and system based on nano microbubble technology

    CN121158948A