Underground pipeline pipe gallery resource connection method and device based on large language model
By constructing a global topological knowledge graph and using a large language model for logical reasoning, the problem of low resource identification accuracy in traditional pipeline planning has been solved, realizing efficient, green, and low-cost reuse of pipeline resources and improving the utilization efficiency of urban underground space.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI YINGYI URBAN PLANNINGDESIGN CO LTD
- Filing Date
- 2026-05-18
- Publication Date
- 2026-06-12
AI Technical Summary
Traditional pipeline planning methods have low accuracy in identifying idle utility tunnel resources, cannot effectively utilize fragmented data, and rely on human experience for planning decisions, which is inefficient and prone to errors. They also cannot achieve multi-level causal reasoning and are difficult to meet the requirements of smart cities for efficient, green, and low-cost reuse of utility tunnel resources.
Construct a global topological knowledge graph, perform semantic recognition and logical reasoning based on a large language model, dynamically extract local graphs, evaluate and filter them in conjunction with engineering specifications and rules, and generate connectivity solutions that take into account the reuse of existing resources, cost control and security compliance.
It improves the accuracy of utility tunnel resource identification and engineering feasibility, generates multiple candidate connectivity schemes that take into account the reuse of existing resources, path distance optimization and safety constraints, and improves the efficiency of intensive use of urban underground space.
Smart Images

Figure CN122197244A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method and apparatus for connecting underground pipeline and utility tunnel resources based on a large language model. Background Technology
[0002] Traditional pipeline planning methods mainly rely on GIS, CAD and simple rule engines. These systems can only process predefined structured data and are helpless with multi-source data that has spatial continuity, complex causal logic and fragmentation. Therefore, these methods have low accuracy in identifying idle pipeline resources and cannot effectively utilize fragmented data.
[0003] Furthermore, traditional planning logic is limited to single-level static queries or manual adjustments, failing to achieve multi-level causal reasoning from demand analysis to path optimization and solution trade-offs. Planning decisions heavily rely on human experience, resulting in low efficiency and a high risk of errors. Moreover, once human intervention in data interpretation and analysis is introduced, the entire analysis process becomes cumbersome, prone to errors, and unable to iterate on the planning logic.
[0004] Therefore, current methods for analyzing underground pipeline data are insufficient to meet the requirements of smart cities for efficient, green, and low-cost reuse of utility tunnel resources, which has become a key focus of current utility tunnel technology upgrades. Summary of the Invention
[0005] Therefore, in order to overcome the shortcomings of the prior art, this invention provides a method, device, computer equipment, and storage medium for connecting underground pipeline corridor resources based on a large language model. It aims to solve the problems of spatial data fragmentation, rigid rule engines, and low efficiency in identifying and reusing idle corridor resources in existing municipal pipeline planning technologies. It can automatically complete the semantic recognition and compatibility assessment of idle resources, and finally generate a connection scheme that takes into account the reuse of existing resources, cost control, and safety compliance, thereby improving the efficiency of intensive utilization of urban underground space.
[0006] To achieve the above objectives, this invention provides a method for connecting underground pipeline and utility tunnel resources based on a large language model, comprising: acquiring pipeline detection data of all underground pipelines in a target area, constructing a global topological knowledge graph corresponding to the utility tunnel resources of the underground pipelines, wherein the pipeline detection data includes at least pipeline spatial data and attribute data; extracting a local topological knowledge graph from the global topological knowledge graph based on planning instructions carrying start-point information, end-point information, and pipeline planning; converting the local topological knowledge graph into a text sequence with hierarchical relationships to obtain structured text, and using a large language model combined with engineering specification rules obtained based on the pipeline planning to evaluate and filter the utility tunnel resources in the structured text to obtain structured text with compatibility evaluation tags; using the large language model to perform logical reasoning based on the start-point information and the end-point information and the local topological relationships represented by the structured text with compatibility evaluation tags, generating a reasoning result that satisfies the pipeline planning and is a complete path chain from the start-point to the end-point; and generating candidate connectivity schemes for at least one planning objective based on the reasoning result, and constructing a candidate connectivity scheme set.
[0007] In one embodiment, the step of acquiring pipeline detection data of all underground pipelines in the target area and constructing a global topological knowledge graph corresponding to the underground pipeline corridor resources includes: acquiring pipeline detection data of all underground pipelines in the target area, wherein the pipeline detection data includes pipeline spatial data, attribute data, and resource occupancy status; abstracting each pipeline intersection, maintenance well, node well, or endpoint in the pipeline spatial data as a node, and establishing topological edges between adjacent nodes based on the connection relationship between nodes in the pipeline spatial data; filtering out topological edges with available margin based on the resource occupancy status; calculating the attribute information of the topological edges based on the node information connected by the filtered topological edges, and constructing a global topological knowledge graph covering all underground pipelines in the target area, wherein the attribute information includes physical spatial characteristics and resource occupancy status characteristics.
[0008] In one embodiment, the step of extracting a local topology knowledge graph from the global topology knowledge graph based on planning instructions carrying start-point information, end-point information, and pipeline planning includes: obtaining the coordinate information of the start-point and end-point information in the global topology knowledge graph, generating spatial range constraints to determine the basic envelope region; expanding the basic envelope region to form a three-dimensional local envelope region with safety redundancy; further adjusting the boundary of the three-dimensional local envelope region according to the positional relationship between important nodes and the boundary of the three-dimensional local envelope region; and extracting nodes and corresponding edges located within the boundary of the adjusted three-dimensional local envelope region from the global topology knowledge graph to construct the local topology knowledge graph.
[0009] In one embodiment, the step of using a large language model combined with engineering specification rules obtained based on the pipeline planning to evaluate and filter the utility tunnel resources in the structured text to obtain structured text with compatibility evaluation tags includes: extracting currently traversed candidate free edges from the structured text based on the pipeline planning and generating semantic retrieval instructions; obtaining engineering specification rules corresponding to the candidate free edges and the pipeline planning based on the semantic retrieval instructions; using the large language model as an inference engine to perform causal logic evaluation on the feasibility of reusing free utility tunnel resources in the structured text, filtering candidate free edges that conflict with the pipeline planning, and obtaining structured text of free utility tunnel resources with compatibility evaluation tags.
[0010] In one embodiment, the step of using the large language model to perform logical reasoning based on the local topological relationship of the structured text representation with compatibility evaluation labels, according to the starting point information and the ending point information, to generate a reasoning result that satisfies the pipeline planning and is a complete path chain from the starting point to the ending point includes: calling a spatial path search algorithm to extract candidate paths connecting the starting point information and the ending point information, and constructing a candidate path set; verifying the compatibility evaluation labels of the path segments that make up each candidate path, and eliminating conflicting path segments; and at the pathfinding divergence points of the candidate paths, comprehensively weighing the engineering target constraints in the planning instructions to generate a reasoning result that satisfies the pipeline planning and is a complete path chain from the starting point to the ending point.
[0011] In one embodiment, the step of invoking the spatial path search algorithm to infer and extract candidate paths connecting the starting point information and the ending point information, and constructing a candidate path set, includes: when the spatial path search algorithm determines that there are physical breakpoints on the path that cannot be connected, extracting the breakpoint information of the physical breakpoint and the corresponding local engineering specifications; based on the local engineering specifications, breakpoint information, and ending point information, performing obstacle avoidance in the three-dimensional scene formed by the pipeline detection data to generate a three-dimensional supplementary path that conforms to the actual engineering and has a smooth trajectory; converting the generated three-dimensional supplementary path into a newly added topological path segment in the local topological knowledge graph, invoking the spatial path search algorithm to infer and extract candidate paths connecting the starting point information and the ending point information, and constructing a candidate path set.
[0012] In one embodiment, the step of generating candidate connectivity schemes for at least one planning objective based on the inference result and constructing a candidate connectivity scheme set includes: obtaining the weight configuration in the adjusted planning instruction; generating candidate connectivity schemes for multiple planning objectives based on the inference result of the large language model; the planning objective is any one of path distance optimization, security constraint considerations, and reuse of existing resources; extracting node sequences and edge attribute features from the candidate connectivity schemes and rendering corresponding visual connectivity graphs; and storing the visual connectivity graphs and the candidate connectivity schemes as a candidate connectivity scheme set.
[0013] A device for connecting underground pipeline and utility tunnel resources based on a large language model includes: a global graph construction module for acquiring pipeline detection data of all underground pipelines in a target area and constructing a global topological knowledge graph corresponding to the utility tunnel resources of the underground pipelines; a local graph extraction module for extracting local topological knowledge graphs from the global topological knowledge graph based on planning instructions carrying start-point information, end-point information, and pipeline planning; a text generation module for converting the local topological knowledge graphs into a hierarchical text sequence to obtain structured text, and using a large language model combined with engineering specification rules obtained based on the pipeline planning to evaluate and filter the utility tunnel resources in the structured text to obtain structured text with compatibility evaluation tags; a reasoning module for using the large language model to perform logical reasoning based on the start-point information and the end-point information and the local topological relationships represented by the structured text with compatibility evaluation tags, generating a reasoning result that satisfies the pipeline planning and is a complete path chain from the start-point to the end-point; and a scheme generation module for generating candidate connectivity schemes for at least one planning objective based on the reasoning result, and constructing a set of candidate connectivity schemes.
[0014] A computer device includes a memory and a processor, the memory storing a computer program, characterized in that the processor executes the computer program to implement the steps of the above-described method.
[0015] A computer-readable storage medium having a computer program stored thereon, characterized in that the computer program, when executed by a processor, implements the steps of the above-described method.
[0016] Compared with the prior art, the advantages of the present invention are as follows: 1. This application constructs a global topological knowledge graph and dynamically extracts local graphs based on spatial constraints, then serializes them into structured text with hierarchical relationships. This "semantic representation of spatial data" processing method breaks through the bottleneck of traditional spatial computing, effectively connects physical spatial data with the cognition of large language models, realizes the graph representation and semantic dimensionality reduction understanding of physical spatial data, and enables large language models to directly read and parse complex underground topological networks. This not only reduces the processing complexity of massive spatial data, but also enables the processing of multi-source, fragmented attribute data. 2. By dynamically acquiring external engineering constraints through pipeline planning, an external knowledge retrieval and logical reasoning mechanism is introduced. Furthermore, by combining the pipeline attributes and spatial features of candidate edges in structured text, a large language model is used for causal reasoning and logical verification to improve the accuracy of pipeline compatibility assessment. In addition, the semantic level is used to comprehensively verify whether there are physical or regulatory conflicts (such as the same trench laying conditions and safety distances for pipeline types), thereby effectively filtering out invalid resources that do not meet engineering specifications and improving the accuracy of pipeline corridor resource identification and engineering feasibility. 3. By using a large language model to perform semantic trade-offs and evaluate schemes in structured text, multiple sets of candidate connectivity schemes can be generated in parallel for one or more planning objectives, taking into account the reuse of existing resources, path distance optimization, and safety constraints, thus providing more multi-dimensional auxiliary references for municipal planning decisions. 4. This application also constructs an intelligent agent workflow that combines macro-graph database retrieval with micro-scale model semantic reasoning: by abstracting the physical space of underground pipelines into a global topological knowledge graph, and dynamically extracting local subgraphs by autonomously generating spatial range constraints using a large model, combined with external knowledge base retrieval technology, prompt word engineering, and the logical reasoning capabilities of a large language model, the system is endowed with multi-level logical reasoning capabilities similar to human experts. It can automatically complete the semantic recognition and compatibility assessment of idle resources, and finally generate a multi-objective connectivity scheme that takes into account the reuse of existing resources, cost control, and safety compliance, thereby improving the efficiency of intensive utilization of urban underground space. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a flowchart illustrating the method for connecting underground pipeline and utility tunnel resources based on a large language model in an embodiment of the present invention. Figure 2This is a global topological knowledge graph corresponding to the underground pipeline corridor resources in an embodiment of the present invention; Figure 3 This is a local topological knowledge graph corresponding to the underground pipeline corridor resources in an embodiment of the present invention; Figure 4 This is a structural block diagram of an underground pipeline and utility tunnel resource interconnection device based on a large language model, as described in an embodiment of the present invention. Figure 5 This is an internal structural diagram of a computer device in an embodiment of the present invention. Detailed Implementation
[0019] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0020] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. This application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be noted that, in the absence of conflict, the following embodiments and features in the embodiments can be combined with each other. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0021] It should be noted that the following description covers various aspects of embodiments within the scope of protection of this invention. It will be apparent that the aspects described herein can be embodied in a wide variety of forms, and any particular structure and / or function described herein is merely illustrative. Based on this application, those skilled in the art will understand that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number and aspects set forth herein can be used to implement the device and / or practice the method. Additionally, this device and / or method can be implemented using other structures and / or functionalities besides one or more of the aspects set forth herein.
[0022] It should also be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this application. The drawings only show the components related to this application and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0023] Furthermore, specific details are provided in the following description to facilitate a thorough understanding of the examples. However, those skilled in the art will understand that the described aspects can be practiced without these specific details.
[0024] This application provides a method for connecting underground pipeline and utility tunnel resources based on a large language model, applied to a server or terminal. The terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable smart devices. The server can be a standalone server or a server cluster composed of multiple servers. For example... Figure 1 As shown, taking the application of this method for connecting underground pipeline and utility tunnel resources based on a large language model on a server as an example, the method includes the following steps: Step 101: Obtain pipeline detection data for all underground pipelines in the target area, and construct a global topological knowledge graph corresponding to the underground pipeline corridor resources. The pipeline detection data includes at least pipeline spatial data and attribute data.
[0025] The server acquires pipeline detection data for all underground pipelines in the target area. The server can receive raw pipeline detection data uploaded by users. The format of the pipeline detection data can be an underground pipeline survey database, a pipeline ledger in CSV or Excel format, a vector graphic in AutoCAD DWG / DXF format, a GIS data format, or a LiDAR point cloud data format. The pipeline detection data must include at least spatial and attribute data. Spatial data can include the three-dimensional coordinates (X, Y, Z) of the pipeline centerline, the starting / ending depth of the pipeline segment, the pipeline material, and the pipe diameter or cross-sectional dimensions. Attribute data can include pipeline type identifiers (e.g., water supply, drainage, gas, electricity, communication, etc.). The server reads a table file (e.g., in Excel spreadsheet format) containing the raw pipeline detection data. Based on the detailed engineering data recorded in the table, such as fields including site point number, pipe type, pipe diameter, coordinates, elevation, and burial depth, the server constructs... Figure 2 A global topological knowledge graph corresponding to the underground pipeline corridor resources.
[0026] In one embodiment, the server can also abstract each pipeline intersection, inspection well, node well, or endpoint in the pipeline detection data as a node, then determine edges based on the connection relationships between different nodes, and determine the weight of each edge according to the relationships between nodes; based on the nodes, edges, and edge weights, a global topological knowledge graph corresponding to the underground pipeline gallery resources is constructed. In one embodiment, the server can also send the global topological knowledge graph to the user terminal, allowing the user to select a location from the displayed global topological knowledge graph on the interface.
[0027] Step 102: Based on the planning instructions carrying starting point information, ending point information, and pipeline planning, extract the local topology knowledge graph from the global topology knowledge graph.
[0028] The server receives planning instructions from the user terminal, carrying start and end point information and pipeline planning details. The server can define a local envelope region containing the start and end points within the global topology knowledge graph; extract the nodes and corresponding edges located within the local envelope region, and construct a topology knowledge graph as follows: Figure 3 The local topological knowledge graph shown is generated by the server, which extracts only the nodes and their connecting edges that fall within the local envelope region, dynamically generating a lightweight local topological knowledge graph. This controls the context window length of the serialized input large language model, effectively filtering redundant global data and improving data processing efficiency. Pipeline planning is the design and coordination of linear systems of resources, processes, or entities in the spatial and temporal dimensions to ensure that optimal planning objectives are achieved while meeting transportation needs (such as oil and gas, water flow, electricity, or production materials). Pipeline planning carries at least one planning objective, including shortest path, lowest cost, safety priority, unified ownership, lower construction difficulty, and priority reuse of existing resources.
[0029] Step 103: The local topological knowledge graph is converted into a text sequence with hierarchical relationships to obtain structured text. A large language model is then used in conjunction with engineering specification rules obtained from pipeline planning to evaluate and filter the pipe gallery resources in the structured text, resulting in structured text with compatibility evaluation labels.
[0030] The server converts the local topological knowledge graph into a hierarchical text sequence, resulting in structured text. Using a large language model combined with engineering specification rules obtained from pipeline planning, the server introduces external planning specifications as an evaluation basis before reasoning on the serialized text in step 104. The server can communicate with a specification knowledge base, which can store various urban underground pipeline engineering planning specification documents after being segmented and vectorized, or it can directly store various urban underground pipeline engineering planning specification documents. When the server receives a planning instruction involving a specific pipeline (such as laying an "information pipeline"), the server extracts the target pipeline type and the attributes of the currently traversed candidate free edges in the serialized text, generates a semantic retrieval instruction, and sends it to the specification knowledge base. Based on this instruction, the specification knowledge base dynamically retrieves the relevant engineering specification rules for the engineering plan. These engineering specification rules can include medium restrictions for the isomorphic laying of water supply pipes and telecommunications cables, as well as horizontal clearance requirements when they are laid parallel.
[0031] The server converts a local topological knowledge graph into structured text not by simply piecing together the graph content into natural language, but by following pre-defined data extraction rules, topological relationship preservation rules, and formatted serialization rules. Specifically, this includes the following steps: (1) Obtain the basic data structure of the local topological knowledge graph.
[0032] The server uses a local topology knowledge graph G local =(V local E local ) as input, where V local E represents the set of nodes in a local graph. local This represents the set of edges in the local graph. Each node in the node set must contain at least a node identifier, node type, 3D coordinates, and the type of pipeline it belongs to; each edge in the edge set must contain at least an edge identifier, a starting node identifier, an ending node identifier, a pipeline type, a pipeline length, and a resource occupancy status. The resource occupancy status can include the total number of orifices, the number of orifices occupied, the number of orifices available, and a reusable identifier.
[0033] (2) Establish a node index table to fix the correspondence between node identifiers and node attributes.
[0034] Server traversal V local For each node in the database, a node index table is created using its unique identifier as the key. The node index table stores attributes such as the node's 3D coordinates, node type, pipeline type, ground elevation, burial depth, pipe top elevation, and pipe bottom elevation. Through this node index table, for each edge, the server can trace back to the spatial location and attribute information of the corresponding node based on the start and end node identifiers, thus avoiding the loss of node identity during text processing.
[0035] (3) Traverse the edge set and extract the edge's own attributes and the attributes of the nodes at both ends.
[0036] The server reads E sequentially local For each edge in the process, the server first obtains the edge identifier, start node identifier, and end node identifier; then, based on the start node identifier and end node identifier, it queries the node index table to obtain the coordinates, type, and pipeline attributes of the start and end nodes; finally, it obtains the edge's own attribute information, such as pipeline type, pipe segment length, total number of holes, number of occupied holes, number of free holes, whether it is a breakpoint placeholder edge, and whether it is a reusable resource.
[0037] If the edge itself does not directly record its spatial distance, the server calculates the physical distance of the edge based on the three-dimensional coordinates of the starting and ending nodes. If the pipe segment corresponding to the edge is in a resource occupancy state, the server calculates the number of free holes based on the total number of holes and the number of occupied holes, and uses this result as an input field for subsequent resource reuse evaluation.
[0038] (4) Organize graph-level information, node information and edge information according to the preset hierarchical structure.
[0039] The server can organize and structure the acquired data according to a preset hierarchical structure. This hierarchical structure includes at least graph-level information, a node list, an edge list, and topological references.
[0040] Graph-level information may include at least one of the following: number of nodes, number of edges, target pipeline type, start point identifier, end point identifier, coordinate system, or spatial unit.
[0041] The node list is used to store the attributes of each node. The node list can contain at least one of the following information for each node: node identifier, 3D coordinates, node type, pipeline type, and other attributes.
[0042] The edge list is used to store connection relationships and pipe segment attributes. The edge list can contain at least one of the following information for each edge: edge identifier, start node identifier, end node identifier, pipe segment attributes, resource occupancy status, and risk / breakpoint identifier.
[0043] Topological references can include each edge referencing a node in a node list via a start node identifier and an end node identifier. The edge list can use the `from` field (start node) and the `to` field (end node) to point to the node identifiers in the node list, thus explicitly preserving the topological references between edges and nodes in structured text.
[0044] (5) Generate standardized text fields using preset field mapping rules.
[0045] The server maps internal graph fields to standardized text fields. For example, node identifiers are mapped to `node_id`, start node identifiers to `from`, end node identifiers to `to`, pipe types to `pipe_type`, spatial physical distances to `distance_m`, free hole counts to `free_holes`, and whether an edge is a breakpoint placeholder to `is_gap_placeholder`. By using fixed field names, different local graphs can be converted into structured text of the same format.
[0046] (6) Perform topology consistency check.
[0047] In one embodiment, before generating structured text, the server can also perform a consistency check on the graph conversion result. The check includes: whether the start and end node identifiers of each edge in the edge list are present in the node list; whether the number of nodes and edges are consistent with the graph-level information; whether the same node identifier is defined repeatedly; whether breakpoint placeholder edges are correctly marked; and whether numerical fields such as pipe segment length and number of holes meet preset data type requirements. The server can selectively perform this step 6 based on the graph quality.
[0048] If the verification fails, the server outputs an error message and stops submitting the local graph to the large language model; if the verification passes, the server continues to perform serialization processing.
[0049] (7) Serialize the hierarchical structure into structured text that can be read by a large language model.
[0050] The server serializes the validated hierarchical structure into a standardized markup language such as JSON, XML, GeoJSON, or YAML. Taking JSON as an example, the structured text output by the server includes three main parts: graph, nodes, and edges. The graph records graph-level summary information, the nodes record the set of nodes, and the edges record the set of edges and their origin-endpoint references.
[0051] In this structured text, although the text itself is arranged linearly according to character order, each edge still explicitly references a node identifier through the `from` and `to` fields. When multiple edges share the same node identifier, it means that these edges are topologically connected at that node. Therefore, when the large language model reads this structured text, it can recover the multi-hop path connections based on the reference relationships between the same node identifiers, thereby performing path reasoning from the start point to the end point.
[0052] (8) Use structured text as a unified input for subsequent normative evaluation and path reasoning.
[0053] The server inputs the generated structured text into the subsequent compatibility assessment step. After the compatibility assessment step writes compatibility assessment labels into the edge-level fields, the structured text continues to serve as input for the path reasoning step. Because the structured text simultaneously preserves node attributes, edge attributes, and edge-to-node references, the subsequent large language model can both read the resource status of the pipeline segment and perform multi-hop path reasoning along the graph based on the from and to fields.
[0054] Through the steps described above, the local topological knowledge graph is converted into structured text with a fixed format, fixed fields, and fixed topological reference relationships. This conversion process is not an arbitrary text description, but a deterministic conversion process from the graph data structure to a standardized markup language, which ensures that the nodes, edges, attributes, and connections in the graph structure are completely preserved after textification.
[0055] As an optional example, structured text can be represented in JSON format. Below is an example of a display of power cables for a specific region: { "graph": { "node_count": 2, "edge_count": 1, "target_pipe_type": "power cable", "start_node": "N1", "end_node": "N2" }, "nodes": [ { "node_id": "N1", "x": 3593.767, "y": -5921.025, "z": 3.424, "node_type": "Inspection well", "pipe_type": "power cable" }, { "node_id": "N2", "x": 3596.815, "y": -5932.884, "z": 3.322, "node_type": "Inspection well", "pipe_type": "power cable" } ], "edges": [ { "edge_id": "E1", "from": "N1", "to": "N2", "pipe_type": "power cable", "distance_m": 12.245, "total_holes": 12, "occupied_holes": 6, "free_holes": 6, "is_reusable": true, "is_gap_placeholder": false } ] } In the example above, both the from and to fields in edges reference the node_id in nodes. Therefore, even if the content is serialized into text, the connection direction of the edges and the multi-hop topology can still be recovered through the node identifier.
[0056] The structured text described above preserves the complete topological information of the graph structure through the following mechanism: (1) Representation of topological connections: Each edge explicitly declares the directed connection between two nodes through the edge_id field in the format "start_node (source node) → end_node (target node)"; at the same time, the start_node and end_node fields uniquely identify the nodes at both ends of the edge. When two edges share the same node identifier, it indicates that there is a topological connection between the two edges at that node, and the large language model can perform multi-hop path reasoning accordingly; (2) Complete preservation of spatial information: Each node carries three-dimensional spatial coordinates (x, y, z), and each edge carries spatial physical distance (distance_m), enabling large language models to perform path length calculation and spatial reasoning based on spatial distance; (3) Carrying resource status and compatibility labels: Each edge carries attributes such as the total number of holes, the number of occupied holes, the number of free holes, whether it is reusable (is_reusable), and whether it is a gap placeholder edge (is_gap_placeholder). These attributes serve as input for compatibility evaluation and path decision-making in subsequent steps of the large language model; (4) Design of hierarchical structure: JSON adopts a three-level hierarchical structure of “graph summary → edge list → source / target node attributes embedded in each edge”, which enables the large language model to understand the overall topology scale from the graph summary first, and then analyze the specific connection relationship and resource status edge by edge, which conforms to the reasoning paradigm from macro to micro.
[0057] The server evaluates and filters the utility tunnel resources in the structured text according to engineering specifications, resulting in structured text with compatibility assessment tags. The server filters out edges that have physical or regulatory conflicts and attaches corresponding compatibility assessment tags and judgment criteria to candidate edges. Through this causal reasoning process, the server successfully eliminates invalid resources that appear idle but actually violate engineering specifications, achieving accurate identification and compliance assurance of utility tunnel resources.
[0058] Step 104: Using a large language model, logical reasoning is performed based on the local topological relationships of the starting point and ending point information and the structured text representation with compatibility evaluation labels to generate a reasoning result that satisfies pipeline planning and is a complete path chain from the starting point to the ending point.
[0059] A Large Language Model (LLM) is a deep learning model that learns natural language from a large amount of text through large-scale unsupervised training. This model can generate natural language text or understand the meaning of language text. In one embodiment, a large language model can be an agent model or learned and trained through a deep learning network. For example, large language models are large-scale language models with complex instruction following capabilities and logical reasoning abilities, such as GPT-4 (OpenAI), Qwen (Alibaba Cloud), and DeepSeek. The training dataset for this model consists of three types of data: general corpus data, domain knowledge data, and task instruction data. General corpus data is used to maintain the model's basic language capabilities and prevent catastrophic forgetting. Specifically, it can use open-source general text corpora, including but not limited to: Wikipedia Chinese corpus, news media corpora, and book corpora. Domain knowledge data is used to enable the model to learn professional terminology, concepts, and knowledge systems in the pipeline planning domain. Data sources can include pipeline design specifications (such as GB50838 "Technical Specification for Urban Integrated Pipeline Gallery Engineering" and GB50373 "Design Standard for Communication Pipelines and Channels Engineering"), technical manuals (such as construction manuals for various pipelines, technical requirements for entering corridors, and pipe material selection guidelines), industry standard terminology databases, typical engineering cases, and route plans. Task instruction data is the core of the training dataset, used to train the model to execute specific pipeline planning tasks. Each instruction contains three fields: instruction (instruction description), input (input data), and output (expected output).
[0060] This method's large language model learns from various text data in the training dataset to understand the statistical patterns, world knowledge, and logical reasoning patterns of language in the pipeline planning field. Subsequently, it can perform logical reasoning on the local topological relationships represented by structured text through prompt words.
[0061] The server uses a large language model to perform logical reasoning based on the local topological relationships represented by the structured text with compatibility assessment tags, according to the starting point and ending point information. This generates a reasoning result that satisfies pipeline planning and shows a complete path chain from the starting point to the ending point. The server can directly input planning instructions into the large language model, or it can input at least one engineering objective constraint combined with the planning instructions. Engineering objective constraints can be any of the following: shortest path constraint (prioritizing the path with the smallest total physical distance), lowest cost constraint (comprehensively considering laying costs, access fees, and coordination costs between ownership units), safety priority constraint (avoiding high-risk pipe sections, etc.), unified ownership constraint (completing path planning within the same ownership unit's network as much as possible to reduce cross-unit coordination), or construction difficulty constraint (avoiding pipe sections with excessive burial depth, crossing important rivers, or subway tunnel areas).
[0062] The server inputs start-point and end-point information into the large language model. The large language model then performs logical reasoning based on the local topological relationships represented by the structured text with compatibility evaluation labels, searching for a connected subgraph from the start point to the end point. The large language model can perform multi-hop pathfinding reasoning within the structured text with compatibility evaluation labels based on the start-point and end-point information in the planning instructions. When faced with multiple candidate branches, the large language model can perform comprehensive evaluation and semantic trade-offs based on the engineering goal weights in the engineering goal constraints, iteratively connecting edges that satisfy compatibility conditions, thereby generating a connected subgraph that satisfies pipeline planning and represents a complete path chain from the start point to the end point. This connected subgraph is then displayed as the reasoning result.
[0063] Step 105: Based on the reasoning results, generate candidate connectivity schemes for at least one planning objective and construct a set of candidate connectivity schemes.
[0064] Based on the inference results, the server generates candidate connectivity schemes for at least one planning objective, constructing a set of candidate connectivity schemes. Based on the single inference result of the large language model, the server drives the large language model to generate candidate connectivity schemes for at least one planning objective by adjusting the weight configuration in the instruction template, constructing a set of candidate connectivity schemes. For example, the planning objective can be any one of path priority, security priority, and resource reuse priority.
[0065] Path priority indicates that the configuration prioritizes shortening the connection distance. Large language models favor geometrically direct connectivity, allowing for a higher proportion of additional newly excavated pipeline segments.
[0066] Safety first means that the configuration scheme prioritizes strictly avoiding risks. During inference, the large language model will actively avoid node regions with high-risk attributes and conservatively discard nodes when the spatial spacing is at the standard threshold, thereby outputting a safer connection path.
[0067] Prioritizing resource reuse means that the configuration scheme prioritizes minimizing new excavation work. The large language model will thoroughly search and evaluate all connected available free edges, tending to reuse existing underground utility tunnels as much as possible.
[0068] The large language model outputs a connected path from the starting point to the ending point that satisfies pipeline planning in a standard data interaction format. This connected path includes nodes, edges, branch points, and optimal path segments traversed from the starting point. The large language model can generate a readable planning recommendation report in natural language, which includes path descriptions, reasons for trade-offs, and precautions.
[0069] The aforementioned method, by constructing a global topological knowledge graph and dynamically extracting local graphs based on spatial constraints, then serializing them into structured text with hierarchical relationships, breaks through the bottleneck of traditional spatial computing. It effectively bridges the gap between physical spatial data and the cognition of large language models, achieving graph-based and semantically dimensionality-reduced understanding of physical spatial data. This allows large language models to directly read and parse complex underground topological networks, reducing the processing complexity of massive spatial data and enabling the processing of multi-source, fragmented attribute data. Furthermore, by dynamically acquiring external engineering constraint rules through pipeline planning, an external knowledge retrieval and logical reasoning mechanism is introduced. Combining the pipeline attributes and spatial features of candidate edges in the structured text, the large language model performs causal reasoning and logical verification, improving the accuracy of pipeline compatibility assessment. Moreover, it comprehensively verifies the existence of physical or regulatory conflicts (such as the same-trench laying conditions and safety distances for pipeline types) from a semantic perspective, effectively filtering out invalid resources that do not conform to engineering specifications, thus improving the accuracy of pipeline corridor resource identification and engineering feasibility. By performing semantic trade-offs and evaluating solutions in structured text using a large language model, multiple sets of candidate connectivity solutions can be generated in parallel for one or more planning objectives, taking into account the reuse of existing resources, path distance optimization, and safety constraints. This provides more multi-dimensional auxiliary references for municipal planning decisions. Furthermore, the entire method forms an intelligent agent workflow combining macro-graph database retrieval and micro-scale model semantic reasoning. By abstracting the physical space of underground pipelines into a global topological knowledge graph, and having the large model autonomously generate spatial constraints to dynamically extract local subgraphs, combined with external knowledge base retrieval technology, prompt word engineering, and the logical reasoning capabilities of the large language model, the system is endowed with multi-level logical reasoning capabilities similar to human experts. It can automatically complete semantic recognition and compatibility assessment of idle resources, and ultimately generate multi-objective connectivity solutions that balance the reuse of existing resources, cost control, and safety compliance, thereby improving the intensive utilization efficiency of urban underground space.
[0070] In one embodiment, pipeline detection data of all underground pipelines in the target area is obtained, and a global topological knowledge graph corresponding to the underground pipeline gallery resources is constructed, including: Step 1: Obtain pipeline detection data for all underground pipelines within the target area. The pipeline detection data includes pipeline spatial data, attribute data, and resource occupancy status.
[0071] The server acquires pipeline detection data for all underground pipelines within the target area. This pipeline detection data includes pipeline spatial data, attribute data, and resource occupancy status.
[0072] The server calculates the absolute three-dimensional coordinates of each feature point (such as a water supply pipeline valve well or a telecommunications cable manhole) by integrating two-dimensional plane coordinates, ground elevation, and burial depth data from pipeline spatial data.
[0073] Resource occupancy status refers to the record of cables actually laid or planned for occupancy within a pipeline section, including the occupied hole number, occupied cable type, occupancy unit, and occupancy time. Resource occupancy status can be extracted from planning ledger data. The calculation process for resource occupancy status characteristics is as follows: For N with total pore number attribute total For a given pipe section, the system calculates the number of occupied boreholes (N) from the planning ledger data. occupied Then the number of empty holes N free N is determined by the following formula: free =N total N occupied When different hole sizes exist within the same pipe section (e.g., some holes are φ110mm, some are φ50mm), the server can further calculate the number of available holes based on the pipe diameter. In this embodiment, when N is calculated... free When the value is greater than 0, the system will mark the edge as a potential reusable resource and record its number of free holes and corresponding specifications.
[0074] Step 2: Abstract each pipeline intersection, maintenance well, node well, or endpoint in the pipeline space data into a node, and establish topological edges between adjacent nodes based on the connection relationship between nodes in the pipeline space data.
[0075] The server establishes topological edges between adjacent nodes based on the connectivity relationships in the probe data, and uses different color mappings to distinguish different types of pipelines such as water supply, drainage, power, and communication. The server abstracts each pipeline intersection, manhole, node well, or endpoint in the pipeline spatial data into a node, and establishes topological edges between adjacent nodes based on the connectivity relationships between nodes in the pipeline spatial data. Each pipeline is abstracted as a topological edge, and each pipeline intersection, manhole, node well, or endpoint is abstracted as a node. Node attributes include: unique node identifier (ID), node type (e.g., straight manhole, tee manhole, four-way manhole, endpoint manhole), 3D spatial coordinates (X, Y, Z), ground elevation, and well depth. Edge attributes include: unique edge identifier (ID), pipeline type (e.g., communication pipe, power pipe), material (e.g., PVC, galvanized steel pipe, seven-hole perforated pipe), total number of holes, inner / outer diameter, starting node ID, ending node ID, ownership unit, and construction year. For the same edge, the system uses the three-dimensional coordinates of its two endpoints to calculate the physical spatial distance of the pipe segment. If the node coordinates are in latitude and longitude format, they are first converted to projected plane coordinates (such as UTM coordinates) before the distance is calculated.
[0076] Step 3: Filter out topological edges with available margins based on resource occupancy status.
[0077] The server selects topology edges with available margins based on resource occupancy status. The server can satisfy N free Each edge with a value greater than 0 generates a reusable resource record. Each reusable resource record may include: pipe segment identifier (edge ID), start and end node identifiers, number and specifications of available boreholes, physical spatial distance, ownership unit, burial depth range, etc. In some embodiments, the server can also merge multiple adjacent reusable edges belonging to the same ownership unit and of the same pipeline type to form a continuous reusable pipe segment path, and output data interfaces for design or construction personnel to use.
[0078] Step 4: Based on the node information of the selected topological edges, calculate the attribute information of the topological edges and construct a global topological knowledge graph covering all underground pipelines in the target area. The attribute information includes physical space characteristics and resource occupancy status characteristics.
[0079] Based on the node information of the selected topological edges, the server calculates the attribute information of the topological edges and constructs a global topological knowledge graph covering all underground pipelines in the target area. The attribute information includes physical space characteristics and resource occupancy status characteristics.
[0080] The above method can automatically and efficiently identify reusable pipe resources from massive amounts of existing pipeline data without additional excavation or redundant construction. Combined with physical distance information, it can provide direct and quantitative decision-making basis for subsequent pipeline relocation, 5G micro-station access, and power duct sharing projects, significantly reducing underground pipeline construction costs and minimizing repeated excavation of urban roads.
[0081] In one embodiment, based on planning instructions carrying start-point information, end-point information, and pipeline planning, a local topology knowledge graph is extracted from the global topology knowledge graph, including the following steps: Step i: Obtain the coordinate information of the starting point and ending point in the global topological knowledge graph, and generate spatial range constraints to determine the basic envelope region.
[0082] The server retrieves the coordinates of the starting and ending points in the global topological knowledge graph, and generates spatial constraints to determine the basic envelope region. Let the starting point P... s and endpoint P t Let x and y be any two points in three-dimensional space, and x and y be respectively given coordinates (x, y, y). s ,y s ,z s ) and (x t ,y t ,z t The start and end points can be existing pipeline nodes, access points of proposed buildings, locations of maintenance wells, or any coordinates specified by the user on the map. The global topology knowledge graph G=(V,E), where V is the set of nodes and E is the set of edges. Each node has three-dimensional coordinate attributes, and each edge connects two nodes and represents an underground pipe segment.
[0083] The server is based on the starting point P. s and endpoint P t The spatial location is used to generate a basic 3D envelope region through underlying spatial calculation rules. The underlying spatial calculation rules include at least one of the following two implementation methods or a combination thereof: (a) Axial enclosing box method The server calculates the minimum and maximum values of the starting and ending points along each coordinate axis: x min =min(x s ,x t ), x max =max(x s ,x t ); y min =min(y s ,y t ), y max =max(ys ,y t ); z min =min(z s ,z t ), z max =max(z s ,z t ).
[0084] With (x min ,y min ,z min ) and (x max ,y max ,z max Using the diagonal vertices as the base, construct a cuboid region aligned with the coordinate axes, which serves as the basic envelope region.
[0085] (ii) Path Buffer Method The server can use either the A* algorithm or Dijkstra's algorithm to search for a path starting from point P in the global topological knowledge graph G. s To the destination P t The initial path (usually optimized to minimize physical distance or cost) is denoted as a polyline segment Γ consisting of several continuous edges.
[0086] Then, the server can use path Γ as the center line and move along the horizontal direction (XY plane) with a preset buffer radius R. xy (For example, 20 meters, 50 meters, or 100 meters), along the vertical direction (Z-axis) at the preset buffer height H z (For example, 5 meters, 10 meters, usually considering the variation in burial depth of underground pipelines), generating a three-dimensional pipe-shaped envelope region. Mathematically, this region can be represented as: .
[0087] Step ii: Expand the basic envelope region to form a three-dimensional local envelope region with safety redundancy.
[0088] The server expands the basic envelope region to form a three-dimensional local envelope region with safety redundancy. The server introduces safety redundancy and expands outward to form the final three-dimensional local envelope region with safety redundancy. Safety redundancy is used to address at least one of the following practical engineering needs: location errors at the starting or ending points; uncertainties in pipeline detection data; reserving detour space for subsequent route planning (e.g., avoiding conflicting pipelines or unusable pipe sections); and meeting construction spacing specifications.
[0089] Safety redundancy is achieved through one or more of the following methods: (1) Absolute extension method Add a fixed redundancy δ in each coordinate axis direction. x ,δ y ,δ z The expanded envelope region boundary is: x min =x min δ x x max =x max +δ x ;y min ′=y min δ y y max ′=y max +δ y ;z min ′=z min δ z , z max ′=z max +δ z .
[0090] (2) Proportional expansion method Based on the distance between the start and end points It expands according to a preset scaling factor k (k is a constant, for example, k=0.2). , , where α is the vertical scaling factor (e.g., α=0.1).
[0091] (3) Buffer expansion method For the initial envelope region generated by the path buffer method, the horizontal buffer radius R xy Increase the redundancy radius r red (For example, 10 meters), the vertical buffer height H z Increase the redundancy height h red (For example, 2 meters), to obtain the expanded buffer radius R. xy =R xy +r red and buffer height H z =H z +h red .
[0092] Step iii: Based on the positional relationship between important nodes and the boundary of the three-dimensional local envelope region, further adjust the boundary of the three-dimensional local envelope region.
[0093] Based on the positional relationship between important nodes and the boundary of the 3D local envelope region, the server further adjusts the boundary of the 3D local envelope region. Within the expanded 3D local envelope region, the server checks if any important nodes (such as manholes of main pipelines or valve chambers) are located near the boundary. If any node's distance to the boundary is less than a preset attraction threshold... If the distance is 5 meters, the node will be included in the three-dimensional local envelope region, and the boundary will be adjusted accordingly to include the node, thereby ensuring that no key topological nodes are missed due to boundary cutting.
[0094] Step iv: Extract the nodes and corresponding edges located within the boundaries of the adjusted 3D local envelope region from the global topological knowledge graph to construct the local topological knowledge graph.
[0095] The server extracts nodes and corresponding edges located within the boundary of the adjusted 3D local envelope region Ω from the global topology knowledge graph, constructing a local topology knowledge graph. The server then selects all nodes and edges from the global topology knowledge graph G that satisfy the following conditions: Node V local Filtering: The node's three-dimensional coordinates (x, y, z) are located inside or on the boundary of the three-dimensional local envelope region Ω; Side E local Filtering: Both end nodes of an edge are located inside Ω, or at least one end node of an edge is located inside Ω and the edge intersects the boundary of Ω (i.e., partially crosses the envelope region).
[0096] All the selected nodes and edges, along with their original attributes (coordinates, type, total number of holes, number of occupied holes, material, ownership unit, etc.), together constitute a subgraph G. local G local =(V local E local This subgraph is a local topological knowledge graph.
[0097] The server can also record the coordinates of the virtual intersection point of each truncated edge at the boundary of the envelope region and retain them as auxiliary nodes in the local topology graph to maintain the integrity of topological connectivity.
[0098] The method described above dynamically narrows the search space of the global knowledge graph from the entire city or region level to a local three-dimensional region centered on the starting and ending points, with engineering safety redundancy. Compared with running path search algorithms directly on the entire global graph, this reduces computational complexity, thereby significantly improving the system's real-time response capability. Simultaneously, the introduction of safety redundancy ensures the method's robustness and engineering usability in real underground environments.
[0099] In one embodiment, a large language model combined with engineering specification rules obtained based on pipeline planning is used to evaluate and filter the utility tunnel resources in the structured text, resulting in structured text with compatibility evaluation labels. This includes: extracting candidate idle edges currently traversed from the structured text based on pipeline planning and generating semantic retrieval instructions; obtaining engineering specification rules corresponding to the candidate idle edges and pipeline planning based on the semantic retrieval instructions; and using a large language model as an inference engine to perform causal logic evaluation on the feasibility of reusing idle utility tunnel resources in the structured text, filtering candidate idle edges that conflict with pipeline planning, and obtaining structured text of idle utility tunnel resources with compatibility evaluation labels.
[0100] The server extracts the identifiers, 3D spatial coordinate features, and attribute information such as pipeline type, physical distance, and current number of available orifices of the pipeline network edges and their two endpoints, and converts this information into structured text corresponding to a standardized markup language or natural language description sequence. The server can then use a local topology map G... local =(V local E local Given V as input, extract the set of nodes and the set of edges. local Each node v in the array must contain at least: a unique node identifier v.id, three-dimensional spatial coordinates (vx, vy, vz), and a node type v.type (e.g., maintenance well, tee well, endpoint well); and an edge set E. local Each edge e in the array must contain at least the following: edge unique identifier e.id, starting node identifier e.from, ending node identifier e.to, pipeline type e.pipeType (e.g., communication pipe, power pipe, water supply pipe), spatial physical distance e.distance, and current number of free holes e.freeHoles.
[0101] The server iterates through each edge e∈E in the input graph. local For each edge, the following extraction operations are performed: (1) Extraction of the edge and the identifiers of its two ends: edge identifier e.id, starting node identifier e.from, and ending node identifier e.to; (2) Extraction of three-dimensional spatial coordinate features: based on the identifiers of the two ends of the edge, extract the three-dimensional spatial coordinate features from the node set V. localThe three-dimensional coordinates (xfrom, yfrom, zfrom) of the starting node and the three-dimensional coordinates (xto, yto, zto) of the ending node are obtained respectively, and they are extracted as the coordinate features of the edge. As an extended implementation method, the system also extracts the midpoint coordinates of the edge, the direction vector from the starting point to the ending point, and other derived spatial features; (3) Extraction of pipe segment attribute information: pipe type e.pipeType, spatial physical distance e.distance, current number of free holes e.freeHoles. As a preferred implementation method, the server can also extract one or more of the following attributes: pipe diameter specification, material, ownership unit, construction year, burial depth range, total number of holes, and number of occupied holes. The server organizes the above information extracted into a text sequence according to the preset hierarchical structure. The hierarchical relationship is reflected in: taking each edge as the top-level unit, the attributes under the edge are divided into three sub-levels: "edge self-attribute", "starting node attribute", and "ending node attribute". The server converts the above structured text sequence with hierarchical relationship into one or more standardized markup languages according to the preset mapping rules. Standardized markup language formats include, but are not limited to: JSON, XML, GeoJSON, and YAML.
[0102] Based on pipeline planning, the server extracts candidate idle edges from the structured text and generates semantic retrieval instructions. The pipelines corresponding to the pipeline planning can be water supply, and candidate idle edges can be pipelines of the same type as water supply, or other types such as electricity, communication, or gas. For each candidate idle edge, the server reads information such as the edge's start node, end node, candidate pipeline type, spatial physical distance, total number of holes, number of occupied holes, number of idle holes, burial depth, material, ownership unit, and whether it is a breakpoint / placeholder edge. If the number of idle holes for a candidate idle edge is greater than zero, the edge is considered a potentially reusable resource; if the candidate edge has insufficient idle holes, an incompatible pipeline type, or is a breakpoint / placeholder edge, it will be marked as unreusable or requiring the addition of new pipelines in subsequent evaluations. The server combines the target pipeline type, candidate pipeline type, and candidate edge usage scenario into semantic retrieval instructions. For example, when the target pipeline is a power cable and the candidate or adjacent pipeline is a gas pipeline, the semantic search instructions generated by the server include "restrictions on laying power cables and gas pipelines in the same trench", "horizontal clearance between power cables and gas pipelines", and "safety requirements for power cables crossing gas pipelines". When the target pipeline is a water supply pipeline and the candidate pipeline is a telecommunications cable, the semantic search instructions generated by the server include "restrictions on laying water supply pipelines and telecommunications cables in the same trench" and "clearance between water supply pipelines and communication cables laid in parallel".
[0103] The server can send semantic retrieval commands to the engineering specification knowledge base. Based on these commands, the knowledge base retrieves the engineering planning rules corresponding to candidate free edges and pipeline planning (e.g., media restrictions for isomorphic laying of water supply pipes and telecommunication cables, and horizontal clearance requirements when they are laid parallel), and feeds these rules back to the server. The engineering specification knowledge base can include GB50289-2016 "Code for Comprehensive Planning of Urban Engineering Pipelines" and other local standards, industry standards, or project rules. The knowledge base returns applicable rules based on the target pipeline type and candidate pipeline types. Applicable rules must include at least the rule source, applicable object, rule type, and rule conclusion. For example, in a scenario where the target pipeline is a power cable and the candidate pipeline is a gas pipeline, the knowledge base can return: power cables and gas pipelines must not be laid in the same trench; when they are laid parallel or adjacent, the corresponding minimum horizontal clearance requirements must be met. The server structures this rule into fields such as "rule source, pipeline combination, restriction type, threshold, and processing conclusion."
[0104] The server converts the specification clauses corresponding to the engineering planning rules into executable judgment steps for the large language model. Based on these judgment steps, it generates prompts for the input large language model, enabling the model to perform causal logic evaluation along a fixed logical chain. The judgment steps may include: determining whether the pipeline type of the candidate edge belongs to the same type of reusable resource as the target pipeline; determining whether the candidate edge has sufficient free holes or available capacity; determining whether there are prohibitive rules such as prohibition of sharing trenches or pipe holes between the target pipeline and candidate edges or adjacent pipelines; and determining whether spatial distance, burial depth, or net distance meets one or more of the specification thresholds. Based on these judgment steps, compatibility labels and risk levels can be generated.
[0105] The server can combine decision steps with task descriptions, target pipeline information, candidate edge data, applicable rules and output requirements to create prompts. A prompt must include at least the following: i Role Description: Requires the large language model to make judgments as an expert in municipal pipeline compatibility assessment; ii. Target pipeline information: Target pipeline type, specifications, and planning purpose; iii. Candidate edge information: pipeline type, start and end points, borehole status, spatial distance, burial depth, etc. of the candidate edge; iv. Applicable normative rules: Rules retrieved from the normative knowledge base and their sources; v Judgment steps: The model is required to sequentially judge type compatibility, resource availability, specification conflict, and net distance risk; vi Output format: Requires the model to be output in a fixed JSON format.
[0106] The server uses a large language model as its inference engine to perform causal logic evaluation on the feasibility of reusing idle utility tunnel resources in structured text. It filters candidate idle edges that conflict with pipeline planning, resulting in structured text of idle utility tunnel resources with compatibility evaluation labels. After receiving the serialized structured text and the recall rules, the large language model, as its inference engine, performs causal logic evaluation on the feasibility of reusing this segment of idle utility tunnel. Based on the judgment steps in the prompts, the large language model evaluates candidate edges and outputs structured results. The output fields include at least: { "edge_id": "Candidate edge identifier", "compatible": true, "reuse_allowed": true, "risk_level": "safe", "rule_basis": "Source of applicable rules or regulations", "reason": "basis for judgment" } Among them, compatible indicates whether the engineering specification compatibility requirements are met, reuse_allowed indicates whether the resource is allowed to be reused as the target pipeline, risk_level indicates the risk level, rule_basis indicates the standard basis adopted, and reason indicates the reason for the judgment.
[0107] Compared to traditional rules that only consider the remaining quantity (the number of empty holes being greater than zero), large language models execute a more stringent logical verification chain: (1) Type compatibility determination: The large model compares the pipeline types of the target pipeline with those of the candidate edges, and infers whether there is a medium conflict between them based on the feedback engineering planning rules. For example, the large model infers that there is a medium incompatibility between water supply pipes and telecommunications cables, and even if there are enough empty holes in the pipe section, they do not have the compatibility of being reused in the same trench.
[0108] (2) Safety distance assessment: If new excavation is required in parallel next to the candidate edge, the large model will combine the three-dimensional spatial coordinate characteristics of the adjacent nodes to calculate whether the spatial distance meets the safety threshold required by the standard rules.
[0109] After the above reasoning and verification, the large language model will filter out edges that have physical or specification conflicts, and attach corresponding compatibility evaluation labels and judgment criteria to the candidate edges.
[0110] The server receives the causal logic evaluation results from the large language model and uses a JSON parser to read fields such as edge_id, compatible, reuse_allowed, risk_level, and reason. If any output fields are missing or the format does not meet the requirements, the server can perform format correction, provide further suggestions, or downgrade to a rule engine-based judgment.
[0111] After successful parsing, the server writes the compatibility assessment label back to the corresponding candidate edge, forming structured text with the compatibility assessment label. Subsequent path reasoning steps only use edges with compatible=true or not marked as conflicting as valid path segments; for edges with compatible=false, the server can remove them from the candidate reuse resources or mark them as needing to be newly created, rerouted, or manually reviewed.
[0112] The above method, through this causal reasoning process, successfully eliminated invalid resources that appeared idle but actually violated engineering specifications, achieving accurate identification and compliance assurance of utility tunnel resources. Furthermore, the generation and parsing of prompt words are automatically completed by the server based on engineering data and regulatory rules, allowing for the subsequent reproduction of this compatibility assessment process based on the target pipeline, candidate edge fields, and regulatory knowledge base rules.
[0113] In some embodiments, a large language model is used to perform logical reasoning based on the local topological relationships of the structured text representation with compatibility evaluation labels, according to the starting point information and the ending point information, to generate a reasoning result that satisfies pipeline planning and is a complete path chain from the starting point to the ending point. This includes: calling a spatial path search algorithm to extract candidate paths that connect the starting point information and the ending point information, and constructing a candidate path set; verifying the compatibility evaluation labels of the path segments that make up each candidate path, and eliminating conflicting path segments; and at the pathfinding divergence points of the candidate paths, comprehensively weighing the engineering target constraints in the planning instructions to generate a reasoning result that satisfies pipeline planning and is a complete path chain from the starting point to the ending point.
[0114] To guide the large language model in global spatial planning, the server inputs a search instruction containing pipeline planning data into the model. After receiving structured text with compatibility assessment tags, the server generates path reasoning prompts based on the pipeline planning (the search instruction carries these prompts) to guide the large language model in multi-objective path trade-offs. This search instruction structurally integrates engineering objectives, contextual information, and priority instructions from the pipeline planning. These priorities correspond to engineering objective constraints and are set through natural language to prioritize pathfinding weights. For example, when the server receives detailed pipeline planning information such as "When searching for a continuous path from the starting point to the end point, existing idle pipe segments that meet compatibility assessment conditions must be utilized first; based on this, the total path length and new excavation costs should be controlled as much as possible," the server uses the large language model to first analyze this macro-control constraint, breaking it down into the engineering objective constraints included in the macro-control constraint: 1. Prioritize the reuse of existing resources; 2. Shortest path; 3. Lowest cost. Based on the search instruction, the large language model performs logical reasoning within the context of the structured text to search for the optimal connected subgraph.
[0115] The specific execution logic for the server to generate path reasoning prompts is as follows: (1) Initial screening using spatial algorithms to generate a candidate path set: The server parses the origin and destination information, calls the underlying spatial path search algorithm, and extracts a candidate path set that satisfies the basic topological connectivity. Based on the local topological relationships with compatibility evaluation labels, the server calls the Dijkstra algorithm, A* algorithm, or other spatial path search algorithms to generate a candidate path set P={P1,P2,…,P...} from the origin to the destination. m}, where each candidate path P i It is an ordered sequence of nodes [v0, v1, v2, ..., v k ], satisfying v0=S (starting point), v k =T (end point), and there are edge (pipe segment) connections between adjacent nodes; (2) Verify the compatibility evaluation labels in the candidate paths: The server obtains the path segments of the candidate paths in the candidate path set one by one, as well as the compatibility labels of the corresponding edges of the path segments. If a path contains an edge with compatible=false, the server can remove the path or mark it as a high-risk candidate path. If an edge is marked as a breakpoint placeholder edge, the server marks the edge as requiring subsequent breakpoint supplementation path processing. The server can also use logical reasoning to remove or reduce the weight of path segments with risks such as physical net distance thresholds or pipeline conflicts. A path segment refers to multiple road segment edges that make up a candidate path, and each road segment edge corresponds to an edge / channel segment. The large model verifies the compatibility evaluation labels of each path in the candidate path set P branch by branch and removes paths containing conflicting branches. The server removes paths in P containing at least one conflicting branch through the large language model, obtaining the verified candidate path set P. valid P. If P valid If the value is empty, the server returns a message to the user that there is no feasible path and suggests adjusting the planning requirements (such as reducing the number of holes, relaxing ownership constraints, or adding breakpoint paths, etc.). (3) Identifying pathfinding branch points in candidate paths: The server compares the node sequences of each path in the candidate path set. When multiple candidate paths have the same prefix before the same node but choose different successor nodes after that node, the server identifies that node as a pathfinding branch point. For each branch point, the server extracts indicators such as distance, reuse length, number of free holes, risk level, new length, and number of breakpoints for each branch path. A pathfinding branch point is a node in the candidate path set where two or more paths branch off at this node and lead to different successor nodes. For example, if path A goes to N-104 after passing N-102, and path B goes to N-105 after passing N-102, then N-102 is a branch point. The server analyzes P... valid Given the node sequence of all paths in the sequence, identify all branch points D={d1,d2,…,dq}; (4) Generate weight configuration or priority instructions based on pipeline planning: The server abandons single numerical weights and makes comprehensive trade-offs based on the engineering objective constraints of the instruction template. The server reads the pipeline plan from the planning instructions provided by the user. The pipeline plan may include at least one planning objective such as shortest path, lowest cost, safety priority, unified ownership, lower construction difficulty, and priority reuse of existing resources. The server generates corresponding engineering objective constraints based on the pipeline plan. The engineering objective constraints can be expressed by configuring planning objective weights or priority instructions for different planning objectives. For example, for the shortest path constraint, the server can generate multiple weights of different values to be assigned to candidate paths in the candidate path set. Among them, the candidate path with the smallest total physical distance has the largest weight value. For the lowest cost constraint, the server can generate multiple weights of different values to be assigned to candidate paths in the candidate path set. Among them, the candidate path with the smallest comprehensive consideration of laying cost, corridor access fee, and ownership unit coordination cost has the largest weight value. To address safety priority constraints, the server can generate multiple weights of varying magnitudes to assign to candidate paths in the candidate path set. Paths with low risk levels that avoid high-risk objects such as gas pipelines and unknown pipelines have the highest weight. To address ownership uniformity constraints, the server can generate multiple weights of varying magnitudes to assign to candidate paths in the candidate path set. Paths that complete path planning within the same ownership unit's network as much as possible, minimizing cross-unit coordination, have the highest weight. To address construction difficulty constraints, the server can generate multiple weights of varying magnitudes to assign to candidate paths in the candidate path set. Paths that avoid excessively deep burial sections, or sections crossing important rivers or subway tunnel sections have the highest weight. To address existing resource reuse priority constraints, the server can generate multiple weights of varying magnitudes to assign to candidate paths in the candidate path set. Paths that pass compatibility assessments, have sufficient free holes, and have a high reuse length have the highest weight. (5) Generate path reasoning prompts: The server combines the start point, end point, candidate path set, compatibility evaluation labels for each path segment, pathfinding divergence information, planning target weights (or priority instructions), and output format requirements into path reasoning prompts. These prompts can instruct the large language model to complete the following tasks step by step: i. Check whether the candidate path is connected by an actual edge; ii. Exclude candidate paths that contain conflicting path segments; iii. At the point of divergence, a trade-off is made based on the weight of the planning objectives (or priority instructions); iv. Select a complete path that meets the objective requirements; v outputs the node sequence corresponding to the path and the reason for the selection.
[0116] The large language model is configured based on candidate paths, compatibility tags, and planning target weights (or priority instructions) in the prompt words. The large language model can also perform multi-hop path inference along the graph based on the from and to fields and output inference results in a fixed JSON format.
[0117] For example, a large language model can output structured text in JSON format containing the following: { "selected_strategy": "safety_first", "path": ["N1", "N3", "N5", "N8"], "decision_points": [ { "node_id": "N3", "selected_next": "N5", "reason": "The other branch is adjacent to a gas pipeline, which poses a higher risk level." } ], "reason": "This route avoids high-risk pipelines, and all route segments have passed compatibility assessments." } The path field contains the sequence of path nodes that can be directly used in subsequent steps, the decision_points field records the trade-off results of the model at the pathfinding divergence points, and the reason field records the overall reasons for the selection.
[0118] Therefore, when faced with the choice between "detour and reuse of existing utility tunnels" and "go straight but pass through high-risk areas", the large language model can weigh the options at the divergence point based on the planning target weight (or priority instruction) in the prompt words "priority of reuse of existing resources" or "priority of safety". It can simulate expert logic to make the decision that best fits the current planning priority. Then, through iterative reasoning and evaluation, the large language model iteratively connects the optimal compatible edges to determine the complete path chain.
[0119] The above method, where the large language model acts as an intelligent planning agent with the ability to invoke graph search algorithms, verify compatibility rules, and make multi-objective trade-off decisions, has the following beneficial effects: 1. User-friendly natural language interaction: Users do not need to learn complex query syntax. They can directly describe the starting point, ending point and engineering goal in natural language, and the large language model can understand and execute it. 2. Intelligent handling of compatibility constraints: The large language model can understand the semantics of compatibility evaluation tags and automatically eliminate conflicting branches according to preset rules, without the need for manual verification. 3. Trade-off decision interpretation: The natural language reasoning process output by the large language model at the point of divergence makes the planning results traceable and understandable, which facilitates project review and approval; 4. Algorithm and semantic integration: It utilizes the computational efficiency of graph search algorithms and leverages the comprehensive trade-off ability of large language models to handle complex constraints, which is superior to pure rule systems or pure algorithm systems.
[0120] In some embodiments, a spatial path search algorithm is invoked to infer and extract candidate paths that connect the starting point information and the ending point information, and to construct a candidate path set. This includes: when the spatial path search algorithm determines that there are physical breakpoints on the path that cannot be connected, extracting the breakpoint information of the physical breakpoint and the corresponding local engineering specifications; based on the local engineering specifications, breakpoint information, and ending point information, performing obstacle avoidance in the three-dimensional scene formed by pipeline detection data to generate a three-dimensional supplementary path that conforms to the actual engineering and has a smooth trajectory; converting the generated three-dimensional supplementary path into a newly added topological path segment in the local topological knowledge graph, invoking the spatial path search algorithm to infer and extract candidate paths that connect the starting point information and the ending point information, and to construct a candidate path set.
[0121] When encountering a physical breakpoint where existing utility tunnel resources cannot be fully connected, the server triggers a macro-micro collaborative breakpoint repair mechanism, as follows: 1. Breakpoint Triggering and Cooperative Scheduling: If the large model determines that the pathfinding is blocked by a physical obstacle, the server automatically obtains the breakpoint information and corresponding local engineering specifications from the input physical breakpoint. The server identifies unconnectable physical breakpoints or breakpoint placeholder edges in the candidate paths and extracts the start point Ps and end point Pt at both ends of the breakpoint. Ps and Pt both contain 3D coordinate information, the pipeline type, node identifier, and the corresponding target pipeline planning information. The server also reads pipeline detection data and engineering specification rules within the local area where the breakpoint is located as input for subsequent supplementary path searches.
[0122] 2. Microscopic Generation Based on Learning Algorithms: The server extracts the local spatial state features and relative position vectors of the breakpoint region, performs obstacle avoidance in continuous three-dimensional space, and generates a new three-dimensional supplementary excavation path that conforms to engineering realities and has a smooth trajectory. Based on the breakpoint start point Ps and breakpoint end point Pt, the server generates a local three-dimensional envelope region covering both end nodes and their surrounding space. This envelope region is a continuous three-dimensional space, expanding outwards from the coordinate range of the start and end points according to preset horizontal and vertical redundancy distances to reserve detour space. The server discretizes this local three-dimensional envelope region into a three-dimensional search grid according to a preset step size, or constructs a three-dimensional search space available for sampling and searching. The preset step size can be determined according to the target pipeline type, planning accuracy, and computational requirements.
[0123] 3. Setting Obstacles and Engineering Constraints: The server extracts existing pipelines, pipelines conflicting with the target pipeline, underground structures, and restricted areas from the local topology knowledge graph and pipeline detection data, and treats them as obstacles. For each obstacle, the server generates an obstacle safety envelope based on engineering specifications or preset safety distances. This safety envelope is a non-passable buffer zone outside the obstacle, used to ensure that the supplementary path meets the minimum clearance requirements between it and existing pipelines or structures.
[0124] For existing pipeline obstacles, the obstacle safety envelope can be formed by extending outward based on the pipeline centerline, the outer diameter of the pipeline, and the minimum clearance requirements; for underground structures or restricted areas, the obstacle safety envelope can be formed by extending outward based on their spatial boundaries.
[0125] Simultaneously, the server obtains engineering constraints related to the target pipeline through pipeline planning or local engineering specifications. These engineering constraints ensure that the output pipeline path meets the requirements of constructability (the design scheme can be implemented on-site). Engineering constraints may include: minimum horizontal or vertical clearance constraints; minimum cover depth constraints; minimum turning radius constraints; and constraints ensuring the pipeline does not cross restricted areas or obstacles. Specifically, the cover depth can be determined based on the difference between the ground surface elevation and the top elevation of the supplementary pipeline path. The top elevation of the supplementary pipeline path can be calculated based on the centerline elevation of the supplementary path, the outer diameter of the target pipeline, or preset pipe diameter parameters. The minimum turning radius can be determined based on the target pipeline type, diameter, material, or preset engineering parameters.
[0126] 4. Path Assembly and Loop Closure: The server converts the generated continuous 3D coordinate sequence into a topology structure tagged with "Supplementary New Excavation," and uses it as a newly added topological path segment in the local topological knowledge graph. It then calls a spatial path search algorithm to infer and extract candidate paths connecting the starting and ending points. These paths are topologically stitched together with the existing reused connected subgraph of the large model at the breakpoint coordinates, constructing a candidate path set. This breaks down the barrier between conceptual planning and the underlying algorithm execution, achieving a closed-loop solution. Within the local 3D search space of step 2, the server uses the 3D A* algorithm, RRT / RRT* algorithm, or other existing 3D path search algorithms to search from the starting point Ps to the ending point Pt. During the search, if a candidate search point falls into the obstacle safety envelope, exceeds the local 3D envelope area, or does not meet basic constraints such as minimum cover depth, the search point is determined to be impassable and will not participate in subsequent path expansion. The evaluation of the path search can comprehensively consider path length, obstacle avoidance distance, burial depth changes, and turning conditions. The server prioritizes candidate paths that are short, avoid obstacles, meet soil depth requirements, and have few turns, resulting in an initial polyline path composed of several 3D coordinate points. Since the initial path generated by the 3D path search algorithm is typically a series of polylines, it may contain large local angles or discontinuous directions. Therefore, the server smooths the initial polyline path. Smoothing can employ corner trimming, circular transitions, spline curve fitting, or other existing curve smoothing methods to transform the initial polyline path into a more continuous 3D coordinate sequence.
[0127] In this step, "path smoothing" means that the spatial orientation of the supplementary path meets the preset continuity and engineering constructability requirements. Specifically, the smoothed path can meet the following conditions: the local turning radius of the path is not less than the preset minimum turning radius corresponding to the target pipeline; the smoothed path does not enter the safety envelope of obstacles and still meets the minimum clearance requirement; the difference between the pipe top elevation and the ground surface elevation of the smoothed path meets the minimum soil cover depth requirement.
[0128] The above conditions can serve as a quantitative basis for judging whether a path is "smooth and conforms to engineering reality". If a path appears visually continuous, but its turning radius is smaller than the preset minimum turning radius, or it enters the safety envelope of obstacles after smoothing, the server will not output it as a qualified supplementary path.
[0129] 5. Perform engineering constraint verification: The server performs another engineering constraint verification on the smoothed 3D supplementary path. The verification includes: whether the supplementary path intersects with existing obstacles or obstacle safety envelopes; whether the net distance between the supplementary path and existing pipelines meets the specifications or preset thresholds; whether the soil cover depth of the entire supplementary path meets the minimum soil cover depth requirement; and whether the supplementary path still starts from the breakpoint Ps and ends at the breakpoint Pt.
[0130] If the verification result does not meet the requirements, the server can adjust the search step size, safety envelope distance, or smoothing parameters, and re-execute the path search or smoothing process; if the verification passes, the server identifies the path as a breakpoint supplementary path. If a supplementary path that meets the constraints cannot be generated within a preset number of iterations or a preset search range, the server outputs a prompt that automatic supplementation is not possible and marks the breakpoint as requiring manual verification or adjustment of planning conditions. In one embodiment, the "perform engineering constraint verification" step is optional.
[0131] 6. Convert to supplementary topology path segments and write back to the local topology knowledge graph: The server converts the final verified 3D supplementary path into a continuous coordinate sequence and generates supplementary nodes at preset intervals. Supplementary edges are generated between adjacent supplementary nodes, recording attributes such as pipeline type, spatial distance, whether it is a newly created supplementary segment, and whether it is a currently reused resource; among them, newly created supplementary segments are usually marked as non-currently reused resources. Subsequently, the server writes the supplementary nodes and supplementary edges back to the local topology knowledge graph and adds "newly created supplementary segment" or "breakpoint supplementary segment" tags to the corresponding edges.
[0132] Through the above processing, previously disconnected physical breakpoints are transformed into supplementary path segments added to the local topological knowledge graph. Subsequent path planning, solution demonstration, and result export steps can all treat these supplementary path segments as part of the complete path chain.
[0133] The above method constructs a collaborative mechanism of "large-scale model reuse + learning algorithm to fill gaps": based on graph reasoning using a large language model, for physical gaps that cannot be connected, a path generation module based on a learning algorithm is invoked to generate local obstacle avoidance and topology stitching. The originally unconnectable physical gaps are converted into supplementary path segments added to the local topological knowledge graph. Subsequent path planning, scheme demonstration, and result export steps can all process these supplementary path segments as part of the complete path chain. This collaborative mechanism effectively connects theoretical planning with underlying engineering algorithms, forming a utility tunnel connectivity scheme that takes into account both the reuse of existing resources and local construction, shortening the transformation cycle from conceptual planning to scheme output.
[0134] In some embodiments, based on the reasoning results, candidate connectivity schemes are generated for at least one planning objective, and a candidate connectivity scheme set is constructed. This includes: obtaining the weight configuration in the adjusted planning instructions; generating candidate connectivity schemes for multiple planning objectives based on the reasoning results of a large language model; the planning objective is any one of path distance optimization, security constraint considerations, and reuse of existing resources; extracting node sequences and edge attribute features from the candidate connectivity schemes; rendering and generating corresponding visual connectivity graphs; and storing the visual connectivity graphs and candidate connectivity schemes as a candidate connectivity scheme set.
[0135] Based on the single inference result of the large language model, the server drives the large language model to generate candidate connectivity scheme sets for different planning objectives in parallel by adjusting the weight configuration in the instruction templates. The core content of the three instruction templates and their corresponding planning objectives are as follows: (1) Path distance optimization: Configure instructions that prioritize shortening connectivity distance. Large language models tend to favor geometrically direct connectivity, allowing for a higher proportion of additional newly excavated pipeline segments.
[0136] (2) Safety constraints: The configuration prioritizes instructions that strictly avoid risks. During inference, the large language model will actively avoid node regions with high-risk attributes and conservatively discard them when the spatial clearance is at the standard critical state, thereby outputting a more secure connection path.
[0137] (3) Prioritize the reuse of existing resources: Configure instructions that prioritize reducing the amount of new excavation work. The large language model will fully search and evaluate all connected available free edges, and tend to reuse existing underground utility tunnels as much as possible.
[0138] Taking the same starting point and ending point as an example, the evaluation results of different schemes are as follows: Path priority scheme: Total length 215.4m, reuse rate 80%, including 34 nodes; one breakpoint was supplemented, 172.3m of existing pipe section was reused, and 43.0m of new excavation was carried out.
[0139] Safety-first plan: The total length is 283.4m, the reuse rate is 100%, and it includes 4 nodes. All the sections along the route are compliant and vacant utility tunnels, and no breaks are made to fill them.
[0140] Resource reuse priority scheme: total length 236m, reuse rate 100%, includes 11 nodes, all along the route are compliant and vacant utility tunnels, no breakpoints were added.
[0141] All three schemes described above output connected subgraph data from a large language model in a standard data interaction format. The scheme generation and visualization module receives and parses this data, and finally renders and generates the corresponding visualized network connectivity graph on the server interface.
[0142] In one embodiment, such as Figure 4 As shown, an underground pipeline corridor resource interconnection device based on a large language model is provided. The device includes a global map construction module 401, a local map extraction module 402, a text generation module 403, a reasoning module 404, and a scheme generation module 405.
[0143] The global graph construction module 401 is used to obtain pipeline detection data of all underground pipelines in the target area and construct a global topological knowledge graph corresponding to the underground pipeline corridor resources. The pipeline detection data includes at least pipeline spatial data and attribute data.
[0144] The local topology extraction module 402 is used to extract local topology knowledge graphs from the global topology knowledge graph based on planning instructions carrying start-point information, end-point information, and pipeline planning.
[0145] The text generation module 403 is used to convert the local topological knowledge graph into a text sequence with hierarchical relationships to obtain structured text. Then, it uses a large language model combined with engineering specification rules obtained based on pipeline planning to evaluate and filter the pipe gallery resources in the structured text to obtain structured text with compatibility evaluation labels.
[0146] The reasoning module 404 is used to perform logical reasoning based on the local topological relationships of the starting point and ending point information using a large language model, based on the structured text representation with compatibility evaluation labels, to generate a reasoning result that satisfies pipeline planning and is a complete path chain from the starting point to the ending point.
[0147] The scheme generation module 405 is used to generate candidate connectivity schemes for at least one planning objective based on the reasoning results, and to construct a set of candidate connectivity schemes.
[0148] Specific limitations regarding the underground pipeline and utility tunnel resource interconnection device based on large language models can be found in the limitations of the underground pipeline and utility tunnel resource interconnection method based on large language models mentioned above, and will not be repeated here. Each module in the aforementioned underground pipeline and utility tunnel resource interconnection device based on large language models can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0149] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 5As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and the database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data such as global topology knowledge graphs and local topology knowledge graphs. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a method for connecting underground pipeline and utility tunnel resources based on a large language model.
[0150] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0151] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the following steps: acquiring pipeline detection data of all underground pipelines in a target area, constructing a global topological knowledge graph corresponding to the underground pipeline corridor resources, wherein the pipeline detection data includes at least pipeline spatial data and attribute data; extracting a local topological knowledge graph from the global topological knowledge graph based on planning instructions carrying start-point information, end-point information, and pipeline planning; converting the local topological knowledge graph into a text sequence with hierarchical relationships to obtain structured text, and using a large language model combined with engineering specification rules obtained based on pipeline planning to evaluate and filter the corridor resources in the structured text to obtain structured text with compatibility evaluation labels; using a large language model to perform logical reasoning based on the start-point information and end-point information and the local topological relationships represented by the structured text with compatibility evaluation labels, generating a reasoning result that satisfies the pipeline planning and is a complete path chain from the start-point to the end-point; and based on the reasoning result, generating candidate connectivity schemes for at least one planning objective and constructing a set of candidate connectivity schemes.
[0152] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, it performs the following steps: acquiring pipeline detection data of all underground pipelines in a target area, constructing a global topological knowledge graph corresponding to the underground pipeline corridor resources, wherein the pipeline detection data includes at least pipeline spatial data and attribute data; extracting a local topological knowledge graph from the global topological knowledge graph based on planning instructions carrying start-point information, end-point information, and pipeline planning; converting the local topological knowledge graph into a text sequence with hierarchical relationships to obtain structured text, and using a large language model combined with engineering specification rules obtained based on pipeline planning to evaluate and filter the corridor resources in the structured text to obtain structured text with compatibility evaluation labels; using a large language model to perform logical reasoning based on the start-point information and end-point information and the local topological relationships represented by the structured text with compatibility evaluation labels, generating a reasoning result that satisfies the pipeline planning and is a complete path chain from the start-point to the end-point; and based on the reasoning result, generating candidate connectivity schemes for at least one planning objective and constructing a set of candidate connectivity schemes.
[0153] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A method for connecting underground pipeline and utility tunnel resources based on a large language model, characterized in that, include: Obtain pipeline detection data for all underground pipelines in the target area, and construct a global topological knowledge graph corresponding to the pipeline gallery resources of the underground pipelines. The pipeline detection data includes at least pipeline spatial data and attribute data. Based on the planning instructions carrying starting point information, ending point information, and pipeline planning, a local topology knowledge graph is extracted from the global topology knowledge graph; The local topological knowledge graph is converted into a text sequence with hierarchical relationships to obtain structured text. A large language model is then used in conjunction with engineering specification rules obtained based on the pipeline planning to evaluate and filter the pipe gallery resources in the structured text, resulting in structured text with compatibility evaluation tags. The large language model is used to perform logical reasoning based on the local topological relationship of the structured text representation with compatibility evaluation labels according to the starting point information and the ending point information, to generate a reasoning result that satisfies the pipeline planning and is a complete path chain from the starting point to the ending point; Based on the reasoning results, candidate connectivity schemes are generated for at least one planning objective, and a set of candidate connectivity schemes is constructed.
2. The method for connecting underground pipeline corridor resources according to claim 1, characterized in that, The process of acquiring pipeline detection data for all underground pipelines in the target area and constructing a global topological knowledge graph corresponding to the underground pipeline corridor resources includes: Acquire pipeline detection data for all underground pipelines within the target area. The pipeline detection data includes pipeline spatial data, attribute data, and resource occupancy status. Each pipeline intersection, maintenance well, node well, or endpoint in the pipeline space data is abstracted as a node, and a topological edge between adjacent nodes is established based on the connection relationship between nodes in the pipeline space data. Based on the resource occupancy status, select topological edges with available margins; Based on the node information connected by the selected topological edges, the attribute information of the topological edges is calculated, and a global topological knowledge graph covering all underground pipelines in the target area is constructed. The attribute information includes physical space characteristics and resource occupancy status characteristics.
3. The method for connecting underground pipeline corridor resources according to claim 1, characterized in that, The step of extracting a local topology knowledge graph from the global topology knowledge graph based on planning instructions carrying start-point information, end-point information, and pipeline planning includes: Obtain the coordinate information of the starting point and ending point information in the global topological knowledge graph, and generate spatial range constraints to determine the basic envelope region; The basic envelope region is expanded to form a three-dimensional local envelope region with safety redundancy; Based on the positional relationship between the important nodes and the boundary of the three-dimensional local envelope region, the boundary of the three-dimensional local envelope region is further adjusted; Nodes and corresponding edges located within the adjusted three-dimensional local envelope region are extracted from the global topological knowledge graph to construct a local topological knowledge graph.
4. The method for connecting underground pipeline corridor resources according to claim 1, characterized in that, The method employs a large language model combined with engineering specification rules obtained from the pipeline planning to evaluate and filter the pipe gallery resources in the structured text, resulting in structured text with compatibility evaluation tags, including: Based on the pipeline planning, the candidate free edges currently traversed are extracted from the structured text to generate semantic retrieval instructions; Based on the semantic retrieval instructions, obtain the engineering specification rules corresponding to the candidate free edges and pipeline planning; Using the large language model as the inference engine, the feasibility of reusing idle utility tunnel resources in the structured text is evaluated by causal logic. Candidate idle edges that conflict with the pipeline planning are filtered out, resulting in structured text of idle utility tunnel resources with compatibility evaluation labels.
5. The method for connecting underground pipeline corridor resources according to claim 1, characterized in that, The step of employing the large language model to perform logical reasoning based on the local topological relationships of the structured text representation with compatibility evaluation labels according to the starting point information and the ending point information, and generating a reasoning result that satisfies the pipeline planning and is a complete path chain from the starting point to the ending point, includes: The spatial path search algorithm is invoked to infer and extract candidate paths that connect the starting point information and the ending point information, and a candidate path set is constructed. The compatibility evaluation labels of the path segments that make up each candidate path are verified separately, and conflicting path segments are eliminated. At the pathfinding branch points of the candidate paths, a comprehensive consideration is made based on the engineering objective constraints in the planning instructions to generate a reasoning result that satisfies the pipeline planning and forms a complete path chain from the starting point to the end point.
6. The method for connecting underground pipeline corridor resources according to claim 5, characterized in that, The invoked spatial path search algorithm infers and extracts candidate paths connecting the starting point information and the ending point information, constructing a candidate path set, including: When the spatial path search algorithm determines that there are physical breakpoints on the path that cannot be connected, extract the breakpoint information of the physical breakpoint and the corresponding local engineering specifications. Based on the local engineering specifications, breakpoint information, and endpoint information, obstacle avoidance is performed in the three-dimensional scene formed by the pipeline detection data to generate a three-dimensional supplementary path that conforms to the actual engineering situation and has a smooth trajectory. The generated 3D supplementary path is converted into a new topological path segment in the local topological knowledge graph. The spatial path search algorithm is called to infer and extract each candidate path that connects the starting point information and the ending point information, and a candidate path set is constructed.
7. The method for connecting underground pipeline corridor resources according to claim 1, characterized in that, Based on the reasoning results, candidate connectivity schemes are generated for at least one planning objective, and a set of candidate connectivity schemes is constructed, including: Obtain the weight configuration in the adjusted planning instruction, and generate candidate connectivity schemes based on the inference results of the large language model for multiple planning objectives, wherein the planning objectives are any one of path distance optimization, security constraint considerations, and reuse of existing resources; Extract the node sequence and edge attribute features from the candidate connectivity schemes, and render the corresponding visual connectivity graph. The visualized connectivity graph and the candidate connectivity schemes are stored as a set of candidate connectivity schemes.
8. A device for connecting underground pipeline and utility tunnel resources based on a large language model, characterized in that, The device includes: The global graph construction module is used to acquire pipeline detection data of all underground pipelines in the target area and construct a global topological knowledge graph corresponding to the pipe gallery resources of the underground pipelines. The pipeline detection data includes at least pipeline spatial data and attribute data. The local topology extraction module is used to extract local topology knowledge graphs from the global topology knowledge graph based on planning instructions carrying start-point information, end-point information, and pipeline planning. The text generation module is used to convert the local topological knowledge graph into a text sequence with hierarchical relationships to obtain structured text. Then, it uses a large language model combined with engineering specification rules obtained based on the pipeline planning to evaluate and filter the pipe gallery resources in the structured text to obtain structured text with compatibility evaluation tags. The reasoning module is used to perform logical reasoning based on the local topological relationship of the structured text representation with compatibility evaluation labels using the large language model, according to the starting point information and the ending point information, to generate a reasoning result that satisfies the pipeline planning and is a complete path chain from the starting point to the ending point; The scheme generation module is used to generate candidate connectivity schemes for at least one planning objective based on the reasoning results, and to construct a set of candidate connectivity schemes.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.