A method and system for designing an indoor gas piping route
By automatically planning gas pipeline routes on a 3D model, the problems of low efficiency and insufficient accuracy in traditional manual design are solved, achieving efficient and accurate gas pipeline layout, reducing costs and improving design quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- PETROCHINA CO LTD
- Filing Date
- 2025-01-03
- Publication Date
- 2026-07-03
AI Technical Summary
Traditional gas pipeline layout relies on manual design and on-site measurement, which is inefficient, inaccurate, and costly.
Based on a 3D model, a path planning algorithm is used to automatically design gas pipeline routes. This includes obtaining a 3D model of the target building, determining the pipeline's entry and exit points, dividing the wall mesh, mapping it to a weighted graph, using the A* algorithm to find the shortest path, and outputting the pipeline route.
It enables automated design of gas pipelines, improving design efficiency and accuracy, reducing costs, minimizing human error and construction complexity, and enhancing the safety and reliability of gas supply systems.
Smart Images

Figure CN122333683A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of pipeline design technology, specifically relating to a design method and system for indoor gas pipeline routes. Background Technology
[0002] With the acceleration of urbanization and the improvement of residents' living standards, natural gas, as a clean energy source, is gradually increasing its proportion in the energy consumption structure. As an important component of the gas supply system, the efficiency and quality of the layout and construction of gas pipelines directly affect the safety and reliability of the gas supply. Traditional gas pipeline layout methods often rely on manual design and on-site measurement, which suffers from problems such as low efficiency, insufficient accuracy, and high cost. Summary of the Invention
[0003] The purpose of this invention is to provide a design method for indoor gas pipeline routes, so as to solve the problems of low efficiency, insufficient accuracy and high cost of existing pipeline layout design based on manual design and on-site measurement as mentioned in the background art.
[0004] To achieve the above objectives, the present invention provides the following technical solution: a method for designing indoor gas pipeline routes, comprising:
[0005] Obtain a 3D model of the target building;
[0006] Extract the wall data from the 3D model and determine the pipe inlet and outlet points on the wall data;
[0007] The wall data is divided into a grid to form a wall grid, and the connected regions of the wall grid are determined.
[0008] Map the connected regions of the wall grid onto the weighted graph;
[0009] Based on the weighted graph, the shortest path between the entry point and the destination point is obtained through a path planning algorithm, and the grid path corresponding to the shortest path is determined in the connected interval of the wall grid.
[0010] Output pipeline paths based on grid paths.
[0011] Furthermore, the three-dimensional model has multiple building components, and the method further includes classifying the attributes of the building components.
[0012] Furthermore, the building components include a first component disposed on the wall and a second component not disposed on the wall, and the determination of the connected regions of the wall grid includes:
[0013] Identify the grid containing the first component from the wall grid and remove it to obtain the first connected region of the wall grid;
[0014] Determine the distance between the second component and the wall. When the distance between the second component and the wall is less than the safe distance, identify the grid where the projection of the second component is located from the first connected interval of the wall grid and remove it to obtain the second connected interval of the wall grid. The second connected interval is the connected interval of the wall grid.
[0015] Furthermore, the method also includes filtering the pipeline paths and outputting a single pipeline path when the number of pipeline paths is greater than 1.
[0016] Furthermore, when the number of pipeline paths is greater than 1, the output of a single pipeline path after filtering includes:
[0017] Obtain the number of inflections for multiple pipeline paths, and output the pipeline path with the smallest number of inflections as a single pipeline path.
[0018] Furthermore, the method also includes determining at least one intermediate node of the pipe while determining the pipe's inlet and outlet points on the wall data, and using the intermediate node as a necessary point in the pipe path.
[0019] Furthermore, the output pipeline path based on the mesh path includes:
[0020] The grid path is de-rasterized, and feature points and feature lines of the grid path are extracted to output the pipeline path.
[0021] Furthermore, the path planning algorithm is the A* algorithm, and Euclidean distance is used as the heuristic function.
[0022] Furthermore, the method also includes generating a three-dimensional pipeline model based on the output pipeline path and generating a planar drawing.
[0023] Another aspect of this application discloses a design system for indoor gas pipeline routes, including:
[0024] The acquisition module is configured to acquire a 3D model of the target building.
[0025] The extraction module is configured to extract wall data from the 3D model and determine the entry and exit points of pipes on the wall data.
[0026] The partitioning module is configured to divide the wall data into a grid to form a wall grid and determine the connected regions of the wall grid.
[0027] The mapping module is configured to map connected regions of the wall grid to a weighted graph;
[0028] The algorithm module is configured to obtain the shortest path between the entry point and the destination point through a path planning algorithm based on a weighted graph, and determine the grid path corresponding to the shortest path in the connected interval of the wall grid.
[0029] The output module is configured to output pipeline paths based on grid paths.
[0030] Another aspect of this application discloses an electronic device, which includes a processor and a memory, wherein the memory stores at least one computer program, which is loaded and executed by the processor to enable the electronic device to implement the above-described method.
[0031] Another aspect of this application discloses a computer-readable storage medium storing at least one computer program, which is loaded and executed by a processor to enable an electronic device to implement the above-described method.
[0032] Compared with the prior art, the beneficial effects of the present invention are:
[0033] Based on the obtained three-dimensional model of the target building, this application determines the pipeline layout area on the wall of the three-dimensional model, and automatically plans the pipeline path on the wall through the pipeline path algorithm, thus realizing the automated design of gas pipelines, improving design efficiency while ensuring design accuracy and reducing design costs. Attached Figure Description
[0034] Figure 1 This is a flowchart of the method in this application;
[0035] Figure 2 A schematic diagram of the three-dimensional model of the target building;
[0036] Figure 3 This is a schematic diagram of the data grid division above;
[0037] Figure 4 This is a schematic diagram of the pipeline route;
[0038] Figure 5 This application contains an electronic device schematic diagram. Detailed Implementation
[0039] 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 embodiments of the present invention, and not all embodiments. 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.
[0040] A method for designing indoor gas pipeline routes, referring to Figure 1 ,include:
[0041] S100: Obtain the 3D model of the target building;
[0042] S200: Extract wall data from the 3D model and determine the pipe inlet and outlet points on the wall data;
[0043] S300: Grid the wall data to form a wall grid and determine the connected regions of the wall grid;
[0044] S400: Maps the connected regions of the wall grid to the weighted graph;
[0045] S500: Based on a weighted graph, the shortest path between the entry point and the destination point is obtained through a path planning algorithm, and the corresponding grid path is determined in the connected interval of the wall grid.
[0046] S600: Outputs pipeline paths based on grid paths.
[0047] Specifically, in S100, the 3D model of the target building (e.g., a house) is a building vector model (BIM model), which is used to... (see...) Figure 2 The three-dimensional model (example) can identify and parse information such as the spatial layout of the house structure (e.g., the layout of walls, the position of windows on walls, and the position of components such as wardrobes). For example, it can determine the specifications and position information of walls (in this application, walls refer to complete walls, including wall structures and non-wall structures such as windows arranged on walls) and the specifications and position information of wardrobes in the house based on the three-dimensional model.
[0048] Simultaneously, after obtaining the 3D model of the target building, the building components within the 3D model can be classified by attribute, mainly distinguishing wall components from other components in the 3D model to prepare for subsequent pipeline path planning. Specifically, wall components can be assigned a connectivity attribute, while non-wall components (such as windows on wall components and wardrobes inside the house) can be assigned a non-connectivity attribute. Correspondingly, in the subsequent determination of the wall mesh (see...),... Figure 3 When defining the connected regions of the wall grid (as shown in the schematic diagram of the wall grid), window components arranged on the wall are considered non-connected, and their locations are defined as non-connected regions. For building components not arranged on the wall, such as wardrobes, processing is required based on the distance between the building component and the wall. For example, if the distance between the building component and the wall is less than the safety distance, the building component needs to be projected onto the wall, and the grid area occupied by the projected building component is marked as a non-connected region, i.e., removed from the connected regions of the grid. Specifically, the aforementioned building components include wall components and non-wall components, and non-wall components include a first component arranged on the wall and a second component not located on the wall. Correspondingly, in the above S300, determining the connected grid regions of the wall grid includes:
[0049] Identify the grid containing the first component from the wall grid and remove it to obtain the first connected region of the wall grid;
[0050] Determine the distance between the second component and the wall. When the distance between the second component and the wall is less than the safe distance, identify the grid where the projection of the second component is located from the first connected interval of the wall grid and remove it to obtain the second connected interval of the wall grid, which is then used as the connected interval of the wall grid.
[0051] Specifically, in step S400, when mapping the connected regions of the wall mesh to a weighted graph, the nodes of the weighted graph constitute the grid points of the connected regions of the wall mesh. At this time, the edges in the weighted graph constitute the connecting edges between adjacent grid points. That is, when there is a common edge between grid points, the node corresponding to the grid point has an edge on the weighted graph. Correspondingly, in some examples, the weight of an edge in the weighted graph can be determined by the Euclidean distance between two nodes in the wall mesh. In other examples, the weight of an edge in the weighted graph can be determined by the angle between the normals of two nodes in the wall mesh, to reflect the smoothness or curvature of the surface. In this application, it is preferred to use... The weights of edges in the weighted graph are determined by the Euclidean distance between two nodes in the wall mesh. The A* algorithm is selected as the path planning algorithm for subsequent path planning operations. Euclidean distance is used as the heuristic function. By dividing the wall data into meshes and mapping these meshes onto a connected weighted graph, the complex 3D environment can be simplified into a 2D graph structure, thereby reducing computational complexity. Based on the weighted graph, the optimal path from the starting point to the target point can be found using algorithms such as A*. By evaluating the function f(n) = g(n) + h(n), the algorithm can effectively avoid unnecessary searches and improve the efficiency of path planning.
[0052] In some embodiments, the method further includes determining intermediate nodes of the pipeline while determining the inlet and outlet points of the pipeline on the wall data. For example, the intermediate node may be, for example, the location of the gas meter. In this case, when the shortest path between the inlet and outlet points is output by the A* algorithm based on the weighted graph, the node can be added as a necessary node to the A* algorithm search path. For example, when there are multiple intermediate nodes and their order is not fixed, a multi-objective A* algorithm variant can be used. The heuristic function of the A* algorithm can be adjusted to comprehensively consider multiple intermediate nodes. In other examples, the space can be divided into different levels, and the A* algorithm can be used in each level. Reasonable connections are ensured between levels, and the paths of each level are coordinated through global constraints or overall optimization to achieve the shortest and most practical path planning from the inlet point to the outlet point.
[0053] In step S500, considering the de-rasterization operation in the subsequent step S500, it is necessary to reflect the shortest path between the introduced point and the destination in the weighted graph obtained by the path planning algorithm into the grid of the connected interval in the wall grid, that is, to find the corresponding grid point of the shortest path node in the connected interval to form the grid path.
[0054] Correspondingly, in step S600, refer to Figure 4 This is a schematic diagram of the output pipeline path. The output pipeline path based on the grid path includes:
[0055] The grid path is de-rasterized, and feature points and feature lines of the grid path are extracted to output the pipeline path.
[0056] In this step, the feature points extracted by de-rasterization constitute key turning points (such as inflection points at wall intersections or boundary points between connected and non-connected intervals) or nodes in the connecting path. Feature lines constitute the connecting line segments of the feature points, reflecting the overall direction and shape of the path. At the same time, when generating the pipeline path, it is necessary to ensure the horizontal and vertical routing of the pipeline, that is, any line segment constituting the pipeline is a horizontal or vertical line, that is, the starting point and ending point of any line segment on the pipeline have the same vertical height or the same horizontal position.
[0057] In some embodiments, the above method further includes filtering the pipeline paths and outputting a single pipeline path when the number of pipeline paths is greater than 1. Specifically, when multiple pipeline paths are obtained, the number of inflection points of multiple pipeline paths needs to be obtained accordingly, and the pipeline path with the smallest number of inflection points is used as the output pipeline path.
[0058] In some embodiments, the method further includes generating a three-dimensional pipeline model based on the output pipeline path and generating a plan drawing, which includes detailed information such as a bill of materials and construction annotations, while automatically generating a three-dimensional model of the indoor gas pipeline. This model clearly shows the route of the gas pipeline and ensures compliance with all requirements in the relevant specifications. For example, the design specifications for gas pipelines include:
[0059] 1. GB 50236-2011 Construction Specification for Welding Engineering of On-site Equipment and Industrial Pipelines;
[0060] 2. CJJ 94-2009 Construction and Quality Acceptance of Indoor Gas Engineering in Urban Areas;
[0061] 3. GB 50028-2006 (2020 Edition) Code for Design of Urban Gas Supply;
[0062] 4. CJJ / T 146-2011 Technical Specification for Urban Gas Alarm Control Systems;
[0063] 5. GB 50057-2010 Code for Design of Lightning Protection of Buildings (including explanatory notes);
[0064] 6. CJT 180-2014 Manual gas valves for buildings;
[0065] 7. CJ / T 394-2018 Electromagnetic Gas Emergency Shut-off Valve;
[0066] 8. GB / T 51455-2023 Standard for Construction and Acceptance of Urban Gas Transmission and Distribution Engineering;
[0067] 9. HG / T20592~20635-2009 Steel pipe flanges, gaskets and fasteners (including compilation instructions and errata);
[0068] 10. GB / T 9124.1-2019 Steel pipe flanges - Part 1: PN series;
[0069] 11. GB / T 8163-2018 Seamless steel pipes for conveying fluids.
[0070] This application also discloses a design system for indoor gas pipeline routes, including:
[0071] The acquisition module is configured to acquire a 3D model of the target building.
[0072] The extraction module is configured to extract wall data from the 3D model and determine the entry and exit points of pipes on the wall data.
[0073] The partitioning module is configured to divide the wall data into a grid to form a wall grid and determine the connected regions of the wall grid.
[0074] The mapping module is configured to map connected regions of the wall grid to a weighted graph;
[0075] The algorithm module is configured to obtain the shortest path between the entry point and the destination point through a path planning algorithm based on a weighted graph, and determine the grid path corresponding to the shortest path in the connected interval of the wall grid.
[0076] The output module is configured to output pipeline paths based on grid paths.
[0077] This application utilizes an automated design scheme for gas pipelines, which can significantly shorten the design cycle, reduce design costs, and improve design efficiency. Compared to traditional manual design methods, the automated process can more quickly identify building structures, analyze spatial layouts, and generate preliminary pipeline layout plans. Simultaneously, automated layout technology reduces human error and oversight, improving the accuracy and reliability of pipeline design and lowering the probability of safety accidents. Furthermore, automated layout technology enables personalized and precise pipeline layout, meeting the individual needs of different regions and users, improving the service quality and user experience of the gas supply system. Through intelligent optimization algorithms, this invention can accurately calculate pipeline length and material requirements, avoiding unnecessary waste, which helps reduce material costs and improve resource utilization efficiency. At the same time, a reasonable pipeline layout can reduce the complexity and risks during construction, thereby reducing construction difficulty and costs. Finally, the implementation of automated gas pipeline layout projects will also promote technological progress and industrial upgrading in the gas industry, fostering its sustainable development.
[0078] Furthermore, the technical solution proposed in this application can design indoor gas pipelines for buildings of different types and structures. It can provide suitable pipeline layout solutions for residential, commercial, and industrial buildings.
[0079] Figure 5 This is a block diagram of an electronic device used to implement the overseas crude oil pipeline disaster early warning method of this invention, such as... Figure 5 As shown, the electronic device 400 includes: a memory 401 and a processor 402;
[0080] Memory 401 stores computer-executed instructions;
[0081] At least one processor 402 executes computer execution instructions stored in memory, causing the at least one processor to perform the method provided in the above embodiments.
[0082] This application also provides a non-transitory computer-readable storage medium including instructions, such as a memory including instructions that can be executed by a processor of an electronic device to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0083] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for designing indoor gas pipeline routes, characterized in that, include: Obtain a 3D model of the target building; Extract the wall data from the 3D model and determine the pipe inlet and outlet points on the wall data; The wall data is divided into a grid to form a wall grid, and the connected regions of the wall grid are determined. Map the connected regions of the wall grid onto the weighted graph; Based on the weighted graph, the shortest path between the entry point and the destination point is obtained through a path planning algorithm, and the grid path corresponding to the shortest path is determined in the connected interval of the wall grid. Output pipeline paths based on grid paths.
2. The method for designing indoor gas pipeline routes according to claim 1, characterized in that: The three-dimensional model has multiple building components, and the method further includes classifying the attributes of the building components.
3. The method for designing an indoor gas pipeline route according to claim 2, characterized in that: The building components include a first component disposed on the wall and a second component not disposed on the wall. The connected regions of the wall grid are defined as follows: Identify the grid containing the first component from the wall grid and remove it to obtain the first connected region of the wall grid; Determine the distance between the second component and the wall. When the distance between the second component and the wall is less than the safe distance, identify the grid where the projection of the second component is located from the first connected interval of the wall grid and remove it to obtain the second connected interval of the wall grid. The second connected interval is the connected interval of the wall grid.
4. The method for designing indoor gas pipeline routes according to claim 1, characterized in that: The method also includes filtering the pipeline paths and outputting a single pipeline path when the number of pipeline paths is greater than 1.
5. The method for designing an indoor gas pipeline route according to claim 4, characterized in that: When the number of pipeline paths is greater than 1, the output of a single pipeline path after filtering includes: Obtain the number of inflections for multiple pipeline paths, and output the pipeline path with the smallest number of inflections as a single pipeline path.
6. The method for designing an indoor gas pipeline route according to claim 1, characterized in that: The method also includes determining the pipe's inlet and outlet points on the wall data, while simultaneously determining at least one intermediate node of the pipe, and using the intermediate node as a necessary point in the pipe path.
7. The method for designing indoor gas pipeline routes according to claim 1, characterized in that: The grid-based output pipeline path includes: The grid path is de-rasterized, and feature points and feature lines of the grid path are extracted to output the pipeline path.
8. The method for designing indoor gas pipeline routes according to claim 1, characterized in that: The path planning algorithm is the A* algorithm, and Euclidean distance is used as the heuristic function.
9. The method for designing an indoor gas pipeline route according to claim 1, characterized in that: The method also includes generating a three-dimensional pipeline model based on the output pipeline path and generating a planar drawing.
10. A design system for indoor gas pipeline routes, characterized in that, include: The acquisition module is configured to acquire a 3D model of the target building. The extraction module is configured to extract wall data from the 3D model and determine the entry and exit points of pipes on the wall data. The partitioning module is configured to divide the wall data into a grid to form a wall grid and determine the connected regions of the wall grid. The mapping module is configured to map connected regions of the wall grid to a weighted graph; The algorithm module is configured to obtain the shortest path between the entry point and the destination point through a path planning algorithm based on a weighted graph, and determine the grid path corresponding to the shortest path in the connected interval of the wall grid. The output module is configured to output pipeline paths based on grid paths.
11. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory storing at least one computer program, which is loaded and executed by the processor to enable the electronic device to implement the method as described in any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one computer program, which is loaded and executed by a processor to enable the electronic device to implement the method as described in any one of claims 1 to 9.