Complex building water supply and drainage pipeline wiring optimization system based on data analysis

CN122927019APending Publication Date: 2026-10-16ZHEJIANG YUOU CONSTR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611089106.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-22
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0004]上述常规的给排水管道布线优化系统存在几何寻优与流体物理约束割裂导致布线方案可行性低的技术问题

Benefits of technology

1.本发明将流体连续性方程与伯努利方程转化为图节点特征更新的非线性约束函数,在图神经网络的消息传递阶段,计算相邻图节点间的高程差与水头损失梯度,并依据水头损失梯度重新分配边特征的连接权重,执行基于物理约束的图拓扑重构。通过将流场物理方程内化为图节点特征更新与边权重分配的计算规则,将事后流体力学校验前置为寻优过程中的特征更新约束,消除纯几何寻优产生的重力倒坡与水压失稳路径。在消息传递迭代中,将流体连续性方程离散化至体素空间尺度建立入流量总和与出流量总和的等式约束作为第一惩罚项,当流量差值超出守恒容差时对特征向量进行负向梯度修正,并将伯努利方程与达西公式结合构建压降计算模型,将预测水头损失沿高程差方向的水头损失梯度作为第二惩罚项对违背重力流要求的特征向量进行投影修正。这种物理特征嵌入机制使得图拓扑重构结果直接满足重力流坡度与水压平衡要求,无需独立的事后仿真校验迭代,获得满足物理流场特性的三维管道拓扑,提升复杂建筑给排水管网系统的水力稳定性与布线方案一次生成成功率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122927019A_ABST
    Figure CN122927019A_ABST
Patent Text Reader

Abstract

The application belongs to the field of computer data processing and relates to a complex building water supply and drainage pipeline wiring optimization system based on data analysis. The system constructs a three-dimensional voxel graph model containing building structure placeholders and pipeline nodes; extracts node water pressure, flow and gravity slope parameters as graph node features, and extracts pipe sections as edge features; in the graph neural network message passing stage, the fluid continuity equation and Bernoulli equation are converted into nonlinear constraint functions for updating the graph node features, and the elevation difference and water head loss gradient between adjacent graph nodes are calculated; the edge feature connection weight is redistributed according to the water head loss gradient, and the graph topology reconstruction based on physical constraints is performed. The application eliminates the inverted slope and water pressure instability path generated by geometric optimization, places the fluid force verification in front of the optimization feature update constraint, reduces the verification rework, obtains a pipeline topology that meets the flow field characteristics, and improves the hydraulic stability and wiring success rate of the pipeline network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer data processing and relates to a complex building water supply and drainage pipeline wiring optimization system based on data analysis. Background Technology

[0002] Optimization of water supply and drainage pipeline routing in complex buildings typically employs data processing methods based on spatial geometry optimization. Conventional routing systems acquire building information model (BIM) data, identify the building's internal 3D spatial structure, and discretize the space occupied by the building structure (including load-bearing walls, beams, columns, and pre-reserved openings) and the start and end nodes of the water supply and drainage pipelines, transforming this into a 3D voxel graph model. In this model, the start and end nodes of the water supply and drainage pipelines are abstracted as graph nodes, and pipe segments are abstracted as edge features. Based on this 3D voxel graph model, conventional systems use shortest path search algorithms or conventional graph neural network algorithms, with the objective function of minimizing geometric distance or spatial conflict, to perform path planning within the feasible domain of the building structure's footprint, generating a preliminary 3D spatial routing plan for the water supply and drainage pipelines.

[0003] After generating the initial geometric routing, conventional water supply and drainage pipeline routing systems require a fluid dynamics verification process. The system exports the initially planned pipeline routing, segment lengths, pipe diameters, and node elevations to a separate fluid simulation software to establish a corresponding hydraulic calculation model. Within this simulation software, based on the fluid continuity equation and Bernoulli's equation, the system calculates the friction loss, local head loss, and actual water pressure distribution at each node for each pipe segment. This verifies whether the gravity flow gradient of the drainage pipeline meets the gravity flow requirements and whether the water pressure in the water supply pipeline is in equilibrium. If the verification results do not meet the laws of fluid physics, technicians must manually adjust the pipeline routing, elevation, or pipe diameter, and then import the modified data back into the fluid simulation software for repeated verification and iteration until a routing scheme that meets hydraulic constraints is generated.

[0004] The aforementioned conventional water supply and drainage pipeline routing optimization system suffers from a technical problem: the disconnect between geometric optimization and fluid physics constraints leads to low feasibility of the routing scheme. Conventional systems rely solely on geometric distance and spatial occupancy as optimization criteria during the graph model construction and path search phases, failing to internalize the fluid continuity equation and Bernoulli's equation into the iterative optimization calculations of the graph neural network. This results in the generated initial geometric paths significantly violating the distribution laws of gravity flow slope and water pressure gradient. Subsequent post-compliance fluid dynamics verification, as a check independent of the optimization process, cannot guide path correction from a global topology perspective. This makes it difficult for the verification iterations to converge to a globally feasible solution, leading to high rework rates. Furthermore, the geometric optimization results' incompatibility with fluid physics laws result in low feasibility of the routing scheme. Summary of the Invention

[0005] The purpose of this invention is to provide a data analysis-based optimization system for the wiring of complex building water supply and drainage pipelines, which can effectively solve the problems mentioned in the background art.

[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A data-driven system for optimizing the wiring of complex building water supply and drainage pipes includes: The graphical model building end is used to discretize the three-dimensional space containing the building structure footprint and the start and end nodes of water supply and drainage pipes into voxels, and to build a three-dimensional voxel graphical model. The feature extraction end is used to extract the water pressure, flow rate, and gravity slope parameters of the water supply and drainage pipeline nodes as graph node features, and to extract the pipe segments as edge features; The constraint message passing end is used to transform the fluid continuity equation and Bernoulli equation into nonlinear constraint functions for updating the features of the graph nodes during the message passing stage of the graph neural network, and to calculate the elevation difference and head loss gradient between adjacent graph nodes. The topology reconstruction end is used to redistribute the connection weights of the edge features according to the head loss gradient, perform graph topology reconstruction based on physical constraints, and output a three-dimensional coordinate sequence of water supply and drainage pipeline nodes that satisfy the gravity flow slope and water pressure balance.

[0007] Preferably, the graph model building end further performs the following: acquiring the building information model data of complex buildings, and identifying the three-dimensional bounding boxes of load-bearing walls, beam and column structures and reserved holes in the building information model data; The three-dimensional bounding box is mapped into a voxel space of a preset resolution. Voxels that intersect with the load-bearing wall and beam-column structure are given an inaccessible occupancy attribute, voxels that intersect with the reserved holes are given a passable occupancy attribute, and voxels that do not occupy structural space are given a free optimization attribute. Based on the non-traversable occupant attribute, traversable occupant attribute, and free optimization attribute, the node feasible domain space of the three-dimensional voxel graph model is constructed.

[0008] Preferably, the feature extraction end further performs the following: obtaining the design load data and topology connection requirements of the water supply and drainage network; Calculate the expected flow vector for each of the water supply and drainage pipeline nodes based on the design load data; The gravity slope parameter is calculated based on the expected flow vector and the spatial elevation coordinates of the water supply and drainage nodes. The expected flow vector, the gravity slope parameter, and the preset nodal water pressure boundary conditions are concatenated to generate multi-dimensional graph node features. Simultaneously, the pipe segment length, the initial value of the current pipe diameter, and the pipe segment roughness coefficient between adjacent water supply and drainage pipe nodes are extracted as the edge features.

[0009] Preferably, the constraint message passing end further performs the following: during the message passing stage of the graph neural network, for any target graph node, aggregate the upstream flow vector and upstream water pressure parameters of all upstream graph nodes adjacent to the target graph node; The fluid continuity equation is discretized to the voxel space scale, and the equality constraints between the sum of the inflow and the sum of the outflow of the target graph nodes are established. The equality constraint is used as the first penalty term of the nonlinear constraint function. During the feature update process of the target graph node, when the difference between the sum of the inflow and the sum of the outflow exceeds the preset conservation tolerance, the feature vector of the target graph node is negatively gradient corrected through the first penalty term.

[0010] Preferably, the constraint message transmission terminal also performs the following: for any two adjacent graph nodes, extracting the spatial elevation difference between the two graph nodes and the friction coefficient along the pipe segment; By combining the Bernoulli equation with the Darcy formula, a pressure drop calculation model is constructed that includes the spatial elevation difference, velocity head, and friction head loss. The predicted head loss between two adjacent graph nodes is calculated based on the pressure drop calculation model, and the head loss gradient along the spatial elevation difference direction is calculated. The head loss gradient is used as the second penalty term of the nonlinear constraint function to project and correct the feature vectors that violate the requirements of gravity flow.

[0011] Preferably, the constraint message transmission terminal further performs the following: in the t-th iteration feature update of the graph neural network, obtain the graph node hidden layer feature vector output by the (t-1)-th iteration; Calculate the first gradient direction corresponding to the first penalty term and the second gradient direction corresponding to the second penalty term; The first gradient direction and the second gradient direction are weighted and fused to generate a comprehensive physical constraint gradient; The graph node hidden layer feature vector is backpropagated and corrected based on the comprehensive physical constraint gradient to obtain the graph node update feature for the t-th iteration, until the difference between the sum of inflow and the sum of outflow and the predicted head loss both satisfy the convergence condition.

[0012] Preferably, the feature extraction end further performs the following: during the message passing iteration of the graph neural network, dynamically adjusting the initial value of the current pipe diameter in the edge features based on the expected flow vector in the graph node update features generated by the current iteration; Based on the adjusted initial value of the current pipe diameter and the roughness coefficient of the pipe segment, the friction coefficient of the pipe segment is recalculated. The recalculated friction coefficient of the pipe segment is used as the input edge feature for the next message passing iteration, and participates in the recalculation of the head loss along the pipe segment in the pressure drop calculation model until the change in the initial value of the current pipe diameter of the pipe segment is less than the preset pipe diameter change threshold.

[0013] Preferably, the topology reconstruction end further performs: obtaining the head loss gradient in the graph node update features, and reading the inaccessible occupancy attribute, accessible occupancy attribute, and free optimization attribute in the node feasible domain space; Set the edge weights between voxels corresponding to the non-traversable occupant attribute to infinity, set the edge weights between voxels corresponding to the free optimization attribute to a monotonically increasing function of the head loss gradient, and set the edge weights between voxels corresponding to the traversable occupant attribute to the product of the monotonically increasing function of the head loss gradient and the traversal cost coefficient. Shortest path search is performed based on the reassigned edge weights to generate the graph topology reconstruction result.

[0014] Preferably, the path smoothing end is used to obtain the three-dimensional coordinate sequence of the water supply and drainage pipeline nodes output by the topology reconstruction end; Identify the abrupt change in direction in the three-dimensional coordinate sequence of the water supply and drainage pipeline nodes, and extract the abrupt change in direction and its adjacent nodes to form a set of local control points; A three-dimensional uniform B-spline curve is used to spatially fit the set of local control points to generate a smooth pipe segment centerline that satisfies the minimum bending radius constraint. Replace the corresponding polyline segment in the original three-dimensional coordinate sequence of the water supply and drainage pipeline node with the centerline of the smoothed pipe segment, and output the smoothed three-dimensional trajectory of the water supply and drainage pipeline wiring.

[0015] Preferably, the scheme evaluation end is used to obtain multiple sets of three-dimensional coordinate sequences of candidate water supply and drainage pipeline nodes output by the topology reconstruction end; For each group of candidate water supply and drainage pipeline node three-dimensional coordinate sequence, extract the total length of pipe segment, the total elevation difference of pipe segment and the distribution index of pipe diameter specifications. Input the total length of the pipe segment, the total elevation difference of the pipe segment, and the pipe diameter specification distribution index into the pre-constructed multi-objective cost evaluation model to calculate the weighted sum of the pipe material cost evaluation value and the hydraulic energy consumption evaluation value. The multiple sets of candidate water supply and drainage pipeline node 3D coordinate sequences are sorted according to the weighted sum from smallest to largest, and the candidate water supply and drainage pipeline node 3D coordinate sequence with the first position in the sort is extracted as the final wiring optimization result output.

[0016] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention transforms the fluid continuity equation and Bernoulli equation into nonlinear constraint functions for updating graph node features. During the message passing phase of the graph neural network, the elevation difference and head loss gradient between adjacent graph nodes are calculated, and the connection weights of edge features are redistributed based on the head loss gradient, performing graph topology reconstruction based on physical constraints. By internalizing the flow field physical equations into calculation rules for graph node feature updates and edge weight allocation, post-event fluid dynamics verification is moved forward to the feature update constraint during the optimization process, eliminating gravity slope and hydraulic instability paths generated by pure geometric optimization. In the message passing iteration, the fluid continuity equation is discretized to a voxel space scale to establish an equality constraint between the sum of inflow and outflow as the first penalty term. When the flow difference exceeds the conservation tolerance, a negative gradient correction is applied to the feature vector. Furthermore, the Bernoulli equation and Darcy's formula are combined to construct a pressure drop calculation model. The predicted head loss gradient along the elevation difference direction is used as the second penalty term to project and correct feature vectors that violate gravity flow requirements. This physical feature embedding mechanism enables the graph topology reconstruction results to directly meet the requirements of gravity flow slope and water pressure balance, without the need for independent post-simulation verification iterations. It obtains a three-dimensional pipe topology that meets the physical flow field characteristics, improving the hydraulic stability of complex building water supply and drainage pipe network systems and the success rate of generating wiring schemes on the first attempt.

[0017] 2. In the message passing iteration process of the graph neural network, this invention dynamically adjusts the initial value of the current pipe diameter in the edge features based on the expected flow vector in the updated features of the graph nodes generated in the current iteration. Based on the adjusted pipe diameter and roughness coefficient, the friction coefficient of the pipe segment is recalculated and used as the input edge feature for the next iteration to participate in the pressure drop recalculation, achieving a dynamic balance between pipe diameter and hydraulic resistance. During the topology reconstruction stage, the inaccessible, accessible, and free-optimization attributes in the feasible domain space of the nodes are read. The edge weights of the inaccessible voxels are set to infinity, the edge weights of the free-optimization voxels are set to a monotonically increasing function of the head loss gradient, and the edge weights of the accessible voxels are set to the product of this monotonically increasing function and the crossing cost coefficient. Based on the reassigned edge weights, the shortest path search is performed to avoid pipeline crossings of load-bearing structures and reduce construction difficulty. After obtaining the node 3D coordinate sequence output by the topology reconstruction, the direction abrupt change inflection points are identified. A 3D uniform B-spline curve is used to spatially fit the local control point set, generating a smooth pipe segment centerline that satisfies the minimum bending radius constraint. The total length of pipe segments, the total elevation difference of pipe segments, and the distribution index of pipe diameter specifications of multiple candidate sequences are extracted and input into a multi-objective cost evaluation model. The weighted sum of the pipe material cost evaluation value and the hydraulic energy consumption evaluation value is calculated and sorted to output the final wiring optimization result, so as to achieve the comprehensive optimization of pipe material and hydraulic energy consumption. Attached Figure Description

[0018] Figure 1 This is the overall flowchart of the system's end-to-end cabling optimization according to the present invention; Figure 2 This is a flowchart of the BIM parsing, voxel assignment, and feasible domain space construction process of the graphical model construction end of the present invention; Figure 3 This is a flowchart of the feature extraction process for multi-dimensional features of end nodes and pipe segment edge features in this invention. Figure 4 This is a flowchart of the constraint message passing terminal's dual physical constraint construction and gradient fusion iterative update process of the present invention; Figure 5 This is a flowchart illustrating the differential assignment of edge weights for topology reconstruction and the generation of pipeline topology based on weight optimization in this invention. Figure 6 This is a flowchart illustrating the pipeline B-spline smoothing process and multi-objective cost evaluation for selecting the best final solution according to the present invention. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0020] Please refer to Figure 1 This embodiment provides a data analysis-based system for optimizing the wiring of water supply and drainage pipes in complex buildings. It optimizes the wiring of water supply and drainage pipes in complex buildings by internalizing fluid physics constraints into the message passing process of a graph neural network, enabling simultaneous geometric optimization and hydraulic constraints. During system operation, each module works collaboratively according to a preset data flow logic to complete the entire process from building space modeling to the final wiring scheme output.

[0021] In one embodiment, reference Figure 2The graph model building end receives 3D spatial data containing building structure locations and the start and end nodes of water supply and drainage pipes. It discretizes this 3D space into uniformly distributed voxel units and constructs a 3D voxel graph model based on these voxel units. The discretization process uses a uniform segmentation method, dividing the building's 3D space into several cubic units according to preset voxel side lengths. Each voxel unit corresponds to a unique location in the 3D space, and the voxel coordinates are represented using 3D integer coordinates, establishing a corresponding mapping relationship with the building's world coordinate system. The start and end nodes of the water supply and drainage pipes are mapped to the corresponding voxel units, serving as the initial nodes of the 3D voxel graph model. The feature extraction end extracts water pressure, flow rate, and gravity slope parameters of the water supply and drainage pipe nodes from a preset water supply and drainage design database, integrating these parameters into graph node features; simultaneously, it extracts pipe segment information between adjacent pipe nodes, integrating it into edge features. In the message passing phase of the graph neural network, the constraint message passing end transforms the fluid continuity equation and Bernoulli equation into nonlinear constraint functions for updating graph node features. During feature updates, features that do not meet physical constraints are corrected. Simultaneously, the elevation difference and head loss gradient between adjacent graph nodes are calculated, providing a basis for subsequent topology reconstruction. Based on the head loss gradient output by the constraint message passing end, the topology reconstruction end reallocates the connection weights of edge features in the 3D voxel graph model, performs a physically constraint-based graph topology reconstruction operation, and finally outputs a sequence of 3D coordinates of water supply and drainage pipeline nodes that meet the requirements of gravity flow slope and water pressure balance.

[0022] This embodiment integrates fluid physics constraints into the optimization process of the graph neural network through the collaborative work of the graph model construction end, feature extraction end, constraint message transmission end and topology reconstruction end. This achieves simultaneous consideration of geometric space constraints and fluid physics constraints, avoiding wiring results that do not conform to the laws of fluid physics generated by pure geometric optimization.

[0023] In one embodiment, the graphical model builder acquires Building Information Model (BIM) data of a complex building and identifies the 3D bounding boxes of load-bearing walls, beam-column structures, and reserved openings within the BIM data. The BIM data is stored in an Industrial Basic Class (IBC) format. The graphical model builder reads this format data using a built-in IFC parser, extracting the geometric information of structural components such as IfcWall, IfcColumn, and IfcBeam, as well as the geometric information of reserved opening components such as IfcOpeningElement. For each structural component, the parser extracts its representative shape's IfcExtrudedAreaSolid entity, obtaining the entity's extrusion direction, extrusion length, and cross-sectional profile data. By traversing all vertex coordinates of the cross-sectional profile and combining the extrusion direction and length, the coordinates of all vertices of the component in the world coordinate system are calculated. The geometric information extraction process for reserved opening components is the same as for structural components. Based on all extracted vertex coordinates, the minimum axis-aligned bounding box of each component is calculated. The bounding box's range is determined by the minimum and maximum values ​​of the x, y, and z coordinates of all vertices of the component.

[0024] The 3D bounding box is mapped to a voxel space with a preset resolution. Voxels intersecting with load-bearing walls and beams are assigned an "impassable" occupancy attribute, voxels intersecting with pre-reserved openings are assigned a "passable" occupancy attribute, and voxels without structural occupancy are assigned a free optimization attribute. The resolution of the voxel space is set according to the building's scale and wiring accuracy requirements, with voxel side lengths ranging from 0.1m to 0.5m. During the mapping process, the world coordinates of each component's 3D bounding box are converted to integer coordinates in the voxel space using the following formula: , , ,in , , Let be the three-dimensional integer coordinates of the voxel. , , These are the coordinates in the world coordinate system. , , The minimum world coordinates in the three-dimensional space of the building. Let be the side length of the voxel. For each voxel, determine whether it intersects with the 3D bounding box of any structural member. The method for determining intersection is to compare whether the coordinate range of the voxel overlaps with the coordinate range of the bounding box. If there is an overlap, the voxel is considered to intersect with that member. If the voxel intersects with the bounding box of a load-bearing wall or beam-column structure, the voxel is assigned the "Impassable Occupied" attribute; if the voxel intersects with the bounding box of a reserved opening, the voxel is assigned the "Passable Occupied" attribute; if the voxel does not intersect with the bounding box of any structural member or reserved opening, the voxel is assigned the "Free Optimization" attribute.

[0025] The node feasible region space of the 3D voxel graph model is constructed based on the non-traversable occupancy attribute, traversable occupancy attribute, and free optimization attribute. The node feasible region space consists of all voxels with traversable occupancy and free optimization attributes. Voxels with non-traversable occupancy attributes are excluded from the feasible region, and pipeline routing can only be performed within the feasible region space. Each node in the 3D voxel graph model corresponds to a voxel within a feasible region. The edges between nodes correspond to the connection relationships between adjacent voxels. Adjacent voxels include 6 face-adjacent voxels, 12 edge-adjacent voxels, and 8 vertex-adjacent voxels, for a total of 26 adjacent voxels. The mapping relationship between voxel attributes and feasible regions is shown in Table 1.

[0026] Table 1. Mapping Relationship between Voxel Attributes and Feasible Region Table 1 shows the intersecting objects, their states in the feasible region, and the base values ​​of edge weights corresponding to different voxel attributes. Voxels corresponding to the "Impassable Placeholder" attribute do not allow pipes to pass through them, so their base edge weight is set to infinity, and paths passing through this type of voxel are automatically excluded during path search. Voxels corresponding to the "Passable Placeholder" attribute allow pipes to pass through but require additional construction costs, so their base edge weight is higher than that of voxels with the "Free Optimization" attribute. Voxels corresponding to the "Free Optimization" attribute are preferred areas for pipe routing, and their base edge weight is set to 1.0.

[0027] This embodiment constructs an accurate node feasible domain space by voxelizing and mapping the building structure and assigning different attributes. This provides a clear spatial constraint basis for subsequent path optimization and ensures that the generated wiring scheme will not conflict with the building's load-bearing structure.

[0028] In one embodiment, reference Figure 3 The feature extraction end acquires the design load data and topology connection requirements of the water supply and drainage network. The design load data includes the design flow rate per second at each water usage point, the design drainage volume at each drainage point, and the location coordinates of each water usage point and drainage point. The topology connection requirements include the connection relationships between the inlet nodes of the water supply pipeline and each water usage node, and the connection relationships between each drainage node and the outlet nodes of the drainage pipeline. The design load data and topology connection requirements are stored in a pre-set water supply and drainage design database, and the feature extraction end reads the relevant data from this database through a data interface.

[0029] The expected flow vector for each water supply and drainage pipeline node is calculated based on design load data. For the water supply pipeline system, the node flow balance method is used to calculate the expected flow of each node. Starting from the inlet node, the total flow of the inlet node is distributed to each downstream node according to the topological connection relationship. The expected flow of each downstream node is equal to the sum of the design flow rates per second of all water usage points connected to it. For the drainage pipeline system, the node flow balance method is also used. Starting from each drainage node, the drainage volume of the drainage node is aggregated to the upstream node, and finally aggregated to the outlet node. The expected flow of each node is equal to the sum of the drainage volumes of all downstream drainage nodes connected to it. The expected flow vector is a three-dimensional vector, the magnitude of which is equal to the expected flow value of the node, and the direction is consistent with the water flow direction.

[0030] The gravity slope parameter is calculated based on the expected flow vector and the spatial elevation coordinates of the water supply and drainage nodes. For any two adjacent pipe nodes, the gravity slope parameter is calculated as the ratio of the elevation difference between the two nodes to the horizontal distance between them. The elevation difference is the difference between the z-coordinates of the upstream and downstream nodes, and the horizontal distance is the Euclidean distance between the two nodes in the xy-plane. For drainage pipes, the gravity slope parameter must be positive to meet the requirements of gravity flow; for water supply pipes, the gravity slope parameter can be positive or negative, but it must meet the water pressure balance requirements.

[0031] The expected flow vector, gravity gradient parameter, and preset nodal water pressure boundary conditions are concatenated to generate multi-dimensional graph node features. The nodal water pressure boundary conditions are set according to the type and location of the pipeline. For the inlet node of a water supply pipeline, the preset water pressure is the municipal water supply pressure; for the outlet node of a drainage pipeline, the preset water pressure is atmospheric pressure; for intermediate nodes, the initial water pressure value is preliminarily estimated based on the node's elevation and the expected flow. During the vector concatenation process, the three components of the expected flow vector, one component of the gravity gradient parameter, and one component of the nodal water pressure are sequentially concatenated to form a 7-dimensional graph node feature vector.

[0032] Simultaneously, the pipe segment length, initial value of the current pipe diameter, and pipe segment roughness coefficient between adjacent water supply and drainage pipe nodes are extracted as edge features. The pipe segment length is the Euclidean distance between two adjacent nodes, calculated as follows: ,in and These represent the world coordinates of two adjacent nodes. The initial value of the current pipe diameter is initially selected based on the expected flow rate in the design load data, with the selection principle being to ensure that the fluid velocity within the pipe segment is within the economic velocity range. The pipe roughness coefficient is set according to the pipe material; different pipe materials correspond to different roughness coefficients. For example, the absolute roughness of steel pipe is 0.045 mm, and the absolute roughness of plastic pipe is 0.0015 mm. Table 2 shows the descriptions of the node and edge features.

[0033] Table 2. Description of Node and Edge Features in the Graph Table 2 details the dimensions, physical meaning, and value range of each component of the graph node and edge features. Graph node features are 8-dimensional vectors, and edge features are 3-dimensional vectors. All feature values ​​are real numbers, and their ranges are determined based on the specific engineering requirements. Node coordinate features describe the node's position in three-dimensional space, providing a foundation for subsequent elevation difference calculations and topology reconstruction.

[0034] This embodiment extracts multi-dimensional node and edge features to comprehensively describe the hydraulic and spatial characteristics of the water supply and drainage pipeline system, providing a complete data foundation for subsequent constraint message passing and topology reconstruction.

[0035] In one embodiment, during the message passing phase of the graph neural network, the constraint message passing end aggregates the upstream flow vectors and upstream water pressure parameters of all upstream graph nodes adjacent to the target graph node for any given target graph node. The graph neural network adopts a graph convolutional network structure, containing an input layer, three hidden layers, and an output layer. The input layer receives initial graph node features and edge features, the hidden layers perform message passing and feature update operations, and the output layer outputs the final updated graph node features. The message passing process of each hidden layer includes an aggregation phase and an update phase. The aggregation phase aggregates the features of adjacent nodes, and the update phase generates new features based on the aggregated features and its own features. The definition of an upstream node is determined according to the water flow direction. For water supply pipes, an upstream node is a node located before the target node in the water flow direction; for drainage pipes, an upstream node is a node located before the target node in the water flow direction. The aggregation method uses a weighted summation, where the weight is the reciprocal of the pipe segment length in the edge features between adjacent nodes. The weight calculation formula is... ,in For nodes To the node Aggregate weights, For nodes With nodes The length of the pipe section between them.

[0036] The fluid continuity equation is discretized to a voxel space scale, establishing equality constraints between the sum of inflow and outflow at each node of the target graph. The fluid continuity equation describes the law of mass conservation in the fluid flow process; for incompressible fluids, the sum of inflow at each node equals the sum of outflow at each node. The discretized fluid continuity equation is as follows: in, For the target graph node, For target graph nodes The set of upstream nodes corresponding to all incoming edges. For target graph nodes The set of downstream nodes corresponding to all outgoing edges. upstream node Flow to target graph node Traffic, For target graph nodes Flowing to downstream nodes Traffic, For target graph nodes The difference in flow rate. When The absolute value is less than or equal to the preset conservation tolerance. When, it is assumed that the nodes of the target graph satisfy the fluid continuity constraint; when The absolute value is greater than At that time, it is considered that the nodes in the target graph do not satisfy the fluid continuity constraint. Conservation tolerance. The value ranges from 0.001 to 0.01 L / s. The tolerance value is adjusted according to the accuracy requirements of the project. The higher the accuracy requirement, the smaller the tolerance value.

[0037] Using the equality constraint as the first penalty term in the nonlinear constraint function, during the feature update process of the target graph nodes, when the difference between the sum of the inflow and the sum of the outflow exceeds the preset conservation tolerance, the feature vector of the target graph node is negatively corrected through the first penalty term. The expression for the first penalty term is: Its gradient direction is ,in For a sign function, when hour, ;when hour, ;when hour, . For flow difference The gradient relative to the eigenvector of the target graph node is calculated using the chain rule. The negative gradient correction process involves adjusting the eigenvector of the target graph node in the opposite direction of the gradient of the first penalty term to reduce the flow difference and ensure that the target graph node satisfies the fluid continuity constraint.

[0038] Furthermore, for any two adjacent graph nodes, the constraint message passing end extracts the spatial elevation difference and the friction factor of the pipe segment. The spatial elevation difference is the z-coordinate of the upstream node minus the z-coordinate of the downstream node. For drainage pipes, the spatial elevation difference needs to be positive to ensure that the fluid can flow by gravity. The friction factor of the pipe segment is calculated based on the pipe diameter, roughness coefficient, and Reynolds number. The formula for calculating the Reynolds number is... ,in The average flow velocity of the fluid within the pipe section. For the pipe section diameter, The kinematic viscosity of a fluid, for water at room temperature, The value is .

[0039] By combining Bernoulli's equation and Darcy's formula, a pressure drop calculation model is constructed that incorporates spatial elevation difference, velocity head, and friction head loss. Bernoulli's equation describes the energy conservation law for an ideal fluid flow process, while Darcy's formula describes the friction head loss law for fluid flow in a pipe. The combined pressure drop calculation model is as follows: in, and These are the elevations of the upstream and downstream nodes, respectively. and The water pressure at the upstream and downstream nodes are respectively. Let be the density of the fluid; for water, The value is , Let gravitational acceleration be the acceleration due to gravity, and its value be [value missing]. , and These represent the fluid velocities at the upstream and downstream nodes, respectively. This refers to the head loss along the pipe section. Calculated using Darcy's formula: in, This is the friction coefficient along the pipe section. For the length of the pipe section, For the pipe section diameter, Let be the average fluid velocity within the pipe section. Substituting Darcy's formula into Bernoulli's equation yields a complete pressure drop calculation model, which can accurately calculate the head loss and pressure change between two adjacent nodes.

[0040] The predicted head loss between two adjacent graph nodes is calculated based on the pressure drop calculation model, and the head loss gradient along the spatial elevation difference direction is also calculated. The formula for calculating the head loss gradient is as follows: in, For the head loss gradient, This represents the spatial elevation difference between the upstream and downstream nodes. For drainage pipelines, when... When the elevation of the downstream node is higher than that of the upstream node, the head loss gradient is negative, indicating the existence of gravity backslope, which violates the requirements of gravity flow.

[0041] The head loss gradient is used as the second penalty term in the nonlinear constraint function to project and correct the eigenvectors that violate the gravity flow requirements. The expression for the second penalty term is: Its gradient direction is ,in The gradient of the head loss gradient relative to the eigenvectors of the target map nodes is calculated using the chain rule. The projection correction process involves projecting the eigenvectors of the target map nodes onto a feature space that satisfies the gravity flow requirements. Specifically, when the head loss gradient is negative, the elevation coordinates of the nodes are adjusted to ensure that... This makes the head loss gradient positive, thus satisfying the requirements of gravity flow.

[0042] This embodiment transforms the fluid continuity equation and Bernoulli equation into two penalty terms of a nonlinear constraint function. During the graph node feature update process, features that do not meet the physical constraints are corrected in real time, ensuring that the generated pipeline layout gradually approaches the fluid physics laws in each iteration.

[0043] In one embodiment, reference Figure 4 In the t-th iteration of the graph neural network's feature update, the constraint message relay obtains the hidden layer feature vector of the graph node output from the (t-1)-th iteration. The hidden layer feature vector of the graph node is an 8-dimensional vector containing information such as node flow rate, water pressure, and elevation, with the same dimension as the initial graph node feature vector. The hidden layer feature vector of the 0th iteration is the initial graph node feature vector.

[0044] Calculate the first gradient direction corresponding to the first penalty term and the second gradient direction corresponding to the second penalty term. The first gradient direction is... The direction of the second gradient is The calculation method is as described above. For each graph node, its corresponding first gradient direction and second gradient direction are calculated respectively. The gradient direction is a vector with the same dimension as the hidden layer feature vector.

[0045] The first gradient direction and the second gradient direction are weighted and fused to generate the comprehensive physical constraint gradient. The formula for calculating the comprehensive physical constraint gradient is as follows: in, To integrate physical constraint gradients, The weighting coefficient for the first penalty term. The weighting coefficient for the second penalty term. and The values ​​of are all in the range (0,1), and . and The value of is adjusted according to actual engineering needs. When the requirement for flow conservation is high, increase . The value of is determined by the gradient; when a higher gradient is required for gravity flow, the value of is increased. The value of can be set. For example, for drainage pipe systems, gravity flow has more stringent requirements and can be configured as follows: , For water supply pipeline systems, the requirements for flow conservation are more stringent, and settings can be configured... , .

[0046] The hidden feature vectors of graph nodes are corrected through backpropagation based on the gradient of the comprehensive physical constraints, resulting in the updated features of the graph nodes in the t-th iteration. The backpropagation correction process uses the gradient descent method, and the update formula is as follows: ,in For the nodes of the target graph after the t-th iteration The hidden layer feature vectors For the target graph nodes after the (t-1)th iteration The hidden layer feature vectors Let be the learning rate. An adaptive learning rate adjustment strategy is employed: a larger learning rate is used in the early stages of iteration to accelerate convergence, while a smaller learning rate is used in the later stages to improve convergence accuracy. The formula for adjusting the learning rate is: ,in This is the initial learning rate, ranging from 0.01 to 0.1. This is the attenuation coefficient, with a value ranging from 0.001 to 0.01. This represents the number of iterations.

[0047] Repeat the above iterative process until the difference between the total inflow and total outflow, as well as the predicted head loss, both satisfy the convergence condition. The convergence condition is that for all graph nodes, And for all adjacent graph nodes, ,in The preset head loss tolerance ranges from 0.01 to 0.1 m. When the convergence condition is met, iteration stops, and the final graph node update features are output. If the convergence condition is not met even after the preset maximum number of iterations, iteration stops, and the current graph node update features are output. The maximum number of iterations ranges from 100 to 1000.

[0048] This embodiment uses an iterative feature update process to comprehensively consider flow conservation and gravity flow constraints, gradually correcting the graph node features until the convergence condition is met, ensuring that the generated pipeline layout simultaneously meets the requirements of flow conservation and water pressure balance.

[0049] In one embodiment, during the message passing iteration of the graph neural network, the feature extraction end updates the expected flow vector in the features based on the graph nodes generated in the current iteration, and dynamically adjusts the initial value of the current pipe diameter in the edge features. The pipe diameter adjustment is based on the fluid velocity within the pipe segment being within the economic flow rate range. The economic flow rate is set according to the pipe material and purpose; for water supply pipes, the economic flow rate is generally 1.0 to 2.0 m / s; for drainage pipes, the economic flow rate is generally 0.6 to 2.0 m / s. The pipe diameter adjustment formula is as follows: in, The adjusted pipe diameter The expected flow rate within the pipe section, The economic flow rate for each pipe segment is given. Based on the expected flow vector in the updated graph node features of the current iteration, the expected flow rate for each pipe segment is calculated. The expected flow rate of a pipe segment is equal to the expected flow rate of the upstream node of that pipe segment. (The expected flow rate is then...) and the preset economic flow rate Substituting into Formula 5, the adjusted pipe diameter is calculated. The adjusted pipe diameter needs to conform to the standard pipe diameter specification. The calculated pipe diameter should be rounded up to the nearest standard pipe diameter.

[0050] Based on the adjusted initial value of the current pipe diameter and the pipe roughness coefficient, the friction coefficient of the pipe section is recalculated. The calculation uses different formulas depending on the fluid flow state. At that time, the fluid is in a laminar flow state, and the friction coefficient is calculated using the formula... Calculate; when At this time, the fluid is in a transition state, and the friction coefficient is calculated using an empirical formula. Calculate; when When the fluid is in a turbulent state, the friction factor is calculated using the Moody formula, which is expressed as follows: ,in Let be the absolute roughness of the pipe section. The Moody formula is an implicit equation, solved using an iterative method, with the iteration process continuing until the result is obtained from two calculations. The difference is kept until it is less than 0.0001.

[0051] The recalculated friction coefficient of the pipe segment is used as the input edge feature for the next message passing iteration, participating in the recalculation of head loss in the pressure drop calculation model. During each iteration of the graph neural network, the pipe diameter adjustment and friction coefficient recalculation operations are performed, and the updated edge features are input into the constraint message passing process of the next iteration. This process of pipe diameter adjustment and friction coefficient calculation is repeated until the change in the initial value of the current pipe diameter is less than a preset pipe diameter change threshold. Pipe diameter change threshold The value range is from 0.001 to 0.01 m. When the pipe diameter change is less than... When the pipe diameter and hydraulic resistance reach a dynamic equilibrium, pipe diameter adjustment is stopped.

[0052] This embodiment achieves a dynamic balance between pipe diameter and hydraulic resistance by dynamically adjusting the pipe diameter and friction coefficient during the iteration process, ensuring that the fluid velocity in the pipe section is always within the economic velocity range and reducing the hydraulic energy consumption of the pipe network.

[0053] In one embodiment, reference Figure 5 The topology reconstruction end obtains the head loss gradient from the graph node update features and reads the inaccessible occupant attributes, accessible occupant attributes, and free optimization attributes from the node feasible region space. The head loss gradient is extracted from the graph node update features output by the constraint message passing end, with each adjacent node pair corresponding to a head loss gradient value. The voxel attributes of the node feasible region space are read from the 3D voxel graph model output by the graph model construction end.

[0054] The edge weights between voxels corresponding to the inaccessible placeholder attribute are set to infinity. The edge weights between voxels corresponding to the free optimization attribute are set to a monotonically increasing function of the head loss gradient. The edge weights between voxels corresponding to the accessible placeholder attribute are set to the product of the monotonically increasing function of the head loss gradient and the crossing cost coefficient. The calculation rules for the edge weights are shown in Table 3. Table 3. Rules for calculating edge weights for different voxel attributes. Table 3 shows the edge weight calculation rules for different voxel attributes. The monotonically increasing function for the head loss gradient is a linear function. This function has a simple form, high computational efficiency, and is suitable for most engineering scenarios. In other preferred embodiments, the monotonically increasing function can also be an exponential function. or power function ,in For positive integers, different function forms are suitable for different head loss gradient change scenarios. Crossing cost coefficient. The value of the crossing cost coefficient is adjusted according to the construction difficulty of the reserved hole. The greater the construction difficulty, the greater the value of the crossing cost coefficient. For example, for a reserved hole with a smaller diameter, the crossing cost coefficient can be 3.0; for a reserved hole with a larger diameter, the crossing cost coefficient can be 1.5.

[0055] Shortest path search is performed based on the reassigned edge weights to generate graph topology reconstruction results. The shortest path search uses Dijkstra's algorithm to find the shortest path from the starting node to the ending node of the pipeline. The total weight of the path is the sum of the weights of all edges on the path. The Dijkstra algorithm executes as follows: the distance to the starting node is initialized to 0, and the distances to all other nodes are set to infinity. Then, the unvisited node with the smallest distance is selected each time, and the distances to its adjacent nodes are updated. This process is repeated until the ending node is reached; the distance to the ending node is then the total weight of the shortest path. Backtracking yields the node sequence of the shortest path. Since edge weights are positively correlated with the gradient of head loss, the shortest path is the path with the minimum head loss, while also satisfying spatial constraints. For water supply and drainage pipeline systems with multiple branches, the shortest path search is performed on each branch separately, and then the paths of all branches are concatenated to obtain the complete pipeline topology.

[0056] This embodiment generates a pipeline topology that satisfies both spatial and hydraulic constraints by redistributing edge weights based on the head loss gradient and voxel properties and performing shortest path search. This avoids pipelines crossing load-bearing structures and reduces the construction difficulty of pipelines crossing reserved holes.

[0057] In one embodiment, reference Figure 6 The path smoothing end obtains the 3D coordinate sequence of the water supply and drainage pipeline nodes output by the topology reconstruction end. The 3D coordinate sequence of the water supply and drainage pipeline nodes is a series of 3D coordinate points arranged in the direction of water flow. Each coordinate point corresponds to the center coordinate of a voxel, and the interval between coordinate points is the side length of the voxel. Due to the discreteness of the voxelization process, there may be abrupt turning points in the output coordinate sequence. These turning points will cause an increase in the local head loss of the pipeline, so smoothing processing is required.

[0058] Abrupt directional change inflection points are identified in the 3D coordinate sequence of water supply and drainage pipeline nodes. These inflection points and their adjacent nodes are then extracted to form a set of local control points. The method for identifying abrupt directional change inflection points is as follows: for the first node in the sequence... Nodes ( , (The total number of nodes in the sequence), calculate the vector. with vector The angle between The formula for calculating the included angle is: .when Less than the preset angle threshold At that time, it was believed This is a turning point where the direction abruptly changes. Angle threshold. The value ranges from 90° to 150°. The smaller the angle threshold, the fewer abrupt changes in direction are identified.

[0059] A three-dimensional uniform B-spline curve is used to spatially fit the local control point set, generating a smooth pipe segment centerline that satisfies the minimum bending radius constraint. The expression for the three-dimensional uniform B-spline curve is as follows: in, For points on the B-spline curve, This is a parameter, and its value range is [0,1]. Let k be uniform B-spline basis functions. As control points, Let be the number of control points. The recursive formula for the k-th degree uniform B-spline basis function is: in, Let be the node vector. For a uniform B-spline, the node vector is . , In this embodiment, a cubic uniform B-spline curve is used, i.e. There are four control points, including abrupt change in direction inflection points. and one adjacent node before and after it. and and in and An auxiliary control point inserted between The coordinates of the auxiliary control points are .

[0060] After fitting, the minimum bending radius of the B-spline curve is calculated. The formula for calculating the bending radius is as follows: ,in The first derivative of the B-spline curve. This is the second derivative of the B-spline curve. If the minimum bending radius is greater than or equal to the preset minimum bending radius... If the minimum bending radius is less than 1, then the fitting result is considered to meet the requirements; if the minimum bending radius is less than 1, then the fitting result is considered to meet the requirements. If the minimum bending radius constraint is not met, adjust the position of the auxiliary control points and refit the model until the minimum bending radius constraint is satisfied. The minimum bending radius is determined based on the pipe diameter and material, and is generally 3 to 10 times the pipe diameter. For example, for a DN100 steel pipe, the minimum bending radius is 300mm; for a DN100 plastic pipe, the minimum bending radius is 500mm.

[0061] The smoothed pipe segment centerline replaces the corresponding polyline segment in the original 3D coordinate sequence of the water supply and drainage pipeline nodes, outputting the smoothed 3D trajectory of the water supply and drainage pipeline layout. During the replacement process, the B-spline curve is sampled at a preset sampling interval to obtain a series of smoothed coordinate points, which are then used to replace the original sequence's polyline segments. arrive The sampling interval ranges from 0.1m to 0.5m; the smaller the sampling interval, the more accurate the generated smooth trajectory.

[0062] This embodiment uses a three-dimensional uniform B-spline curve to fit the inflection point of abrupt change in direction, generating a smooth pipe segment centerline that satisfies the minimum bending radius constraint, reducing local head loss in the pipeline and improving the hydraulic stability of the pipe network.

[0063] In one embodiment, the scheme evaluation end obtains multiple sets of three-dimensional coordinate sequences of candidate water supply and drainage pipeline nodes output by the topology reconstruction end. These multiple candidate sequences are determined by setting different edge weight ratios during the topology reconstruction stage. and the cost coefficient of crossing The generation method involves randomly generating 10 to 20 different sets of values ​​within a preset range. and For each combination, a topology reconstruction operation is performed to obtain a set of candidate routing sequences. The more candidate sequences there are, the greater the probability of finding the optimal solution, but the greater the computational cost. Therefore, a balance needs to be struck between computational efficiency and optimization effectiveness.

[0064] For each set of candidate water supply and drainage pipeline node 3D coordinate sequences, the total pipe segment length, the sum of pipe segment elevation differences, and the pipe diameter distribution indicators are extracted. The total pipe segment length is the sum of the Euclidean distances between all adjacent nodes in the sequence, calculated as follows: ,in This represents the total number of nodes in the sequence. The total elevation difference of the pipe segment is the sum of the absolute values ​​of the elevation differences between all adjacent nodes in the sequence, calculated as follows: The pipe diameter distribution index is the proportion of pipe segment lengths of different diameters to the total length in the sequence, calculated as follows: ,in For the first Total length of pipe sections of various diameters For the first The percentage of pipe length for each pipe diameter.

[0065] The total length of the pipe segment, the sum of the elevation differences of the pipe segments, and the distribution of pipe diameter specifications are input into a pre-constructed multi-objective cost evaluation model to calculate the weighted sum of the pipe material cost evaluation value and the hydraulic energy consumption evaluation value. The formula for calculating the pipe material cost evaluation value is as follows: in, This is the cost evaluation value for pipe materials. For the number of pipe sections, For the first The length of each pipe section For the first The cost per unit length of pipe for each pipe segment is determined based on the pipe diameter and material of the segment and is stored in a pre-set pipe price database.

[0066] The formula for calculating the evaluation value of hydraulic kinetic energy consumption is as follows: in, This is the evaluation value for hydraulic kinetic energy consumption. For water, the specific weight of the fluid is... The value is , For the first Flow rate of each pipe segment For the first The head loss along the pipe section is calculated using Darcy's formula.

[0067] The comprehensive cost evaluation value is the weighted sum of the pipe material cost evaluation value and the hydraulic energy consumption evaluation value, calculated using the following formula: ,in This is the comprehensive cost evaluation value. This is a weighting coefficient for pipe material costs. This is the weighting coefficient for the consumption of hydraulic kinetic energy. and The values ​​of are all in the range (0,1), and The weight allocation of the multi-objective evaluation indicators is shown in Table 4.

[0068] Table 4. Weight Allocation Table for Multi-Objective Evaluation Indicators Table 4 shows the weight coefficients, value ranges, and adjustment criteria for each indicator in the multi-objective evaluation model. The pipe cost evaluation value is obtained by weighting two sub-indicators: total pipe length and pipe diameter distribution. The weight coefficients are as follows: and , When project budgets are tight, increase the weighting factor for pipe material costs. When there are high requirements for the long-term operating costs of the pipeline network, the weighting coefficient of hydraulic energy consumption should be increased. .

[0069] The three-dimensional coordinate sequences of multiple candidate water supply and drainage pipeline nodes are sorted in ascending order of weighted sum. The three-dimensional coordinate sequence of the candidate water supply and drainage pipeline node at the top of the sorted list is extracted as the final routing optimization result. If multiple candidate sequences have the same comprehensive cost evaluation value, their pipe material cost evaluation value is compared, and the sequence with the smaller pipe material cost evaluation value is selected as the final result. If the pipe material cost evaluation values ​​are also the same, their hydraulic energy consumption evaluation values ​​are compared, and the sequence with the smaller hydraulic energy consumption evaluation value is selected as the final result.

[0070] This embodiment constructs a multi-objective cost evaluation model, comprehensively considers pipe material cost and hydraulic energy consumption, evaluates and ranks multiple candidate wiring schemes, and outputs the comprehensive optimal wiring result, thus achieving a comprehensive balance between pipe material cost and hydraulic energy consumption.

Claims

1. A data analysis-based optimization system for complex building water supply and drainage pipeline wiring, characterized in that, include: The graphical model building end is used to discretize the three-dimensional space containing the building structure footprint and the start and end nodes of water supply and drainage pipes into voxels, and to build a three-dimensional voxel graphical model. The feature extraction end is used to extract the water pressure, flow rate, and gravity slope parameters of the water supply and drainage pipeline nodes as graph node features, and to extract the pipe segments as edge features; The constraint message passing end is used to transform the fluid continuity equation and Bernoulli equation into nonlinear constraint functions for updating the features of the graph nodes during the message passing stage of the graph neural network, and to calculate the elevation difference and head loss gradient between adjacent graph nodes. The topology reconstruction end is used to redistribute the connection weights of the edge features according to the head loss gradient, perform graph topology reconstruction based on physical constraints, and output a three-dimensional coordinate sequence of water supply and drainage pipeline nodes that satisfy the gravity flow slope and water pressure balance.

2. The complex building water supply and drainage pipeline wiring optimization system based on data analysis according to claim 1, characterized in that, The graph model building end further performs the following: acquiring the building information model data of complex buildings, and identifying the three-dimensional bounding boxes of load-bearing walls, beam and column structures and reserved holes in the building information model data; The three-dimensional bounding box is mapped into a voxel space of a preset resolution. Voxels that intersect with the load-bearing wall and beam-column structure are given an inaccessible occupancy attribute, voxels that intersect with the reserved holes are given a passable occupancy attribute, and voxels that do not occupy structural space are given a free optimization attribute. Based on the non-traversable occupant attribute, traversable occupant attribute, and free optimization attribute, the node feasible domain space of the three-dimensional voxel graph model is constructed.

3. The complex building water supply and drainage pipeline wiring optimization system based on data analysis according to claim 1, characterized in that, The feature extraction end further performs the following: obtaining the design load data and topology connection requirements of the water supply and drainage network; Calculate the expected flow vector for each of the water supply and drainage pipeline nodes based on the design load data; The gravity slope parameter is calculated based on the expected flow vector and the spatial elevation coordinates of the water supply and drainage nodes. The expected flow vector, the gravity slope parameter, and the preset nodal water pressure boundary conditions are concatenated to generate multi-dimensional graph node features. Simultaneously, the pipe segment length, the initial value of the current pipe diameter, and the pipe segment roughness coefficient between adjacent water supply and drainage pipe nodes are extracted as the edge features.

4. The complex building water supply and drainage pipeline wiring optimization system based on data analysis according to claim 3, characterized in that, The constraint message passing end further executes: in the message passing stage of the graph neural network, for any target graph node, it aggregates the upstream flow vector and upstream water pressure parameters of all upstream graph nodes adjacent to the target graph node; The fluid continuity equation is discretized to a voxel space scale, and equality constraints are established between the sum of inflow and outflow of the target graph nodes. The equality constraint is used as the first penalty term of the nonlinear constraint function. During the feature update process of the target graph node, when the difference between the sum of the inflow and the sum of the outflow exceeds the preset conservation tolerance, the feature vector of the target graph node is negatively gradient corrected through the first penalty term.

5. The complex building water supply and drainage pipeline wiring optimization system based on data analysis according to claim 4, characterized in that, The constraint message transmission terminal also performs the following: for any two adjacent graph nodes, extract the spatial elevation difference between the two graph nodes and the friction coefficient of the pipe segment; By combining the Bernoulli equation with the Darcy formula, a pressure drop calculation model is constructed that includes the spatial elevation difference, velocity head, and friction head loss. The predicted head loss between two adjacent graph nodes is calculated based on the pressure drop calculation model, and the head loss gradient along the spatial elevation difference direction is calculated. The head loss gradient is used as the second penalty term of the nonlinear constraint function to project and correct the feature vectors that violate the requirements of gravity flow.

6. The complex building water supply and drainage pipeline wiring optimization system based on data analysis according to claim 5, characterized in that, The constraint message passing terminal also performs the following: in the t-th iteration feature update of the graph neural network, obtain the hidden layer feature vector of the graph node output in the (t-1)-th iteration; Calculate the first gradient direction corresponding to the first penalty term and the second gradient direction corresponding to the second penalty term; The first gradient direction and the second gradient direction are weighted and fused to generate a comprehensive physical constraint gradient; The graph node hidden layer feature vector is backpropagated and corrected based on the comprehensive physical constraint gradient to obtain the graph node update feature for the t-th iteration, until the difference between the sum of inflow and the sum of outflow and the predicted head loss both satisfy the convergence condition.

7. The complex building water supply and drainage pipeline wiring optimization system based on data analysis according to claim 5, characterized in that, The feature extraction end also performs the following: during the message passing iteration of the graph neural network, dynamically adjusts the initial value of the current pipe diameter in the edge feature based on the expected flow vector in the graph node update feature generated by the current iteration; Based on the adjusted initial value of the current pipe diameter and the roughness coefficient of the pipe segment, the friction coefficient of the pipe segment is recalculated. The recalculated friction coefficient of the pipe segment is used as the input edge feature for the next message passing iteration, and participates in the recalculation of the head loss along the pipe segment in the pressure drop calculation model until the change in the initial value of the current pipe diameter of the pipe segment is less than the preset pipe diameter change threshold.

8. The complex building water supply and drainage pipeline wiring optimization system based on data analysis according to claim 2, characterized in that, The topology reconstruction end further performs the following: obtaining the head loss gradient in the graph node update features, and reading the inaccessible occupancy attribute, accessible occupancy attribute, and free optimization attribute in the node feasible domain space; Set the edge weights between voxels corresponding to the non-traversable occupant attribute to infinity, set the edge weights between voxels corresponding to the free optimization attribute to a monotonically increasing function of the head loss gradient, and set the edge weights between voxels corresponding to the traversable occupant attribute to the product of the monotonically increasing function of the head loss gradient and the traversal cost coefficient. Shortest path search is performed based on the reassigned edge weights to generate graph topology reconstruction results.

9. The complex building water supply and drainage pipeline wiring optimization system based on data analysis according to claim 1, characterized in that, It also includes a path smoothing end, used to obtain the three-dimensional coordinate sequence of water supply and drainage pipeline nodes output by the topology reconstruction end; Identify the abrupt change in direction in the three-dimensional coordinate sequence of the water supply and drainage pipeline nodes, and extract the abrupt change in direction and its adjacent nodes to form a set of local control points; A three-dimensional uniform B-spline curve is used to spatially fit the set of local control points to generate a smooth pipe segment centerline that satisfies the minimum bending radius constraint. Replace the corresponding polyline segment in the original three-dimensional coordinate sequence of the water supply and drainage pipeline node with the centerline of the smoothed pipe segment, and output the smoothed three-dimensional trajectory of the water supply and drainage pipeline wiring.

10. The complex building water supply and drainage pipeline wiring optimization system based on data analysis according to claim 1, characterized in that, It also includes a scheme evaluation terminal, used to obtain multiple sets of candidate water supply and drainage pipeline node three-dimensional coordinate sequences output by the topology reconstruction terminal; For each group of candidate water supply and drainage pipeline node three-dimensional coordinate sequence, extract the total length of pipe segment, the total elevation difference of pipe segment and the distribution index of pipe diameter specifications. Input the total length of the pipe segment, the total elevation difference of the pipe segment, and the pipe diameter specification distribution index into the pre-constructed multi-objective cost evaluation model to calculate the weighted sum of the pipe material cost evaluation value and the hydraulic energy consumption evaluation value. The multiple sets of candidate water supply and drainage pipeline node 3D coordinate sequences are sorted according to the weighted sum from smallest to largest, and the candidate water supply and drainage pipeline node 3D coordinate sequence with the first position in the sort is extracted as the final wiring optimization result output.