Pipeline path finding method and device, equipment and storage medium
By screening effective connectivity areas, width expansion and axial ray emission, the optimal pipeline path is generated, which solves the resolution limit, increase in computing complexity and insufficient flexibility of pipeline pathfinding in the prior art, and achieves efficient and accurate path planning.
Patent Information
- Application Number
- CN202510165820.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-14
- Publication Date
- 2025-06-13
AI Technical Summary
In the prior art, pipeline road search planning has problems such as resolution limitations, increased computational complexity and insufficient flexibility. It is difficult to accurately depict the edges of obstacles. The computational complexity increases dramatically in dense obstacle environments and is not suitable for irregular obstacle profiles.
By obtaining the areas where pipelines need to be arranged, filtering out the effective communication areas, expanding the width of the object, and emitting axial rays based on the linear nodes corresponding to the extended object, constructing the target node and target edge, calculating the pathfinding cost of each target edge, and finally generating the optimal pipeline path.
It effectively reduces the computational complexity, improves the adaptability to the contours of complex obstacles, realizes efficient and accurate path planning, and improves planning efficiency and path quality.
Smart Images

Figure CN120145592A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of architectural design, and particularly to a pipeline routing method, device, equipment and storage medium. Background Art
[0002] The prior art usually uses the grid method for pipeline routing. This method divides the planning space into a series of grids of the same size, and marks the grids according to obstacles and passable areas. When planning a path, the optimal path is searched in the grids marked as passable. The grid method faces problems such as resolution limitation, increased computational complexity and insufficient flexibility in path planning. Larger grids are difficult to accurately depict the edges of obstacles, which may cause the path planning result to be close to or overlap with the obstacles. In a dense obstacle environment, the sharp increase in the number of grids makes the computational complexity increase sharply, affecting the planning efficiency. In addition, the fixed shape of the grid limits its ability to adapt to the contour of irregular obstacles, weakening its applicability in complex environments. Summary of the Invention
[0003] The present invention provides a pipeline routing method, device, equipment and storage medium to solve the problem of low adaptability and efficiency in pipeline routing planning in the prior art.
[0004] In the first aspect of the present invention, a pipeline routing method is provided, including: obtaining an area where pipeline layout is required, and determining a routing start point and a routing end point in the area; screening out effective connected areas from the area; expanding the width of the objects in the effective connected areas; emitting axial rays based on the straight-line nodes corresponding to the objects after expansion, and the rays stop extending when encountering a boundary; constructing target nodes and target edges based on the intersection points between the rays, and calculating the routing cost of each target edge; generating an optimal pipeline path based on the routing start point, the routing end point, the nodes and the routing cost.
[0005] In a feasible implementation manner, the screening out effective connected areas from the area includes: classifying the area based on the area passage level rule to obtain a plurality of divided areas; in the plurality of divided areas, deleting the divided areas that cannot be traversed, the one-way passage divided areas without a routing end point, and the two-way passage divided areas with a degree of 1 and without a routing end point, to obtain effective connected areas.
[0006] In a feasible implementation manner, the expanding the width of the objects in the effective connected areas includes: identifying rooms and obstacles in the effective connected areas; expanding the width of the rooms and the obstacles by half of the preset routing width, where the routing width is the minimum width that an object can safely pass through in a given space.
[0007] In a feasible implementation manner, generating an optimal pipeline path based on the pathfinding start point, the pathfinding end point, the nodes, and the pathfinding cost includes: determining the pathfinding type according to the designed scenario requirements; generating an optimal pipeline path according to the pathfinding type, the pathfinding start point, the pathfinding end point, the nodes, and the pathfinding cost.
[0008] In a feasible implementation manner, when the pathfinding type is two-point pathfinding, generating an optimal pipeline path according to the pathfinding type, the pathfinding start point, the pathfinding end point, the nodes, and the pathfinding cost includes: starting from the pathfinding start point, traversing its adjacent nodes, determining the current node with the minimum cost based on the pathfinding cost, and continuing pathfinding based on the current node and the adjacent nodes of the current node until all pathfinding end points are found, and performing path backtracking based on the pathfinding end points to determine the optimal pipeline path.
[0009] In a feasible implementation manner, when the pathfinding type is a tree-shaped path, generating an optimal pipeline path according to the pathfinding type, the pathfinding start point, the pathfinding end point, the nodes, and the pathfinding cost includes: numbering the pathfinding start point, the pathfinding end point, and the target nodes; generating a chromosome population based on the coding result, the chromosome population including multiple chromosomes, each chromosome representing the connection order from the pathfinding start point to the pathfinding end point; calculating the total cost corresponding to each chromosome based on the pathfinding cost; selecting the chromosome with the minimum cost from the total costs to obtain the optimal pipeline path.
[0010] In a feasible implementation manner, when the pathfinding type is a circular path, generating a pipeline path according to the pathfinding type, the pathfinding start point, the pathfinding end point, the nodes, and the pathfinding cost includes: finding the outer-ring end points located in the outer ring according to the positions of all pathfinding end points; forming an outer-ring path according to the outer-ring end points; calculating the optimal connected path based on the outer-ring path; connecting the pathfinding start point and the pathfinding end point to the loop through a point-to-edge pathfinding method to obtain the optimal pipeline path.
[0011] The second aspect of the present invention provides a pipeline pathfinding device, including: an acquisition module, configured to acquire an area where pipeline layout is required, and determine a pathfinding start point and a pathfinding end point in the area; a screening module, configured to screen out effective connected areas from the area; an expansion module, configured to expand the width of objects in the effective connected areas; a processing module, configured to emit axial rays based on the straight-line nodes corresponding to the expanded objects, and the rays stop extending when encountering a boundary; a calculation module, configured to construct target nodes and target edges based on the intersection points between the rays, and calculate the pathfinding cost of each target edge; a generation module, configured to generate an optimal pipeline path based on the pathfinding start point, the pathfinding end point, the nodes, and the pathfinding cost.
[0012] In a feasible implementation manner, the screening module is specifically configured to: classify the area based on the area passage level rule to obtain a plurality of divided areas; in the plurality of divided areas, delete the divided areas that cannot be traversed, the one-way passage divided areas without a pathfinding end point, and the two-way passage divided areas with a degree of 1 and without a pathfinding end point to obtain effective connected areas.
[0013] In a feasible implementation manner, the expansion module is specifically configured to: identify rooms and obstacles in the effective connected areas; expand the width of the rooms and the obstacles by half of the preset pathfinding width, and the pathfinding width is the minimum width that an object can safely pass through in a given space.
[0014] In a feasible implementation manner, the generation module includes: a determination unit, configured to determine the pathfinding type according to the designed scenario requirements; a generation unit, configured to generate an optimal pipeline path according to the pathfinding type, the pathfinding start point, the pathfinding end point, the nodes, and the pathfinding cost.
[0015] In a feasible implementation manner, the generation unit is specifically configured to: start from the pathfinding start point, traverse its adjacent nodes, determine the current node with the minimum cost based on the pathfinding cost, and continue pathfinding based on the current node and the adjacent nodes of the current node until all pathfinding end points are found, and perform path backtracking based on the pathfinding end points to determine the optimal pipeline path.
[0016] In a feasible implementation manner, the generation unit is further specifically configured to: number the pathfinding start point, the pathfinding end point, and the target nodes; generate a chromosome population based on the coding result, where the chromosome population includes a plurality of chromosomes, and each chromosome represents the connection order from the pathfinding start point to the pathfinding end point; calculate the total cost corresponding to each chromosome based on the pathfinding cost; select the chromosome with the minimum cost from the total costs to obtain the optimal pipeline path.
[0017] In a feasible implementation manner, the generating unit is further specifically configured to: find out the outer-ring endpoints located on the outer ring according to the positions of all the pathfinding endpoints; form an outer-ring path according to the outer-ring endpoints; calculate an optimal connected path based on the outer-ring path; and connect the pathfinding start point and the pathfinding end point to the loop through a point-to-edge pathfinding method to obtain an optimal pipeline path.
[0018] A third aspect of the present invention provides a pipeline pathfinding device, including: a memory and at least one processor, wherein instructions are stored in the memory; the at least one processor calls the instructions in the memory so that the pipeline pathfinding device executes the above-mentioned pipeline pathfinding method.
[0019] A fourth aspect of the present invention provides a computer-readable storage medium, in which instructions are stored, and when the instructions are run on a computer, the computer is made to execute the above-mentioned pipeline pathfinding method.
[0020] In the technical solution provided by the present invention, an area where pipeline layout is required is obtained, and the pathfinding start point and the pathfinding end point in the area are determined; effective connected areas are screened out from the area; the objects in the effective connected areas are expanded in width; axial ray emission is performed based on the straight-line nodes corresponding to the expanded objects, and the rays stop extending when encountering boundaries; target nodes and target edges are constructed based on the intersections between the rays, and the pathfinding costs of the target edges are calculated; and an optimal pipeline path is generated based on the pathfinding start point, the pathfinding end point, the nodes, and the pathfinding costs. In the embodiments of the present invention, by directly processing the effective connected areas and constructing path nodes by using width expansion and axial ray emission, the calculation complexity is effectively reduced, and at the same time, the adaptability to the contour of complex obstacles is improved, thereby realizing efficient and accurate path planning in pipeline pathfinding and improving the planning efficiency and path quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 It is a schematic diagram of an embodiment of the pipeline pathfinding method in an embodiment of the present invention; Figure 2 It is a schematic diagram of another embodiment of the pipeline pathfinding method in an embodiment of the present invention; Figure 3 It is a schematic diagram of an embodiment of the pipeline pathfinding device in an embodiment of the present invention; Figure 4 It is a schematic diagram of another embodiment of the pipeline pathfinding device in an embodiment of the present invention; Figure 5 It is a schematic diagram of an embodiment of the pipeline pathfinding device in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0022] An embodiment of the present invention provides a pipeline routing method, device, equipment and storage medium to improve the adaptability to complex obstacles and the efficiency of path planning in pipeline routing.
[0023] Terms such as "first", "second", "third", "fourth", etc. (if any) in the specification, claims and above-mentioned drawings of the present invention are used to distinguish similar objects and do not necessarily need to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments described herein can be implemented in an order different from that illustrated or described herein. In addition, the terms "comprising" or "having" and any variation thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or equipment comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or equipment.
[0024] It can be understood that the execution subject of the present invention can be a pipeline routing device, or a terminal or a server, and specific limitations are not made here. An embodiment of the present invention will be described by taking the server as the execution subject as an example.
[0025] For the convenience of understanding, the specific process of the embodiment of the present invention will be described below. Please refer to Figure 1 , an embodiment of the pipeline routing method in the embodiment of the present invention includes: 101. Obtain the area where pipeline layout is required, and determine the routing start point and routing end point in the area; The routing start point is used to indicate where the pipeline starts to be laid according to the pipeline access requirements, which can be a certain room in a building, a certain corner in a basement, or an external access point, etc.; the routing end point is used to indicate the final destination of the pipeline according to the usage requirements of the pipeline. This may include another room, an access point of a device, or an external discharge / output point, etc.
[0026] 102. Screen out the effective connected areas from the area; Identify the impassable areas in the area, mark or delete the impassable areas to obtain the effective connected areas. For example, in an underground garage, there may be equipment rooms and machine rooms, such as a fire pump room and a power distribution room, etc. These areas usually have strict layout requirements and safety regulations, and pipeline layout should avoid passing through or interfering with these areas.
[0027] 103. Expand the width of the objects in the effective connected areas; Convert the effective connected region into a grayscale image, calculate the gradient intensity and direction of each pixel in the grayscale image, traverse each pixel point, and check the adjacent pixel points in its gradient direction. Retain the pixel point with the maximum gradient intensity in the gradient direction as the candidate edge point. Compare the gradient intensity of the candidate edge point with the first threshold. Determine the candidate edge points with gradient intensity greater than the first threshold as edge points. Compare the gradient intensity less than the first threshold with the second threshold, and judge whether the candidate edge points with gradient intensity greater than the second threshold are connected to the edge points. If so, determine the candidate edge points as edge points. Connect the edge points to obtain the corresponding contours. Since there are multiple parts in the effective connected region, multiple contours will be obtained. Identify the multiple contours to obtain the contours corresponding to each object; select a preset number of points on each contour, expand the width of each object based on the preset number of points, connect the points after expansion with straight lines to obtain the expanded object, and use each point as the straight line node corresponding to the object.
[0028] 104. Emit axial rays based on the straight line nodes corresponding to the expanded object, and the rays stop extending when they encounter a boundary. Select the straight line nodes of the expanded room and obstacles, emit rays along the horizontal and vertical directions with the straight line nodes as the starting points, identify the boundaries in the effective connected region, and determine the boundary units. The boundary units include the closed boundaries that form closed figures and the straight boundaries that do not form closed figures. Traverse all boundary units, detect the intersection of the rays with each side in each boundary unit. If the ray intersects any side in the boundary unit, it is determined that the ray has encountered a boundary. When the ray intersects the boundary unit, record the position of the intersection point. If there are multiple intersection points, select the intersection point closest to the starting point of the ray as the point where the extension stops. In addition, if there are rays with a distance less than the preset distance, perform corresponding ray deletion processing to make the distance between the rays within a reasonable range.
[0029] 105. Construct target nodes and target edges based on the intersection points between the rays, and calculate the pathfinding cost of each target edge. Determine the intersection points between the rays in the effective connected region, the intersection points between the rays and the boundaries, and the straight line nodes as target nodes, and determine the edges between the target nodes as target edges. For each target edge, calculate its pathfinding cost. The pathfinding cost includes the length cost and the obstacle coefficient. The obstacle coefficient is set according to the actual situation. For example, the obstacle coefficient of the structural wall is set to 1000, the obstacle coefficient of the building wall is set to 10, the obstacle coefficient of the lane is set to 1, and the obstacle coefficient of the parking space is set to 0.5, etc.
[0030] 106. Generate the optimal pipeline path based on the pathfinding starting point, pathfinding ending point, target nodes, and pathfinding cost.
[0031] Generate multiple pipeline paths based on the pathfinding start point, pathfinding end point, and target nodes. For each pipeline path, which may include at least one section of pipeline, calculate the pipeline size of each section of pipeline based on the preset pipeline size rule and the number of pathfinding end points connected by each section of pipeline. Determine the weight coefficient of the corresponding section of pipeline based on the pipeline size, identify the number of turns corresponding to each section of pipeline, determine the turning cost according to the number of turns, and calculate the cost of each section of pipeline based on the pathfinding cost, weight coefficient, and turning cost. Then sum up the costs of at least one section of pipeline corresponding to each pipeline path to obtain the total cost of each pipeline path, and select the pipeline path with the minimum total cost as the optimal pipeline path. Among them, the cost of each section of pipeline = length cost × weight coefficient × (obstacle coefficient + turning cost).
[0032] In the embodiment of the present invention, by obtaining the area where pipeline layout needs to be carried out, and determining the pathfinding start point and pathfinding end point in the area; screening out the effectively connected areas from the area; expanding the width of the objects in the effectively connected areas; emitting axial rays based on the straight nodes corresponding to the expanded objects, and the rays stop extending when encountering the boundary; constructing target nodes and target edges based on the intersection points between the rays, and calculating the pathfinding cost of each target edge; generating the optimal pipeline path based on the pathfinding start point, pathfinding end point, nodes, and pathfinding cost, the calculation complexity is effectively reduced, and at the same time the adaptability to the contour of complex obstacles is improved, thereby realizing efficient and accurate path planning in pipeline pathfinding, and improving the planning efficiency and path quality.
[0033] Please refer to Figure 2 , another embodiment of the pipeline pathfinding method in the embodiment of the present invention includes: 201. Obtain the area where pipeline layout needs to be carried out, and determine the pathfinding start point and pathfinding end point in the area; 202. Screen out the effectively connected areas from the area; Classify the area based on the area passage level rule to obtain multiple divided areas; in the multiple divided areas, delete the divided areas that cannot be traversed, the one-way passage divided areas without pathfinding end points, and the two-way passage divided areas with a degree of 1 and without pathfinding end points to obtain the effectively connected areas.
[0034] Identify each part in the area, including but not limited to components such as walls, columns, rooms, parking spaces, driveways, doors, existing pipelines, etc. Classify the area according to the names of each part in the area to obtain multiple divided areas. The types of divided areas include non-passable, one-way traffic, and two-way traffic. Taking the divided areas as nodes, establish the connected edges of adjacent rooms, and establish two-way arrows between the divided areas with two-way traffic, and establish single arrows between the divided areas with two-way traffic and one-way traffic. Delete the non-passable divided areas in the area, the one-way traffic divided areas without a pathfinding end point, and the two-way traffic divided areas with a degree of 1 and without a pathfinding end point. Among them, the non-passable divided areas include areas with physical obstacles or strict restrictions. The one-way communication divided areas include areas that only allow movement in one direction or leaving. The two-way traffic divided areas include areas without obstacles and allowing free passage in both directions.
[0035] For non-passable divided areas, they do not participate in any traffic paths; for one-way traffic divided areas without a pathfinding end point, there is no path leading to any pathfinding end point; for two-way traffic divided areas with a degree of 1 and without a pathfinding end point, although they can pass in both directions, they are only connected to one other room (i.e., the degree is 1), and this connection does not point to any pathfinding end point. Therefore, deleting the above-mentioned divided areas can simplify the calculation process and make the remaining nodes and edges more closely reflect the effective connectivity relationship between the divided areas, improving the accuracy and efficiency of connectivity analysis.
[0036] 203. Expand the width of the objects in the effectively connected area; Identify the rooms and obstacles in the effectively connected area; expand the width of the rooms and obstacles by half of the preset pathfinding width. The pathfinding width is the minimum width that an object can safely pass through in a given space.
[0037] Extract the contours corresponding to the rooms and obstacles in the effectively connected area, traverse the points on each contour, determine the preset number of directions for each point, calculate the new points after expanding the preset pathfinding width in the preset number of directions for each point, connect the original points and the expanded new points to form the expanded contour, and merge all the expanded straight line segments of each contour to form a complete outer-expanded contour. The nodes where the straight line segments are spliced are straight nodes. During the expansion process, if the expanded area overlaps with another room or obstacle, corresponding adjustments are made, such as correcting the boundary and merging adjacent rooms, etc.
[0038] 204. Emit axial rays based on the straight nodes corresponding to the outer-expanded objects, and the rays stop extending when they encounter the boundary; 205. Construct target nodes and target edges based on the intersection points between the rays, and calculate the pathfinding cost of each target edge; 206. Determine the pathfinding type according to the designed scenario requirements; In the pipeline system, if it is necessary to quickly locate and reach a specific pipeline segment for maintenance or replacement, or the design between the pathfinding start point and the pathfinding end point is relatively simple, then two-point pathfinding is applicable; if there is a complex pipeline network with a clear hierarchical structure, many branches, and many nodes, then a tree-shaped path is applicable for pathfinding; if cyclic flow or redundancy requirements are needed, then a circular path is applicable for pathfinding.
[0039] 207. Generate the optimal pipeline path according to the pathfinding type, pathfinding start point, pathfinding end point, target node, and pathfinding cost.
[0040] If the pathfinding type is two-point pathfinding, start from the pathfinding start point, traverse its adjacent nodes, determine the current node with the minimum cost based on the pathfinding cost, and continue pathfinding based on the current node and its adjacent nodes until all pathfinding end points are found, and perform path backtracking based on the pathfinding end points to determine the optimal pipeline path.
[0041] Determine the pathfinding start point and all pathfinding end points, create a priority queue for storing the nodes to be processed (pathfinding start point, pathfinding end point, and target node) and their current cost from the pathfinding start point to this node, initialize a distance array for recording the shortest known cost from the pathfinding start point to each node, and initialize a parent node array for path backtracking after finding the shortest path.
[0042] Add the pathfinding start point, pathfinding end point, and target node to the priority queue, set the cost of the pathfinding start point to 0, the cost of the pathfinding end point and the target node to infinity, and set its parent node to null, or use other special marks to indicate no parent node. Process the nodes in the priority queue in a loop: Take out the node with the minimum cost from the priority queue as the current node. If the current node is any pathfinding end point, perform path backtracking and save the path. If the current node is not a pathfinding end point, traverse all adjacent nodes of the current node. For each adjacent node, calculate the total cost from the pathfinding start point through the current node to this adjacent node. If this total cost is less than the previously recorded shortest cost from the start point to this adjacent node, update the shortest cost of this adjacent node, add it to the priority queue, and set its parent node to the current node. When any end point is found, start from this end point, backtrack to the start point through the parent node array, record the sequence of nodes passed through, and connect based on the node sequence. The connected path is the optimal path from the start point to the end point.
[0043] If the pathfinding type is a tree - shaped path, number the pathfinding start point, pathfinding end point, and target nodes; generate a chromosome population based on the coding results, where the chromosome population includes multiple chromosomes, and each chromosome represents the connection order from the pathfinding start point to the pathfinding end point; calculate the total cost corresponding to each chromosome based on the pathfinding cost; select the chromosome with the minimum cost from the total costs to obtain the optimal pipeline path.
[0044] Number the pathfinding start point, pathfinding end point, and target nodes, and this method helps to uniquely identify each node in the algorithm.
[0045] Each chromosome represents a possible path connection order from the pathfinding start point to the pathfinding end point. In a tree - shaped structure, this usually means a sequence of nodes, where each node (except the pathfinding start point and pathfinding end point) appears exactly once, and the sequence starts with the pathfinding start point and ends with the pathfinding end point. In a genetic algorithm, it may not be necessary to explicitly include the pathfinding start point and pathfinding end point in the chromosome because they are fixed. Chromosomes can be encoded in various ways, such as using a sequence of node numbers. It is also possible to use an encoding method that can represent the connection relationship between nodes, such as a sequence of "edges" of the path. For each chromosome in the population (i.e., each possible path), use a preset evaluation function to calculate the total cost from the pathfinding start point to the pathfinding end point. Based on the total cost, select the chromosome with the minimum cost from the current population, and this chromosome represents the currently found optimal pipeline path.
[0046] After calculating the total cost of each chromosome, usually generate a new chromosome population through genetic operations such as selection, crossover, and mutation. This operation is to retain excellent features and introduce new diversity. The selection process tends to retain chromosomes with high fitness. The crossover operation combines the features of multiple parent chromosomes to produce potentially better solutions, while the mutation operation randomly modifies the chromosomes to avoid falling into local optima. This process is repeated continuously until the termination conditions are met. The termination conditions include reaching a predetermined number of iterations or finding a path that is good enough, etc. Finally, output the chromosome with the minimum cost, and this chromosome represents the optimal pipeline path from the start point to the end point.
[0047] If the pathfinding type is a circular path, find the outer - ring end points located on the outer ring according to the positions of all pathfinding end points; form the outer - ring path based on the connection of the outer - ring end points; calculate the optimal connected path based on the outer - ring path; connect the pathfinding start point and pathfinding end point to the loop through the point - to - edge pathfinding method to obtain the optimal pipeline path.
[0048] After determining the positions of the pathfinding start point and the pathfinding end point, the outer ring end points are identified through the convex hull algorithm. The polygon formed by connecting the outer ring end points is the smallest polygon that encloses all the pathfinding end points. The outer ring end points are sorted, and an empty set of outer ring paths is created. One of the sorted outer ring end points is selected as the starting point, and the remaining outer ring end points are traversed in the sorted order. For each outer ring end point, the optimal path from the previous outer ring end point to the current outer ring end point is found and added to the outer ring path set. After traversing all the outer ring end points, backtrack from the last traversed outer ring end point to the starting point to obtain the optimal connected path of the outer ring. Among them, the A* algorithm is used to calculate the cost of the outer ring path, f(n)=g(n)+h(n), where f(n) is the total cost, g(n) represents the total path cost from the starting point to the current outer ring end point n, and h(n) represents the comprehensive evaluation cost from the next 2 unvisited outer ring end points to node n. The expression of h(n) is: h(n)=d(i)+d(i + 1), where d(i) and d(i + 1) represent the costs of the path from the starting point to node n for the i-th outer ring end point and the (i + 1)-th outer ring end point.
[0049] Emit rays starting from the concave points of the optimal connected path of the outer ring, determine the intersection points of the rays and other sides of the outer ring, generate connected pipe paths between the concave points and the intersection points through the shortest path algorithm, use whether each connected pipe is selected as the gene encoding of the genetic algorithm, and use the total cost of all selected connected pipes as the fitness function. Perform genetic algorithm operations such as selection, crossover, and mutation, and iteratively optimize the selection of connected pipes until the termination conditions are met, such as reaching the maximum number of iterations or the fitness no longer significantly improves. For the generation of the inner ring path, use a similar loop generation method as above to form the inner ring, and connect each pathfinding end point to the outer ring or the inner ring, which can be implemented through the shortest path algorithm from the pathfinding end point to the nearest point on the loop.
[0050] In an embodiment of the present invention, an area where pipeline layout is to be performed is acquired, and a pathfinding start point and a pathfinding end point in the area are determined; effective connected areas are screened out from the area; the objects in the effective connected areas are expanded in width; axial ray emission is performed based on the straight line nodes corresponding to the expanded objects, and the rays stop extending when encountering a boundary; target nodes and target edges are constructed based on the intersection points between the rays, and the pathfinding costs of each target edge are calculated; the pathfinding type is determined according to the designed scenario requirements; an optimal pipeline path is generated according to the pathfinding type, the pathfinding start point, the pathfinding end point, the nodes, and the pathfinding costs. By directly processing the effective connected areas and constructing path nodes using width expansion and axial ray emission, the computational complexity is effectively reduced, and at the same time, the adaptability to the contour of complex obstacles is improved, thereby realizing efficient and accurate path planning in pipeline pathfinding, enhancing the planning efficiency and path quality. The pathfinding type is flexibly determined according to specific scenario requirements, and combined with the pathfinding start point, end point, nodes, and pathfinding costs, an optimal pipeline path is generated. This method improves the pertinence and efficiency of path planning, and significantly enhances the practical application effect and adaptability of the planning scheme.
[0051] The pipeline pathfinding method in the embodiment of the present invention is described above. Next, the pipeline pathfinding device in the embodiment of the present invention will be described. Please refer to Figure 3 , an embodiment of the pipeline pathfinding device in the embodiment of the present invention includes: An acquisition module 301, configured to acquire an area where pipeline layout is to be performed, and determine a pathfinding start point and a pathfinding end point in the area; A screening module 302, configured to screen out effective connected areas from the area; An expansion module 303, configured to expand the width of the objects in the effective connected areas; A processing module 304, configured to perform axial ray emission based on the straight line nodes corresponding to the expanded objects, and the rays stop extending when encountering a boundary; A calculation module 305, configured to construct target nodes and target edges based on the intersection points between the rays, and calculate the pathfinding costs of each target edge; A generation module 306, configured to generate an optimal pipeline path based on the pathfinding start point, the pathfinding end point, the target nodes, and the pathfinding costs.
[0052] In an embodiment of the present invention, by obtaining the area where pipeline layout is to be carried out, and determining the pathfinding start point and pathfinding end point in the area; screening out the effectively connected areas from the area; expanding the width of the objects in the effectively connected areas; performing axial ray emission based on the straight-line nodes corresponding to the expanded objects, and the rays stop extending when encountering the boundary; constructing target nodes and target edges based on the intersection points between the rays, and calculating the pathfinding cost of each target edge; generating the optimal pipeline path based on the pathfinding start point, pathfinding end point, nodes and pathfinding cost, the computational complexity is effectively reduced, and at the same time the adaptability to the contour of complex obstacles is improved, thereby realizing efficient and accurate path planning in pipeline pathfinding, and improving the planning efficiency and path quality.
[0053] Please refer to Figure 4 , another embodiment of the pipeline pathfinding device in the embodiment of the present invention includes: An acquisition module 301, configured to obtain the area where pipeline layout is to be carried out, and determine the pathfinding start point and pathfinding end point in the area; A screening module 302, configured to screen out the effectively connected areas from the area; An expansion module 303, configured to expand the width of the objects in the effectively connected areas; A processing module 304, configured to perform axial ray emission based on the straight-line nodes corresponding to the expanded objects, and the rays stop extending when encountering the boundary; A calculation module 305, configured to construct target nodes and target edges based on the intersection points between the rays, and calculate the pathfinding cost of each target edge; A generation module 306, configured to generate the optimal pipeline path based on the pathfinding start point, pathfinding end point, target nodes and pathfinding cost.
[0054] Optionally, the screening module 302 may be specifically configured to: Classify the area based on the area passage level rule to obtain multiple divided areas; in the multiple divided areas, delete the non-traversable divided areas, the one-way passage divided areas without a pathfinding end point, and the two-way passage divided areas with a degree of 1 and without a pathfinding end point, to obtain the effectively connected areas.
[0055] Optionally, the expansion module 303 may be specifically configured to: Identify the rooms and obstacles in the effectively connected areas; expand the width of the rooms and obstacles by half of the preset pathfinding width, and the pathfinding width is the minimum width that an object can safely pass through in a given space.
[0056] Optionally, the generation module 306 includes: A determination unit 3061, configured to determine the pathfinding type according to the designed scenario requirements; A generating unit 3062, configured to generate an optimal pipeline path according to a pathfinding type, a pathfinding start point, a pathfinding end point, nodes, and pathfinding costs.
[0057] Optionally, the generating unit 3062 may specifically be configured to: Start from the pathfinding start point, traverse its adjacent nodes, determine the current node with the minimum cost based on the pathfinding costs, and continue pathfinding based on the current node and the adjacent nodes of the current node until all pathfinding end points are found, and perform path backtracking based on the pathfinding end points to determine the optimal pipeline path.
[0058] Optionally, the generating unit 3062 may also specifically be configured to: Number the pathfinding start point, the pathfinding end point, and target nodes; generate a chromosome population based on the coding results, where the chromosome population includes multiple chromosomes, and each chromosome represents the connection order from the pathfinding start point to the pathfinding end point; calculate the total cost corresponding to each chromosome based on the pathfinding costs; select the chromosome with the minimum cost from the total costs to obtain the optimal pipeline path. Optionally, the generating unit 3063 may also specifically be configured to: Find out outer ring end points located on the outer ring according to the positions of all pathfinding end points; form an outer ring path according to the connection of the outer ring end points; calculate an optimal connected path based on the outer ring path and a genetic algorithm to generate a target loop; connect the pathfinding start point and the pathfinding end point to the target loop through a point-to-edge pathfinding method to obtain the optimal pipeline path.
[0059] In an embodiment of the present invention, an area where pipeline layout needs to be performed is acquired, and a pathfinding start point and a pathfinding end point in the area are determined; effective connected areas are screened out from the area; the objects in the effective connected areas are expanded in width; axial ray emission is performed based on the straight nodes corresponding to the objects after expansion, and the rays stop extending when encountering boundaries; target nodes and target edges are constructed based on the intersections between the rays, and the pathfinding costs of the target edges are calculated; the pathfinding type is determined according to the designed scenario requirements; an optimal pipeline path is generated according to the pathfinding type, the pathfinding start point, the pathfinding end point, the nodes, and the pathfinding costs. By directly processing the effective connected areas and constructing path nodes by using width expansion and axial ray emission, the computational complexity is effectively reduced, and at the same time, the adaptability to complex obstacle contours is improved, thereby realizing efficient and accurate path planning in pipeline pathfinding, improving the planning efficiency and path quality, flexibly determining the pathfinding type according to specific scenario requirements, and combining the pathfinding start point, end point, nodes, and pathfinding costs to generate an optimal pipeline path. This method improves the pertinence and efficiency of path planning, and significantly enhances the practical application effect and adaptability of the planning scheme.
[0060] Above Figure 3 And Figure 4The pipeline routing device in the embodiments of the present invention is described in detail from the perspective of modular functional entities. Next, the pipeline routing device in the embodiments of the present invention is described in detail from the perspective of hardware processing.
[0061] Refer to Figure 5 As shown, the pipeline routing device includes a processor 500 and a memory 501. The memory 501 stores machine-executable instructions that can be executed by the processor 500. The processor 500 executes the machine-executable instructions to implement the above pipeline routing method.
[0062] Furthermore, Figure 5 The pipeline routing device shown also includes a bus 502 and a communication interface 503. The processor 500, the communication interface 503, and the memory 501 are connected through the bus 502.
[0063] Among them, the memory 501 may include a high-speed random access memory (Random Access Memory, RAM), and may also include non-volatile memory, for example, at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 503 (which can be wired or wireless). The Internet, wide area network, local area network, metropolitan area network, etc. can be used. The bus 502 can be an ISA bus, a PCI bus, an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, Figure 5 only a bidirectional arrow is used in [description] to represent it, but it does not mean that there is only one bus or one type of bus.
[0064] The processor 500 may be an integrated circuit chip with the ability to process signals. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in the processor 500 or the instructions in the form of software. The above-mentioned processor 500 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present disclosure. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present disclosure can be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of the hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. This storage medium is located in the memory 501, and the processor 500 reads the information in the memory 501 and combines its hardware to complete the method steps of the foregoing embodiments.
[0065] The present invention also provides a pipeline routing device. The computer device includes a memory and a processor. Computer-readable instructions are stored in the memory. When the computer-readable instructions are executed by the processor, the processor is caused to execute the steps of the pipeline routing method in the above embodiments. The present invention also provides a computer-readable storage medium. The computer-readable storage medium may be a non-volatile computer-readable storage medium, or the computer-readable storage medium may also be a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions run on a computer, the computer is caused to execute the steps of the pipeline routing method.
[0066] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the foregoing method embodiments, and will not be described herein again.
[0067] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs.
[0068] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of various embodiments of the present invention.
Claims
1. A pipeline path finding method, characterized in that: The pipeline path finding method comprises: Acquire an area where pipelines need to be laid out, and determine a path-finding starting point and a path-finding end point in the area; Screening out effective connected regions from the regions; Expanding the width of objects in the effective connected area; Emitting axial rays based on the straight line nodes corresponding to the expanded object, wherein the rays stop extending when encountering a boundary; Constructing target nodes and target edges based on the intersections between the rays, and calculating the path-finding cost of each target edge; An optimal pipeline path is generated based on the path finding starting point, the path finding end point, the node and the path finding cost.
2. The pipeline path finding method according to claim 1, characterized in that: The step of selecting a valid connected region from the region comprises: Classifying the area based on the regional access level rule to obtain a plurality of divided areas; Among the multiple divided areas, the divided areas that cannot be crossed, the divided areas with one-way traffic without pathfinding endpoints, and the divided areas with two-way traffic with a degree of 1 and without pathfinding endpoints are deleted to obtain a valid connected area.
3. The pipeline path finding method according to claim 1, characterized in that: The step of expanding the width of the objects in the effective connected area comprises: Identifying rooms and obstacles in the effective connectivity area; The room and the obstacle are expanded in width by half of a preset pathfinding width, where the pathfinding width is the minimum width through which an object can pass safely in a given space.
4. The pipeline path finding method according to claim 1, characterized in that: The generating of the optimal pipeline path based on the path finding starting point, the path finding end point, the node and the path finding cost comprises: Determine the pathfinding type based on the design scenario requirements; An optimal pipeline path is generated according to the path finding type, the path finding starting point, the path finding end point, the node and the path finding cost.
5. The pipeline path finding method according to any one of claims 4, characterized in that: When the path finding type is two-point path finding, generating the optimal pipeline path according to the path finding type, the path finding starting point, the path finding end point, the node and the path finding cost includes: Starting from the path finding starting point, traverse its adjacent nodes, determine the current node with the minimum cost based on the path finding cost, and continue path finding based on the current node and the adjacent nodes of the current node until all path finding end points are found, and backtrack the path based on the path finding end points to determine the optimal pipeline path.
6. The pipeline path finding method according to claim 4, characterized in that: When the path finding type is a tree path, generating an optimal pipeline path according to the path finding type, the path finding starting point, the path finding end point, the node and the path finding cost includes: Numbering the path finding starting point, the path finding end point and the target node; Generate a chromosome population based on the encoding result, the chromosome population includes a plurality of chromosomes, each chromosome represents a connection sequence from the path finding starting point to the path finding end point; Calculate the total cost corresponding to each chromosome based on the path-finding cost; The chromosome with the smallest cost is selected from the total cost to obtain the optimal pipeline path.
7. The pipeline path finding method according to claim 4, characterized in that: When the path finding type is a ring path, generating a pipeline path according to the path finding type, the path finding starting point, the path finding end point, the node and the path finding cost includes: Find the outer ring end point located on the outer ring according to the positions of all pathfinding end points; An outer ring path formed by connecting the outer ring endpoints; Calculating an optimal connected path based on the outer loop path; The path finding starting point and the path finding end point are connected to the loop through a point-to-edge path finding method to obtain an optimal pipeline path.
8. A pipeline path finding device, characterized in that: The pipeline path finding device comprises: An acquisition module is used to acquire an area where pipeline layout is required, and determine a path finding starting point and a path finding end point in the area; A screening module, used for screening out effective connected areas from the area; An expansion module, used for expanding the width of objects in the effective connected area; A processing module, configured to emit axial rays based on the straight line nodes corresponding to the expanded object, wherein the rays stop extending when encountering a boundary; A calculation module, used for constructing target nodes and target edges based on the intersection points between the rays, and calculating the path-finding cost of each target edge; A generation module is used to generate an optimal pipeline path based on the path finding starting point, the path finding end point, the node and the path finding cost.
9. A pipeline pathfinding device, characterized in that: The pipeline pathfinding device comprises: a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instructions in the memory so that the pipeline path finding device executes the pipeline path finding method as described in any one of claims 1-7.
10. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the pipeline path finding method as described in any one of claims 1-7 is implemented.
Citation Information
Patent Citations
Route planning method and device for unmanned aerial vehicle
CN106092102A
Industrial robot path searching optimization method
CN108917770A
Path searching method and device, intelligent equipment and storage medium
CN113720344A