A residential drainage pipe design optimization method and system

By extracting the location of drainage equipment and calculating the distance of the equipment in the residential structure image, combining dynamic optimization algorithms and drainage attributes, the design of residential drainage pipelines is optimized, and the problem of low design accuracy in the existing technology is solved, achieving more efficient and reliable drainage Pipeline layout.

CN118133394BActive Publication Date: 2024-11-12CHINA CONSTRUCTION SIXTH ENGINEERING BUREAU GENERAL CONTRACTING ENGINEERING CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410308967.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-19
Publication Date
2024-11-12
Estimated Expiration
2044-03-19

AI Technical Summary

Technical Problem

The design optimization technology of existing residential drainage pipes has low accuracy and the influencing factors cannot be fully considered, resulting in insufficient design.

Method used

By obtaining residential structure images, extracting drainage equipment locations and calculating equipment distances, calculating the optimal pipeline diameter and slope using dynamic optimization algorithms and drainage properties, generating multi-dimensional pipeline opening positions, and optimizing drainage pipeline layout to improve efficiency and reliability.

Benefits of technology

It improves the accuracy and efficiency of drainage pipe design, ensures the optimal flow rate and flow of the pipe at all locations, reduces energy consumption and maintenance costs, and enhances the safety and reliability of the drainage structure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118133394B_ABST
    Figure CN118133394B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of material science and technology, and discloses a residential drainage pipeline design optimization method and system, including: extracting drainage equipment positions in a residential structure image, calculating drainage equipment distances between drainage equipment positions one by one; generating main drainage pipeline directions and branch drainage pipeline directions according to drainage equipment distances and drainage pipeline directions, and generating drainage pipeline layout of a target residential house through the main drainage pipeline directions and branch drainage pipeline directions; calculating the optimal pipeline diameter in the drainage pipeline layout, and calculating the optimal pipeline slope of the ramp position in the residential structure image according to the optimal pipeline diameter and drainage attributes; generating multidimensional pipeline port positions in the drainage pipeline layout through pipeline path states and pipeline intersection positions; optimizing the drainage pipeline layout according to the optimal pipeline diameter, the optimal pipeline slope and the multidimensional pipeline port positions, and obtaining the optimal drainage pipeline layout. The present invention can improve the accuracy of residential drainage pipeline design optimization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of material science and technology, and in particular to a residential drainage pipeline design optimization method and system. Background Art

[0002] With the acceleration of urbanization, the scale and density of residential construction are increasing. Residential drainage pipes are one of the indispensable infrastructures in buildings, and play a vital role in ensuring the hygiene and comfort of the residential environment. In order to improve the drainage efficiency of the house, reduce odor and water pollution, and improve the quality of life of residents, it is necessary to optimize the residential drainage pipes.

[0003] The existing residential drainage pipe design optimization technology is to minimize the pipe length and resistance by reasonably planning and arranging the direction of the pipe to improve the drainage efficiency. In practical applications, the design of residential drainage pipes is not only about the direction of the pipes, but also includes a variety of influencing factors. Only considering the direction of the residential drainage pipes may lead to too one-sided optimization of the residential drainage pipe design, resulting in low accuracy in the optimization of the residential drainage pipe design. Summary of the invention

[0004] The present invention provides a residential drainage pipeline design optimization method and system, the main purpose of which is to solve the problem of low accuracy when performing residential drainage pipeline design optimization.

[0005] To achieve the above object, the present invention provides a residential drainage pipe design optimization method, comprising:

[0006] S1. Acquire a residential structure image of a target residence, extract drainage equipment positions in the residential structure image, and calculate drainage equipment distances between the drainage equipment positions one by one;

[0007] S2. Generate the direction of the main drainage pipe and the direction of the branch drainage pipe according to the distance of the drainage equipment and the preset direction of the drainage pipe, and generate the drainage pipe layout of the target house through the direction of the main drainage pipe and the direction of the branch drainage pipe;

[0008] S3, using a preset dynamic optimization algorithm and a preset drainage attribute to calculate an optimal pipe diameter in the drainage pipe layout, and calculating an optimal pipe slope at a ramp position in the residential structure image according to the optimal pipe diameter and the preset drainage attribute, wherein the using a preset dynamic optimization algorithm and a preset drainage attribute to calculate the optimal pipe diameter in the drainage pipe layout includes:

[0009] S31, extracting the peak value of water flow at each drainage device location in the preset drainage attribute;

[0010] S32, determining the influencing factor of each drainage device location according to the pipe material properties of the drainage device location;

[0011] S33, using the following preset dynamic optimization algorithm to calculate the optimal pipe diameter in the drainage pipe layout according to the water flow peak value and the influencing factor:

[0012]

[0013] Wherein, D is the optimal pipe diameter, δ is the pipe diameter optimization factor, m is the water flow peak value, π is the pi, α is the material empirical coefficient in the influencing factor, q is the pipe pressure loss in the influencing factor, and p is the pipe liquid density in the influencing factor;

[0014] S4, generating a multi-dimensional pipe opening position in the drainage pipe layout according to a preset pipe path state and a preset pipe intersection position;

[0015] S5. Optimize the drainage pipeline layout according to the optimal pipeline diameter, the optimal pipeline slope and the multi-dimensional pipeline port position to obtain the optimal drainage pipeline layout.

[0016] Optionally, extracting the location of the drainage equipment in the residential structure image includes:

[0017] Gray-scaling the residential structure image to obtain a residential structure grayscale image;

[0018] Graying the preset drainage equipment template image to obtain a drainage equipment template graying image;

[0019] Extract the starting area of ​​the residential structure grayscale image, slide the drainage equipment template grayscale image on the residential structure grayscale image one by one according to the starting area, and obtain the pixel correlation coefficient, wherein the pixel correlation coefficient calculation formula is:

[0020]

[0021] Wherein, γ is the pixel correlation coefficient, x ij is the pixel value of the i-th row and j-th column of the grayscale image of the residential structure, y ij is the pixel value of the i-th row and j-th column in the grayscale image of the drainage equipment template, u is the total dimension of the number of rows, and v is the total dimension of the number of columns;

[0022] When the pixel correlation coefficient is equal to a preset correlation coefficient threshold, the drainage device position corresponding to the drainage device is extracted.

[0023] Optionally, calculating the drainage device distances between the drainage device positions one by one includes:

[0024] Extracting the device center coordinates of the drainage device location;

[0025] The drainage equipment distances between the drainage equipment positions are calculated one by one according to the equipment center coordinates, wherein the drainage equipment distance calculation formula is:

[0026]

[0027] Among them, d kt is the drainage equipment distance between the kth drainage equipment and the tth drainage equipment, a k is the horizontal coordinate value of the center coordinate of the kth drainage device, b k is the ordinate value of the center coordinate of the kth drainage device, a t is the horizontal coordinate value of the center coordinate of the tth drainage device, b t It is the ordinate value of the equipment center coordinate of the tth drainage equipment.

[0028] Optionally, generating the direction of the main drainage pipe and the direction of the branch drainage pipe according to the distance of the drainage equipment and the preset direction of the drainage pipe includes:

[0029] Generate an undirected distance graph of the drainage pipeline according to the location of the drainage equipment and the distance of the drainage equipment;

[0030] Determine the drainage starting point and drainage ending point in the undirected distance graph of the drainage pipeline according to the preset drainage pipeline direction, and calculate the main drainage shortest path from the drainage starting point to the drainage ending point;

[0031] Generate the main drainage pipeline direction through the main drainage shortest path;

[0032] Mark the drainage nodes and the drainage edges in the main drainage shortest path in the drainage pipe undirected distance graph to obtain marked drainage nodes and marked drainage edges;

[0033] The direction of the branch drainage pipe is generated according to the marked drainage node and the marked drainage edge.

[0034] Optionally, the generating the direction of the branch drainage pipe according to the marked drainage node and the marked drainage edge includes:

[0035] Determine a branch drainage node in the undirected distance graph of the drainage pipe according to the marked drainage node, and determine a branch drainage edge in the undirected distance graph of the drainage pipe according to the marked drainage edge;

[0036] Deleting the drainage start point and the drainage end point in the marked drainage node to obtain a target drainage node;

[0037] According to the branch drainage node and the target drainage node, the branch drainage edge is selected as a target branch drainage edge;

[0038] A branch drainage path is generated according to the target branch drainage edge, and a branch drainage pipeline direction is generated according to the branch drainage path.

[0039] Optionally, the generating of the drainage pipe layout of the target residence by the direction of the main drainage pipe and the direction of the branch drainage pipe includes:

[0040] Selecting the drainage pipeline direction with the shortest drainage equipment distance among the branch drainage pipeline directions as the target branch drainage pipeline direction;

[0041] Connecting the target branch drainage pipeline direction to the main drainage pipeline direction to generate a target drainage pipeline path;

[0042] The drainage pipe layout of the target residence is generated according to the target drainage pipe path.

[0043] Optionally, the calculating the optimal pipe slope at the ramp position in the residential structure image according to the optimal pipe diameter and the preset drainage attribute includes:

[0044] extracting ramp attribute data of the ramp position in the residential structure image;

[0045] Optimizing the pipeline data of the drainage pipeline at the ramp position according to the ramp attribute data to obtain optimal pipeline data;

[0046] Extracting the average flow rate of the pipe at the ramp position in the drainage attribute;

[0047] The optimal pipeline slope of the ramp position in the residential structure is calculated according to the optimal pipeline diameter, the optimal pipeline data and the average pipeline flow, wherein the optimal pipeline slope calculation formula is:

[0048]

[0049] Among them, R is the optimal pipeline slope, h1 is the starting point height value in the optimal pipeline data of the drainage pipeline, h2 is the end point height value in the optimal pipeline data of the drainage pipeline, L is the horizontal length of the pipeline in the optimal pipeline data of the drainage pipeline, Q is the average flow rate of the pipeline, C is the flow coefficient, D is the optimal pipeline diameter, γ is the pipeline slope optimization factor, and θ is the pipeline slope change factor.

[0050] Optionally, the generating of the multi-dimensional pipe opening position in the drainage pipe layout by using the preset pipe path state and the preset pipe intersection position includes:

[0051] When the pipeline path state is a non-abnormal state, the horizontal length of each drainage pipeline in the drainage pipeline layout is divided into three equal parts to obtain equal division nodes;

[0052] Dispose drainage ports and inspection ports at the pipeline positions of the equally divided nodes one by one;

[0053] generating a water flow replenishment port according to the pipeline interaction position;

[0054] The position of the drainage port, the position of the inspection port and the position of the water flow replenishment port are collected to form a multi-dimensional pipe port position in the drainage pipe layout.

[0055] Optionally, the optimizing the drainage pipe layout according to the optimal pipe diameter, the optimal pipe slope and the multi-dimensional pipe port position to obtain the optimal drainage pipe layout includes:

[0056] Update the initial pipe diameter in the drainage pipe layout according to the optimal pipe diameter to obtain a target pipe diameter;

[0057] Adjusting the initial pipeline slope in the drainage pipeline layout according to the optimal pipeline slope to obtain a target pipeline slope;

[0058] configuring the multi-dimensional pipe opening position on each drainage pipe in the drainage pipe layout;

[0059] An optimal layout of the drainage pipes is generated according to the target pipe diameter, the target pipe slope and the configured drainage pipes.

[0060] In order to solve the above problems, the present invention also provides a residential drainage pipeline design optimization system, the system comprising:

[0061] A drainage equipment distance calculation module is used to obtain a residential structure image of a target residence, extract drainage equipment positions in the residential structure image, and calculate drainage equipment distances between the drainage equipment positions one by one;

[0062] A drainage pipe layout generation module, used to generate the main drainage pipe direction and the branch drainage pipe direction according to the drainage equipment distance and the preset drainage pipe direction, and generate the drainage pipe layout of the target house through the main drainage pipe direction and the branch drainage pipe direction;

[0063] An optimal pipe slope calculation module, used to calculate the optimal pipe diameter in the drainage pipe layout using a preset dynamic optimization algorithm and preset drainage properties, and calculate the optimal pipe slope at the ramp position in the residential structure image according to the optimal pipe diameter and the preset drainage properties;

[0064] A multi-dimensional pipe opening position generating module, used to generate the multi-dimensional pipe opening position in the drainage pipe layout according to the preset pipe path state and the preset pipe intersection position;

[0065] The drainage pipe layout optimization module is used to optimize the drainage pipe layout according to the optimal pipe diameter, the optimal pipe slope and the multi-dimensional pipe port position to obtain the optimal drainage pipe layout.

[0066] The embodiment of the present invention can understand the drainage demand and layout requirements inside the house by extracting the position of the drainage equipment in the residential structure image and calculating the distance between the equipment, so as to provide an accurate data basis for the subsequent pipeline design; according to the distance of the drainage equipment and the preset pipeline direction, the direction of the main drainage pipeline and the position and direction of the branch pipeline are determined to ensure the consistency and efficiency of the residential drainage structure; the optimal pipeline diameter in the drainage pipeline layout is calculated by using the dynamic optimization algorithm and the drainage attribute, and the optimal pipeline slope of the ramp position in the residential structure image is calculated to ensure that the flow velocity and flow rate of the drainage pipeline at each position are in the optimal state, thereby improving the drainage efficiency and the performance of the system; according to the pipeline path state and the pipeline intersection position, the multi-dimensional pipeline port position in the drainage pipeline layout is generated, so that the residential drainage structure is more flexible and adaptable to different drainage needs, and is also more convenient during maintenance and repair; according to the optimal pipeline diameter, the optimal pipeline slope and the multi-dimensional pipeline port position, the drainage pipeline layout is optimized to ensure that all aspects of the drainage pipeline are optimally configured, improve the drainage efficiency, reduce energy consumption and maintenance costs, and enhance the safety and reliability of the residential drainage structure. Therefore, the residential drainage pipe design optimization method and system proposed in the present invention can solve the problem of low accuracy when performing residential drainage pipe design optimization. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] Figure 1 A schematic diagram of a flow chart of a residential drainage pipe design optimization method provided by an embodiment of the present invention;

[0068] Figure 2 A schematic diagram of a flow chart for generating a drainage pipe direction according to an embodiment of the present invention;

[0069] Figure 3 A schematic diagram of a process for calculating an optimal pipe diameter provided by an embodiment of the present invention;

[0070] Figure 4 A functional module diagram of a residential drainage pipe design optimization system provided by an embodiment of the present invention;

[0071] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0072] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0073] The embodiment of the present application provides a residential drainage pipe design optimization method. The execution subject of the residential drainage pipe design optimization method includes but is not limited to at least one of the electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided by the embodiment of the present application. In other words, the residential drainage pipe design optimization method can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms.

[0074] Reference Figure 1 FIG. 1 is a flow chart of a residential drainage pipe design optimization method provided by an embodiment of the present invention. In this embodiment, the residential drainage pipe design optimization method includes:

[0075] S1. Acquire a residential structure image of a target residence, extract drainage equipment positions in the residential structure image, and calculate drainage equipment distances between the drainage equipment positions one by one.

[0076] In an embodiment of the present invention, the residential structure image refers to an image describing the internal or external structure of a house, which usually includes detailed information such as the building's floor plan, floor distribution, walls, door and window locations, stairs, and pipeline layout. Through the residential structure image, the spatial layout of the house can be clearly understood, such as the location and size of the rooms, and the location of functional areas such as bathrooms and kitchens.

[0077] In detail, the residential structure image of the target residence can be obtained from a pre-stored storage area through a computer statement with a data crawling function (such as a Java statement, a Python statement, etc.), where the storage area includes but is not limited to a database and a blockchain.

[0078] Furthermore, in order to clearly understand the specific location and quantity of each drainage device, such as toilets, shower rooms, washing machines, etc., to plan the optimal pipeline layout, and design corresponding pipelines according to the characteristics of each drainage device, it is necessary to extract the location of the drainage devices extracted from the residential structure image, so as to ensure the efficiency and smoothness of the residential drainage structure.

[0079] In the embodiment of the present invention, the drainage equipment position refers to the position where the drainage equipment needs to be configured in the residential structure image, such as the position of the kitchen drainage equipment, the position of the bathroom drainage equipment, and the like.

[0080] In the embodiment of the present invention, the step of extracting the location of the drainage equipment in the residential structure image includes:

[0081] Gray-scaling the residential structure image to obtain a residential structure grayscale image;

[0082] Graying the preset drainage equipment template image to obtain a drainage equipment template graying image;

[0083] Extract the starting area of ​​the residential structure grayscale image, slide the drainage equipment template grayscale image on the residential structure grayscale image one by one according to the starting area, and obtain the pixel correlation coefficient, wherein the pixel correlation coefficient calculation formula is:

[0084]

[0085] Wherein, γ is the pixel correlation coefficient, x ij is the pixel value of the i-th row and j-th column of the grayscale image of the residential structure, y ij is the pixel value of the i-th row and j-th column in the grayscale image of the drainage equipment template, u is the total dimension of the number of rows, and v is the total dimension of the number of columns;

[0086] When the pixel correlation coefficient is equal to a preset correlation coefficient threshold, the drainage device position corresponding to the drainage device is extracted.

[0087] In detail, the residential structure grayscale image refers to the image after the residential structure is grayed, and the drainage equipment template grayscale image is the image after the pre-prepared drainage equipment template image is grayed, wherein the color image can be converted into a grayscale image by calculating the average value of the RGB channels of the pixel points of the color image, and the drainage equipment template image generally refers to a drawing or template used to standardize and design residential drainage structures, which may include symbols, marks and schematic diagrams of various drainage equipment. Therefore, graying converts the color image into a grayscale image, removes the color information, and makes the image simpler and easier to process.

[0088] Specifically, the starting area is set by the size of the grayscale image of the drainage equipment template. For example, if the size of the grayscale image of the drainage equipment template is 2×2, the starting area refers to the 2×2 image in the upper left corner of the grayscale image of the residential structure. Then, a variable is initialized to save the pixel correlation coefficient of each sliding position. The grayscale image of the drainage equipment template is slid one by one starting from the upper left corner of the grayscale image of the residential structure. The similarity between the grayscale image of the drainage equipment template and the target image in the grayscale image of the residential structure is calculated to obtain a matching result. After traversing all the pixel positions of the starting area and the template image, the pixel correlation coefficient of each sliding position is obtained. When the pixel correlation coefficient is equal to zero, it indicates that the match is successful, and the drainage equipment position corresponding to the drainage equipment can be determined.

[0089] Exemplarily, the larger the difference in pixel correlation coefficients is, the larger the pixel difference between the two is. If the size of the grayscale image of the drainage equipment template is 2×2 and the size of the grayscale image of the residential structure is 32×32, the grayscale image of the residential structure is set in a two-dimensional coordinate system to form a 32×32 two-dimensional coordinate. The grayscale image of the drainage equipment template is slid one by one from the starting area for matching. If the horizontal coordinate [1-3] and the vertical coordinate [2-4] of the two-dimensional coordinate system of the residential structure grayscale image are matched successfully, the horizontal coordinate [1-3] and the vertical coordinate [2-4] can be determined as the drainage equipment position of the drainage equipment.

[0090] Furthermore, by analyzing the distance between drainage equipment, the correlation and interaction between the equipment can be discovered, and then the optimized design can be carried out. For example, the layout of the pipeline can be reasonably arranged according to the distance between the equipment, reducing the length of the pipeline and the amount of material used, thereby improving the drainage efficiency.

[0091] In an embodiment of the present invention, the drainage equipment distance refers to the actual physical distance between different drainage equipment. The drainage equipment may include sewers, drainage pipes, etc., in order to determine the layout and connection method of the residential drainage structure to ensure the normal operation and efficient drainage of the residential drainage structure.

[0092] In the embodiment of the present invention, the step of calculating the drainage device distances between the drainage device positions one by one includes:

[0093] Extracting the device center coordinates of the drainage device location;

[0094] The drainage equipment distances between the drainage equipment positions are calculated one by one according to the equipment center coordinates, wherein the drainage equipment distance calculation formula is:

[0095]

[0096] Among them, d ktis the drainage equipment distance between the kth drainage equipment and the tth drainage equipment, a k is the horizontal coordinate value of the center coordinate of the kth drainage device, b k is the ordinate value of the center coordinate of the kth drainage device, a t is the horizontal coordinate value of the center coordinate of the tth drainage device, b t It is the ordinate value of the equipment center coordinate of the tth drainage equipment.

[0097] In detail, the device center coordinates of each drainage device are extracted from the drainage device position in the two-dimensional coordinate system of the residential structure grayscale image. For example, if the coordinate range of the drainage device position A is the horizontal coordinate [1-3] and the vertical coordinate [2-4], then its device center coordinates are [2,3]. Then, the distances between the drainage device positions are calculated one by one according to the device center coordinates. A nested loop is used to traverse all combinations of drainage devices and calculate the distances between them respectively. Finally, the calculation results are saved in a distance list for subsequent processing and output.

[0098] Furthermore, by understanding the distance and position relationship between drainage equipment, the layout of drainage pipes can be determined, including the direction of main pipes and branch pipes, connection methods, length and diameter of pipes, etc., so that reasonable pipe layout and direction can improve the efficiency and stability of residential drainage structure.

[0099] S2. Generate the direction of the main drainage pipe and the direction of the branch drainage pipe according to the distance of the drainage equipment and the preset direction of the drainage pipe, and generate the drainage pipe layout of the target house through the direction of the main drainage pipe and the direction of the branch drainage pipe.

[0100] In the embodiment of the present invention, the direction of the main drainage pipe refers to the path and direction of the main drainage pipe from the drainage starting point to the drainage ending point. The direction of the main drainage pipe needs to be connected with various drainage equipment to ensure that the entire system can drain water effectively.

[0101] In the embodiment of the present invention, refer to Figure 2 As shown, the generating of the main drainage pipe direction and the branch drainage pipe direction according to the drainage equipment distance and the preset drainage pipe direction includes:

[0102] S21, generating an undirected distance map of the drainage pipeline according to the location of the drainage equipment and the distance of the drainage equipment;

[0103] S22, determining the drainage starting point and the drainage ending point in the undirected distance graph of the drainage pipe according to the preset drainage pipe direction, and calculating the main drainage shortest path from the drainage starting point to the drainage ending point;

[0104] S24, generating the main drainage pipeline direction through the main drainage shortest path;

[0105] S25, marking the drainage nodes and the drainage edges in the main drainage shortest path in the drainage pipe undirected distance graph to obtain marked drainage nodes and marked drainage edges;

[0106] S26. Generate the direction of the branch drainage pipe according to the marked drainage node and the marked drainage edge.

[0107] In detail, the undirected distance graph of drainage pipes refers to integrating the distance information between all drainage devices and the location information of drainage pipes into an undirected distance graph of drainage pipes, wherein the nodes represent the locations of drainage devices or pipes, and the edges represent the distances between drainage devices or pipes. Then, according to the preset direction of drainage pipes, the entrance and exit of the undirected distance graph of drainage pipes, i.e., the drainage starting point and the drainage ending point, are determined, wherein the drainage starting point refers to the first node connected to the drainage device along the preset pipe direction starting from the entrance; the drainage ending point refers to the last node connected to the drainage device along the preset pipe direction starting from the exit.

[0108] Specifically, the shortest path algorithm (such as Dijkstra algorithm, Bellman-Ford algorithm, Floyd algorithm, etc.) is used to find the main drainage shortest path from the starting point to the end point. This main drainage shortest path is the direction of the main drainage pipeline, that is, the drainage starting point is set as the current node, the distance from the drainage starting point to each node is initialized to infinity, the distance from the drainage starting point to itself is set to 0, all neighbor nodes of the current node are traversed, and their distances to the drainage starting point are updated, and a node that is closest to the drainage starting point and has not been visited is selected, and it is set as the current node. All neighbor nodes of the current node are traversed. If the distance to the node through the current node is shorter than the originally calculated distance, the distance of the node is updated, and the current node is marked as visited. If the end point is marked as visited, the search is stopped, and the shortest path from the starting point to the end point is traced back to get the direction of the main drainage pipeline.

[0109] Furthermore, based on the shortest path of the main drainage, all nodes and edges passed by the main drainage path are marked in the undirected distance graph of the drainage pipe, so as to subsequently generate the direction of the branch drainage pipe, and then generate the branch pipe connected to the main drainage pipe based on the marked drainage nodes and edges, and determine the direction and connection method of the branch pipe, so that the relationship between the various pipes and equipment in the residential drainage structure can be clearly understood, so that the structure and layout of the residential drainage structure can be optimized according to the specific situation, thereby improving the efficiency of residential drainage.

[0110] In an embodiment of the present invention, the direction of the branch drainage pipe refers to the specific layout plan of the branch drainage path on the ground generated according to the marked drainage nodes and drainage edges, and its main purpose is to achieve efficient, stable and safe operation of the branch pipe in the residential drainage structure.

[0111] In the embodiment of the present invention, the generating of the direction of the branch drainage pipe according to the marked drainage node and the marked drainage edge includes:

[0112] Determine a branch drainage node in the undirected distance graph of the drainage pipe according to the marked drainage node, and determine a branch drainage edge in the undirected distance graph of the drainage pipe according to the marked drainage edge;

[0113] Deleting the drainage start point and the drainage end point in the marked drainage node to obtain a target drainage node;

[0114] According to the branch drainage node and the target drainage node, the branch drainage edge is selected as a target branch drainage edge;

[0115] A branch drainage path is generated according to the target branch drainage edge, and a branch drainage pipeline direction is generated according to the branch drainage path.

[0116] In detail, according to the marked drainage nodes, the branch drainage nodes in the undirected distance graph of the drainage pipe are identified and marked, which are the branch nodes connected to the main drainage path, that is, the drainage nodes not marked in the undirected distance graph of the drainage pipe are regarded as branch drainage nodes; according to the marked drainage edges, the branch drainage edges in the undirected distance graph of the drainage pipe are identified and marked, which connect the branch drainage nodes and the target drainage nodes, and then the starting point and the ending point in the marked drainage nodes are deleted to obtain the target drainage node set, which are the remaining nodes excluding the starting point and the ending point, and then by comparing the branch drainage node and the target drainage node, the branch drainage edges connected to them are screened out as the target branch drainage edges, and based on the target branch drainage edges, the corresponding branch drainage paths are generated, that is, the paths connecting the branch drainage nodes and the target drainage nodes, and the branch drainage paths are taken as the direction of the branch drainage pipe.

[0117] For example, if the nodes included in the undirected distance graph of the drainage pipe are A, B, C, D, and E, and the direction of the main branch drainage pipe is ABCD, A is the starting point, D is the ending point, and point E is also included in the undirected distance graph of the drainage pipe, then point E is unmarked, that is, point E is used as a branch drainage node, so that EA, EB, EC, and ED are all branch drainage edges, and the starting point A and the ending point D are deleted from the nodes of the branch drainage pipe direction to obtain the target drainage nodes B and C. Then, the branch drainage edges are filtered according to the target drainage nodes B and C and the branch drainage node E. Only EB and EC are retained on the branch drainage edges, and EB and EC are used as target branch drainage edges. The target branch drainage edges corresponding to EB and EC are used as branch drainage paths, and the direction of the branch drainage pipe is determined according to the branch drainage path, that is, EB and EC are determined as the direction of the branch drainage pipe.

[0118] Furthermore, by rationally planning and designing the main and branch pipes of the residential drainage structure, the layout of the residential drainage structure can be optimized and optimized, thereby improving drainage efficiency and reducing drainage dead corners, thereby improving the quality of life and living environment of residents, and increasing living comfort and convenience.

[0119] In the embodiment of the present invention, the drainage pipe layout refers to the process of reasonably arranging and connecting the drainage pipes in a residential building according to drainage requirements and terrain conditions. Appropriate connection methods can be selected according to the connection points and destinations of the pipes, such as direct connection, T-type connection, Y-type connection, etc.

[0120] In the embodiment of the present invention, the generating of the drainage pipe layout of the target residence according to the direction of the main drainage pipe and the direction of the branch drainage pipe includes:

[0121] Selecting the drainage pipeline direction with the shortest drainage equipment distance among the branch drainage pipeline directions as the target branch drainage pipeline direction;

[0122] Connecting the target branch drainage pipeline direction to the main drainage pipeline direction to generate a target drainage pipeline path;

[0123] The drainage pipe layout of the target residence is generated according to the target drainage pipe path.

[0124] In detail, after determining the direction of the main drainage pipe, for each branch drainage equipment (such as bathroom, kitchen, etc.), select the branch drainage pipe direction closest to the main drainage pipe as the target branch drainage pipe direction, which can reduce the length and resistance of the drainage pipe and improve the drainage efficiency. Then connect the target branch drainage pipe to the main drainage pipe so that the drainage can flow smoothly into the main pipe. If needed, elbows, T-type connectors and other pipe fittings can be used for connection, so as to determine the path of the target drainage pipe according to the direction and connection point of the target branch drainage pipe, that is, determine the connection point of each target branch drainage pipe with the main drainage pipe, where the connection point is usually located along the main drainage pipe so that the drainage can flow smoothly into the main pipe.

[0125] For example, assuming that the main drain pipe starts from the kitchen area of ​​the house, passes through the bathroom, and finally connects to the external sewage pipe, if the kitchen requires a separate drain pipe connected to the main drain pipe, the location of the drain pipe can be selected under the kitchen sink; if the bathroom requires a separate drain pipe for drainage of the toilet, washbasin and shower, the location of the drain pipe can be arranged from under the bathroom floor and connected to the main drain pipe, thereby forming a diverse drainage pipe layout.

[0126] Furthermore, in order to ensure that the residential drainage structure has sufficient water flow and avoid poor drainage during peak hours or emergencies, thereby improving the reliability of the residential drainage structure, it is necessary to optimize the diameter of the drainage pipe to avoid problems such as pipe blockage and poor water flow.

[0127] S3. Calculate the optimal pipe diameter in the drainage pipe layout using a preset dynamic optimization algorithm and preset drainage properties, and calculate the optimal pipe slope at the ramp position in the residential structure image based on the optimal pipe diameter and the preset drainage properties.

[0128] In the embodiment of the present invention, the optimal pipe diameter refers to the most suitable pipe diameter obtained after calculation and optimization under the premise of meeting the drainage flow and speed requirements. The larger the pipe diameter, the greater its water flow capacity, so that it can withstand more flow. However, too large a pipe diameter will also increase construction costs and material waste, and will also cause the water flow speed to be too slow, prone to water accumulation and blockage problems. Therefore, it is necessary to obtain the most suitable pipe diameter.

[0129] In the embodiment of the present invention, refer to Figure 3 As shown, the method of calculating the optimal pipe diameter in the drainage pipe layout by using a preset dynamic optimization algorithm and a preset drainage attribute includes:

[0130] S31, extracting the peak value of water flow at each drainage device location in the preset drainage attribute;

[0131] S32, determining the influencing factor of each drainage device location according to the pipe material properties of the drainage device location;

[0132] S33, using the following preset dynamic optimization algorithm to calculate the optimal pipe diameter in the drainage pipe layout according to the water flow peak value and the influencing factor:

[0133]

[0134] Wherein, D is the optimal pipe diameter, δ is the pipe diameter optimization factor, m is the water flow peak value, π is the pi, α is the material empirical coefficient in the influencing factor, q is the pipe pressure loss in the influencing factor, and p is the pipe liquid density in the influencing factor.

[0135] In detail, the peak water flow refers to the maximum amount of water that the drainage equipment needs to discharge within a certain period of time, wherein the peak water flow of the drainage equipment at each drainage equipment location can be obtained based on the information on equipment performance and technical parameters that the manufacturer of the drainage equipment usually provides. In addition, the influence factor of the pipe at each drainage equipment location on the pipe diameter is determined based on the pipe material at each drainage equipment location, that is, the influence factor includes the empirical coefficient of the pipe material, the pipe pressure loss and the standard liquid density of the pipe.

[0136] Specifically, in the dynamic optimization algorithm, α is an empirical coefficient related to the pipeline material, which can be found in relevant standards or manuals. Different materials and pipeline types have different empirical coefficients. q is the pressure loss in the pipeline, usually in Pascal (Pa). The pipeline pressure loss depends on the pipeline length and the flow properties of the liquid in the pipeline material properties. The pipeline pressure loss is given by q = (f × (L / D) × (ρ × V 2 )) / 2, where f is the friction factor (unitless), L is the length of the pipe (m), D is the initial pipe diameter (m), and ρ is the liquid density (kg / m 3 ), V represents the liquid flow rate (m / s), and the friction factor f is a complex parameter that can be estimated or determined experimentally based on factors such as pipe material, roughness, and Reynolds number; p is the density of the liquid, usually expressed in kilograms per cubic meter (kg / m 3 ) units, the density of the liquid is usually determined based on known density records.

[0137] Furthermore, when selecting the pipe diameter, future expansion needs should also be considered. If the drainage volume is expected to increase in the future, a slightly larger pipe diameter can be selected to leave room. Therefore, the pipe diameter optimization factor δ needs to be configured. The pipe diameter optimization factor δ can be customized to increase or decrease to ensure that the residential drainage structure can cope with future changes in demand.

[0138] Furthermore, it is necessary to optimize not only the pipe diameter, but also the pipe slope. By setting a suitable pipe slope, drainage can be quickly flowed to the designated outlet, improving drainage efficiency. The appropriate slope ensures sufficient water flow speed and prevents water accumulation and blockage.

[0139] In the embodiment of the present invention, the optimal pipeline slope refers to a slope that enables water in the pipeline to flow smoothly and achieve the best drainage effect under given drainage conditions.

[0140] In an embodiment of the present invention, the step of calculating the optimal pipe slope at the ramp position in the residential structure image according to the optimal pipe diameter and the preset drainage attribute includes:

[0141] extracting ramp attribute data of the ramp position in the residential structure image;

[0142] Optimizing the pipeline data of the drainage pipeline at the ramp position according to the ramp attribute data to obtain optimal pipeline data;

[0143] Extracting the average flow rate of the pipe at the ramp position in the drainage attribute;

[0144] The optimal pipeline slope of the ramp position in the residential structure is calculated according to the optimal pipeline diameter, the optimal pipeline data and the average pipeline flow, wherein the optimal pipeline slope calculation formula is:

[0145]

[0146] Among them, R is the optimal pipeline slope, h1 is the starting point height value in the optimal pipeline data of the drainage pipeline, h2 is the end point height value in the optimal pipeline data of the drainage pipeline, L is the horizontal length of the pipeline in the optimal pipeline data of the drainage pipeline, Q is the average flow rate of the pipeline, C is the flow coefficient, D is the optimal pipeline diameter, γ is the pipeline slope optimization factor, and θ is the pipeline slope change factor.

[0147] In detail, the ramp attribute data includes the slope length, slope height, and ramp angle of the pipeline, and image processing technology, such as edge detection, contour extraction and other methods, can be used to identify and extract the characteristics of the ramp position, and analyze the extracted ramp characteristics, including attributes such as slope length, slope height, and ramp angle. The ramp attribute data can be obtained by measuring pixel distance, calculating angles, etc., and then the pipeline data of the drainage pipe is optimized according to the ramp attribute data. The pipeline data of the drainage pipe includes a starting height value, an end height value, and a horizontal length of the pipeline, so as to obtain the optimal starting height value, end height value, and horizontal length of the pipeline. The optimization process refers to configuring the horizontal length of the pipeline according to the ramp length, and configuring the starting height value and end height value according to the ramp height and ramp angle.

[0148] Specifically, the average flow rate of the pipeline is calculated based on the cumulative value of the flow rate at the ramp position within a period of time counted by the pressure sensor, and then the optimal pipeline slope at the ramp position in the residential structure is calculated based on the optimal pipeline diameter, the optimal pipeline data and the average pipeline flow rate. When calculating the optimal pipeline slope, the pipeline slope may change due to construction quality or force majeure factors. Therefore, it is necessary to change the optimal pipeline slope in real time. The pipeline slope optimization factor θ is used for real-time optimization, so as to select the optimal pipeline slope formula according to the pipeline slope change factor θ. When the pipeline slope change factor θ<0, it indicates that there is no change in the pipeline slope in the vertical and horizontal directions. The smaller the change in the pipeline slope, the better the stability of the pipeline; and when the pipeline slope change factor θ≥0, it indicates the change in the pipeline slope in the vertical and horizontal directions. The change in the pipeline slope needs to be eliminated by the pipeline slope optimization factor γ. If the pipeline slope changes greatly upward in the vertical and horizontal directions, it is necessary to reduce the pipeline slope optimization factor γ to obtain the optimal pipeline slope.

[0149] Furthermore, in order to eliminate the air pressure in the pipes in long-distance or complex-layout drainage pipes, avoid problems caused by negative pressure, and facilitate subsequent pipe maintenance and cleaning, it is necessary to configure drain ports and inspection ports in the pipes to improve drainage efficiency.

[0150] S4. Generate a multi-dimensional pipe outlet position in the drainage pipe layout according to a preset pipe path state and a preset pipe intersection position.

[0151] In the embodiment of the present invention, the multi-dimensional pipeline port position refers to the position where the drainage port, the inspection port and the water flow replenishment port are arranged on the pipeline.

[0152] In an embodiment of the present invention, the method of generating the multi-dimensional pipe opening position in the drainage pipe layout by using the preset pipe path state and the preset pipe intersection position includes:

[0153] When the pipeline path state is a non-abnormal state, the horizontal length of each drainage pipeline in the drainage pipeline layout is divided into three equal parts to obtain equal division nodes;

[0154] Dispose drainage ports and inspection ports at the pipeline positions of the equally divided nodes one by one;

[0155] generating a water flow replenishment port according to the pipeline interaction position;

[0156] The position of the drainage port, the position of the inspection port and the position of the water flow replenishment port are collected to form a multi-dimensional pipe port position in the drainage pipe layout.

[0157] In detail, it is first necessary to determine the starting point, end point and path status of the drainage pipe to ensure that there are no abnormal conditions in the pipe path, such as obstacles, intersections, etc., and then under non-abnormal conditions, for each drainage pipe, divide its horizontal length into three equal parts to obtain equal division nodes, that is, divide the pipe length into three parts evenly, set an equal division node at a certain distance, and configure drainage outlets and inspection ports one by one at the pipe position of the equal division node. The number and position of the drainage outlets and inspection ports of each pipe can be determined according to the design requirements and flow requirements of the pipeline, and set them on the equal division nodes.

[0158] Specifically, the water flow replenishment port is used to replenish the air that may exist in the drainage pipe to ensure the normal operation of the residential drainage structure. It is set at the intersection or other location where the water flow replenishment port is required according to the design requirements and flow requirements of the pipeline. The location of the drainage outlet, the location of the inspection port and the location of the water flow replenishment port are brought together to form a multi-dimensional pipe outlet position in the drainage pipe layout, which can facilitate the subsequent maintenance and management of the residential drainage structure.

[0159] Furthermore, by optimizing the drainage pipe layout based on the determined optimal pipe diameter, optimal pipe slope and multi-dimensional pipe port position, problems such as pipe blockage and leakage can be avoided, the stability and reliability of the residential drainage structure can be improved, and multi-dimensional design optimization of the residential drainage pipe can be achieved.

[0160] S5. Optimize the drainage pipeline layout according to the optimal pipeline diameter, the optimal pipeline slope and the multi-dimensional pipeline port position to obtain the optimal drainage pipeline layout.

[0161] In the embodiment of the present invention, the optimal layout of the drainage pipes means that under the premise of meeting the drainage needs, through reasonable design and layout, the efficiency, reliability and economy of the residential drainage structure are optimized, and the reasonable pipe direction, slope, diameter, drainage outlet and inspection port location, etc. are determined, and the drainage efficiency of the drainage system is improved through the optimal layout.

[0162] In an embodiment of the present invention, the optimization of the drainage pipe layout according to the optimal pipe diameter, the optimal pipe slope and the multi-dimensional pipe port position to obtain the optimal drainage pipe layout includes:

[0163] Update the initial pipe diameter in the drainage pipe layout according to the optimal pipe diameter to obtain a target pipe diameter;

[0164] Adjusting the initial pipeline slope in the drainage pipeline layout according to the optimal pipeline slope to obtain a target pipeline slope;

[0165] configuring the multi-dimensional pipe opening position on each drainage pipe in the drainage pipe layout;

[0166] An optimal layout of the drainage pipes is generated according to the target pipe diameter, the target pipe slope and the configured drainage pipes.

[0167] In detail, the optimal pipe diameter is used to update the initial pipe diameter in the drainage pipe layout, and the updated pipe diameter is used as the target pipe diameter; the optimal pipe slope is used to update the initial pipe slope in the drainage pipe layout, and the updated pipe slope is used as the target pipe slope. According to the optimal pipe diameter and slope, the smoothness of the drainage pipe can be ensured, and the occurrence of water accumulation and blockage can be reduced, thereby improving the drainage efficiency.

[0168] Specifically, multi-dimensional pipe port positions, including drainage ports and inspection ports, are configured on each drainage pipe in the layout to effectively drain accumulated water and effectively clean it, so that daily maintenance and cleaning can be conveniently performed, reducing maintenance costs and time; based on the updated target pipe diameter, target pipe slope and configured multi-dimensional pipe port positions, an optimal layout of the drainage pipe is generated to reduce the risks of pipe leakage, damage, etc., wherein computer-aided design (CAD) software or other related tools can be used to draw and optimize the drainage pipe layout to ensure smooth flow between pipes and meet drainage requirements, so as to ensure the efficient operation and reliability of the residential drainage structure.

[0169] The embodiment of the present invention can understand the drainage demand and layout requirements inside the house by extracting the position of the drainage equipment in the residential structure image and calculating the distance between the equipment, so as to provide an accurate data basis for the subsequent pipeline design; according to the distance of the drainage equipment and the preset pipeline direction, the direction of the main drainage pipeline and the position and direction of the branch pipeline are determined to ensure the consistency and efficiency of the residential drainage structure; the optimal pipeline diameter in the drainage pipeline layout is calculated by using the dynamic optimization algorithm and the drainage attribute, and the optimal pipeline slope of the ramp position in the residential structure image is calculated to ensure that the flow velocity and flow rate of the drainage pipeline at each position are in the optimal state, thereby improving the drainage efficiency and the performance of the system; according to the pipeline path state and the pipeline intersection position, the multi-dimensional pipeline port position in the drainage pipeline layout is generated, so that the residential drainage structure is more flexible and adaptable to different drainage needs, and is also more convenient during maintenance and repair; according to the optimal pipeline diameter, the optimal pipeline slope and the multi-dimensional pipeline port position, the drainage pipeline layout is optimized to ensure that all aspects of the drainage pipeline are optimally configured, improve the drainage efficiency, reduce energy consumption and maintenance costs, and enhance the safety and reliability of the residential drainage structure. Therefore, the residential drainage pipe design optimization method and system proposed in the present invention can solve the problem of low accuracy when performing residential drainage pipe design optimization.

[0170] like Figure 4 , which is a functional module diagram of a residential drainage pipe design optimization system provided by an embodiment of the present invention.

[0171] The residential drainage pipeline design optimization system 100 of the present invention can be installed in an electronic device. According to the functions to be implemented, the residential drainage pipeline design optimization system 100 can include a drainage equipment distance calculation module 101, a drainage pipeline layout generation module 102, an optimal pipeline slope calculation module 103, a multi-dimensional pipeline port position generation module 104 and a drainage pipeline layout optimization module 105. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.

[0172] In this embodiment, the functions of each module / unit are as follows:

[0173] The drainage equipment distance calculation module 101 is used to obtain a residential structure image of a target residential building, extract drainage equipment positions in the residential structure image, and calculate drainage equipment distances between the drainage equipment positions one by one;

[0174] The drainage pipe layout generation module 102 is used to generate the main drainage pipe direction and the branch drainage pipe direction according to the drainage equipment distance and the preset drainage pipe direction, and generate the drainage pipe layout of the target house through the main drainage pipe direction and the branch drainage pipe direction;

[0175] The optimal pipe slope calculation module 103 is used to calculate the optimal pipe diameter in the drainage pipe layout by using a preset dynamic optimization algorithm and a preset drainage attribute, and calculate the optimal pipe slope at the ramp position in the residential structure image according to the optimal pipe diameter and the preset drainage attribute;

[0176] The multi-dimensional pipe outlet position generating module 104 is used to generate the multi-dimensional pipe outlet position in the drainage pipe layout according to the preset pipe path state and the preset pipe intersection position;

[0177] The drainage pipe layout optimization module 105 is used to optimize the drainage pipe layout according to the optimal pipe diameter, the optimal pipe slope and the multi-dimensional pipe port position to obtain the optimal drainage pipe layout.

[0178] In detail, each module described in the residential drainage pipeline design optimization system 100 in the embodiment of the present invention is used in the same manner as described above. Figures 1 to 3 The same technical means are used as the residential drainage pipe design optimization method described in, and can produce the same technical effects, so I will not go into details here.

[0179] In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0180] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0181] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0182] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0183] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is not limited only according to the above description, and it is intended that all changes within the meaning and scope of equivalent elements within the scope of protection are included in the present invention.

[0184] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0185] In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. The multiple units or systems stated in the system embodiment can also be implemented by one unit or system through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any specific order.

[0186] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A residential drainage pipe design optimization method, characterized in that: The method comprises: S1. Acquire a residential structure image of a target residence, extract drainage equipment positions in the residential structure image, and calculate drainage equipment distances between the drainage equipment positions one by one; S2. Generate the direction of the main drainage pipe and the direction of the branch drainage pipe according to the distance of the drainage equipment and the preset direction of the drainage pipe, and generate the drainage pipe layout of the target house through the direction of the main drainage pipe and the direction of the branch drainage pipe; S3, using a preset dynamic optimization algorithm and a preset drainage attribute to calculate an optimal pipe diameter in the drainage pipe layout, and calculating an optimal pipe slope at a ramp position in the residential structure image according to the optimal pipe diameter and the preset drainage attribute, wherein the using a preset dynamic optimization algorithm and a preset drainage attribute to calculate the optimal pipe diameter in the drainage pipe layout includes: S31, extracting the peak value of water flow at each drainage device location in the preset drainage attribute; S32, determining the influencing factor of each drainage device location according to the pipe material properties of the drainage device location; S33, using the following preset dynamic optimization algorithm to calculate the optimal pipe diameter in the drainage pipe layout according to the water flow peak value and the influencing factor: Wherein, D is the optimal pipe diameter, δ is the pipe diameter optimization factor, m is the water flow peak value, π is the pi, α is the material empirical coefficient in the influencing factor, q is the pipe pressure loss in the influencing factor, and p is the pipe liquid density in the influencing factor; S4, generating a multi-dimensional pipe opening position in the drainage pipe layout according to a preset pipe path state and a preset pipe intersection position; S5, optimizing the layout of the drainage pipe according to the optimal pipe diameter, the optimal pipe slope and the multi-dimensional pipe port position to obtain the optimal layout of the drainage pipe; The step of calculating the optimal pipe slope at the ramp position in the residential structure image according to the optimal pipe diameter and the preset drainage attribute includes: extracting ramp attribute data of the ramp position in the residential structure image; Optimizing the pipeline data of the drainage pipeline at the ramp position according to the ramp attribute data to obtain optimal pipeline data; Extracting the average flow rate of the pipe at the ramp position in the drainage attribute; The optimal pipeline slope of the ramp position in the residential structure is calculated according to the optimal pipeline diameter, the optimal pipeline data and the average pipeline flow, wherein the optimal pipeline slope calculation formula is: Among them, R is the optimal pipeline slope, h1 is the starting point height value in the optimal pipeline data of the drainage pipeline, h2 is the end point height value in the optimal pipeline data of the drainage pipeline, L is the horizontal length of the pipeline in the optimal pipeline data of the drainage pipeline, Q is the average flow rate of the pipeline, C is the flow coefficient, D is the optimal pipeline diameter, γ is the pipeline slope optimization factor, and θ is the pipeline slope change factor.

2. The residential drainage pipe design optimization method according to claim 1, characterized in that: The extracting the drainage equipment position in the residential structure image comprises: Graying the residential structure image to obtain a residential structure gray image; graying a preset drainage equipment template image to obtain a drainage equipment template gray image; Extract the starting area of ​​the residential structure grayscale image, slide the drainage equipment template grayscale image on the residential structure grayscale image one by one according to the starting area, and obtain the pixel correlation coefficient, wherein the pixel correlation coefficient calculation formula is: Wherein, γ is the pixel correlation coefficient, x ij is the pixel value of the i-th row and j-th column of the grayscale image of the residential structure, y ij is the pixel value of the i-th row and j-th column in the grayscale image of the drainage equipment template, u is the total dimension of the number of rows, and v is the total dimension of the number of columns; When the pixel correlation coefficient is equal to a preset correlation coefficient threshold, the drainage device position corresponding to the drainage device is extracted.

3. The residential drainage pipe design optimization method according to claim 1, characterized in that: The calculating the drainage equipment distances between the drainage equipment positions one by one includes: Extracting the device center coordinates of the drainage device location; The drainage equipment distances between the drainage equipment positions are calculated one by one according to the equipment center coordinates, wherein the drainage equipment distance calculation formula is: Among them, d kt is the drainage equipment distance between the kth drainage equipment and the tth drainage equipment, a k is the horizontal coordinate value of the center coordinate of the kth drainage device, b k is the ordinate value of the center coordinate of the kth drainage device, a t is the horizontal coordinate value of the center coordinate of the tth drainage device, b t It is the ordinate value of the equipment center coordinate of the tth drainage equipment.

4. The residential drainage pipe design optimization method according to claim 3, characterized in that: The generating of the main drainage pipe direction and the branch drainage pipe direction according to the drainage equipment distance and the preset drainage pipe direction includes: Generate an undirected distance graph of the drainage pipeline according to the location of the drainage equipment and the distance of the drainage equipment; Determine the drainage starting point and drainage ending point in the undirected distance graph of the drainage pipeline according to the preset drainage pipeline direction, and calculate the main drainage shortest path from the drainage starting point to the drainage ending point; Generate the main drainage pipeline direction through the main drainage shortest path; Mark the drainage nodes and drainage edges in the main drainage shortest path in the drainage pipe undirected distance graph to obtain marked drainage nodes and marked drainage edges; The direction of the branch drainage pipe is generated according to the marked drainage node and the marked drainage edge.

5. The residential drainage pipe design optimization method according to claim 4, characterized in that: The generating the direction of the branch drainage pipe according to the marked drainage node and the marked drainage edge includes: Determine a branch drainage node in the undirected distance graph of the drainage pipe according to the marked drainage node, and determine a branch drainage edge in the undirected distance graph of the drainage pipe according to the marked drainage edge; Deleting the drainage start point and the drainage end point in the marked drainage node to obtain a target drainage node; According to the branch drainage node and the target drainage node, the branch drainage edge is selected as a target branch drainage edge; A branch drainage path is generated according to the target branch drainage edge, and a branch drainage pipeline direction is generated according to the branch drainage path.

6. The residential drainage pipe design optimization method according to claim 1, characterized in that: The generating of the drainage pipe layout of the target residence by using the direction of the main drainage pipe and the direction of the branch drainage pipe includes: Selecting the drainage pipeline direction with the shortest drainage equipment distance among the branch drainage pipeline directions as the target branch drainage pipeline direction; Connecting the target branch drainage pipeline direction to the main drainage pipeline direction to generate a target drainage pipeline path; The drainage pipe layout of the target residence is generated according to the target drainage pipe path.

7. The residential drainage pipe design optimization method according to claim 1, characterized in that: The generating of the multi-dimensional pipe opening position in the drainage pipe layout by using the preset pipe path state and the preset pipe intersection position includes: When the pipeline path state is a non-abnormal state, the horizontal length of each drainage pipeline in the drainage pipeline layout is divided into three equal parts to obtain equal division nodes; Dispose drainage ports and inspection ports at the pipeline positions of the equally divided nodes one by one; generating a water flow replenishment port according to the pipeline intersection position; The position of the drainage port, the position of the inspection port and the position of the water flow replenishment port are collected to form a multi-dimensional pipe port position in the drainage pipe layout.

8. The residential drainage pipe design optimization method according to claim 1, characterized in that: The optimizing the drainage pipe layout according to the optimal pipe diameter, the optimal pipe slope and the multi-dimensional pipe port position to obtain the optimal drainage pipe layout includes: updating the initial pipe diameter in the drainage pipe layout according to the optimal pipe diameter to obtain the target pipe diameter; Adjusting the initial pipeline slope in the drainage pipeline layout according to the optimal pipeline slope to obtain a target pipeline slope; The multi-dimensional pipe port position is configured on each drainage pipe in the drainage pipe layout; and the optimal layout of the drainage pipes is generated according to the target pipe diameter, the target pipe slope and the configured drainage pipes.

9. A residential drainage pipe design optimization system, characterized in that: The system comprises: a drainage equipment distance calculation module, which is used to obtain a residential structure image of a target residential building, extract drainage equipment positions in the residential structure image, and calculate drainage equipment distances between the drainage equipment positions one by one; A drainage pipe layout generation module is used to generate the main drainage pipe direction and the branch drainage pipe direction according to the drainage equipment distance and the preset drainage pipe direction, and generate the drainage pipe layout of the target residence through the main drainage pipe direction and the branch drainage pipe direction; an optimal pipe slope calculation module is used to calculate the optimal pipe diameter in the drainage pipe layout by using a preset dynamic optimization algorithm and a preset drainage attribute, and calculate the optimal pipe slope of the ramp position in the residential structure image according to the optimal pipe diameter and the preset drainage attribute, wherein the use of the preset dynamic optimization algorithm and the preset drainage attribute to calculate the optimal pipe diameter in the drainage pipe layout includes: extracting the water flow peak value of each drainage equipment position in the preset drainage attribute; determining the influencing factor of each drainage equipment position according to the pipe material property of the drainage equipment position; and using the following preset dynamic optimization algorithm to calculate the optimal pipe diameter in the drainage pipe layout according to the water flow peak value and the influencing factor: Wherein, D is the optimal pipe diameter, δ is the pipe diameter optimization factor, m is the water flow peak value, π is the pi ratio, α is the material empirical coefficient in the influencing factor, q is the pipe pressure loss in the influencing factor, and p is the pipe liquid density in the influencing factor; a multi-dimensional pipe port position generation module is used to generate the multi-dimensional pipe port position in the drainage pipe layout through a preset pipe path state and a preset pipe intersection position; A drainage pipe layout optimization module is used to optimize the drainage pipe layout according to the optimal pipe diameter, the optimal pipe slope and the multi-dimensional pipe port position to obtain the optimal layout of the drainage pipe; the optimal pipe slope of the ramp position in the residential structure image is calculated according to the optimal pipe diameter and the preset drainage attribute, including: extracting ramp attribute data of the ramp position in the residential structure image; Optimizing the pipeline data of the drainage pipeline at the ramp position according to the ramp attribute data to obtain optimal pipeline data; Extracting the average flow rate of the pipe at the ramp position in the drainage attribute; The optimal pipeline slope of the ramp position in the residential structure is calculated according to the optimal pipeline diameter, the optimal pipeline data and the average pipeline flow, wherein the optimal pipeline slope calculation formula is: Among them, R is the optimal pipeline slope, h1 is the starting point height value in the optimal pipeline data of the drainage pipeline, h2 is the end point height value in the optimal pipeline data of the drainage pipeline, L is the horizontal length of the pipeline in the optimal pipeline data of the drainage pipeline, Q is the average flow rate of the pipeline, C is the flow coefficient, D is the optimal pipeline diameter, γ is the pipeline slope optimization factor, and θ is the pipeline slope change factor.