Water supply scheduling system and water scheduling method
By deploying pressure sensors at water supply nodes and building a water pressure prediction model, and using TimeGPT and KNN algorithms to optimize the water diversion plan, the problems of insufficient data processing and information sharing in traditional water supply scheduling methods are solved, and efficient and stable scheduling of the water supply system is achieved.
Patent Information
- Application Number
- CN202411563988.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2044-11-05
AI Technical Summary
Traditional water supply scheduling methods make it difficult to acquire and process large amounts of water supply-related data in real time, and are unable to achieve cross-departmental and cross-system information sharing and collaborative scheduling, resulting in resource waste and unbalanced water supply in multi-stage pump station water supply systems when faced with complex and changing water supply demands.
By deploying pressure sensors at water supply nodes, building a water pressure prediction model, and using the TimeGPT network structure to predict water supply pressure, and combining the KNN algorithm and BP neural network, the water diversion plan is optimized to achieve refined management and scheduling of water supply nodes.
It realizes the real-time prediction and optimized scheduling of water supply pressure of water supply nodes, improves the water regulation efficiency and stability of the water supply system, and ensures the coordinated operation of water supply nodes and efficient use of resources.
Smart Images

Figure CN119444498B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of urban water supply, and particularly relates to a water supply scheduling system and a water scheduling method. BACKGROUND
[0002] The urban water supply system is an important part of urban infrastructure, and undertakes the heavy responsibility of providing clean water sources for residents, businesses, industries and other types of users. The water supply system balances the distribution of water resources from water production to delivery to the municipal water supply network through scheduling instructions, to continuously meet the demand of the water market and realize the water supply scheduling process. With the acceleration of urbanization and the continuous growth of population, the water supply scheduling of urban water supply system is facing increasing pressure and challenges. Water supply scheduling needs to balance between responding to emergencies and ensuring daily water supply. In a multi-stage pumping station system, water supply scheduling faces more complex challenges. The existence of multi-stage pumping stations increases the complexity of the system, and optimization scheduling needs to be carried out at multiple levels to ensure the stability and efficiency of water supply. The multi-stage pumping station water supply system needs to realize efficient system integration and collaborative scheduling to ensure the coordinated operation of each water supply node.
[0003] The traditional water supply scheduling method mainly relies on manual experience and simple rule system, and has many deficiencies in the face of complex and variable water supply demand and multi-water source conditions. The traditional method is difficult to obtain and process a large amount of water supply related data in real time, and cannot realize the comprehensive monitoring and fine management of the water supply system. In addition, due to the lack of advanced algorithms and uneven technology resources are wasted. The water supply system involves multiple links and departments, and the traditional method is difficult to realize cross-department and cross-system information sharing and collaborative scheduling.
[0004] Therefore, it is of great significance to design a system and method that can effectively solve the problem of multi-stage pumping station urban water supply scheduling. SUMMARY
[0005] In view of the deficiencies in the related art, the present application provides a water supply scheduling system and a water scheduling method to predict whether a water supply node is short of water and to schedule water for the water supply node that is short of water.
[0006] The present application provides a water supply scheduling system, comprising:
[0007] a water supply network for conveying water; the water supply network is provided with a plurality of water supply nodes, and each water supply node is respectively provided with a pressure sensor for detecting the water supply pressure of the corresponding water supply node;
[0008] a scheduling module storing a plurality of water scheduling schemes;
[0009] a control module configured to: acquire detection data of a pressure sensor corresponding to a current water supply node to obtain water supply pressure data of the current water supply node; construct a water pressure prediction model according to the water supply pressure data;
[0010] calculate a pressure prediction value of the current water supply node according to the water pressure prediction model;
[0011] if the pressure prediction value is less than a first threshold value, select a corresponding water regulation scheme from the dispatch module according to the pressure prediction value;
[0012] calculate water supply pressure of the current water supply node after the selected water regulation scheme is regulated, and determine a final water regulation scheme from the selected water regulation scheme according to the calculation result.
[0013] The technical solution establishes a water pressure prediction model through historical water supply pressure data of a water supply node, predicts water supply pressure of the water supply node at a certain time by using the water pressure prediction model, compares the prediction value of the water supply pressure with a first threshold value of the water supply node to determine whether the water supply pressure of the water supply node needs to be regulated, selects a water regulation scheme meeting the requirements from a dispatch module if the water supply pressure needs to be regulated, and compares the water regulation schemes meeting the requirements to select an optimal water regulation scheme from the water regulation schemes meeting the requirements.
[0014] In some embodiments, the water supply node includes several levels of water supply nodes, the current water supply node can supply water to a lower level water supply node, and an upper level water supply node can supply water to the current water supply node; when the current water supply node lacks water, the water supply pressure of the upper level water supply node is adjusted to increase the water supply amount of the upper level water supply node to the current water supply node.
[0015] In some embodiments, the water supply node increasing the water supply amount to the current water supply node is a target node; the target node is an upper level of the current water supply node.
[0016] The control module is further configured to: calculate water supply pressure of all water supply nodes of the same level as the current water supply node after the target node supplies water to the current water supply node, form regulation pressure data from the calculation result; calculate Manhattan distance between the regulation pressure data and a second threshold value in each water regulation scheme based on a KNN algorithm, and determine a final water regulation scheme from the selected water regulation schemes according to the Manhattan distance.
[0017] In some embodiments, the dispatch module includes a water supply pressure dispatch model, the water supply pressure dispatch model is set in one-to-one correspondence with the water regulation scheme, and the water supply pressure dispatch model is used to calculate water supply pressure of all water supply nodes of the same level as the current water supply node after the corresponding water regulation scheme is regulated.
[0018] In some embodiments, a storage module is further included, and the storage module is configured to store detection data of the pressure sensor; the control module is further configured to: obtain historical detection data of the pressure sensor from the storage module, and calculate the first threshold value.
[0019] In some embodiments, the first threshold value comprises a lower limit value V l and an upper limit value V u , and the lower limit value V l and the upper limit value V u together define a first range, and the lower limit value V l and the upper limit value V u correspond to the lower limit value and the upper limit value of the first range.
[0020] The control module is further configured to: when the pressure prediction value of the current water supply node is greater than the upper limit value V u , determine that the water quantity of the current water supply node is sufficient, and the water supply quantity to the next level water supply node can be increased; when the pressure prediction value of the current water supply node is less than the lower limit value V l , determine that the water quantity of the current water supply node is insufficient, and water transfer from the upper water supply node is required; and when the pressure prediction value of the current water supply node is within the first range, determine that the water quantity of the current water supply node is general, and no water transfer is required.
[0021] In some embodiments, the second threshold value corresponding to different water supply nodes is different, and the second threshold value is the average value of the lower limit value V l and the upper limit value V u of the corresponding water supply node.
[0022] In some embodiments, the water pressure prediction model is constructed based on the network structure of TimeGPT, the input of the water pressure prediction model is the historical water supply pressure value of the water supply node, and the output of the water pressure prediction model is the pressure prediction value of the water supply node at a future time.
[0023] In addition, the present application also provides a water transfer method, comprising the water supply scheduling system described above, and the water transfer method comprises the following steps:
[0024] Pressure sensors are arranged at each water supply node of the water supply network, detection data of the pressure sensors is obtained and stored, and historical detection data of each water supply node is obtained;
[0025] A water pressure prediction model is constructed for each water supply node according to the historical detection data of each water supply node;
[0026] The prediction pressure of the corresponding water supply node is calculated according to the water pressure prediction model;
[0027] If the prediction pressure is less than the first threshold value, it is determined that the water quantity of the target water supply node is insufficient, and a water transfer scheme meeting the requirements is selected from the scheduling module.
[0028] The pressure of all water supply nodes at the same level as the current water supply node after the current water supply node is adjusted is calculated, and a final water adjustment scheme is determined from the multiple water adjustment schemes according to the calculation result.
[0029] The water pressure prediction model is established by using the historical water supply pressure data of the water supply node, the water supply pressure of the water supply node at a certain time is predicted by using the water pressure prediction model, and the predicted value of the water supply pressure is compared with the first threshold value of the water supply node to determine whether the water supply pressure of the water supply node needs to be adjusted. If adjustment is needed, a water adjustment scheme that meets the requirements is selected from the dispatching module, and the water adjustment schemes that meet the requirements are compared to select the optimal water adjustment scheme from the water adjustment schemes that meet the requirements.
[0030] In some embodiments, when determining the final water adjustment scheme, the Manhattan distance between the pressure of all water supply nodes at the same level as the current water supply node after the current water supply node is adjusted and the second threshold value is calculated based on the KNN algorithm, and the final water adjustment scheme is determined from the selected water adjustment schemes according to the Manhattan distance.
[0031] Based on the above technical solution, the water supply dispatching system in the embodiment of the present application can predict the pressure prediction value of the water supply node, compare the pressure prediction value with the first threshold value to determine whether the water supply pressure of the water supply node needs to be adjusted, select a water adjustment scheme that meets the requirements in the case of water shortage of the water supply node, compare the water adjustment schemes that meet the requirements, and select the optimal water adjustment scheme from the water adjustment schemes that meet the requirements. Not only can the water supply pressure of the water supply node be adjusted to ensure the water adjustment effect, but also the water adjustment efficiency is high. BRIEF DESCRIPTION OF DRAWINGS
[0032] The accompanying drawings, which are included to provide a further understanding of the present application and are incorporated in and constitute a part of this application, illustrate embodiments of the present application and serve to explain the present application. In the drawings:
[0033] Figure 1 The structure schematic diagram of different levels of water supply nodes in an embodiment of the water supply dispatching system of the present application;
[0034] Figure 2 The structure schematic diagram of multiple levels of water supply nodes in an embodiment of the water supply dispatching system of the present application;
[0035] Figure 3 The flowchart of determining whether the water supply node needs to be adjusted in an embodiment of the water supply dispatching system of the present application;
[0036] Figure 4 The working flowchart of the control module in an embodiment of the water supply dispatching system of the present application. DETAILED DESCRIPTION
[0037] The technical solutions in the embodiments will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments of the present application, all the other embodiments obtained by a person of ordinary skill in the art without creative effort belong to the scope of protection of the present application.
[0038] In the description of the present application, it should be understood that the terms "center", "transverse", "longitudinal", "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer" and the like indicate the orientation or positional relationship shown in the drawings based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation of the present application.
[0039] The terms "first", "second", "third" are only for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with "first", "second", "third" can explicitly or implicitly include one or more of the features.
[0040] In the description of the present application, it should be noted that unless otherwise explicitly specified and limited, the terms "mounting", "connection", "connection" should be understood broadly, for example, it can be fixed connection, or detachable connection, or integral connection; it can be directly connected, or indirectly connected through an intermediate medium, or the internal communication of two elements. For a person of ordinary skill in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.
[0041] In one illustrative embodiment of the water supply scheduling system, the water supply scheduling system is used to optimize the scheduling of water quantity in the water supply network, adjust the water quantity distribution in the water supply network, and ensure the efficiency of water supply, the water pressure stability of user end and the safety of the network.
[0042] The above-mentioned water supply scheduling system includes a water supply network for conveying water; the water supply network includes a plurality of water supply nodes, which are the gathering points or distribution points of water flow in the water supply network.
[0043] As shown in FIG. 1, the water supply network includes a plurality of water supply nodes, and the water supply nodes are connected to each other to form a network structure. Figure 1As shown, the water supply node includes several levels of water supply nodes, which are arranged in sequence according to the flow direction and path of the water flow; wherein the current water supply node can supply water to the lower level water supply node, and the upper level water supply node can supply water to the current water supply node; when the current water supply node is short of water, the water supply pressure of the upper level water supply node is adjusted to increase the water supply amount of the upper level water supply node to the current water supply node.
[0044] As shown in the accompanying drawings, Figure 2 As shown, the water supply node is generally divided into a first level water supply node, a second level water supply node,..., and an Nth level water supply node. The first level water supply node is connected to the second level water supply node, and the second level water supply node is connected to the third level water supply node. The first level water supply node can supply water to the second level water supply node, and the second level water supply node can supply water to the third level water supply node, and so on. The water flow passes through the first level water supply node, the second level water supply node, the third level water supply node,..., and the Nth level water supply node in sequence. It can be considered that the input end of the first level water supply node is the source of the water flow, and the output end of the Nth level water supply node is the user end.
[0045] In actual application, the water supply node includes water supply pump stations and water supply plants, etc. Under the condition that other conditions remain unchanged, the higher the water supply pressure of the water supply node, the greater the water supply amount of the water supply node, which can be reflected by the water supply pressure.
[0046] The water supply pressure reflects the flow power of water and directly affects whether the water can be delivered to the user end. Therefore, the water supply pressure of the water supply node affects the efficiency of water supply, the water pressure stability of the user end, and the safety of the pipe network. The water supply pressure of the water supply node refers to the water pressure measured at a position or measurement point in the water supply pipeline.
[0047] Since there are several water supply nodes in the water supply pipe network, and the water supply pressures of different water supply nodes are different, in the above water supply scheduling system, a pressure sensor is arranged for each water supply node, and the pressure sensor is used to detect the water pressure of the corresponding water supply node. The pressure sensor is also arranged in several, and the pressure sensor is arranged one by one corresponding to the water supply node.
[0048] The above water supply scheduling system includes a control module connected with the pressure sensor. As shown in the accompanying drawings, Figure 3 The control module is configured to: obtain the detection data of the pressure sensor to obtain the water supply pressure data of the water supply node; construct a water pressure prediction model according to the detection data of the pressure sensor; calculate the pressure prediction value of the water supply node according to the water pressure prediction model; determine whether the water supply node needs to be adjusted according to the pressure prediction value of the water supply node; if the pressure prediction value is less than a first threshold value, it is determined that the water pressure of the water supply node is insufficient and needs to be adjusted; if the pressure prediction value is greater than or equal to the first threshold value, it is determined that the water pressure of the water supply node is sufficient and does not need to be adjusted.
[0049] It should be noted that the water supply pressure of different water supply nodes is different, so the water supply pressure data of different water supply nodes is different, and the water pressure prediction model corresponding to different water supply nodes is different.
[0050] That is, the control module constructs the corresponding water pressure prediction model according to the water supply pressure data of the water supply node, and applies the corresponding water pressure prediction model to predict the water supply pressure of the water supply node at a certain time.
[0051] It should be noted that the water supply pressure data of the water supply node is usually historical water supply pressure, which refers to collecting the pressure data of the water supply node in the past period of time. Through these historical data, the law of pressure change of the water supply node can be obtained, so as to generate a water pressure prediction model.
[0052] The water supply pressure of the water supply node changes with time, and the water supply pressure of the water supply node at different times is different. Therefore, the input data of the water pressure prediction model at least includes the water pressure value of the water supply node and the time point corresponding to the water pressure value, so that the water pressure prediction model can predict the water supply pressure of the water supply node at a certain time, and realize real-time prediction of the water supply node.
[0053] The above-mentioned water supply scheduling system includes a storage module, which is used to store the data detected by the pressure sensor. The storage module is connected with the control module, and the control module is used to acquire the historical detection data of the pressure sensor stored in the storage module.
[0054] The detection data of the pressure sensor is raw data, and the raw data is directly used for model training, which is easy to cause large model error. Therefore, the raw data needs to be preprocessed, and the control module generates a water pressure prediction model by using the processed data, so as to ensure the prediction accuracy of the water pressure prediction model.
[0055] In data preprocessing, first, the raw data needs to be cleaned to remove noise, missing values and outliers to ensure data quality. Data cleaning includes using moving average filtering, Kalman filtering, Fourier transform and other methods to remove noise. In terms of missing value processing, linear interpolation method can be used. In the processing of outliers, statistical methods (such as 3σ principle) are used to identify outliers, and smoothing methods (such as local weighted regression) or median replacement technology are used for processing. Through these steps, the data quality and reliability can be ensured, so as to ensure the accuracy of the water pressure prediction model, and further ensure the prediction accuracy of the water pressure prediction model.
[0056] TimeGPT is a large language model specially designed for processing time series data. It combines advanced natural language processing (NLP) techniques and time series analysis methods to efficiently capture and predict patterns in data over time.
[0057] In the water supply scheduling system described above, a water pressure prediction model is constructed based on the network structure of TimeGPT. The input of the water pressure prediction model is the historical water supply pressure value of the water supply node, and the output of the water pressure prediction model is the pressure prediction value of the water supply node at a certain time in the future.
[0058] It should be noted that since the TimeGPT model requires time series data, the pressure data and time information are organized and constructed to form an input sequence for predicting future pressure value data.
[0059] After the original data preprocessing is completed, the processed data is used to train the TimeGPT neural network water pressure prediction model. Through the TimeGPT model, the dynamic law of pressure change in the water supply network can be captured, thereby performing accurate pressure prediction.
[0060] In the process of constructing the water pressure prediction model, a large amount of historical data is used to optimize the model, so that it can learn the complex nonlinear relationship and time dependence of the water supply network in good operating state.
[0061] In some embodiments, the water pressure prediction model can predict the pressure situation in the next 15 minutes and output the predicted pressure value.
[0062] In this embodiment, the TimeGPT water pressure prediction model outputs the pressure value predicted by the TimeGPT model of the water supply node according to the set time step, which is the predicted pressure value of the pipe network at that time.
[0063] TimeGPT can effectively process and predict time series data through the transformer model and self-attention mechanism. The TimeGPT network structure can efficiently process and predict pressure data in the water supply network by introducing the transformer encoder and multi-head self-attention mechanism. This structure not only improves the accuracy of prediction, but also has good scalability and application prospects. By predicting the real-time pressure data of the water supply node, the stable operation of the water supply system can be effectively guaranteed, the user's water experience can be improved, and strong support can be provided for the optimization management of the water supply system.
[0064] The network structure of TimeGPT mainly includes the following key parts:
[0065] Data preprocessing module: data standardization, standardizing the input time series data to ensure that data of different features are on the same scale. Time window segmentation, segmenting the time series data according to fixed length time windows to generate training samples.
[0066] Position encoding module: using sine and cosine functions to generate position encoding, embedding the information of time steps into input data, so that the model can identify the order of time steps.
[0067] Transformer encoder module: Multi-head self-attention mechanism: captures long-range dependencies in time series data by parallel computation of multiple attention heads. Each attention head computes the relevance (attention weights) of each time step in the input sequence to other time steps and obtains a new representation by weighted summation. Convolutional neural network: each encoder layer contains a convolutional neural network for extracting high-order features.
[0068] Output layer: after processing by multiple transformer encoder layers, the final output layer makes predictions on the time series data. The output result is the stress prediction value at the future time step.
[0069] In the model training and optimization part, mean squared error is used as the loss function to measure the difference between the predicted value and the true value. At the same time, the Adam optimization algorithm is used to update the model parameters through gradient descent method, gradually reducing the prediction error. L2 regularization and Dropout techniques are introduced to prevent model overfitting and improve the generalization ability of the model.
[0070] The network structure of TimeGPT is a common technical knowledge in the field, which will not be described here.
[0071] In the above water supply scheduling system, the first threshold is obtained according to the pressure output of the water supply node at the same time in the past period, that is, the first threshold is obtained according to the water supply pressure historical data of the water supply node.
[0072] It should be noted that because the water supply pressure historical data of different water supply nodes is different, the first threshold corresponding to different water supply nodes is also different.
[0073] The control module is configured to: obtain the historical detection data of the pressure sensor from the storage module, and calculate the first threshold corresponding to the water supply node according to the water supply pressure historical data of the water supply node.
[0074] The pressure of each water supply node in the water supply network has its stable operating range, and the water supply pressure of the water supply node is variable, so the first threshold of the same water supply node has different values at different times.
[0075] The pressure value distribution of the water supply pressure of the water supply node in a day satisfies the normal distribution, and the first threshold includes the lower limit value V l and the upper limit value V u , the lower limit value V l and the upper limit value V u together define the first range, and the lower limit value V l and the upper limit value V u correspond to the lower limit value and the upper limit value of the first range. It can be considered that the first threshold changes within the first range.
[0076] The water supply scheduling system comprises a water supply node, a water demand node, a water supply scheduling center and a water supply scheduling system. u When the predicted pressure is greater than the upper limit value V l , it is determined that the water supply node has sufficient water supply, and the water supply to the lower level water supply node can be increased. l When the predicted pressure is less than the lower limit value V l , it is determined that the water supply node has insufficient water supply, and water needs to be supplied from the upper level water supply node.
[0077] It should be noted that the lower limit value V l and the upper limit value V u of different water supply nodes are different.
[0078] The lower limit value V l and the upper limit value V u can be determined according to the sigma principle, 2sigma principle and 3sigma principle in normal distribution.
[0079] In the above water supply scheduling system, the historical water consumption statistical data and scheduling experience are combined with weather temperature correction, the 3sigma principle is adopted to complete the preliminary setting, the lower limit value V l and the upper limit value V u , δ is the standard deviation of historical water consumption data, the weather correction factor is a 气象 , the recent total water output correction factor is b 水量 , for holidays and weekends, the user's water consumption is relatively low compared with working days, and the water consumption peak period appears relatively late. The water consumption peak value is relatively low, and the holiday and weekend correction factor c holiday is the general mathematical form of threshold calculation as shown in formula (1)~formula (2).
[0080] V l =(μ-3δ)×a 气象 ×b 水量 ×c 节假日 (1)
[0081] V u =(μ+3δ)×a 气象 ×b 水量 ×c 节假日 (2)
[0082] Where: V l →lower limit value;
[0083] V u →upper limit value;
[0084] μ——historical water consumption data mean, m 3 ;
[0085] δ - standard deviation of historical water volume data;
[0086] a 气象 weather correction factor;
[0087] b 水量 water volume correction factor;
[0088] c 节假日 holiday and weekend correction factor.
[0089] weather factor a 气象 is calculated as formula (3).
[0090]
[0091] wherein: T a - average temperature of the day, ℃ ° water demand factor b 水量 is calculated as formula (4).
[0092] b 水量 = 1 + 1 / 100( 1 + e -0. 15( w-25) ) (4)
[0093] wherein: w - water demand prediction value of the day, m 3 / d °
[0094] holiday factor c 节假日 is calculated as formula (5).
[0095]
[0096] wherein: t - the day is in the holiday, td; L - holiday length, d °
[0097] When the current water supply node is short of water, the water supply amount of one or more water supply nodes at the previous level to the current water supply node can be increased to solve the problem of the current water supply node being short of water.
[0098] Since the number of water supply nodes at the previous level usually includes multiple, when the current water supply node is short of water, there can be multiple different water transfer schemes. Among them, the water transfer scheme at least includes the number of water supply nodes for water supply, the water supply pressure after pressure regulation of the water supply node and other information.
[0099] Although each water transfer scheme can adjust the water volume of the current water supply node to make the water supply pressure of the current water supply node meet the requirements, the water transfer efficiency and water transfer cost of different water transfer schemes are different.
[0100] The water supply scheduling system compares each water diversion scheme to select an optimal water diversion scheme as the final implemented water diversion scheme to ensure overall water diversion efficiency and water diversion effect.
[0101] Specifically, the control module is configured to: calculate the water supply pressure of all water supply nodes of the same level as the current water supply node after the current water supply node is diverted, form the calculation result into pressure regulating data, calculate the Manhattan distance between the pressure regulating data and the second threshold in each water diversion scheme, and determine the final water diversion scheme from the selected water diversion scheme according to the Manhattan distance.
[0102] It should be noted that the calculation result of the water supply pressure of all water supply nodes of the same level as the current water supply node after the current water supply node is diverted forms the pressure regulating data, which is a common technical means in the art and will not be repeated here.
[0103] K-Nearest Neighbors (also known as KNN model) is a simple and intuitive machine learning algorithm widely used in classification and regression tasks. The core idea is: given a data point, find the K nearest neighbors in the feature space, and predict the output of the data point based on the values of these neighbors. In regression problems, the KNN model predicts by calculating the average of the K nearest neighbors.
[0104] Manhattan distance is a way to calculate the distance between two points in multi-dimensional space. It is defined as:
[0105]
[0106] Where x i and y i are the coordinates of two data points in the i-th dimension, and n is the number of dimensions.
[0107] Based on the KNN algorithm, the Manhattan distance between the pressure regulating data and the second threshold is calculated, and the final water diversion scheme is determined from the selected water diversion scheme according to the Manhattan distance.
[0108] It should be noted that the second threshold corresponding to different water supply nodes is different, and the second threshold is the average of the lower limit value V l and the upper limit value V u of the corresponding water supply node.
[0109] In practical applications, water diversion schemes are usually pre-prepared based on historical data or historical experience, and when a water supply node is short of water, one or more water diversion schemes that meet the requirements are selected from the known water diversion scheme database.
[0110] The water supply scheduling system includes a scheduling module, and the scheduling module stores a plurality of water diversion schemes. When the control module determines that the water pressure of the detection point is insufficient, the control module is configured to select a water diversion scheme from the scheduling module.
[0111] The scheduling module includes a water supply pressure scheduling model, which is set in one-to-one correspondence with the water diversion scheme. The water supply pressure scheduling model is used to calculate the water supply pressure of all water supply nodes at the same level as the current water supply node after water diversion according to the corresponding water diversion scheme. Through the water supply pressure scheduling model, the water supply pressure of all water supply nodes at the same level as the current water supply node after water diversion of the current water supply node can be calculated.
[0112] In this embodiment, the water supply pressure scheduling model is obtained by training a neural network model. In the neural network model, there is no specific mathematical relationship expression, but through learning and training of historical data, a mapping relationship between input and output is obtained.
[0113] Specifically, the historical water supply pressure of all water supply nodes at the same level as the target node is taken as the input, and the historical water supply pressure of all water supply nodes at the same level as the current water supply node at the corresponding time is taken as the output. Through continuous training and adjustment, the water supply pressure scheduling model is obtained. Through the water supply pressure scheduling model, the water supply pressure of all water supply nodes at the same level as the current water supply node after water diversion of the current water supply node can be calculated.
[0114] In this embodiment, for convenience of description, the current water supply node is referred to as a detection point, and the water supply node that supplies water to the current water supply node is referred to as a target node, wherein the target node is located at the upper level of the detection point. By adjusting the water supply pressure of the target node, the water supply amount provided by the target node to the detection point is increased.
[0115] In model training, the historical pressure value of the target node is taken as the input of the BP pressure fitting model, and the pressure data of the detection point and its water supply nodes at the corresponding time are taken as the output of the model. Through continuous adjustment and training, a fitting model that can accurately reflect the actual change of the pressure of the water supply network is formed, which can predict the pressure change of the detection point under these pressure regulating conditions; then, based on the water supply pressure scheduling model fitted by the BP (back propagation) neural network, the above collected data is used to train the water supply pressure scheduling model. The historical data can provide basic information for subsequent model training and prediction. The collected data cannot be directly used, and the data quality and consistency are ensured through preprocessing. In the preprocessing process, the pressure data of the adjacent nodes at the same time point in the past is arranged. The time sequence and correlation of the data are ensured, and more accurate input is provided for the model. The historical pressure data of the adjacent nodes is input into the scheduling model of the BP neural network, and the dynamic data relationship between the pressure values of the adjacent nodes is fitted by using the BP neural network.
[0116] That is, the pressure effect generated by the pressurization scheme is fitted by using a BP neural network, and the content of the BP neural network is as follows:
[0117] The general activation function is logsig, and the expression is as follows:
[0118]
[0119] Therefore, in the hidden layer, the data received from the previous layer is processed in the following manner:
[0120] logsig(X i W ij +X i+1 W ij+1 +β i )
[0121] The expression of y in the above table view is as follows:
[0122]
[0123] The pressure prediction value of the detection point is input into the water supply pressure scheduling model, and the water supply pressure scheduling model outputs the water supply pressure of all water supply nodes at the same level of the detection point.
[0124] As shown in Figure 4 , the control principle of the above water supply scheduling system is as follows: the control module obtains the detection data of the pressure sensor of each water supply node, and stores the data in the storage module to obtain the water supply pressure historical data of each water supply node; a water pressure prediction model of each water supply node is constructed according to the water supply pressure historical data of each water supply node; the pressure prediction value of the current water supply node at a certain time in the future is calculated according to the water pressure prediction model of the current water supply node; if the pressure prediction value is within the first range, the current water supply node does not need to be adjusted; if the pressure prediction value is greater than the upper limit value of the first range, the current water supply node does not need to be adjusted, and the water supply amount to the lower-level water supply node can be increased; if the pressure prediction value is less than the lower limit value of the first range, the current water supply node needs to be adjusted, a required water adjustment scheme is selected from the scheduling module according to the pressure prediction value, the pressure adjustment data in each water adjustment scheme is calculated through the water supply pressure scheduling model, and the Manhattan distance between the pressure adjustment data and the second threshold value is calculated, so as to select the final water adjustment scheme to be implemented from the required water adjustment schemes.
[0125] The water supply scheduling system establishes a water pressure prediction model through historical water supply pressure data of the water supply node, predicts the water supply pressure of the water supply node at a certain time by using the water pressure prediction model, compares the predicted value of the water supply pressure with the first threshold value of the water supply node, and determines whether the water supply pressure of the water supply node needs to be adjusted. If it needs to be adjusted, a water diversion scheme meeting the requirements is selected from the scheduling module, and the water diversion scheme meeting the requirements is compared to select the optimal water diversion scheme.
[0126] Based on the above-mentioned water supply scheduling system, the application also provides a water diversion method, which comprises the above-mentioned water supply scheduling system. The water diversion method comprises the following steps:
[0127] Pressure sensors are arranged at each water supply node of the water supply network, detection data of the pressure sensors are acquired and stored, and historical detection data of each water supply node are obtained;
[0128] A water pressure prediction model is constructed for each water supply node according to the historical detection data of each water supply node;
[0129] The predicted pressure of the corresponding water supply node is calculated according to the water pressure prediction model;
[0130] If the predicted pressure is less than the first threshold value, it is determined that the water amount of the target water supply node is insufficient, and multiple water diversion schemes are selected from the scheduling module;
[0131] The water supply pressure of all water supply nodes at the same level of the current water supply node after water diversion of the current water supply node is calculated, and the final water diversion scheme is determined from the multiple water diversion schemes according to the calculation result.
[0132] When the final water diversion scheme is determined, the calculation result of the water supply pressure of all water supply nodes at the same level of the current water supply node after water diversion of the current water supply node is formed into pressure regulation data; the Manhattan distance between the pressure regulation data and the second threshold value is calculated based on the KNN algorithm, and the final water diversion scheme is determined from the selected water diversion schemes according to the Manhattan distance.
[0133] It should be noted that in actual application, the control module not only determines whether a certain water supply node needs to be diverted, but also determines all water supply nodes to realize the overall reliable operation of the water supply network.
[0134] The water diversion method of the above-mentioned water supply scheduling system will be described in detail below by taking the water supply node A22 as an example.
[0135] The pressure sensor detecting the pressure value of the water supply node A22 stores its detection data in the storage module;
[0136] The control module generates a water pressure prediction model according to historical detection data stored in the storage module, and uses the water pressure prediction model to predict the water supply pressure of the water supply node A22 at a certain time, to obtain a pressure prediction value of the water supply node A22 at the certain time.
[0137] When the pressure prediction value is within the first range, the water amount of the water supply node A22 meets the requirement of the water supply pipe network, and water transfer is not required.
[0138] When the pressure prediction value is greater than the upper limit value of the first range, the water amount of the water supply node A22 is sufficient, not only meets the requirement of the water supply pipe network, but also can supply water to the lower-level water supply node in the case of water shortage of the lower-level water supply node.
[0139] When the pressure prediction value is less than the lower limit value of the first range, the water amount of the water supply node A22 is insufficient, and cannot meet the requirement of the water supply pipe network, and water transfer is required from the upper-level water supply node.
[0140] Among them, water transfer can be directly from the water supply node A2, or from the water supply node A1, or from the water supply node A3, or from the water supply node A2 and the water supply node A1, and there can be many kinds of water transfer schemes that meet the requirements, and these water transfer schemes are stored in the scheduling module in advance, and the control module selects the water transfer scheme that meets the requirements from the scheduling module according to the pressure prediction value.
[0141] Suppose there are three kinds of schemes that meet the requirements, the first scheme is to transfer water from the water supply node A2, the second scheme is to transfer water from the water supply node A2 and the water supply node A1, and the third scheme is to transfer water from the water supply node A3.
[0142] The pressure values of the water supply node A11, the water supply node A12, the water supply node A13, the water supply node A21, the water supply node A22, the water supply node A23, the water supply node A31, the water supply node A32 and the water supply node A33 after the water supply node A22 transfers water in the first scheme are calculated, and the calculation results form pressure regulating data, and the Manhattan distance between the pressure regulating data and the second threshold value is calculated;
[0143] The pressure values of the water supply node A11, the water supply node A12, the water supply node A13, the water supply node A21, the water supply node A22, the water supply node A23, the water supply node A31, the water supply node A32 and the water supply node A33 after the water supply node A22 transfers water in the second scheme are calculated, and the calculation results form pressure regulating data, and the Manhattan distance between the pressure regulating data and the second threshold value is calculated;
[0144] The pressure values of the water supply node A11, the water supply node A12, the water supply node A13, the water supply node A21, the water supply node A22, the water supply node A23, the water supply node A31, the water supply node A32 and the water supply node A33 after the water supply node A22 is adjusted in the third scheme are calculated, and the calculation results form pressure adjustment data, and the Manhattan distance between the pressure adjustment data and the second threshold value is calculated;
[0145] According to the Manhattan distance calculated in each water adjustment scheme, the optimal water adjustment scheme is selected from the three water adjustment schemes.
[0146] Finally, it should be noted that: the embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts of each embodiment can be referred to.
[0147] The above embodiments are only used to illustrate the technical solutions of the present application, but not limit it; although the present application has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the specific embodiments of the present application can be modified or some technical features can be replaced by equivalent ones; without departing from the spirit of the technical scheme of the present application, which should be covered in the technical scheme range of the present application claimed by the present application.
Claims
1. A water supply scheduling system, characterized in that: include: A water supply network for transporting water; the water supply network is provided with a plurality of water supply nodes, each of which is provided with a pressure sensor, and the pressure sensor is used to detect the water supply pressure of the corresponding water supply node; the water supply nodes include a plurality of levels of water supply nodes, the current water supply node can supply water to the lower level water supply node, and the upper level water supply node can supply water to the current water supply node; when the current water supply node is short of water, the water supply pressure of the upper level water supply node is adjusted to increase the water supply volume of the upper level water supply node to the current water supply node; the water supply node that supplies water to the current water supply node is the target node; the target node is the upper level of the current water supply node; A scheduling module stores several water diversion schemes; a control module is configured to obtain detection data of the pressure sensor corresponding to the current water supply node to obtain the water supply pressure data of the current water supply node; the detection data of the pressure sensor is raw data, and after the raw data is preprocessed, a water pressure prediction model is constructed based on the processed data; Calculating a current pressure prediction value of the water supply node according to the water pressure prediction model; if the pressure prediction value is less than a first threshold, selecting a corresponding water diversion scheme from the scheduling module according to the pressure prediction value; In the water diversion scheme selected for calculation, the water supply pressure of all the water supply nodes at the same level of the current water supply node is calculated after the target node supplies water to the current water supply node, and the calculation results are formed into pressure regulation data; based on the KNN algorithm, the Manhattan distance between the pressure regulation data and the second threshold value in each water diversion scheme is calculated respectively, and the final water diversion scheme is determined from the selected water diversion schemes according to the Manhattan distance.
2. The water supply scheduling system according to claim 1, characterized in that: The scheduling module includes a water supply pressure scheduling model, which is set in one-to-one correspondence with the water diversion scheme. The water supply pressure scheduling model is used to calculate the water supply pressure of all water supply nodes at the same level of the current water supply node after water diversion according to the water diversion scheme.
3. The water supply scheduling system according to claim 1, characterized in that: It also includes a storage module, which is used to store the detection data of the pressure sensor; the control module is further configured to: obtain the historical detection data of the pressure sensor from the storage module, and calculate the first threshold.
4. The water supply scheduling system according to claim 1, characterized in that: The first threshold value includes a lower limit value V l and upper limit V u , the lower limit value V l and the upper limit value V u Together they define a first range, the lower limit value V l and the upper limit value V u corresponding to the lower limit and upper limit of the first range; The control module is further configured to: when the current pressure prediction value of the water supply node is greater than the upper limit value V u When the water volume of the current water supply node is determined to be sufficient, the water volume to the water supply node at the next level can be increased; when the pressure prediction value of the current water supply node is less than the lower limit value V l When the pressure prediction value of the current water supply node is within the first range, it is determined that the water volume of the current water supply node is insufficient and water needs to be transferred from the upper water supply node; when the pressure prediction value of the current water supply node is within the first range, it is determined that the water volume of the current water supply node is normal and water does not need to be transferred.
5. The water supply scheduling system according to claim 4, characterized in that: Different water supply nodes correspond to different second thresholds, and the second threshold is the lower limit value V corresponding to the water supply node. l and the upper limit value V u The average value of .
6. The water supply scheduling system according to claim 1, characterized in that: The water pressure prediction model is constructed based on the network structure of TimeGPT. The input of the water pressure prediction model is the historical water supply pressure value of the water supply node, and the output of the water pressure prediction model is the pressure prediction value of the water supply node at a certain moment in the future.
7. A water regulation method for a water supply scheduling system according to claim 1, characterized in that: The water transfer method comprises the following steps: Deploy pressure sensors at each water supply node in the water supply network, acquire and store detection data of the pressure sensors, and obtain historical detection data of each water supply node; Constructing respective water pressure prediction models according to the historical detection data of each water supply node; Calculating the predicted pressure corresponding to the water supply node according to the water pressure prediction model; If the predicted pressure is less than the first threshold, it is determined that the water volume of the target water supply node is insufficient, and a water diversion plan that meets the requirements is selected from the scheduling module; Calculate the pressure of all water supply nodes at the same level of the current water supply node after the current water supply node transfers water, and determine a final water transfer scheme from multiple water transfer schemes based on the calculation results.
8. The water supply scheduling method according to claim 7, characterized in that: When determining the final water diversion plan, based on the KNN algorithm, the Manhattan distance between the pressure of all water supply nodes at the same level as the current water supply node after the current water supply node diverts water and the second threshold is calculated, and the final water diversion plan is determined from the selected water diversion plans based on the Manhattan distance.
Citation Information
Patent Citations
Urban and rural overall planning water supply pipe network hydraulic water quality simulation platform
CN109784746A
Urban water supply pipe network operation evaluation method based on prediction
CN113420967A