Search

CN-122020407-A - Water supply network leakage detection method based on Kriging interpolation method and CatBoost model

CN122020407ACN 122020407 ACN122020407 ACN 122020407ACN-122020407-A

Abstract

The invention belongs to the technical field of water supply network monitoring, and particularly relates to a water supply network leakage detection method based on a Kriging interpolation method and a CatBoost model, which comprises the steps of firstly constructing a network hydraulic model and calculating an Euclidean distance matrix between nodes; the method comprises the steps of simulating multiple leakage by using a hydraulic model, collecting pressure data of pressure value monitoring points and corresponding leakage labels to form training samples, based on a Kriging interpolation method, integrating the pressure data with a distance matrix, estimating non-monitoring point pressure values, constructing a pressure characteristic set covering the nodes of the whole network, sorting and screening the importance of the characteristics to obtain an optimal characteristic subset, combining the characteristics with the leakage labels to form a training sample matrix, inputting the training sample matrix into a CatBoost model for training, and identifying leakage areas and grades according to real-time pressure data by using the trained model. The invention can more accurately position the independent metering partition where leakage occurs based on the pressure data of a small number of monitoring points and judge the severity of the leakage.

Inventors

  • XIE CHENLEI
  • XU YUHANG
  • WANG MINGYUE
  • CHEN TAO
  • FANG QIANSHENG
  • YANG YALONG
  • JIANG TINGTING

Assignees

  • 安徽建筑大学

Dates

Publication Date
20260512
Application Date
20260130

Claims (8)

  1. 1. The water supply network leakage detection method based on the Kriging interpolation method and CatBoost model is characterized by comprising the following steps: S1, constructing a hydraulic model of a water supply network, and acquiring an Euclidean distance matrix among nodes, wherein the nodes comprise pressure value monitoring points and pressure value estimation points which are preset in the network; S2, simulating leakage based on the hydraulic model, acquiring pressure data of the pressure value monitoring points, and recording the partition and the leakage grade of the set leakage nodes to form a training sample; S3, determining pressure values of the pressure value estimation points by adopting a Kriging interpolation method based on the pressure data and the Euclidean distance matrix, and fusing the pressure data of all the pressure value monitoring points to construct a full-node pressure characteristic set; s4, sorting and screening the feature importance of the full-node pressure feature set to obtain an optimal feature subset; S5, combining the optimal feature subset with the corresponding partition to which the leakage node belongs and the leakage level to form a training sample matrix, and inputting CatBoost a leakage detection model for training; S6, identifying the leakage area and the leakage grade of the water supply network based on the trained model.
  2. 2. The water supply network leakage detection method based on the kriging interpolation method and CatBoost model according to claim 1, wherein step S1 includes: s101, importing topological relation and pipe fitting operation parameters of a water supply network into a hydraulic analysis tool, and dividing the water supply network into Individual metering zones, in common A node, among which Each node is used as a pressure value monitoring point, and the rest The individual nodes are used as pressure value estimation points, and a hydraulic model of the water supply pipe network is built; s102, acquiring a coordinate value matrix of pressure value monitoring points And coordinate value matrix of pressure value estimation point ; S103, calculating Euclidean distance matrix between every two middle coordinate values A kind of electronic device Each coordinate value of (a) Euclidean distance matrix between every two coordinate values 。
  3. 3. The water supply network leakage detection method based on the kriging interpolation method and CatBoost model according to claim 2, wherein step S2 includes: s201, performing z-time leakage simulation in the hydraulic model; s202, dividing the leakage amount into a plurality of grades according to the percentage of the total flow of the pipe network, randomly selecting a node as a leakage node in each simulation, and randomly setting a leakage amount in the percentage range; s203, performing hydraulic analysis to obtain pressure data sets of all pressure value monitoring points when leakage occurs each time , , The pressure data value is the pressure data value of the ith pressure value monitoring point; S204, recording independent metering partitions to which the leakage nodes belong in the simulation The leakage level , Will be 、 And Combined into a single training sample , , For training samples Pressure data value of the ith pressure value monitoring point.
  4. 4. The water supply network leakage detection method based on the kriging interpolation method and CatBoost model according to claim 3, wherein step S3 includes: S301, based on the pressure data set Calculating a semi-variance matrix between pressure values of pressure value monitoring points The following formula: ; s302, fitting Euclidean distance matrix by using Gaussian function And (3) with The relation between the two is used for obtaining a fitting function; S303, euclidean distance matrix between pressure monitoring points and pressure estimation points Inputting the fitting function to obtain a half variance fitting value matrix The following formula: ; S304 based on Fitting a value matrix to a half variance Constructing and solving a kriging interpolation weight matrix equation to obtain an optimal weight coefficient for each pressure value estimation point ; S305, optimizing weight coefficients Pressure data value with pressure value monitoring point Substituting the kriging interpolation definition formula: calculating a pressure data set of all pressure value estimation points , Wherein A pressure estimation value that is a pressure value estimation point, A pressure data value which is a pressure value monitoring point; S306, pressure data set of pressure value monitoring points And a pressure data set of pressure value estimation points Characteristic data set combined into pressure of all nodes of water supply network , ; S307, expanding the feature number of each simulation leakage to n+m to update the training sample of single simulation leakage Obtaining a full-node pressure characteristic set , Wherein Is a feature set Middle (f) Data values for the individual pressure characteristics.
  5. 5. The water supply network leakage detection method based on the kriging interpolation method and CatBoost model according to claim 4, wherein step S4 includes: S401, performing importance ranking on all the features in the full-node pressure feature set by adopting a recursive feature elimination-cross verification method and taking CatBoost models as an evaluator and mean square errors as loss functions; S402, deleting the features with the lowest importance ranking in sequence, evaluating the model performance under different feature numbers through K-fold cross validation, and selecting a feature subset which enables the model performance to reach the optimal as the optimal feature subset , 。
  6. 6. The water supply network leakage detection method based on the kriging interpolation method and CatBoost model according to claim 5, wherein in step S5, combining the optimal feature subset and the partition and the leakage level to which the corresponding leakage node belongs into a training sample matrix includes: Repeating Sub-steps S2-S4, simulation Obtained by occurrence of secondary leakage Optimum feature subset Combining to construct training sample matrix when leakage occurs The following formula: 。
  7. 7. The water supply network leakage detection method based on the kriging interpolation method and CatBoost model according to claim 6, wherein in step S5, the training process of the CatBoost leakage detection model includes: taking the characteristic data in the training sample matrix S4 as input characteristics, and partitioning the independent metering And leakage rating As multi-classification target tags; Initializing a model and training the CatBoost leak detection model in a multi-round iterative manner, wherein each round of iteration performs the steps of: Calculating residual errors based on the current prediction result of the model and the real label; Constructing a new decision tree to fit the residual; accumulating the output of the new decision tree into the model accumulated score at a preset learning rate; After all iteration rounds are completed, a CatBoost leak detection model is obtained after training, and the model converts the accumulated score into the prediction probability belonging to each category through a Softmax function.
  8. 8. The water supply network leakage detection method based on the kriging interpolation method and CatBoost model according to claim 1, wherein step S6 includes: s601, inputting real-time pressure data of monitoring points of the pressure value of the pipe network acquired in a period to be detected into a CatBoost leakage detection model trained in the step S5; s602, outputting the prediction probability of the combined categories belonging to each independent metering partition and the leakage level based on the real-time pressure data by the CatBoost leakage detection model, S603, comparing the prediction probabilities of all the combined categories, and taking the category with the highest probability value as a final recognition result, wherein the independent metering partition in the recognition result is the predicted leakage area, and the leakage level is the predicted leakage level.

Description

Water supply network leakage detection method based on Kriging interpolation method and CatBoost model Technical Field The invention belongs to the technical field of water supply network monitoring, and particularly relates to a water supply network leakage detection method based on a Kriging interpolation method and CatBoost models. Background The water supply network leakage detection technology is gradually developed from the traditional manual inspection to an automatic monitoring system based on the Internet of things and an intelligent algorithm. The early stage mainly relies on equipment such as listening bars, correlators and the like to manually position, and the efficiency is low and experience is relied on. With the development of sensor technology, monitoring equipment such as pressure and flow are widely deployed, so that data remote acquisition and primary analysis are realized. In recent years, a machine learning method is introduced into the field of leakage detection, such as a support vector machine, a random forest and other models, and leakage pattern recognition is realized by analyzing historical data, so that the intelligent level of detection is improved. Some researches try to combine the hydraulic model simulation to generate training data so as to solve the problem of insufficient actual leakage samples. However, the existing method still has obvious limitations that on one hand, pressure monitoring points in an actual pipe network are sparsely distributed, so that acquired data space is insufficient in representativeness, the whole network pressure distribution and leakage influence range are difficult to accurately reflect, and on the other hand, when all nodes or monitoring point data are directly used as characteristics, the dimension is high, the redundancy is large, and the model is easy to be fitted excessively and the training efficiency is low. In addition, most machine learning methods do not fully consider the geographical relevance of the pipe network space topology and the pressure field, the generalization capability is insufficient under the condition of limited monitoring points, and high-precision leakage area and grade identification are difficult to realize in a complex pipe network structure. Disclosure of Invention The invention aims to provide a water supply network leakage detection method based on a Kriging interpolation method and CatBoost model, so as to overcome the sparseness of spatial data and eliminate redundant characteristic interference under the condition of limited deployment of pressure monitoring points of the water supply network, and realize accurate and efficient automatic identification of a leakage area and a leakage grade of the water supply network. The invention realizes the above purpose through the following technical scheme: A water supply network leakage detection method based on a kriging interpolation method and CatBoost model, the method comprising the following steps: S1, constructing a hydraulic model of a water supply network, and acquiring an Euclidean distance matrix among nodes, wherein the nodes comprise pressure value monitoring points and pressure value estimation points which are preset in the network; S2, simulating leakage based on the hydraulic model, acquiring pressure data of the pressure value monitoring points, and recording the partition and the leakage grade of the set leakage nodes to form a training sample; S3, determining pressure values of the pressure value estimation points by adopting a Kriging interpolation method based on the pressure data and the Euclidean distance matrix, and fusing the pressure data of all the pressure value monitoring points to construct a full-node pressure characteristic set; s4, sorting and screening the feature importance of the full-node pressure feature set to obtain an optimal feature subset; S5, combining the optimal feature subset with the corresponding partition to which the leakage node belongs and the leakage level to form a training sample matrix, and inputting CatBoost a leakage detection model for training; S6, identifying the leakage area and the leakage grade of the water supply network based on the trained model. Further, step S1 includes: s101, importing topological relation and pipe fitting operation parameters of a water supply network into a hydraulic analysis tool, and dividing the water supply network into Individual metering zones, in commonA node, among whichEach node is used as a pressure value monitoring point, and the restThe individual nodes are used as pressure value estimation points, and a hydraulic model of the water supply pipe network is built; s102, acquiring a coordinate value matrix of pressure value monitoring points And coordinate value matrix of pressure value estimation point; S103, calculatingEuclidean distance matrix between every two middle coordinate valuesA kind of electronic deviceEach coordinate value of (a)Euclidean distance matr