A method for monitoring the quality of drinking water outlet based on neural network model
Through the direct drinking water quality monitoring method based on the neural network model, real-time monitoring of the water supply in the direct drinking water pipeline network is solved, and the monitoring accuracy and efficiency are improved.
Patent Information
- Application Number
- CN202410962947.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-18
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-07-18
AI Technical Summary
Due to the small flow rate and concentrated use time in the direct drinking water pipeline network, water retention is prone to occur, resulting in secondary pollution of drinking water quality. The existing monitoring methods cannot dynamically return water in real time. In addition, the big data monitoring model has monitoring delays and errors in the complex structure of the user's water supply pipeline network.
The direct drinking water effluent quality monitoring method based on the neural network model is adopted. By obtaining the water supply historical data of the main network and the water supply historical data of the water supply at the effluent end, the water outlet is classified at the same time, and a neural network model representing the water outlet is constructed to monitor the water supply quality in real time.
The time accuracy and numerical accuracy of monitoring the quality of the final water supply are significantly improved, the problem of water outlet delay is solved, the neural network model is optimized, the data acquisition and training amount is reduced, and the prediction error is reduced.
Smart Images

Figure CN118917724B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of direct drinking water supply, and in particular to a method for monitoring the quality of direct drinking water outlet water based on a neural network model. Background Art
[0002] Direct drinking water is generally supplied directly to residents in the form of differentiated water supply, and is supplied through pipes with domestic water from tap water, also known as differentiated water supply.
[0003] Since the demand for drinking water is far less than that for domestic use, drinking water pipelines have problems such as small flow, concentrated use time, and easy water retention, especially during low drinking water peak periods and at night when there is no water. Therefore, drinking water in the water supply mains and risers of the pipe network is prone to bacteria, leading to secondary water pollution.
[0004] At present, the means of secondary pollution are two steps: sensor water quality monitoring and return water reprocessing. The shortcomings are: 1. The sensor is generally installed in the water supply network, and it is impossible to monitor the secondary pollution caused by water retention at the outlet; 2. The logic of return water reprocessing also only uses a preset fixed return water logic, and it is impossible to dynamically return water according to the real-time situation of the terminal water; 3. There are also some technical documents that disclose the technology of big data monitoring of terminal water, but the user's water supply network structure is complex, and the length of the water supply network at different outlets is different, which will produce different monitoring delays and monitoring errors. Using only one big data monitoring model will cause obvious prediction deviations. Summary of the invention
[0005] The present invention discloses a method for monitoring the quality of drinking water outlet water based on a neural network model. The specific method is as follows:
[0006] Obtain the historical water supply data of the main network and the historical water supply data of several water outlets;
[0007] According to the historical water supply data of the main network and the historical water supply data of several outlets, the outlets are classified according to their time characteristics;
[0008] Build a neural network model for each type of water outlet;
[0009] Each type of water outlet selects a representative water outlet according to preset conditions;
[0010] If there is no water outlet that meets the preset conditions in the current classified water outlet, two or more water outlets are combined as representative water outlets;
[0011] The neural network model of the corresponding category is trained using the historical data of water supply at the terminal representing the water outlet and the historical data of water supply at the main network at the same time;
[0012] The neural network model is used to monitor the water supply at the corresponding water outlet in real time.
[0013] The advantages of this embodiment are that it adopts a classification prediction method based on time response characteristics, which solves the delay problem of the water outlet and significantly improves the time accuracy of monitoring the water supply quality at the terminal; for numerical accuracy, it adopts a method of selecting representatives from the water outlet to solve it, which can reduce the amount of data collection and training while optimizing the neural network model, excludes some data that may cause prediction errors, and significantly improves the numerical accuracy of monitoring the water supply quality at the terminal; for the classification where the water outlet representative cannot be selected, it also provides a selection method for a combined water outlet representative.
[0014] Furthermore, the main network water supply history data and the peripheral water supply history data include: conductivity, pH value, turbidity and ozone value.
[0015] Furthermore, the water supply history data of the main network and the water supply history data of the peripherals of several water outlets are obtained, and the specific method is as follows:
[0016] Adjust the filtering process parameters of the direct drinking water network to cause fluctuations in the data collected by the sensors at the main water supply network and the water outlet, record the specific fluctuation data and fluctuation time, and construct the water supply history data of the main network and the terminal water supply history data of several water outlets.
[0017] The advantage of this embodiment is that for a newly-invested direct drinking water network, which lacks operating data, active regulation can be used to complete classification at the water outlet.
[0018] Furthermore, the water outlet is classified according to the same time characteristics. The specific method is as follows:
[0019] Mark the first time point when the historical data of water supply of the main network fluctuates;
[0020] Record the time interval of the first time node and construct a basic fluctuation time data set;
[0021] Mark the second time point at which the historical data of the water supply at each outlet point fluctuates;
[0022] Record the time interval of the second time node and construct several comparison fluctuation time data sets;
[0023] Subtract the first time node from the second time node to construct several classification data sets;
[0024] Each classified data set is taken as a multidimensional data point, and the K-means clustering algorithm is used to complete the classification, and several water outlet classifications with the same time characteristics are obtained.
[0025] The advantage of this embodiment is that it provides a feature classification method for solving time delay. By comparing the main network data and each water outlet data, as well as the data similarity features between the water outlet data, the water outlets with similar delay features can be classified into one category for unified processing.
[0026] Furthermore, each type of water outlet selects a representative water outlet according to preset conditions, and the specific method is as follows:
[0027] According to the values of the classified data set, the time representative score of each outlet is calculated;
[0028] Calculate the data representative score of each water outlet based on the terminal water supply historical data when data fluctuation occurs at each water outlet;
[0029] The average of the time representative score and the data representative score of each water outlet is used as the comprehensive score;
[0030] If there is a water outlet whose comprehensive score is within the preset condition value range, the water outlet with the highest comprehensive score is selected as the representative water outlet.
[0031] The advantage of this embodiment is that when selecting the representative water outlet, the representativeness of the time delay and the representativeness of the numerical deviation in the same category are considered, and the representative water outlet selected by combining the two can significantly improve the prediction accuracy of the category.
[0032] Furthermore, if there is no outlet with a comprehensive score within the preset condition value range, a combined outlet is selected, and the specific method is as follows:
[0033] Exhaustively enumerate any combination of two water outlets;
[0034] Weighting the values of the classification data sets of the two water outlets in each combined water outlet, and calculating the time representative score of the combined water outlet;
[0035] Weight the terminal water supply historical data of the two water outlets in each combined water outlet when data fluctuation occurs, and calculate the data representative score of the combined water outlet;
[0036] The combined water outlet end whose time representative score and data representative score meet the standards and whose comprehensive score is the highest is selected as the final choice.
[0037] The advantage of this embodiment is that when there is no water outlet to be selected, the combined water outlet can be considered to represent the category.
[0038] Furthermore, if the time representative score of the combined water outlet and the data representative score of the combined water outlet cannot meet the standards respectively, the number of the combined water outlets is increased until they meet the standards respectively.
[0039] The advantage of this embodiment is that there can be two or more combined water outlet ends, which provides more possibilities.
[0040] Furthermore, the weights during weighting are obtained through an optimization algorithm, and the specific method is as follows:
[0041] Change the weighted weights, and calculate the time representative score of the combined water outlet or the data representative score of the combined water outlet under each weight ratio;
[0042] The combined water outlet end whose time representative score and data representative score meet the standards and whose comprehensive score is the highest is selected as the final choice.
[0043] The advantage of this embodiment is that the most appropriate ratio weight is selected through the optimization algorithm, which can improve the accuracy of the combined water outlet data and significantly improve the prediction accuracy.
[0044] Furthermore, the time at the water outlet represents the score or the time at the combined water outlet represents the score, and the specific calculation method is as follows:
[0045] The variance of the values of the classification data set of the water outlet or the combined water outlet is calculated, and the time representative score of the water outlet or the combined water outlet is calculated based on the variance.
[0046] The advantage of this embodiment is that the variance can represent the data fluctuation of the water outlet or the combined water outlet. The larger the variance following the original data, the more obvious the data feature is, and the more suitable it is as a representative water outlet.
[0047] Furthermore, the data of the water outlet represents the score or the data of the combined water outlet represents the score, and the specific calculation method is as follows:
[0048] Count the average of each time node when the historical data of the terminal water supply of the same classification or combination of water outlets fluctuates;
[0049] Count the specific values of each water outlet or combined water outlet at each data fluctuation time node. If the value is within the preset range, the score is increased by 1;
[0050] The score of each water outlet or combined water outlet is divided by the number of time nodes to calculate that the data of the water outlet represents the score or the data of the combined water outlet represents the score.
[0051] The advantage of this embodiment is that the stronger the data followability of the water outlet or the combined water outlet, the higher the score, the more suitable it is for training the neural network model, and the prediction accuracy of the neural network model can be improved.
[0052] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be achieved and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] The accompanying drawings of the present invention are as follows.
[0054] Figure 1 It is a schematic diagram of the overall process of the embodiment.
[0055] Figure 2 Schematic diagram of the time feature classification process in the embodiment.
[0056] Figure 3 A representative water outlet process flow diagram is selected for the embodiment.
[0057] Figure 4 A combination of representative water outlet flow charts is selected for the embodiment. DETAILED DESCRIPTION
[0058] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0059] A method for monitoring the quality of drinking water outlet water based on a neural network model. Figure 1 As shown, the specific steps are as follows:
[0060] S1. Obtain the historical water supply data W of the main network 0 and the terminal water supply historical data W of several water outlets i , i=1, 2, ..., n.
[0061] In step S1, the main network water supply history data and the peripheral water supply history data are conductivity a, pH value b, turbidity c and ozone value d.
[0062] In step S1, the water supply history data of the main network and the water supply history data of the peripherals of several water outlets are obtained, and the specific method is as follows:
[0063] Adjust the filtering process parameters of the direct drinking water network to make the data collected by the sensors of the main water supply network and the water outlet fluctuate, record the specific fluctuation data and fluctuation time, and construct the water supply history data of the main network and the terminal water supply history data of several water outlets, which are recorded as follows:
[0064]
[0065] Among them, t i,j is the time when the data fluctuation occurs at the i-th water outlet for the jth time.
[0066] S2. Classify the water outlet with the same time characteristics, such as Figure 2 As shown, the specific steps are as follows:
[0067] S21, mark the first time point t where the historical data of water supply of the main network fluctuates 0 ={t 0,1 t 0,2 ...t 0,j}.
[0068] S22, record the time interval of the first time node and construct a basic fluctuation time data set:
[0069]
[0070] S23, marking the second time node t at which the historical data of the water supply at each outlet fluctuates i ={t i,1 t i,2 ... t i,j}.
[0071] S24, record the time interval of the second time node, and construct several comparison fluctuation time data sets:
[0072]
[0073] S25, subtract the first time node from the second time node to construct several classification data sets (t i -t 0 ).
[0074] S26. Take each classified data set as a multidimensional data point, use the K-means clustering algorithm to complete the classification, and obtain several water outlet classifications with the same time characteristics.
[0075] In step S26, each data node is j-dimensional data, that is,
[0076] t i-0 ={t i,1 -t 0,1 t i,2 -t 0,2 ...t i,j -t 0,j}
[0077] The K-means clustering algorithm uses Euclidean distance as the classification calculation distance. By updating the classification center point and Euclidean distance calculation through multiple iterations, the optimal classification center is obtained to complete the water outlet classification.
[0078] S3. Select a representative water outlet or a combination of representative water outlets for each type of water outlet.
[0079] S31, select the representative water outlet, such as Figure 3 As shown, the specific steps are as follows:
[0080] S311, according to the classification data set value t i-0 ={t i,1 -t 0,1 t i,2 -t 0,2 ...t i,j -t 0,j}, calculate the time representative score st of each water outlet i .
[0081] In step S311, the variance of the values of the water outlet classification data set is calculated, and the time representative score stx of the water outlet or the combined water outlet is calculated according to the variance.
[0082] S312, based on the terminal water supply historical data when the data fluctuation occurs at each water outlet, calculate the data representative score sn of each water outlet i .
[0083] In step S312, the data at the water outlet represents the score, and the specific calculation method is as follows:
[0084] S3121. Count the average number j at each time node when historical data of terminal water supply of the same classification water outlet fluctuates.
[0085] S3122. Count the specific values of each water outlet at each data fluctuation time node If the value is within the preset range th 1 ~th 2 If it is within the range, add 1 to the score and record it as 1.
[0086] S3123. Divide the score of each outlet or combined outlet by the number of time nodes to calculate the score of the outlet or the score of the combined outlet.
[0087] S313. The average of the time representative score and the data representative score of each water outlet is used as the comprehensive score:
[0088]
[0089] S314, if there is a comprehensive score within the preset condition value range, the water outlet S∈(th 3 ,th 4 ), the outlet with the highest comprehensive score is selected as the representative outlet.
[0090] S32. If there is no outlet whose comprehensive score is within the preset condition value range, select a combined outlet, such as Figure 4 As shown, the specific steps are as follows:
[0091] S321. Exhaustively list any combination of water outlets consisting of any two water outlets.
[0092] S322, weighting the classification data set values of the two water outlets l and k in each combined water outlet, w 1 .t l-0 +w 2 .t k-0 , calculate the time representative score st of the combined water outlet lk , the time representative score calculation method is the same as step S311.
[0093] S323, weighting the terminal water supply historical data w when the data fluctuation occurs at the two water outlets in each combined water outlet 1 .n k +w 2 .n l , calculate the combined outlet data representative score sn lk The calculation method of the combined water outlet data representative score is the same as step S311.
[0094] S324, selecting the combined water outlet end whose time representative score and data representative score respectively meet the standards and whose combined water outlet end has the highest comprehensive score as the final selection.
[0095] S4. Construct training data with the terminal water supply history data representing the water outlet or the combined water outlet and the main network water supply history data, and use the training data to train the corresponding neural network model.
[0096] In step S4, the neural network model is a long-term and short-term neural network model.
[0097] S5. Input the trained neural network model with the water supply data of the main network, and output the real-time water quality prediction result of the classified water outlet.
[0098] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for monitoring the quality of drinking water outlet water based on a neural network model, characterized in that: The specific method is as follows: Obtain the historical water supply data of the main network and the historical water supply data of several water outlets; According to the historical water supply data of the main network and the historical water supply data of several outlets, the outlets are classified according to their time characteristics; Build a neural network model for each type of water outlet; Each type of water outlet selects a representative water outlet according to preset conditions; If there is no water outlet that meets the preset conditions in the current classified water outlet, two or more water outlets are combined as representative water outlets; The neural network model of the corresponding category is trained using the historical data of water supply at the terminal representing the water outlet and the historical data of water supply at the main network at the same time; Use the neural network model to monitor the water supply at the corresponding water outlet in real time; The specific method for obtaining the historical water supply data of the main network and the terminal water supply historical data of several water outlets is as follows: Adjust the filtering process parameters of the direct drinking water network to make the data collected by the sensors of the main water supply network and the water outlet fluctuate, record the specific fluctuation data and fluctuation time, and construct the water supply history data of the main network and the terminal water supply history data of several water outlets; The water outlet is classified by the same time characteristics. The specific method is as follows: Mark the first time point when the historical data of water supply of the main network fluctuates; Record the time interval of the first time node and construct a basic fluctuation time data set; Mark the second time point at which the historical data of the water supply at each outlet point fluctuates; Record the time interval of the second time node and construct several comparison fluctuation time data sets; Subtract the first time node from the second time node to construct several classification data sets; Each classified data set is taken as a multidimensional data point, and the K-means clustering algorithm is used to complete the classification, and several water outlet classifications with the same time characteristics are obtained; Each type of water outlet selects a representative water outlet according to preset conditions. The specific method is as follows: According to the values of the classified data set, the time representative score of each outlet is calculated; Calculate the data representative score of each water outlet based on the terminal water supply historical data when data fluctuation occurs at each water outlet; The average of the time representative score and the data representative score of each water outlet is used as the comprehensive score; If there is a water outlet whose comprehensive score is within the preset condition value range, the water outlet with the highest comprehensive score is selected as the representative water outlet.
2. The method for monitoring the quality of drinking water outlet based on a neural network model according to claim 1, characterized in that: The main network water supply historical data and the peripheral water supply historical data include: conductivity, pH value, turbidity and ozone value.
3. The method for monitoring the quality of drinking water outlet based on a neural network model according to claim 1, characterized in that: If there is no outlet with a comprehensive score within the preset condition value range, select a combined outlet. The specific method is as follows: Exhaustively enumerate any combination of two water outlets; Weighting the values of the classification data sets of the two water outlets in each combined water outlet, and calculating the time representative score of the combined water outlet; Weight the terminal water supply historical data of the two water outlets in each combined water outlet when data fluctuation occurs, and calculate the data representative score of the combined water outlet; The combined water outlet end whose time representative score and data representative score meet the standards and whose comprehensive score is the highest is selected as the final choice.
4. The method for monitoring the quality of drinking water outlet based on a neural network model according to claim 3, characterized in that: If the time representative score of the combined water outlet and the data representative score of the combined water outlet cannot meet the standards respectively, the number of combined water outlets will be increased until they meet the standards respectively.
5. The method for monitoring the quality of drinking water outlet based on a neural network model according to claim 3, characterized in that: The weights during weighting are obtained through an optimization algorithm, and the specific method is as follows: Change the weighted weights, and calculate the time representative score of the combined water outlet or the data representative score of the combined water outlet under each weight ratio; The combined water outlet end whose time representative score and data representative score meet the standards and whose comprehensive score is the highest is selected as the final choice.
6. The method for monitoring the quality of drinking water outlet based on a neural network model according to any one of claims 1 to 5, characterized in that: The time at the water outlet represents the score or the time at the combined water outlet represents the score. The specific calculation method is as follows: The variance of the values of the classification data set of the water outlet or the combined water outlet is calculated, and the time representative score of the water outlet or the combined water outlet is calculated based on the variance.
7. The method for monitoring the quality of drinking water outlet based on a neural network model according to any one of claims 1 to 5, characterized in that: The data at the outlet represents the score or the data at the combined outlet represents the score. The specific calculation method is as follows: Count the average of each time node when the historical data of the terminal water supply of the same classification or combination of water outlets fluctuates; Count the specific values of each water outlet or combined water outlet at each data fluctuation time node. If the value is within the preset range, the score is increased by 1; The score of each water outlet or combined water outlet is divided by the number of time nodes to calculate that the data of the water outlet represents the score or the data of the combined water outlet represents the score.
Citation Information
Patent Citations
Networked water source monitoring and grading water supply device and monitoring system thereof
CN108425405A
Industrial sewage water quality prediction method and device based on deep learning
CN118260574A