Pipeline leakage prediction method and storage medium thereof
By using a nested BP neural network model to predict leakage in water supply networks, the shortcomings of traditional detection methods are overcome, enabling efficient and accurate leakage forecasting and smart water management.
Patent Information
- Application Number
- CN202310543535.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-15
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2043-05-15
AI Technical Summary
In existing technologies, traditional pipeline leakage detection methods have limited sensing signals that are susceptible to interference, making analysis difficult. They also have high equipment costs and limited effective coverage. The DMA (Diverterless Detection and Mitigation) method is costly and may damage water quality, making it difficult to accurately detect leaks.
A nested BP neural network model is used to preprocess the basic data of the pipeline network. Combined with the calculation model of known node head and unknown node head, the neural network is trained with the operating data of a partial pipeline section to achieve accurate prediction of pipeline leakage.
It reduced the workload of data collection, accelerated the calculation efficiency, simplified the monitoring cost, improved the prediction accuracy of leakage location, and realized the intelligent management of water supply network.
Smart Images

Figure CN116624786B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to a pipeline leakage prediction method and a storage medium thereof, and belongs to the technical field of pipeline leakage prediction. BACKGROUND
[0002] The urban water supply network is an important infrastructure of society, which has far-reaching significance for guaranteeing social benefits and the sustainable and healthy growth of economy and maintaining normal life of people. The construction investment of the water supply network system accounts for 60-80% of the investment in the water supply system. However, at present, many water supply networks have leaks due to external conditions such as corrosion. In addition to increasing the economic cost of water management, pipeline network leakage also damages social benefits, seriously affects service water pressure and water supply quality, and even causes disasters.
[0003] At present, the leakage rate of most urban water supply networks is much higher than the standard value. With the urgent need for pipeline network leakage detection, more and more research is being invested in pipeline network leakage detection technology. The traditional leakage detection is mainly based on sensor signal detection method. This method uses professional instruments to detect the pipeline in a certain area, and analyzes the signal to determine whether there is leakage in the detection range. The sensor signal-based leakage detection method has single sensing signal and is easy to be disturbed, and the analysis difficulty is large, so it is difficult to accurately detect leakage. In addition, due to the dependence on professional equipment, the equipment cost is high and the effective coverage range is small, so its detection accuracy and application scene are limited.
[0004] The engineering scheme taking the DMA partition method as an example is widely used but also has many deficiencies: the essence of partition measurement management is pressure management of the pipeline network, and pressure management is considered by the water supply industry as the most cost-effective method to effectively reduce the leakage of the pipeline network. However, the cost of establishing the DMA measurement management area is relatively high, it not only needs flow meters and data recorders, but also needs to replace or modify valves to meet the closed nature, so the scheme of regional division needs to be demonstrated in detail to save investment and reasonably partition. The closed system created when implementing DMA partition may damage the water quality in the region, and the number of dead ends at the end may greatly increase when introducing DMA. Therefore, flush points need to be installed, resulting in an increase in the cost of the region. Valves and instruments need to be checked regularly, otherwise the obtained information will be misleading or useless, which also needs cost investment. SUMMARY
[0005] The technical problem to be solved by the present application is to overcome the defects of the prior art, provide a pipeline leakage prediction method and a storage medium thereof, which only needs part of the pipeline segment operation condition without the need for real-time operation of the entire pipeline network, greatly reduces the data collection workload, speeds up the calculation efficiency, simplifies the monitoring cost, and can accurately predict the pipeline leakage position according to the calculation result, improves the prediction accuracy.
[0006] In a first aspect, the present application provides a pipeline leakage prediction method, comprising:
[0007] preprocessing the pipeline basic data to obtain pipeline other data;
[0008] inputting the pipeline basic data and the pipeline other data into a pre-trained nested BP neural network model, and outputting the predicted pipeline leakage situation by the nested BP neural network model.
[0009] In combination with the first aspect, the preprocessing of the pipeline basic data to obtain the pipeline other data comprises:
[0010] constructing a pipeline topology matrix structure of known node water head based on the pipeline basic data;
[0011] calculating the pipeline other data by using the pipeline topology matrix structure of known node water head, the known node water head and a pre-constructed unknown node water head calculation model.
[0012] In combination with the first aspect, the pipeline basic data comprises pipeline data, node data, pump station data and valve data.
[0013] In combination with the first aspect, the pipeline other data comprises unknown node water head and pipeline flow.
[0014] In combination with the first aspect, the expression of the pre-constructed unknown node water head calculation model is:
[0015] A 12 h+A 11 Q+A 10 h0=0,
[0016] A 21 Q-q ext =0,
[0017]
[0018] In the formula, A 12 is the pipeline topology matrix structure of unknown node water head; A 11 is a diagonal matrix; A 10 is the pipeline topology matrix structure of known node water head; A 21 is the transpose matrix of the pipeline topology matrix structure of unknown node water head; h is the unknown node water head, unit: m; h0 is the known node water head, unit: m; Q is the pipeline flow, unit: m 3 / s; q ext is the external water demand of the node, unit: m 3 / s; s is a pipe friction coefficient, which is related to pipe diameter, pipe length and pipe material; C is a Hazen-Williams roughness coefficient; d is a pipe diameter, in units of m; L is a pipe length, in units of m; n is a time iteration number; and k is a pipe name, representing the kth pipe.
[0019] In combination with the first aspect, an expression of the pre-trained nested BP neural network model is as follows:
[0020]
[0021] In the expression, r1 is an output result of the first sub-network model in the nested BP neural network model, r2 is an output result of the second sub-network model in the nested BP neural network model, and rm is an output result of the mth sub-network model in the nested BP neural network model. m Each sub-network of the pipe network leakage has n characteristics, which are c1, c2,..., and cn, respectively. n f1 is a data array corresponding to the first sub-network model in the nested BP neural network model, f2 is a data array corresponding to the second sub-network model in the nested BP neural network model, and fm is a data array corresponding to the mth sub-network model in the nested BP neural network model. m
[0022] In combination with the first aspect, the pre-trained nested BP neural network model comprises the following steps.
[0023] Obtaining historical pipe network basic data;
[0024] Using the historical pipe network basic data, the historical known node water head, and the pre-constructed unknown node water head calculation model, the historical unknown node water head and the historical pipe flow are calculated.
[0025] Performing parameter correlation analysis on the historical unknown node water head, the historical pipe flow, and the historical pipe network basic data to obtain characteristic data.
[0026] Using the characteristic data and the corresponding historical actual pipe leakage as pipe samples, the nested BP neural network model is trained using the pipe samples.
[0027] In combination with the first aspect, part of the characteristic data and the corresponding historical actual pipe leakage are extracted as a test set.
[0028] The test set is input into the nested BP neural network model, and the nested BP neural network model outputs the predicted pipe leakage of the test set.
[0029] If the accuracy of the predicted pipe leakage of the test set exceeds a set accuracy threshold, the nested BP neural network model is determined to be qualified, otherwise the characteristic data is re-determined and the nested BP neural network model is re-trained.
[0030] In a second aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method of any one of the first aspect when executing the program.
[0031] In a third aspect, the present application provides a computer-readable storage medium having stored thereon a computer program, wherein the computer program, when executed by a processor, implements the steps of the method of any one of the first aspect.
[0032] The present application has the following beneficial effects:
[0033] The pipeline leakage prediction method provided by the present application does not require real-time operation of the entire pipe network, but only requires operation conditions of part of the pipe sections, greatly reduces the workload of data collection, accelerates the calculation efficiency, simplifies the monitoring cost, and can accurately predict the pipeline leakage position according to the calculation result, thereby improving the prediction accuracy.
[0034] The present application realizes leakage detection through data changes monitored by the monitoring instrument fixedly installed on the pipeline, without the need for personnel to go to the site; the present scheme can realize efficient and reliable collection and transmission of production data of the water supply pipe network, and researches a leakage area detection method, designs a nested BP neural network model, realizes real-time prediction and early warning of the water supply pipe network, and reduces the leakage rate of the water supply pipe network. Ultimately, the present application realizes improvement of the intelligent water business capability and creation of core competitiveness. BRIEF DESCRIPTION OF DRAWINGS
[0035] In order to more clearly illustrate the technical solutions of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. Obviously, for those skilled in the art, other drawings can also be obtained without creative labor based on these drawings.
[0036] Figure 1 FIG. 1 is a result diagram of a four-node five-pipeline nested BP neural network model in some embodiments.
[0037] Figure 2 FIG. 2 is a schematic diagram of a pipe network topology matrix structure of a four-node five-pipeline in some embodiments. DETAILED DESCRIPTION
[0038] In order to facilitate the technical solutions of the present application, the following first explains some concepts related to the present application.
[0039] Embodiment One
[0040] The present application aims to solve the problems of poor compatibility of water supply pipe network transmission equipment, poor timeliness of pipe network analysis, security risks of equipment communication information, lack of data encryption mechanism leading to easy leakage of key information or attacks, weak data analysis capability of existing models, low precision, high pipe network leakage rate, and great prediction difficulty.
[0041] Referring to Figure 1 , the present application provides a pipeline leakage prediction method, comprising: preprocessing pipe network basic data to obtain pipe network other data; inputting the pipe network basic data and the pipe network other data into a pre-trained nested BP neural network model, and the nested BP neural network model outputs predicted pipe network leakage conditions. The pipeline leakage prediction method provided by the present application does not require real-time operation of the entire pipe network, only requires partial pipe segment operation conditions, greatly reduces the data collection workload, accelerates the calculation efficiency, simplifies the monitoring cost, and at the same time, the nested BP neural network model outputs the predicted pipe network leakage conditions, which can accurately predict the pipeline leakage position and improve the prediction accuracy.
[0042] In the embodiments of the present application, the pipe network basic data is preprocessed to obtain pipe network other data, wherein the pipe network basic data includes pipeline data, node data, pump station data and valve data, and the pipe network other data includes unknown node head and pipeline flow; the pipe network basic data and the pipe network other data are input into a pre-trained nested BP neural network model, and the nested BP neural network model outputs predicted pipe network leakage conditions, including pipe network leakage position and pipe network leakage degree. The pre-trained nested BP neural network model improves the prediction accuracy of the nested BP neural network model and improves the prediction hit probability of the present application.
[0043] In the embodiments of the present application, the pipe network basic data is preprocessed to obtain pipe network other data, including: based on the pipe network basic data, constructing a pipe network topology matrix structure of known node head; using the pipe network topology matrix structure of known node head, the known node head and the pre-constructed unknown node head calculation model to calculate and obtain the pipe network other data. Preprocessing the pipe network basic data facilitates obtaining the pipe network other data and prepares for the subsequent nested BP neural network model output prediction of the pipe network leakage conditions.
[0044] In the embodiments of the present application, the expression of the pre-constructed unknown node head calculation model is:
[0045] A 12 h+A 11 Q+A 10 h0=0,
[0046] A 21 Q-q ext =0,
[0047]
[0048] In the formula, A 12 For the network topology matrix structure with unknown node heads; A 11 A is a diagonal matrix; 10 Given the pipe network topology matrix structure with known node heads; A 21 is the transpose of the pipe network topology matrix with unknown node heads; h is the unknown node head (m); h0 is the known node head (m); Q is the pipe flow rate (m³). 3 / s;q ext External water demand of the node, unit: m 3 / s; s is the pipe friction coefficient, which is related to the pipe diameter, pipe length and pipe material; C is the Hazen-Williams roughness coefficient; d is the pipe diameter, in meters; L is the pipe length, in meters; n is the number of time iterations; k is the pipe name, representing the k-th pipe.
[0049] In this embodiment of the application, the expression of the pre-trained nested BP neural network model is:
[0050]
[0051] In the formula, r1 is the output of the first sub-network model in the nested BP neural network model, r2 is the output of the second sub-network model in the nested BP neural network model, and r m This represents the output of the m-th sub-network model in a nested BP neural network model; each sub-network of pipeline leakage has n characteristics, namely c1, c2, ..., c n f1 is the data array corresponding to the first sub-network model in the nested BP neural network model, and f2 is the data array corresponding to the second sub-network model in the nested BP neural network model. m This is the data array corresponding to the m-th sub-network model in the nested BP neural network model.
[0052] In this embodiment, the pre-training of a nested BP neural network model includes: collecting historical pipeline network basic data, which includes: pipeline data (including pipeline name, diameter, length, material, age, roughness coefficient, starting node, ending node, and pipeline type), node data (including node name, node water demand, node type, and critical node head), pump station data (including pump station name, starting point, ending point, type, and operating curve), and valve data (including valve name, starting point, ending point, type, and operating status). The historical pipeline network basic data is directly obtained from the system (information database) or directly from the pipeline. Using the historical pipeline network basic data, historical known node heads, and a pre-built unknown node head calculation model, the historical unknown node heads and historical pipeline flow rates are calculated. Parameter correlation analysis is performed on the historical unknown node heads, historical pipeline flow rates, and historical pipeline network basic data to obtain feature data. The feature data and corresponding historical actual pipeline leakage conditions are used as pipeline samples. The nested BP neural network model is trained using these pipeline samples, and a maximum number of iterations and an iteration threshold are set.
[0053] Based on the input historical pipeline network data, construct a pipeline network topology matrix structure with known node heads. For example... Figure 2 As shown, the pipeline network topology matrix structure is a matrix representing the positional relationships between pipelines and nodes. Nodes flowing into the pipeline are set to -1, and nodes flowing out of the pipeline are set to 1. This yields the pipeline network topology matrix structure with historically known node heads. Based on the obtained network topology matrix structure of the known historical node heads and the pre-constructed unknown node head calculation model, the historical pipeline flow rate and the historical unknown node heads are calculated.
[0054] A set of pipeline samples is input into a nested BP neural network model, which serves as a set of sample test patterns, as shown in formula (1). The data array corresponding to each sub-network model in the nested BP neural network model is a function mapping relationship f, and the nested BP neural network model reflects the complex cross-sensitivity of the array.
[0055] The input data, including historical pipeline network data, is normalized to [-1, 1]. The formula for normalizing the input data is as follows:
[0056]
[0057] In the formula, X is the original input value; X P The input value after smoothing; X max X min These are the maximum and minimum input values, respectively.
[0058] The fitting data and error matrix of the fitting data are obtained through the nested BP neural network model, and the data error is corrected again through the nested BP neural network model calculation, so that the simulation result of the algorithm is obtained. The historical actual pipeline leakage in the test set is used to verify the performance of the model. The nested BP neural network model is obtained by pre-training, which improves the prediction accuracy of the nested BP neural network model and improves the probability of prediction hit of the present application.
[0059] In the embodiment of the present application, the performance of the nested BP neural network model is verified by using the test set, and part of the feature data and the corresponding historical actual pipeline leakage are extracted as the test set; the test set is input into the nested BP neural network model, and the nested BP neural network model outputs the predicted pipeline leakage of the test set; if the correct rate of the predicted pipeline leakage of the test set exceeds the set correct rate threshold, the nested BP neural network model is determined to be qualified, otherwise the feature data is re-determined and the nested BP neural network model is re-trained.
[0060] The pipeline leakage prediction calculation method of the present application does not require real-time full operation state of the pipe network, and can accurately predict the pipeline leakage position according to the calculation result. The calculation efficiency is improved, the monitoring cost is simplified, and the prediction accuracy is improved.
[0061] In the embodiment of the present application, the present application provides an electronic device, which includes a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the method of any one of the first aspect when executing the program.
[0062] In the embodiment of the present application, the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of the method of any one of the first aspect.
[0063] The present scheme can realize efficient and reliable collection and transmission of water supply pipe network production data, and uses safety protection technology as protection, researches leakage area detection method, designs leakage prediction model, realizes real-time prediction and early warning of water supply pipe network, and reduces the leakage rate of water supply pipe network. Finally, the intelligent water business capability is improved, and the core competitiveness is created.
[0064] Embodiment two
[0065] When calculating the water supply pipe network model, the pipe materials used for calculation are 2 plastic pipes (PE), 2 tin-plated steel pipes (DG) and 1 steel pipe (G), and the simulation time is 6 hours.
[0066] First, the node water head at the unknown node is calculated as 50m, 37.1m, 43.49m and 43.48m respectively. The pipeline flow is 4.61m 3 / s, 4.61m3 / s, 4.56 m 3 / s, 4.56 m 3 / s, 0.049 m 3 / s. The calculation time is 0.541 s. The result accords with the flow conservation and energy conservation theorem of the pipeline.
[0067] As Figure 1 shown, the pipeline leakage amount PE pipeline leakage amount MSE value is 6.547, MAPE value is 0.11, DG pipeline leakage amount MSE value is 6.352, MAPE value is 0.123, G pipeline leakage amount MSE value is 6.007, MAPE value is 0.092. It can be seen that the prediction result belongs to a higher precision value, which can accurately identify the prediction sample and achieve ideal prediction results.
[0068] The calculation result of the unknown node head calculation model is:
[0069] Node head: HK[0] = 43.4856, HK[0] = 43.4842,
[0070] Pipeline flow: QK[0] = 4.61092, QK[1] = 4.61148, QK[2] = 4.56148, QK[3] = 4.56092, QK[4] = 0.0494374; Runtime = 0.541, wherein HK is the unknown node head, and QK is the pipeline flow.
[0071] Each embodiment in the specification is described in a progressive manner, and the same and similar parts between each embodiment can be referred to each other. Each embodiment focuses on the difference from other embodiments.
[0072] Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice in the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with the true scope and spirit of the application being indicated by the following claims.
[0073] The above detailed description of the specific implementation is further detailed for the purpose of the application, technical solutions and beneficial effects. It should be understood that the above is only a specific implementation of the application and does not limit the protection scope of the application. Any modification, equivalent replacement, improvement, etc. made on the basis of the technical solutions of the application shall be included in the protection scope of the application.
Claims
1. A method of predicting leaks in a pipeline, characterized by, The method comprises the following steps: preprocessing pipe network basic data to obtain pipe network other data, including: constructing a pipe network topology matrix structure of known node water head based on the pipe network basic data; calculating the pipe network other data by using the pipe network topology matrix structure of known node water head, the known node water head and a pre-constructed unknown node water head calculation model; the expression of the pre-constructed unknown node water head calculation model is: A 12 h+A 11 Q+A 10 h0=0, A 21 Q-q ext =0, wherein A 12 is the pipe network topology matrix structure for the unknown node head; A 11 is a diagonal matrix; A 10 is the pipe network topology matrix structure for the known node head; A 21 is the transpose matrix of the pipe network topology matrix structure for the unknown node head; h is the unknown node head, in m; h0 is the known node head, in m; Q is the pipe flow, in m 3 / s; q ex is the external demand of the node, in m 3 / s; s is the pipe friction coefficient, which is related to the pipe diameter, pipe length, and pipe material; C is the Hazen-Williams roughness coefficient; d is the pipe diameter, in m; L is the pipe length, in m; n is the number of time iterations; k is the pipe name, representing the kth pipe; inputting the pipe network basic data and the pipe network other data into a pre-trained nested BP neural network model, and the nested BP neural network model outputs the predicted pipe leakage situation; the expression of the pre-trained nested BP neural network model is: In the formula, r1 is the output result of the first sub-network model in the nested BP neural network model, r2 is the output result of the second sub-network model in the nested BP neural network model, r m is the output result of the mth sub-network model in the nested BP neural network model; each sub-network of the pipe network leakage has n characteristics, which are c1, c2,..., c n , f1 is the data array corresponding to the first sub-network model in the nested BP neural network model, f2 is the data array corresponding to the second sub-network model in the nested BP neural network model, f m is the data array corresponding to the mth sub-network model in the nested BP neural network model.
2. The pipe leakage prediction method according to claim 1, wherein the pipe network basic data comprises pipe data, node data, pump station data and valve data.
3. The pipe leakage prediction method according to claim 1, wherein the pipe network other data comprises unknown node water head and pipe flow.
4. The pipe leakage prediction method according to claim 1, wherein the pre-trained nested BP neural network model comprises: obtaining historical pipe network basic data; calculating historical unknown node water head and historical pipe flow by using the historical pipe network basic data, historical known node water head and a pre-constructed unknown node water head calculation model; performing parameter correlation analysis on the historical unknown node water head, the historical pipe flow and the historical pipe network basic data to obtain feature data; using the feature data and corresponding historical actual pipe leakage situation as pipe samples, and training the nested BP neural network model by using the pipe samples.
5. The pipe leakage prediction method according to claim 4, wherein extracting part of the feature data and corresponding historical actual pipe leakage situation as a test set; inputting the test set into the nested BP neural network model, and the nested BP neural network model outputs the predicted pipe leakage situation of the test set; if the accuracy of the predicted pipe leakage situation of the test set exceeds a set accuracy threshold, it is determined that the nested BP neural network model is qualified, otherwise the feature data is re-determined and the nested BP neural network model is re-trained.
6. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to realize the steps of the method in any one of claims 1 to 5.
7. A computer readable storage medium having stored thereon a computer program, characterized in that The computer program is executed by the processor to realize the steps of the method in any one of claims 1 to 5.
Citation Information
Patent Citations
Water affair pipeline leakage detection method and system based on deep convolutional neural network
CN111881999A
Water supply network leakage locating method and system
CN115127037A