Municipal water supply and drainage system model construction method and system

Through data collection, preprocessing and federated particle swarm algorithm optimization, a high-precision municipal water supply and drainage system model was constructed, which solved the problems of low data-driven capabilities and parameter optimization efficiency in traditional model construction methods and met the needs of refined management.

CN120671552AInactive Publication Date: 2025-09-19WUHAN MUHE LANDSCAPING ENG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510837600.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-23
Publication Date
2025-09-19
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional municipal water supply and drainage system model construction methods are difficult to meet the needs of refined management due to poor data-driven capabilities, inefficient parameter optimization and limited generalization capabilities.

Method used

Collect raw data from multiple sources, remove noise and outliers through preprocessing, establish pipe network, water demand and drainage sub-models, use federated particle swarm optimization to optimize model parameters, and build a high-precision municipal water supply and drainage system model.

Benefits of technology

It has achieved comprehensive collection and efficient processing of municipal water supply and drainage system data, established an accurate and reliable multi-dimensional model, improved the performance of the model, and met the management needs of different cities and working conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120671552A_ABST
    Figure CN120671552A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of municipal engineering, and discloses a municipal water supply and drainage system model construction method and system.The method comprises the steps that multi-source original data of a municipal water supply and drainage system is collected, the multi-source original data is preprocessed, noise and abnormal values in the data are removed, and processed data are obtained after normalization; establishing an initial municipal water supply and drainage system model including a pipe network sub-model, a water demand sub-model and a drainage sub-model based on the processed data; optimizing parameters of the initial municipal water supply and drainage system model by using a federated particle swarm algorithm to obtain optimal model parameters so as to obtain a final municipal water supply and drainage system model; according to the invention, comprehensive acquisition and efficient processing of municipal water supply and drainage system data are realized, an accurate and reliable multi-dimensional model is established, the performance of the model is improved through model fusion and optimization, and municipal water supply and drainage system management requirements under different cities and different working conditions can be met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of municipal engineering, and in particular to a method and system for constructing a municipal water supply and drainage system model. Background Art

[0002] The municipal water supply and drainage system is an important part of urban infrastructure. Its normal operation has a vital impact on the lives of urban residents, industrial production and environmental protection. With the continuous development and expansion of cities, the scale and complexity of municipal water supply and drainage systems are also increasing. The accuracy of its model construction directly affects the allocation of urban water resources, flood control and drainage decisions, and the efficiency of pipeline network operation and maintenance. Traditional model construction methods are difficult to meet the needs of refined management due to poor data-driven capabilities, inefficient parameter optimization and limited generalization capabilities. Summary of the Invention

[0003] The purpose of the present invention is to solve the above problems and to design a method for constructing a municipal water supply and drainage system model.

[0004] A first aspect of the present invention provides a method for constructing a municipal water supply and drainage system model, the method comprising the following steps: Collect multi-source raw data from the municipal water supply and drainage system, pre-process the multi-source raw data, remove noise and outliers in the data, and obtain processed data after normalization; Based on the processed data, an initial municipal water supply and drainage system model is established, including a pipe network sub-model, a water demand sub-model, and a drainage sub-model; The federated particle swarm algorithm is used to optimize the parameters of the initial municipal water supply and drainage system model to obtain the optimal model parameters and the final municipal water supply and drainage system model.

[0005] Optionally, in a first implementation of the first aspect of the present invention, preprocessing the multi-source raw data to remove noise and outliers in the data and obtaining processed data after normalization includes: Integrate multi-source raw data into a graph structure, use a graph attention network to weight the node features in the graph, aggregate the features of each node by learning the attention weights between nodes, identify mutation anomalies and reverse immersion anomalies in the data, score the degree of anomaly of each node, and mark and remove noise and outliers whose scores exceed the preset threshold; The processed multi-source raw data are grouped according to the time dimension and the space dimension. The mean and standard deviation of the data in each time-region group are first calculated, and then each data point is normalized to have a unified scale in the time and space dimensions.

[0006] Optionally, in a second implementation of the first aspect of the present invention, the process of constructing the pipe network sub-model includes: The municipal water supply and drainage network is abstracted into a directed graph structure with attributes. The network nodes are used as the nodes of the graph. The node attributes contain the dynamic data in the processed data. The pipe segments are used as the edges of the graph. The edge attributes contain the physical parameters in the processed data. The physical parameters include at least pipe diameter, pipe length, roughness and valve status. A graph convolutional network is used to aggregate the neighborhood information of nodes layer by layer, and the hydraulic coupling relationship between nodes is learned through multi-layer nonlinear transformation. In each layer of calculation, each node integrates the water pressure, flow data and pipe transmission characteristics of its adjacent nodes, updates its own state representation, and finally outputs a node feature vector containing global hydraulic associations.

[0007] Optionally, in a third implementation of the first aspect of the present invention, the water demand sub-model construction process includes: The city is divided into multiple geographical units, each of which acts as an intelligent agent, taking the processed data of the historical water consumption, time period, real-time weather parameters, population density and user type of the area as input; The state space of multi-agent reinforcement learning is defined as the real-time water consumption data of the region and the water consumption status of adjacent regions. The action space is the prediction and adjustment strategy of water demand in the future period. The reward function is the reverse mapping of the deviation between the predicted value and the actual water consumption. Through information interaction between intelligent agents, each intelligent agent can learn the global water use rules in local decision-making, and finally output the water demand forecast results of multi-regional coordination.

[0008] Optionally, in a fourth implementation of the first aspect of the present invention, the process of constructing the drainage sub-model includes: A drainage network graph model with both time and space dimensions is constructed. Nodes are inspection wells, rainwater inlets, and outfalls in the drainage network. Node attributes integrate time series and spatial characteristics. Edges represent pipe segment connections and include parameters such as pipe diameter, slope, and drainage capacity. A spatiotemporal graph convolutional network is used to capture the temporal dependence of the rainfall-runoff process through gated recurrent units in the time dimension, and the water flow transmission relationship between pipeline network nodes is modeled through graph convolution operations in the spatial dimension. Finally, the water level and flow prediction values ​​of each node in the future period are jointly output to simulate the dynamic process of rainwater collection, transmission and discharge in the pipeline network.

[0009] Optionally, in a fifth implementation of the first aspect of the present invention, the method of optimizing the parameters of the initial municipal water supply and drainage system model using a federated particle swarm optimization algorithm to obtain optimal model parameters to obtain a final municipal water supply and drainage system model includes: All adjustable parameters of the pipe network sub-model, water demand sub-model and drainage sub-model are encoded as particle position vectors, and each particle represents a complete set of model parameter combinations; On each regional server participating in the optimization, a group of particles is randomly initialized to form a local particle swarm. The pipe network sub-model, water demand sub-model, and drainage sub-model are initialized on distributed servers in various regions of the city to train the initial municipal water supply and drainage system model. Calculate the prediction error of the initial municipal water supply and drainage system model corresponding to each particle, convert the prediction error into a fitness value, and each regional server records the individual optimal position and fitness value in the local particle swarm, as well as the global optimal position and fitness value; Each regional server updates the speed and position of each particle based on the current state of the local particle swarm. During the update process, the particle moves towards its own historical optimal position and the global optimal position to explore a better parameter combination. Each regional server summarizes the global optimal position and its fitness value in the local particle swarm, collects the global optimal positions of all regions, calculates the weighted average of each global optimal position, and obtains the federal global optimal position.

[0010] Optionally, in a sixth implementation of the first aspect of the present invention, the method of optimizing the parameters of the initial municipal water supply and drainage system model using a federated particle swarm optimization algorithm to obtain optimal model parameters to obtain a final municipal water supply and drainage system model further includes: The federated global optimal position is broadcasted back to each regional server. Each regional server replaces the local global optimal position with the federated global optimal position as the guidance direction for the next iteration. When the maximum number of iterations is reached, the iteration stops. Based on the optimal particle position after convergence, each regional server updates the parameters of the corresponding initial municipal water supply and drainage system model to obtain the final global optimal model parameter combination, forming a municipal water supply and drainage system model that integrates multiple regions.

[0011] A second aspect of the present invention provides a municipal water supply and drainage system model building system, the system comprising: The data acquisition module is used to collect multi-source raw data of the municipal water supply and drainage system, pre-process the multi-source raw data, remove noise and outliers in the data, and obtain processed data after normalization; A model building module is used to build an initial municipal water supply and drainage system model based on the processed data, including a pipe network sub-model, a water demand sub-model, and a drainage sub-model; The model optimization module is used to optimize the parameters of the initial municipal water supply and drainage system model using the federated particle swarm algorithm to obtain the optimal model parameters and thus obtain the final municipal water supply and drainage system model.

[0012] The third aspect of the present invention provides a municipal water supply and drainage system model construction device, which includes a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory to enable the municipal water supply and drainage system model construction device to execute each step of the municipal water supply and drainage system model construction method as described in any one of the above items.

[0013] A fourth aspect of the present invention provides a computer-readable storage medium having instructions stored thereon, which, when executed by a processor, implement the various steps of the municipal water supply and drainage system model construction method as described in any of the above items.

[0014] In the technical solution provided by the present invention, multi-source original data of the municipal water supply and drainage system are collected, the multi-source original data are preprocessed, the noise and outliers in the data are removed, and the processed data are obtained after normalization; based on the processed data, an initial municipal water supply and drainage system model including a pipe network sub-model, a water demand sub-model and a drainage sub-model is established; the parameters of the initial municipal water supply and drainage system model are optimized using a federated particle swarm algorithm to obtain the optimal model parameters, so as to obtain the final municipal water supply and drainage system model; the present invention realizes the comprehensive collection and efficient processing of municipal water supply and drainage system data, establishes an accurate and reliable multi-dimensional model, and improves the performance of the model through model fusion and optimization, which can meet the management needs of municipal water supply and drainage systems in different cities and under different working conditions, and provides strong support for the optimization design, operation management and fault diagnosis of water supply and drainage systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Various other advantages and benefits will become apparent to those skilled in the art by reading the detailed description of the preferred embodiment below. The accompanying drawings are only for the purpose of illustrating the preferred embodiment and are not to be considered as limiting the present invention; Figure 1 A flowchart of a method for constructing a municipal water supply and drainage system model provided by an embodiment of the present invention; Figure 2 A schematic diagram of the structure of a municipal water supply and drainage system model building system provided by an embodiment of the present invention; Figure 3 A schematic diagram of the structure of a municipal water supply and drainage system model building device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0016] The terms "first," "second," "third," "fourth," and so forth (if any) in the description and claims of the present invention and in the accompanying drawings are used to distinguish similar items and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that shown or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product, or device that includes a series of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, product, or device.

[0017] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 A flowchart of a method for constructing a municipal water supply and drainage system model provided by an embodiment of the present invention, the method specifically comprising the following steps: Step 101: Collect multi-source raw data of the municipal water supply and drainage system, pre-process the multi-source raw data, remove noise and outliers in the data, and obtain processed data after normalization; In this embodiment, IoT sensors, remote sensing technology, and geographic information systems are used to collect relevant data on the municipal water supply and drainage system, including parameters such as the geographical location, pipe diameter, material, burial depth, water pressure, flow rate, water quality, and other parameters of the pipeline network, as well as basic data such as the city's topography, population distribution, climate conditions, and water demand. In the data collection process, IoT sensors can be deployed at key nodes of the pipeline network, such as pumping stations, valves, and reservoirs, to collect dynamic data such as water pressure and flow rate in real time; remote sensing technology can be used to obtain information such as the city's topography and vegetation cover, and assist in analyzing the runoff of the drainage system; and geographic information systems are used to manage and display the spatial data of the pipeline network, realizing data visualization and spatial analysis.

[0018] In this embodiment, multi-source raw data are integrated into a graph structure, and a graph attention network is used to perform weighted processing on the node features in the graph. By learning the attention weights between nodes, the features of each node are aggregated, mutation anomalies and reverse immersion anomalies in the data are identified, the degree of anomaly of each node is scored, and noise and outliers with scores exceeding a preset threshold are marked and removed; the processed multi-source raw data are grouped according to the time dimension and the space dimension, and the mean and standard deviation of the data in each time-region group are first calculated for the group, and then each data point is normalized to have a unified scale in the time and space dimensions, thereby obtaining a unified scale in the time and space dimensions.

[0019] Step 102: Establish an initial municipal water supply and drainage system model based on the processed data, including a pipe network sub-model, a water demand sub-model, and a drainage sub-model; In this embodiment, the construction process of the pipe network sub-model includes: abstracting the municipal water supply and drainage pipe network into a directed graph structure with attributes, using the pipe network nodes as the nodes of the graph, and the node attributes include the dynamic data in the processed data; using the pipe sections as the edges of the graph, and the edge attributes include the physical parameters in the processed data, where the physical parameters include at least the pipe diameter, pipe length, roughness and valve status; using the graph convolutional network to aggregate the neighborhood information of the nodes layer by layer, and learning the hydraulic coupling relationship between the nodes through multi-layer nonlinear transformation. In the calculation of each layer, each node integrates the water pressure, flow data and pipe section transmission characteristics of its adjacent nodes, updates its own state representation, and finally outputs the node feature vector containing the global hydraulic association.

[0020] In this embodiment, the water demand sub-model construction process includes: dividing the city into multiple geographical units, each unit as an intelligent agent, and taking the historical water consumption, time period, real-time weather parameters, population density and user type of the region in the processed data as input; defining the state space of multi-agent reinforcement learning as the real-time water consumption data in the region and the water consumption status of adjacent areas, the action space as the prediction and adjustment strategy for water demand in future time periods, and the reward function as the reverse mapping of the deviation between the predicted value and the actual water consumption; through information interaction between agents, each agent learns the global water use rules in local decision-making, and finally outputs the water demand prediction results of multi-region collaboration.

[0021] In this embodiment, the construction process of the drainage sub-model includes: constructing a drainage network graph model that includes time and space dimensions, where the nodes are inspection wells, rainwater inlets, and drainage outlets in the drainage network, and the node attributes integrate time series characteristics and spatial characteristics; the edges are the connection relationships between pipe sections and parameters including at least pipe diameter, slope, and drainage capacity; using a spatiotemporal graph convolutional network, capturing the time dependence of the rainfall-runoff process through a gated recurrent unit in the time dimension, modeling the water flow transmission relationship between the network nodes through a graph convolution operation in the spatial dimension, and finally jointly outputting the water level and flow prediction values ​​of each node in the future period to simulate the dynamic process of rainwater collection, transmission, and discharge in the network.

[0022] In this embodiment, the hierarchical propagation mechanism of the pipe network sub-model enables nodes to not only perceive the status of directly connected neighbors, but also capture the indirect hydraulic coupling effects across multiple pipe sections in the pipe network through superposition calculations, such as the impact of the start and stop of remote water pumps on the terminal pressure. Ultimately, a high-dimensional feature vector is generated that integrates the global topological structure and hydraulic correlation of the pipe network, laying the foundation for accurately simulating the dynamic behavior of complex pipe network systems.

[0023] In this embodiment, the physical location nodes shared by the three sub-models are determined, such as: Water user node: the output point of the water demand sub-model; Water supply network inlet / outlet nodes: The connection points between the network submodel and the water source, and the nodes connected to the users; Drainage network start / end node: The starting point and final discharge point of sewage / rainwater collected by the drainage sub-model; Establish node correspondence. Each demand point in the water demand sub-model corresponds to which water supply node in the pipe network sub-model. The wastewater generated by water users corresponds to which drainage starting point in the drainage sub-model. Some nodes in the pipe network sub-model may also be components or input points of the drainage sub-model. Ensure that all submodels use the same geographic coordinate system and spatial accuracy to ensure accurate node alignment. Establish a data flow interface and apply the time series water consumption calculated by the water demand submodel as boundary conditions or loads to the corresponding water supply nodes in the pipe network submodel to drive the hydraulic calculations of the pipe network. After the pipe network submodel simulation is complete, the actual water supply time series or unconsumed water estimate for each user node or regional summary node is passed to the drainage submodel. In the drainage submodel, the received water supply data is converted into a time series of wastewater generation. Typically, the water supply is multiplied by a wastewater generation coefficient, such as 0.8-0.9, to convert the actual or near-actual water consumption of end users of the water supply system into source input for the drainage system. Time frame alignment: All sub-models should simulate the same total time period for time frame alignment. A unified simulation time step is determined, such as 5 minutes, 15 minutes, or 1 hour. Although the calculations within the sub-models may require a finer step, they should use the same, coordinated time step when exchanging data. For example, the demand model outputs water consumption once an hour, the pipe network model receives and calculates it once an hour, and then passes the water supply volume to the drainage model every hour. Use professional water supply and drainage system modeling software or a customized integrated environment. These platforms usually have built-in functions for connecting different sub-modules. Import or establish the pipe network sub-model, water demand sub-model, and drainage sub-model on the platform respectively. Use platform tools to physically connect the water supply network nodes to user points and the user points to the drainage starting points according to the mapping relationship. Link the results of the demand sub-model to the corresponding demand nodes in the pipe network sub-model, and link the node flow or water supply results output by the pipe network sub-model to the corresponding sewage source nodes in the drainage sub-model or use them as input data sources.

[0024] Step 103: Optimize the parameters of the initial municipal water supply and drainage system model using the federated particle swarm algorithm to obtain the optimal model parameters, thereby obtaining the final municipal water supply and drainage system model.

[0025] In this embodiment, all adjustable parameters of the pipe network submodel, water demand submodel, and drainage submodel are encoded as particle position vectors, with each particle representing a complete set of model parameter combinations. On each regional server participating in the optimization, a group of particles is randomly initialized to form a local particle swarm, and the pipe network submodel, water demand submodel, and drainage submodel are initialized on distributed servers in various regions of the city to train the initial municipal water supply and drainage system model. The prediction error of the initial municipal water supply and drainage system model corresponding to each particle is calculated and converted into a fitness value. Each regional server records the individual optimal position and fitness value of the local particle swarm, as well as the global optimal position and fitness value. Each regional server updates the speed and position of each particle based on the current state of the local particle swarm. During the update process, the particle moves toward its own historical optimal position and the global optimal position to explore a better parameter combination. Each regional server aggregates the global optimal position and fitness value of the local particle swarm, collects the global optimal positions of all regions, and calculates the weighted average of each global optimal position to obtain the federated global optimal position.

[0026] In this embodiment, the federated global optimal position is broadcast back to each regional server, and each regional server replaces the local global optimal position with the federated global optimal position as the guiding direction for the next iteration; when the maximum number of iterations is reached, the iteration is stopped, and each regional server updates the parameters of the corresponding initial municipal water supply and drainage system model based on the optimal particle position after convergence to obtain the final global optimal model parameter combination, forming a municipal water supply and drainage system model that integrates multiple regions.

[0027] In this embodiment, during the iterative optimization phase of the federated particle swarm algorithm, after collecting the local global optimal positions uploaded by the regional servers, the central server first performs weighted aggregation on these local global optimal positions to generate a federated global optimal position. The weight distribution is set based on regional characteristic differences. For example, urban areas with large data volumes, such as densely populated commercial areas, are given higher weights. Older urban areas with complex pipe networks are weighted based on complexity indices, such as large differences in pipe diameters and densely distributed valves. This ensures that the federated global solution can balance the characteristic differences between different regions. The aggregation method uses weighted arithmetic averaging, so that the federated global optimal position comprehensively reflects the optimal parameter trends of each region, while preventing data bias in a single region from interfering with the global optimization. The federated global optimal position is broadcast to all regional servers. After receiving the federated global optimal position, each regional server directly replaces the locally recorded global optimal position and uses it as the guiding direction for particle swarm updates in the next iteration cycle. During the replacement process, the regional server retains the individual optimal position of the local particle swarm and only updates the global guidance signal, which not only ensures the guiding role of the global optimal solution, but also allows local particles to conduct local exploration near the historical optimal solution, balancing global convergence and local adaptability. For example, after receiving the federated global optimal position, the particle swarm of an industrial zone server will prioritize moving to a parameter combination that integrates the characteristics of multiple regions such as commercial areas and residential areas in the next iteration, and at the same time fine-tune the special parameters of local industrial water use, such as the pressure adjustment coefficient during high-frequency water use periods. When the number of iterations reaches the preset maximum limit, such as 500, the algorithm stops iterating. At this time, each regional server extracts the particle position with the highest fitness in the current particle swarm, that is, the optimal particle position after convergence, which is usually the better of the federated global optimal position or the local optimal solution of the final iteration, and decodes it into specific parameters of each sub-model. The decoding process follows the physical definition and constraints of the parameters. For example, the first N dimensions in the particle position vector are mapped to the graph convolutional network weight parameters of the pipe network sub-model, the middle M dimensions correspond to the multi-agent reinforcement learning reward function coefficients of the water demand sub-model, and the last K dimensions are assigned to the time step parameters of the spatiotemporal graph convolutional network of the drainage sub-model to ensure that each parameter value falls within the feasible range of the project, such as the valve switch threshold is set to 0-1 and the roughness parameter is non-negative. Each regional server uses the decoded optimal parameter combination to synchronously update the pipe network sub-model, water demand sub-model and drainage sub-model of the initial municipal water supply and drainage system model. The updated model not only retains the local characteristics of each region, but also integrates common cross-regional laws through federal optimization, such as the peak water use period in different climate zones and the drainage capacity design standards in areas with frequent rainstorms, to form a global optimal model that can adapt to the geographical environment, water use habits and pipe network layout differences in multiple regions. While maintaining regional data privacy, this model realizes the sharing and collaboration of cross-regional experience, significantly improving the simulation accuracy and generalization ability of complex municipal water supply and drainage systems.

[0028] In this embodiment, the municipal water supply and drainage system model is a digital tool used to simulate the overall operational status of a city's water supply and drainage systems. It abstracts complex real-world systems into mathematical logical relationships and data objects, including key facilities such as water sources, water treatment plants, water supply networks, user water points, drainage networks, sewage treatment plants, pumping stations, reservoirs, and their interconnections. The model's core objective is to dynamically simulate the flow of water throughout the city's "intake-supply-use-discharge-treatment" chain, predicting changes in the system's hydraulic state and water quality, such as pipeline pressure, flow rate, flow velocity, and fullness, under various conditions, including daily water consumption changes, extreme weather, equipment failures, and planned expansions. It is not only a key means of understanding and evaluating existing system performance and diagnosing issues such as low-pressure areas, pipeline overloads, and overflow risks, but also a vital platform for supporting scientific decision-making. It is widely used in water supply security, drainage and flood prevention planning, facility optimization and scheduling, renovation and expansion plan comparison, and emergency response plan development. It is an indispensable modern decision-making support tool for improving the resilience and management of urban water systems.

[0029] In this embodiment, the actual municipal water supply and drainage system operation data is used to verify and evaluate the established model, calculate the model's prediction error, goodness of fit, root mean square error and other indicators, analyze the model's accuracy and reliability, and adjust and optimize the model based on the verification and evaluation results until the model meets the requirements of actual application. The model verification can use the cross-validation method, divide the data set into a training set and a test set, train the model on the training set, and evaluate the model's performance on the test set. In addition to the above-mentioned prediction error, goodness of fit, and root mean square error, the evaluation indicators can also include mean absolute error, determination coefficient, etc., to evaluate the model's performance from different angles. If the model's performance does not meet the requirements, it is necessary to analyze the reasons, which may be data quality issues, unreasonable model structure or improper parameter settings, and then make targeted adjustments and optimizations. In this embodiment, the municipal water supply and drainage system model is applied to the actual municipal water supply and drainage system management to realize the functions of real-time monitoring, operation optimization, fault diagnosis and planning and design of the water supply and drainage system. In terms of real-time monitoring, by combining the model with the sensor network, the operation data of the pipeline network is obtained in real time, the operation status of the pipeline network is simulated, and abnormal situations are discovered in time and early warnings are issued; in terms of operation optimization, the model is used for simulation and analysis to formulate the optimal operation plan, such as the start and stop control of the pump station and the adjustment of valves, so as to improve the operation efficiency and energy saving effect of the water supply and drainage system; in terms of fault diagnosis, by comparing the prediction results of the model with the actual observation data, the fault location and type in the pipeline network are identified, and repairs and processing are carried out in time; in terms of planning and design, the model is used to simulate and evaluate different planning schemes, select the optimal planning scheme, and guide the construction and expansion of the municipal water supply and drainage system.

[0030] See also Figure 2, a schematic diagram of the structure of a municipal water supply and drainage system model building system provided by an embodiment of the present invention, the system includes: The data acquisition module is used to collect multi-source raw data of the municipal water supply and drainage system, pre-process the multi-source raw data, remove noise and outliers in the data, and obtain processed data after normalization; A model building module is used to build an initial municipal water supply and drainage system model based on the processed data, including a pipe network sub-model, a water demand sub-model, and a drainage sub-model; The model optimization module is used to optimize the parameters of the initial municipal water supply and drainage system model using the federated particle swarm algorithm to obtain the optimal model parameters and thus obtain the final municipal water supply and drainage system model.

[0031] Figure 3 The diagram is a schematic diagram of the structure of a municipal water supply and drainage system modeling device provided in an embodiment of the present invention. The municipal water supply and drainage system modeling device 600 may vary significantly depending on configuration or performance. It may include one or more central processing units (CPUs) 610 (e.g., one or more processors), memory 620, and one or more storage media 630 (e.g., one or more mass storage devices) storing application programs 633 or data 632. The memory 620 and storage medium 630 may be either transient or persistent storage. The program stored in the storage medium 630 may include one or more modules (not shown), each of which may include a series of instructions for operating on the municipal water supply and drainage system modeling device 600. Furthermore, the processor 610 may be configured to communicate with the storage medium 630, executing the series of instructions stored in the storage medium 630 on the municipal water supply and drainage system modeling device 600 to implement the method provided in the above embodiment.

[0032] The municipal water supply and drainage system model building device 600 may further include one or more power supplies 640, one or more wired or wireless network interfaces 650, one or more input and output interfaces 660, and / or one or more operating devices 631, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. It will be understood by those skilled in the art that Figure 3 The structure of the municipal water supply and drainage system model building device shown does not constitute a limitation on the computer device provided by the present invention, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.

[0033] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores instructions. When the instructions are executed on a computer, the computer executes the various steps of the municipal water supply and drainage system model construction method provided in the above embodiments.

[0034] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices, and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0035] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0036] The above shows and describes the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions are merely preferred examples of the present invention and are not intended to limit the present invention. Various changes and improvements may be made to the present invention without departing from the spirit and scope of the present invention. Such changes and improvements fall within the scope of the present invention. The scope of protection claimed in the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for constructing a municipal water supply and drainage system model, characterized in that: The method comprises the following steps: Collect multi-source raw data from the municipal water supply and drainage system, pre-process the multi-source raw data, remove noise and outliers in the data, and obtain processed data after normalization; Based on the processed data, an initial municipal water supply and drainage system model is established, including a pipe network sub-model, a water demand sub-model, and a drainage sub-model; The federated particle swarm algorithm is used to optimize the parameters of the initial municipal water supply and drainage system model to obtain the optimal model parameters and the final municipal water supply and drainage system model.

2. The municipal water supply and drainage system model construction method according to claim 1, characterized in that: The preprocessing of the multi-source raw data to remove noise and outliers in the data and obtain the processed data after normalization includes: Integrate multi-source raw data into a graph structure, use a graph attention network to weight the node features in the graph, aggregate the features of each node by learning the attention weights between nodes, identify mutation anomalies and reverse immersion anomalies in the data, score the degree of anomaly of each node, and mark and remove noise and outliers whose scores exceed the preset threshold; The processed multi-source raw data are grouped according to the time dimension and the space dimension. The mean and standard deviation of the data in each time-region group are first calculated, and then each data point is normalized to have a unified scale in the time and space dimensions.

3. The municipal water supply and drainage system model construction method according to claim 1, characterized in that: The construction process of the pipe network sub-model includes: The municipal water supply and drainage network is abstracted into a directed graph structure with attributes. The network nodes are used as the nodes of the graph. The node attributes contain the dynamic data in the processed data. The pipe segments are used as the edges of the graph. The edge attributes contain the physical parameters in the processed data. The physical parameters include at least pipe diameter, pipe length, roughness and valve status. A graph convolutional network is used to aggregate the neighborhood information of nodes layer by layer, and the hydraulic coupling relationship between nodes is learned through multi-layer nonlinear transformation. In each layer of calculation, each node integrates the water pressure, flow data and pipe transmission characteristics of its adjacent nodes, updates its own state representation, and finally outputs a node feature vector containing global hydraulic associations.

4. The municipal water supply and drainage system model construction method according to claim 1, characterized in that: The water demand sub-model construction process includes: The city is divided into multiple geographical units, each of which acts as an intelligent agent, taking the processed data of the historical water consumption, time period, real-time weather parameters, population density and user type of the area as input; The state space of multi-agent reinforcement learning is defined as the real-time water consumption data of the region and the water consumption status of adjacent regions. The action space is the prediction and adjustment strategy of water demand in the future period. The reward function is the reverse mapping of the deviation between the predicted value and the actual water consumption. Through information interaction between intelligent agents, each intelligent agent can learn the global water use rules in local decision-making, and finally output the water demand forecast results of multi-regional coordination.

5. The municipal water supply and drainage system model construction method according to claim 1, characterized in that: The construction process of the drainage sub-model includes: A drainage network graph model with both time and space dimensions is constructed. Nodes are inspection wells, rainwater inlets, and outfalls in the drainage network. Node attributes integrate time series and spatial characteristics. Edges represent pipe segment connections and include parameters such as pipe diameter, slope, and drainage capacity. A spatiotemporal graph convolutional network is used to capture the temporal dependence of the rainfall-runoff process through gated recurrent units in the time dimension, and the water flow transmission relationship between pipeline network nodes is modeled through graph convolution operations in the spatial dimension. Finally, the water level and flow prediction values ​​of each node in the future period are jointly output to simulate the dynamic process of rainwater collection, transmission and discharge in the pipeline network.

6. The municipal water supply and drainage system model construction method according to claim 1, characterized in that: The method of optimizing the parameters of the initial municipal water supply and drainage system model using the federated particle swarm algorithm to obtain the optimal model parameters and thus obtain the final municipal water supply and drainage system model includes: All adjustable parameters of the pipe network sub-model, water demand sub-model and drainage sub-model are encoded as particle position vectors, and each particle represents a complete set of model parameter combinations; On each regional server participating in the optimization, a group of particles is randomly initialized to form a local particle swarm. The pipe network sub-model, water demand sub-model, and drainage sub-model are initialized on distributed servers in various regions of the city to train the initial municipal water supply and drainage system model. Calculate the prediction error of the initial municipal water supply and drainage system model corresponding to each particle, convert the prediction error into a fitness value, and each regional server records the individual optimal position and fitness value in the local particle swarm, as well as the global optimal position and fitness value; Each regional server updates the speed and position of each particle based on the current state of the local particle swarm. During the update process, the particle moves towards its own historical optimal position and the global optimal position to explore a better parameter combination. Each regional server summarizes the global optimal position and its fitness value in the local particle swarm, collects the global optimal positions of all regions, calculates the weighted average of each global optimal position, and obtains the federal global optimal position.

7. The method for constructing a municipal water supply and drainage system model according to claim 6, wherein: The method of optimizing the parameters of the initial municipal water supply and drainage system model using the federated particle swarm algorithm to obtain the optimal model parameters, thereby obtaining the final municipal water supply and drainage system model, further includes: The federated global optimal position is broadcasted back to each regional server. Each regional server replaces the local global optimal position with the federated global optimal position as the guidance direction for the next iteration. When the maximum number of iterations is reached, the iteration stops. Based on the optimal particle position after convergence, each regional server updates the parameters of the corresponding initial municipal water supply and drainage system model to obtain the final global optimal model parameter combination, forming a municipal water supply and drainage system model that integrates multiple regions.

8. A municipal water supply and drainage system model building system, characterized in that: The system includes: The data acquisition module is used to collect multi-source raw data of the municipal water supply and drainage system, pre-process the multi-source raw data, remove noise and outliers in the data, and obtain processed data after normalization; A model building module is used to build an initial municipal water supply and drainage system model based on the processed data, including a pipe network sub-model, a water demand sub-model, and a drainage sub-model; The model optimization module is used to optimize the parameters of the initial municipal water supply and drainage system model using the federated particle swarm algorithm to obtain the optimal model parameters and thus obtain the final municipal water supply and drainage system model.

9. A municipal water supply and drainage system model building device, characterized in that: The municipal water supply and drainage system model building device includes a memory and at least one processor, wherein instructions are stored in the memory; the at least one processor calls the instructions in the memory so that the municipal water supply and drainage system model building device executes each step of the municipal water supply and drainage system model building method as described in any one of claims 1-7.

10. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the various steps of the method for constructing a municipal water supply and drainage system model as described in any one of claims 1 to 7 are implemented.