A method for building a water supply network risk probability prediction model fusing multi-source data

By integrating OSM data and machine learning, the external environmental features of the water supply network are automatically extracted and an XGBoost model is constructed. This solves the problems of feature extraction and model generalization in the risk assessment of the water supply network, and achieves high-precision risk prediction and accurate maintenance decision-making.

CN122115151APending Publication Date: 2026-05-29TIANJIN UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TIANJIN UNIV
Filing Date
2026-03-17
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing risk assessment methods for water supply networks face challenges in feature construction and model generalization. External environmental factors are costly to extract and have low automation levels. Historical fault data cannot be effectively quantified, and the complex interactions and spatial correlations between features are ignored, which limits the accuracy and generalization ability of the model.

Method used

This paper adopts a method that integrates open-source map data (OSM) spatial analysis, fault point density clustering and machine learning prediction to automatically extract the external environmental features of the water supply network, construct a machine learning risk prediction model, integrate the network's own attributes, external environment and maintenance space density features, and use the XGBoost algorithm for multi-feature fusion.

Benefits of technology

It significantly improves data acquisition efficiency, reduces manual survey costs, enhances feature consistency and interpretability, and improves the accuracy and generalization performance of risk prediction, providing precise maintenance decision support for water supply systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122115151A_ABST
    Figure CN122115151A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of water supply network risk analysis, and discloses a water supply network risk probability prediction model building method fusing multi-source data, which obtains water supply network data of a target area and classifies open source map data, then combines spatial buffer analysis and priority rule determination to realize extraction of external environment characteristics; then rule grid units are constructed within the spatial range of the water supply network, the maintenance spatial density of each grid unit is calculated, and the maintenance spatial density of the grid unit is mapped to each pipe section according to the maintenance spatial density, so that the extraction of the maintenance spatial density characteristics is realized; finally, the machine learning risk prediction model is constructed by integrating the pipe network itself attributes, external environment and maintenance spatial density characteristics, and the risk probability of the pipe section level is directly output. The application fuses open source map data spatial analysis, fault point density clustering and integrated learning prediction, and is suitable for risk probability prediction, high-risk pipe section identification and preventive maintenance decision support of urban water supply networks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of risk analysis technology for water supply networks, specifically relating to a method for building a probability prediction model for water supply network risks that integrates multi-source data. Background Technology

[0002] In the context of smart water management, the safe and stable operation of water supply networks is the core of urban lifeline management. Currently, data-driven risk assessment has become a major trend; however, existing methods still face significant challenges in feature construction and model generalization. Although most studies have adopted machine learning models to replace traditional experience-based judgments and introduced Geographic Information System (GIS) technology for spatial analysis, their feature systems often rely on manual annotation or a single data source. External environmental factors (such as traffic encroachment, building encroachment, and intersection dynamic loads) are key risk factors, but their extraction costs are high and automation is low. Furthermore, historical fault data is often recorded as independent events, and the spatial clustering patterns and density distributions they contain have not been effectively quantified and transformed into features usable by the model. In predictive modeling, most methods treat the network as an isolated unit, ignoring the complex interactions and spatial correlations between features, thus limiting the model's accuracy and generalization ability. With the continuous accumulation of multi-source geographic information and network operation data, the industry urgently needs a risk prediction method that can automatically integrate "self-attributes - external environment - historical spatial patterns" and support high-precision prediction to promote a comprehensive transformation of network risk identification from passive response to intelligent early warning. Summary of the Invention

[0003] This invention aims to perform systematic risk prediction for water supply networks, especially addressing the difficulty in quantifying the spatial patterns of external environmental loads and historical faults in the network. It proposes a method for building a probability prediction model for water supply network risks that integrates spatial analysis of open-source map data (OSM), fault point density clustering, and machine learning prediction. This model is applicable to risk probability prediction, identification of high-risk pipe sections, and preventive maintenance decision support for large-scale urban water supply networks, providing data-driven support for the safe operation and precise maintenance of water supply systems.

[0004] To achieve the above-mentioned objectives, the present invention is implemented through the following technical solution:

[0005] This invention provides a method for building a probability prediction model for water supply network risks that integrates multi-source data, including:

[0006] S1: Obtain water supply network data and open-source map data for the target area, classify and process the road network, railway network and land use data in the open-source map data, and extract the external environmental features of the water supply network through spatial buffer analysis and priority rule determination. The external environmental features include occupancy type features and road intersection features.

[0007] S2: Construct regular grid cells within the water supply network space, count the number of maintenance events and the total length of pipe segments in each grid cell, calculate the maintenance space density of each grid cell, and map the maintenance space density of the grid cell to each pipe segment according to the spatial relationship between the pipe segment and the grid cell, thereby extracting the maintenance space density features.

[0008] S3: Integrate the characteristics of the pipeline network itself, the characteristics of the external environment, and the characteristics of maintenance space density to build a machine learning risk prediction model and directly output the risk probability at the pipe segment level.

[0009] Furthermore, in S1:

[0010] The water supply network data for the target area includes GIS data and its own attribute data. Each pipe segment is recorded in the database as a record and has its geographical coordinates.

[0011] The open-source map data is OpenStreetMap data, which includes road network data, railway network data, and land use data.

[0012] Furthermore, in S1, the road network, railway network, and land use data in the open-source map data are classified and processed, including:

[0013] (1) Classify the occupancy sources according to the “fclass” field of each layer in the OSM data to obtain the occupancy type corresponding to each field value; divide the road network data into different road types; classify the railway network data into railway types; and divide the land use data into different land use types.

[0014] (2) Based on the road network data, calculate the intersection points between all road line elements; this process excludes the cases where only the endpoints of the line elements are connected, and only retains the valid intersection points formed by the intersection of the middle of the road or the connection with the middle of another road; at the same time, a filtering rule is introduced: if the "bridge" attribute of the two intersecting roads is "T", then the intersection point is removed.

[0015] Furthermore, in S1, through spatial buffer analysis and priority rule determination, the external environmental characteristics of the water supply network are extracted, including:

[0016] (1) For road network data and railway network data, create buffers to simulate their encroachment on the ground; for land use data, use their original polygon outlines, and if the pipe segment is located within the polygon, it is determined to be this type of encroachment; for road intersections, according to the road grade priority rules, assign the highest grade to the intersection, and create a circular buffer with the intersection as the center based on the preset road width corresponding to this grade.

[0017] (2) Perform spatial overlay analysis on the water supply network and the established buffer zone, and assign the "occupation type" and "whether at the intersection" field values ​​to the pipe segment respectively. First, add the "occupation type" field to the network attribute table, and its value comes from a set that covers all occupation types. If a pipe segment is located in multiple road network buffer zones and railway network buffer zones at the same time, the value is assigned according to the preset occupation type priority. Second, add the "whether at the intersection" field to the network attribute table. If a pipe segment enters any road intersection buffer zone, the value is assigned as "yes", otherwise it is assigned as "no". Finally, output the corresponding external environment characteristics on a pipe segment basis.

[0018] Furthermore, in S2, the number of maintenance events and the total length of pipe segments within each grid cell are counted, and the maintenance space density of each grid cell is calculated, including:

[0019] (1) Based on the completed regular grid, each maintenance event point is located to its grid cell through spatial overlay analysis;

[0020] (2) Calculate the total length of the pipe segments contained within each grid cell;

[0021] (3) Based on the results of steps (1) and (2), calculate the maintenance space density value of each grid cell; the maintenance space density is defined as the number of maintenance events per unit pipe length.

[0022] Furthermore, in S2, the maintenance space density of the grid cells is mapped to each pipe segment to extract the maintenance space density features, including:

[0023] (1) Based on the spatial relationship between the pipe segment and the grid cell, the maintenance space density of the pipe segment is assigned a value according to the following rules:

[0024] Single-grid coverage: If a pipe segment is completely located inside a certain grid cell, the maintenance space density value of that grid cell is directly used as the maintenance space density characteristic value of this pipe segment.

[0025] Multi-grid crossing: If a pipe segment intersects with multiple grid cells, the length-weighted average method is used to calculate its maintenance space density characteristic value;

[0026] No direct coverage: For pipe segments that do not intersect with any grid cells, the nearest neighbor principle is adopted, and the maintenance space density characteristic value of the grid where its geometric center point is located, or the maintenance space density value of the grid cell closest to its center point, is used as the maintenance space density characteristic value of the pipe segment.

[0027] (2) Post-processing the maintenance space density characteristic values ​​obtained in (1), including:

[0028] Spatial smoothing: Local weighted averaging is used to smooth the density characteristic values ​​of the maintenance space;

[0029] Outlier correction: Identify and correct significant abnormal maintenance space density characteristic values ​​caused by data errors or statistical biases;

[0030] (3) Generate and output the results of the obtained pipe section maintenance space density characteristics:

[0031] Add a "Maintenance Space Density Characteristics" field to the pipe segment attribute table to store the maintenance space density characteristic value corresponding to each pipe segment; the data type of the "Maintenance Space Density Characteristics" field is a numeric field, used to record the number of maintenance events per unit pipe segment length.

[0032] Furthermore, S3 includes:

[0033] (1) Form a dataset containing all feature fields, where each record represents an independent pipeline analysis unit; encode according to different types of data;

[0034] (2) The XGBoost algorithm is used to establish a risk prediction model for the water supply network and train the risk prediction model for the water supply network so that it can output the corresponding risk probability based on the input pipe segment feature vector. The risk probability ranges from 0 to 1.

[0035] The beneficial effects of this invention are:

[0036] (i) Automatic extraction of corresponding external environmental features: By processing OSM data and combining it with spatial analysis methods, the external environmental features of the water supply network are automatically identified, which significantly improves data acquisition efficiency, reduces manual survey costs, and ensures feature consistency and reproducibility.

[0037] (ii) Mining of spatial features corresponding to historical faults: Construct a comprehensive feature system that covers pipeline attributes, external environmental loads and spatial patterns of historical faults, quantify the spatial clustering of historical maintenance events into modelable features, thereby improving the comprehensiveness and physical interpretability of the feature system.

[0038] (III) Corresponding to multi-feature fusion risk prediction: Relying on the XGBoost model to fuse multi-source features, the accuracy and generalization performance of risk prediction are effectively improved. The pipe segment-level risk probability output by the model provides a reliable decision-making basis for pipeline network risk classification and precise maintenance. Attached Figure Description

[0039] Figure 1 A flowchart illustrating the method for building a water supply network risk probability prediction model that integrates multi-source data, as provided in this invention.

[0040] Figure 2This is a flowchart of the external environment feature extraction process in the prediction model building method provided by the present invention;

[0041] Figure 3 This is a flowchart of the maintenance space density feature extraction process in the prediction model building method provided by the present invention.

[0042] Figure 4 This is a schematic diagram illustrating the overlapping relationship between the pipe segment and the OSM data space in an embodiment provided by the present invention. Detailed Implementation

[0043] The present invention will be further described in detail below through specific embodiments. These embodiments will enable those skilled in the art to have a more comprehensive understanding of the present invention, but will not limit the present invention in any way.

[0044] like Figure 1 As shown, this invention provides a method for building a risk probability prediction model that integrates open source map (OSM) data and historical maintenance data of water supply networks. It is mainly achieved through three steps: automatic extraction of external environmental features, extraction of historical maintenance spatial density features, and construction of a multi-feature fusion risk prediction model.

[0045] Step 1: Automated identification of external environmental features of water supply networks based on OSM data

[0046] like Figure 2 As shown, this step acquires water supply network data and open-source map data for the target area. The road network, railway network, and land use data in the open-source map data are then classified and processed. Combined with spatial buffer analysis and priority rule determination, each pipe segment is assigned external environmental attributes to extract external environmental features and improve automation. The specific implementation method is as follows:

[0047] (1) Data preparation

[0048] Collect GIS data (*.shp) and attribute data of the water supply network within the target area, including but not limited to: pipe diameter, pipe material, pipe age, interface type, soil cover depth, and predicted annual average pressure of the previous year. Each pipe segment is recorded as a record in the database and has its geographic coordinates (such as the coordinates of the start point, end point, or center point).

[0049] The OSM data obtained for the target area mainly includes road network data, railway network data, and land use data. Among them, road network data and railway network data are line features, while land use data are area features.

[0050] (2) Classification of external environmental characteristics of pipeline network

[0051] To accurately identify the types of encroachment on water supply networks and key influencing nodes, and to clarify the specific attributes and classification criteria of various external environmental features, this invention classifies the types of external environmental features of water supply networks from two dimensions: encroachment type and road network intersection identification, as detailed below:

[0052] a) Occupancy type classification based on OSM data

[0053] Occupation sources were classified based on the "fclass" field of each layer in the OSM data, resulting in the occupancy type corresponding to each field value. Road network data (gis_osm_roads_free_1) was categorized into expressways, arterial roads, secondary arterial roads, and local roads based on their level; railway network data (gis_osm_railways_free_1) was filtered to include "rail" and "subway" elements, classifying them as railways; and land use data (gis_osm_landuse_a_free_1) was extracted based on its function, identifying building or area types such as commercial and industrial land, urban residential land, and green parks. The correspondence between each category and the original fields can be found in Table 1.

[0054] Table 1. Comparison of OSM Data Fields and Occupancy Types

[0055]

[0056] b) Road network intersection identification based on road network data

[0057] Road network intersection identification focuses on extracting key nodes from the road network that may generate additional load on the pipeline network and determining whether the pipeline network is within its influence range.

[0058] Based on road network data, the intersections between all road features are calculated. This process excludes intersections where only the endpoints of the road features are connected, retaining only valid intersections formed by roads intersecting in the middle or connecting with another road in the middle. Simultaneously, a filtering rule is introduced: if both intersecting roads have a "T" "bridge" attribute (indicating both are elevated or bridge structures), the intersection is removed, as such road intersections have a relatively small impact on the ground load of underground pipelines.

[0059] (3) Assignment of external environmental characteristics of pipeline network

[0060] After classifying the external environmental features of the pipeline network, in order to establish an effective spatial association between various external environmental features such as occupancy types and road network intersections and the water supply pipeline network, it is necessary to use spatial overlay analysis methods, combined with specific operations such as buffer settings and attribute field assignment, to extract the external environmental features of the pipeline network. The specific implementation steps are as follows:

[0061] a) Buffer settings

[0062] Road and railway network data in OSM data are typically stored as centerlines, requiring the creation of buffer zones to simulate their encroachment on the ground. For line features (road and railway network data): Buffer widths are set based on the road width regulations in the "Highway Engineering Technical Standard" (JTG B01-2014) and the actual impact range, for example: 20 meters for expressways, 15 meters for arterial roads, 10 meters for secondary arterial roads, 8 meters for local roads, and 10 meters for railways. For polygon features (land use data): The original polygon outline of the land use data is directly used. If a pipe segment is located within this polygon, it is considered this type of encroachment. For buffer zone settings at road intersections: According to the road grade priority rules, the highest grade is assigned to the intersection. Based on the preset road width corresponding to this grade, a circular buffer zone is created centered on the road intersection.

[0063] The road classification priority is ranked according to the traffic volume of each type of road, specifically: expressway > arterial road > secondary arterial road > local road > internal road > non-motorized vehicle road > other road. When assigning an "occupancy type" to a pipeline segment, the priority should be set according to the degree of impact of each occupancy type on the pipeline risk, from greatest to least, based on the above road classification priority.

[0064] b) Assigning values ​​to the external environmental characteristics of the pipeline network

[0065] Spatial overlay analysis is performed between the water supply network and the aforementioned buffer zones, assigning values ​​to the "occupancy type" and "at intersection" fields for each pipe segment. First, an "occupancy type" field is added to the network attribute table, with values ​​derived from a set encompassing all occupancy types, such as: {Railway, Expressway, Arterial Road, Secondary Arterial Road, Branch Road, Internal Road, Non-motorized Vehicle Lane, Other Road, Industrial Zone, Residential Zone, Green Park, None}. If a pipe segment is located within multiple road and railway network buffer zones simultaneously, values ​​are assigned according to a preset occupancy type priority. Second, an "at intersection" field is added to the network attribute table. If a pipe segment is located within any road intersection buffer zone, it is assigned the value "Yes"; otherwise, it is assigned "No". Finally, the corresponding external environmental characteristics are output for each pipe segment. Spatial overlay analysis refers to using the "spatial inclusion" relationship in a geographic information system for judgment.

[0066] Step 2: Extraction of maintenance space density features based on regular grids

[0067] like Figure 3As shown, this step constructs regular grid cells within the water supply network space, counts the number of maintenance events and the total length of pipe segments within each grid cell, calculates the maintenance space density of each grid cell, and maps the maintenance space density of the grid cells to each pipe segment based on the spatial relationship between pipe segments and grid cells. This extracts the maintenance space density features, thereby transforming the spatial clustering patterns of historical faults into key features that can be modeled. The specific implementation method is as follows:

[0068] (1) Construction of regular grid cells

[0069] First, determine the spatial extent of the water supply network to be predicted. The spatial extent is determined by the spatial distribution of all pipe segments to be predicted, specifically the smallest bounding rectangle formed by the coordinates of all pipe segments to be predicted.

[0070] Subsequently, a regular grid is created within the water supply network to be predicted. A regular grid is a grid composed of square or rectangular cells of identical size. The size of the grid cells is determined based on the required spatial resolution and computational resources.

[0071] For ease of management, each mesh cell is assigned a unique identifier (ID). For boundary mesh cells whose area is partially outside the study region after creation, a precise geometric clipping operation is performed to ensure that all mesh cells are ultimately completely within the study region.

[0072] (2) Calculation of maintenance space density of grid cell

[0073] Based on the constructed regular mesh, the maintenance space density of each mesh cell is calculated using the following sub-steps:

[0074] a) Statistics on maintenance events within the grid

[0075] Through spatial overlay analysis, each maintenance event point is located to its corresponding grid cell. The total number of maintenance event points contained in each grid cell is counted and recorded as the "maintenance event count" for that cell.

[0076] b) Calculation of the total length of pipe segments within the grid

[0077] Calculate the total length of the pipe segments contained within each grid cell. Since the pipe segments are linear elements, a single pipe segment may traverse multiple grid cells, thus requiring accurate spatial intersection calculations.

[0078] To improve computational efficiency, a spatial index is first established for the pipe segment data. For each grid cell, the spatial index is used to quickly retrieve all possible subsets of pipe segments that intersect with it.

[0079] Next, a geometric intersection operation is performed on each candidate pipe segment to obtain the portion where the segment's geometry intersects with the polygon of the grid cell. If the intersection result is a single line segment, its length is calculated directly; if the result is multiple separate line segments (multiple line strings), the lengths of each segment are calculated separately and then summed. All grid cells are traversed, and the total length of the pipe segment within each grid cell is accumulated. The result is recorded as the "total pipe segment length," in kilometers.

[0080] c) Calculation of maintenance space density value

[0081] Based on the above statistical results, the maintenance space density value of each grid cell is calculated. The maintenance space density is defined as the number of maintenance events per unit pipe segment length, expressed in "times / km". Special cases in the calculation are handled as follows: if the "total pipe segment length" of a grid cell is zero, it is replaced with a very small value (e.g., 0.001 km) to avoid division by zero errors; if the calculation result is an outlier such as infinity, the maintenance space density value of that grid cell is set to zero.

[0082] (3) Mapping method of grid maintenance space density to pipe segment based on spatial relationship

[0083] To assign the maintenance space density characteristic value of the grid cells to each pipe segment, the following mapping method is used:

[0084] a) Assigning maintenance space density based on spatial relationships

[0085] Based on the spatial relationship between the pipe segment and the grid cell, the following rules are used for value assignment:

[0086] Single-grid coverage: If a pipe segment is completely located inside a certain grid cell, the maintenance space density value of that grid cell is directly used as the maintenance space density characteristic value of this pipe segment.

[0087] Multi-grid crossing: If a pipe segment intersects with multiple grid cells, the length-weighted average method is used to calculate its maintenance space density value. Specifically, the length of the pipe segment in each intersecting grid cell is first calculated, and then the maintenance space density values ​​of each grid cell are weighted using these lengths. The result is used as the maintenance space density characteristic value of the pipe segment.

[0088] No direct coverage: For a very small number of pipe segments that do not intersect with any grid cells, the nearest neighbor principle is adopted, and the maintenance space density value of the grid cell where its geometric center point is located, or the maintenance space density value of the grid cell closest to its center point, is used as the maintenance space density characteristic value of the pipe segment.

[0089] b) Post-processing and optimization of maintenance space density characteristics

[0090] The obtained maintenance space density feature values ​​are post-processed to improve their applicability:

[0091] Spatial smoothing: Local weighted averaging and other methods are used to smooth the maintenance space density characteristic values ​​to reduce the abrupt changes in maintenance space density characteristic values ​​that may be caused by grid boundary division.

[0092] Outlier Correction: Identify and correct significant outlier maintenance space density feature values ​​caused by data errors or statistical biases.

[0093] (4) Generation and output of results for pipe segment density characteristics

[0094] After completing the mapping calculation and post-processing of the grid maintenance space density to pipe segments, the resulting maintenance space density feature values ​​of the pipe segments are generated and output as data: a new "Maintenance Space Density Feature" field is added to the attribute table of the pipe segments to store the maintenance space density feature value corresponding to each pipe segment. The data type of the "Maintenance Space Density Feature" field is a numeric field, used to record the number of maintenance events per unit pipe segment length.

[0095] Step 3: Building a multi-feature fusion risk prediction model based on XGBoost

[0096] By integrating the inherent attributes of the pipeline network, the external environment, and the density characteristics of maintenance space, a multi-feature fusion risk prediction model based on the XGBoost algorithm is constructed. Through training and optimization using pipeline segment sample data, a prediction model capable of outputting risk probabilities based on pipeline segment characteristics is formed. The specific implementation method is as follows:

[0097] (1) Feature encoding and dataset construction

[0098] The above steps completed the identification of external occupancy categories and maintenance record-related characteristics of the pipe section, forming a dataset containing all feature fields, where each record represents an independent pipe network analysis unit. This next step involves encoding the different types of data displayed in this data table, specifically as follows:

[0099] a) Categorical variable coding

[0100] For categorical variables without inherent order, such as "pipe material" and "interface type," one-hot encoding is used. For binary features like "at an intersection," they can be directly mapped to numerical values ​​(e.g., "yes" = 1, "no" = 0). If other features with a clear hierarchical order exist (e.g., occupancy type priority), label encoding or retaining their priority values ​​can also be considered.

[0101] b) Standardization of numerical variables

[0102] For continuous features such as "pipe diameter", "pipe age", "cover depth", and "annual average pressure", due to their different dimensions and magnitudes, standardization is required to improve model convergence speed and performance. Z-score standardization is usually used to scale the data to a similar range.

[0103] For a given pipe segment sample The final input data to the model is in the form of an ordered pair containing feature vectors and risk labels. .

[0104] Feature vector It is a concatenation of multiple sub-vectors, integrating all preprocessed features; it is a... 3D numerical vector:

[0105] ;

[0106] in: A one-hot encoded vector representing a categorical variable;

[0107] The label encoding vector representing the categorical variable;

[0108] It represents continuous features and includes standardized attribute features;

[0109] Represents a binary flag.

[0110] Risk Label It is a binary scalar, defined based on whether a risk event (such as pipe burst or leakage) occurred in the pipe section during the historical observation period:

[0111] .

[0112] (2) Training and parameter optimization of the XGBoost risk prediction model

[0113] After constructing the sample data, a risk prediction model for the water supply network was established using the XGBoost algorithm. The XGBoost model can directly handle numerical and one-hot encoded categorical features without complex feature transformations. The model complexity is controlled by regularization terms (L1 / L2), and randomness is increased through subsampling (row and column sampling), effectively improving the model's generalization ability.

[0114] First, the dataset is divided into training, testing, and validation sets according to a certain ratio. The model iteratively builds a series of decision trees, each tree working to correct the prediction residuals of the previous tree. Finally, the predictions from all trees are weighted and summed to obtain the final prediction.

[0115] Simultaneously, an independent validation set is used to monitor the training process and optimize hyperparameters. Key hyperparameters affecting model performance and complexity are systematically tuned using strategies such as grid search or random search. Core hyperparameters include learning rate, maximum tree depth, subsample and column sampling ratio, and regularization parameter. An optimal set of hyperparameters is determined with the goal of maximizing the comprehensive evaluation metric on the validation set (e.g., AUC).

[0116] After completing model training and parameter optimization, a risk prediction model for water supply networks based on multi-feature fusion was obtained. This model can predict risks based on the input pipe segment feature vectors. Output the corresponding risk probability. Its value ranges from 0 to 1.

[0117] Example: Construction and evaluation of a risk prediction model based on the method of the present invention

[0118] This embodiment focuses on risk prediction modeling for a portion of a city's water supply network system, employing the method of this invention to construct a complete feature engineering and model training process. The data foundation encompasses 117,922 pipe segment data points (total length exceeding 1,660 kilometers) and 2,597 maintenance records. Basic features include: pipe diameter, pipe material, pipe age, joint type, soil cover depth, and average annual pressure.

[0119] First, the external occupancy type of the pipeline network was identified based on OSM data. After processing by the method of this invention, a total of 72,871 pipeline segments with occupancy were identified. Figure 4 The spatial overlay relationship between the regional pipe network and OSM data in the embodiment is shown. Next, using the aforementioned spatial grid division method, the "maintenance space density" feature of each pipe segment is calculated and extracted.

[0120] XGBoost is used as the basic prediction framework. To address the severe class imbalance problem in the dataset, a specific approach is taken by setting the `scale_pos_weight` parameter (positive sample weight) and implementing a stratified sampling strategy. To evaluate the effectiveness of the features constructed by the method of this invention, a comparative experiment was designed: A complete feature set model: input features include all basic attributes, occupancy type features, and density features; a density-free feature model: input features only include basic attributes and occupancy type features, excluding density features.

[0121] Experimental results show that introducing density features improves the predictive performance of the risk assessment model. The ROC-AUC of the model with the complete feature set reaches 0.721, which is 0.024 higher than that of the model without density features (0.697). Furthermore, feature importance analysis based on SHAP values ​​shows that density features rank second in the complete feature set, second only to pipe age; among the top ten important features in terms of SHAP values, three features originate from the "occupancy type" identified by the method of this invention, demonstrating their effective contribution to model decision-making.

[0122] This embodiment confirms that the occupancy type features and maintenance space density features extracted by the method of this invention are effective variables for predicting water supply network risks. Among them, the maintenance space density feature has a clear effect on improving the model's predictive performance. These features can be further integrated into more complex predictive models to serve refined risk management of the network.

[0123] Although the preferred embodiments of the present invention have been described above in conjunction with the accompanying drawings, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many specific modifications under the guidance of the present invention without departing from the spirit of the invention and the scope of protection of the claims, and these modifications all fall within the scope of protection of the present invention.

Claims

1. A method for building a probability prediction model for water supply network risks by integrating multi-source data, characterized in that, include: S1: Obtain water supply network data and open-source map data for the target area, classify and process the road network, railway network and land use data in the open-source map data, and extract the external environmental features of the water supply network through spatial buffer analysis and priority rule determination. The external environmental features include occupancy type features and road intersection features. S2: Construct regular grid cells within the water supply network space, count the number of maintenance events and the total length of pipe segments in each grid cell, calculate the maintenance space density of each grid cell, and map the maintenance space density of the grid cell to each pipe segment according to the spatial relationship between the pipe segment and the grid cell, thereby extracting the maintenance space density features. S3: Integrate the characteristics of the pipeline network itself, the characteristics of the external environment, and the characteristics of maintenance space density to build a machine learning risk prediction model and directly output the risk probability at the pipe segment level.

2. The method for building a water supply network risk probability prediction model integrating multi-source data according to claim 1, characterized in that, In S1: The water supply network data for the target area includes GIS data and its own attribute data. Each pipe segment is recorded in the database as a record and has its geographical coordinates. The open-source map data is OpenStreetMap data, which includes road network data, railway network data, and land use data.

3. The method for building a water supply network risk probability prediction model integrating multi-source data according to claim 1, characterized in that, In S1, the road network, railway network, and land use data in the open-source map data are classified and processed, including: (1) Classify the occupancy sources according to the "fclass" field of each layer in the OSM data to obtain the occupancy type corresponding to each field value; divide the road network data into different road types; classify the railway network data into railway types; and divide the land use data into different land use types. (2) Based on the road network data, calculate the intersection points between all road line elements; this process excludes the cases where only the endpoints of the line elements are connected, and only retains the valid intersection points formed by the intersection of the middle of the road or the connection with the middle of another road; at the same time, a filtering rule is introduced: if the "bridge" attribute of the two intersecting roads is "T", then the intersection point is removed.

4. The method for building a water supply network risk probability prediction model integrating multi-source data according to claim 1, characterized in that, In S1, the external environmental characteristics of the water supply network are extracted through spatial buffer analysis and priority rule determination, including: (1) For road network data and railway network data, create buffers to simulate their encroachment on the ground; for land use data, use their original polygon outlines, and if the pipe segment is located within the polygon, it is determined to be this type of encroachment; for road intersections, according to the road grade priority rules, assign the highest grade to the intersection, and create a circular buffer with the intersection as the center based on the preset road width corresponding to this grade. (2) Perform spatial overlay analysis on the water supply network and the established buffer zone, and assign values ​​to the "occupation type" and "whether at the intersection" fields of the pipe segment respectively. First, add the "occupation type" field to the pipe network attribute table, and its value comes from a set that covers all occupation types. If a pipe segment is located in multiple road network buffer zones and railway network buffer zones at the same time, the value is assigned according to the preset occupation type priority. Second, add the "whether at the intersection" field to the pipe network attribute table. If a pipe segment enters any road intersection buffer zone, the value is assigned as "yes", otherwise it is assigned as "no". Finally, output the corresponding external environment characteristics on a pipe segment basis.

5. The method for building a water supply network risk probability prediction model integrating multi-source data according to claim 1, characterized in that, In S2, the number of maintenance events and the total length of pipe segments within each grid cell are counted, and the maintenance space density of each grid cell is calculated, including: (1) Based on the completed regular grid, each maintenance event point is located to its grid cell through spatial overlay analysis; (2) Calculate the total length of the pipe segments contained within each grid cell; (3) Based on the results of steps (1) and (2), calculate the maintenance space density value of each grid cell; the maintenance space density is defined as the number of maintenance events per unit pipe length.

6. The method for building a water supply network risk probability prediction model integrating multi-source data according to claim 1, characterized in that, In S2, the maintenance space density of the grid cells is mapped to each pipe segment to extract the maintenance space density features, including: (1) Based on the spatial relationship between the pipe segment and the grid cell, the maintenance space density of the pipe segment is assigned a value according to the following rules: Single-grid coverage: If a pipe segment is completely located inside a certain grid cell, the maintenance space density value of that grid cell is directly used as the maintenance space density characteristic value of this pipe segment. Multi-grid crossing: If a pipe segment intersects with multiple grid cells, the length-weighted average method is used to calculate its maintenance space density characteristic value; No direct coverage: For pipe segments that do not intersect with any grid cells, the nearest neighbor principle is adopted, and the maintenance space density characteristic value of the grid where its geometric center point is located, or the maintenance space density value of the grid cell closest to its center point, is used as the maintenance space density characteristic value of the pipe segment. (2) Post-processing the maintenance space density characteristic values ​​obtained in (1), including: Spatial smoothing: Local weighted averaging is used to smooth the density characteristic values ​​of the maintenance space; Outlier correction: Identify and correct significant abnormal maintenance space density characteristic values ​​caused by data errors or statistical biases; (3) Generate and output the results of the obtained pipe section maintenance space density characteristics: Add a "Maintenance Space Density Characteristics" field to the pipe segment attribute table to store the maintenance space density characteristic value corresponding to each pipe segment; the data type of the "Maintenance Space Density Characteristics" field is a numeric field, used to record the number of maintenance events per unit pipe segment length.

7. The method for building a water supply network risk probability prediction model that integrates multi-source data according to claim 1, characterized in that, S3 include: (1) Form a dataset containing all feature fields, where each record represents an independent pipeline analysis unit; encode according to different types of data; (2) The XGBoost algorithm is used to establish a risk prediction model for the water supply network and train the risk prediction model for the water supply network so that it can output the corresponding risk probability based on the input pipe segment feature vector. The risk probability ranges from 0 to 1.