Power transmission line path planning method and system based on natural language and knowledge graph
Patent Information
- Application Number
- CN202511681536.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-17
- Publication Date
- 2026-09-25
- Estimated Expiration
- 2045-11-17
AI Technical Summary
[0003]然而,上述现有技术存在以下几方面的缺陷:第一,智能化与自动化程度不足,高度依赖专业人工介入数据准备、成本栅格生成、参数配置及结果验证等环节,无法将高层次任务目标转化为自动执行流程,难以实现"自然语言需求输入、规划结果自动输出"的智能体验
本发明的方法通过大语言模型解析自然语言目标并基于业务规则知识图谱推理生成任务步骤序列,结合GIS操作知识图谱与MCP协议自动调度工具执行空间分析,解决了传统方式依赖人工、无法理解复杂约束、决策过程不透明的问题,实现了输电线路路径规划的全自动化、流程可解释与人机交互协同,提升了输电线路路径规划效率。
Smart Images

Figure CN121744557B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power engineering planning and design technology, and in particular to a method and system for transmission line route planning based on natural language and knowledge graph. Background Technology
[0002] Currently, computer-aided path planning technology has been widely applied in the field of power transmission line selection, with methods based on the traditional A* algorithm and its variants (such as weighted A* and dynamically weighted A*) being the most mainstream technical solutions. This method typically relies on extensive manual operations by professional engineers within a GIS software environment: first, the real geographic environment is abstracted into a raster or network graph structure, and the cost value of each node is calculated based on single or a few fixed factors such as slope and land use type, constructing a static cost raster; then, the A* algorithm is configured by writing scripts or calling software tools (such as ArcGIS's Path Distance tool), using the evaluation function f(n) = g(n) + h(n) to expand the search from the starting point to the ending point, prioritizing the node with the smallest f(n) value, and finally outputting a path with the minimum cost value. The entire process relies on pre-fixed cost models and algorithm parameters, resulting in a low level of intelligence and automation.
[0003] However, the aforementioned existing technologies have the following shortcomings: First, their level of intelligence and automation is insufficient. They heavily rely on professional human intervention in data preparation, cost grid generation, parameter configuration, and result verification, failing to transform high-level task objectives into automated execution processes and making it difficult to achieve an intelligent experience of "natural language input and automatic output of planning results." Second, they cannot understand complex natural language constraints and expert experience. Their cost models are fixed in program scripts and cannot dynamically recognize instructions such as "avoid residential areas" and "get as close to highways as possible," which imply spatial relationships and preferences. Changes to constraints require engineers to manually adjust parameters or even modify code, resulting in extremely poor flexibility. Third, their ability to integrate multiple constraints is rigid. The weights of terrain, ecology, and social costs are usually pre-set and fixed, making it difficult to adapt to complex scenarios that require dynamic weight adjustments, such as "considering costs in general areas and strictly avoiding sensitive areas." Often, multiple independent calculations or complex post-processing are required to meet the requirements. Fourth, the decision-making process is a "black box" that only outputs the final path without interpretability. Users cannot know which rules the path is based on, which areas it avoids, or how the weights are allocated. When the result is not ideal, users can only blindly adjust the parameters based on experience, resulting in high trial and error costs.
[0004] Therefore, there is an urgent need to provide a technical solution to address the above problems. Summary of the Invention
[0005] To address the aforementioned technical problems, this invention provides a method and system for power transmission line path planning based on natural language and knowledge graphs.
[0006] In a first aspect, the present invention provides a transmission line path planning method based on natural language and knowledge graphs, the technical solution of which is as follows: Receive the user's natural language path planning target for the target transmission line; The natural language path planning objective is analyzed using a large language model to obtain an intent classification result and at least one named entity; wherein, the at least one named entity includes at least one of: start point, end point, avoidance object, and preference object; The intent classification results and the at least one named entity are mapped to a business rule knowledge graph for reasoning to generate a task step sequence. The task step sequence is displayed to the user through a visual interface, and the user's confirmation or modification of each task step in the task step sequence is received through the visual interface to obtain each target task step. Using the large language model, the combination of multiple GIS tools and their corresponding execution order corresponding to each target task step is retrieved from the GIS operation knowledge graph, and the combination corresponding to each target task step is decomposed into a GIS operator call chain. By calling the corresponding GIS tools through the MCP protocol, the spatial analysis operations in the GIS operator call chain corresponding to each target task step are executed sequentially according to the order of all target task steps, thereby generating the path planning results of the target transmission line.
[0007] The beneficial effects of the transmission line path planning method based on natural language and knowledge graph of the present invention are as follows: The method of this invention parses natural language targets using a large language model and generates task step sequences based on business rule knowledge graph reasoning. It combines GIS operation knowledge graph and MCP protocol automatic scheduling tools to perform spatial analysis, solving the problems of traditional methods relying on manual labor, inability to understand complex constraints, and opaque decision-making processes. It achieves full automation, interpretable process, and human-computer interaction collaboration in transmission line route planning, thereby improving the efficiency of transmission line route planning.
[0008] Based on the above scheme, the transmission line path planning method based on natural language and knowledge graph of the present invention can be further improved as follows.
[0009] In one alternative approach, the step of parsing the natural language path planning objective using a large language model to obtain an intent classification result and at least one named entity includes: The natural language path planning target is subjected to intent classification processing by the large language model, and the intent classification result of the natural language path planning target in the path planning task of the target transmission line is output. The natural language path planning target is processed by the large language model to identify at least one named entity; wherein, the at least one named entity includes at least one of the following: starting point, ending point, avoidance object, and preference object.
[0010] The beneficial effects of adopting the above-mentioned optional methods are: further clarifying the classification of execution intent and named entity recognition of large language models, accurately extracting key information such as starting point, ending point, avoidance object and preference object, improving the accuracy of natural language understanding, providing a structured data foundation for subsequent knowledge graph reasoning, and enhancing the parsing ability of path planning objectives.
[0011] In one alternative approach, the step of mapping the intent classification result and the at least one named entity to a business rule knowledge graph for reasoning to generate a task step sequence includes: The intent classification result and the at least one named entity are matched with nodes in the business rule knowledge graph to obtain matching nodes; Based on the logical relationships and reasoning rules represented by the edges defined in the business rule knowledge graph, reasoning is performed between the matching nodes to obtain the reasoning result; Based on the reasoning result, at least one task step is extracted from the business rule knowledge graph, and the task step sequence is generated according to the execution order of each task step.
[0012] The advantages of adopting the above optional approach are: further matching the parsing results with business rule knowledge graph nodes, and performing logical reasoning based on edge relationships to automatically extract ordered task step sequences, thereby realizing the formal expression and automated application of complex business rules and improving the accuracy and interpretability of task decomposition.
[0013] In one alternative approach, the step of displaying the task step sequence to the user through a visual interface and receiving confirmation or modification from the user for each task step in the task step sequence through the visual interface to obtain each target task step includes: The user is shown each task step in the task step sequence through the visual interface. For each task step in the task step sequence, receive a confirmation command or modification command issued by the user through the visual interface; When a modification instruction for any task step is received, the modification content for that task step is received through the visual interface; Based on the confirmation or modification instructions for each task step and the corresponding modification content, a target task step sequence with the same number of task steps as the task step sequence is formed.
[0014] The advantages of adopting the above optional methods are: further displaying the sequence of task steps through a visual interface and supporting users to confirm or modify each step, realizing human-computer interaction and collaboration, making the planning process transparent and controllable, allowing users to adjust the automatically generated steps according to their professional experience, and improving flexibility and user satisfaction.
[0015] In one alternative approach, the large language model is used to retrieve, from the GIS operation knowledge graph, a combination consisting of multiple GIS tools and their corresponding execution order corresponding to any target task step, and the combination corresponding to any target task step is decomposed into steps of a GIS operator call chain, including: Using the large language model, multiple GIS tools corresponding to any target task step are retrieved from the GIS operation knowledge graph; Based on the execution order relationship between tools represented by the edges defined in the GIS operation knowledge graph, the execution order of multiple GIS tools corresponding to any target task step is determined; Based on the execution order of any target task step, the multiple GIS tools corresponding to any target task step are decomposed into an ordered GIS operator call chain.
[0016] The beneficial effects of adopting the above optional approach are as follows: further retrieving multiple tools corresponding to the target task steps from the GIS operation knowledge graph and determining the execution order, decomposing complex GIS operations into an ordered operator call chain, realizing the automated orchestration of the spatial analysis process, and improving the accuracy and execution efficiency of GIS tool calls.
[0017] In an optional approach, the step of calling the corresponding GIS tool via the MCP protocol, and sequentially executing the spatial analysis operations in the GIS operator call chain corresponding to each target task step according to the order of all target task steps, to generate the path planning result of the target transmission line, includes: Process each target task step sequentially according to the order of all target task steps; For the current target task step, the corresponding GIS tool is called through the MCP protocol. Combined with the spatial analysis results of the previous target task step, at least one spatial analysis operation is executed in the GIS operator call chain corresponding to the target task step, including slope analysis, cross detection, and buffer analysis. The spatial analysis results of the current target task step are generated and provided as input data to the spatial analysis operation corresponding to the next target task step. After all the target task steps are completed, the path planning result of the target transmission line is generated based on the final obtained spatial analysis results through a path search algorithm.
[0018] The advantages of adopting the above optional method are as follows: further, through the MCP protocol, GIS tools are called sequentially to perform spatial operations such as slope analysis, crossing detection and buffer analysis, and progressive calculations are performed in combination with the previous results to achieve refined spatial analysis under multiple constraints and generate path planning results that meet the requirements of complex engineering projects.
[0019] In one alternative approach, it also includes: The path planning results are stored in a database and then visualized.
[0020] The advantages of adopting the above-mentioned optional methods are: further storing the route planning results in the database and performing visualization rendering, realizing the persistent management and graphical display of planning results, facilitating subsequent querying, analysis and decision support, and improving the usability and sharing of results.
[0021] Secondly, this invention provides a power transmission line path planning system based on natural language and knowledge graphs. The technical solution of this system is as follows: The receiving module is used to receive the natural language path planning target input by the user for the target transmission line; The parsing module is used to parse the natural language path planning target using a large language model to obtain the intent classification result and at least one named entity; wherein, the at least one named entity includes at least one of: start point, end point, avoidance object, and preference object; The reasoning module is used to map the intent classification results and the at least one named entity to a business rule knowledge graph for reasoning, and generate a sequence of task steps; The adjustment module is used to display the task step sequence to the user through a visual interface, and to receive the user's confirmation or modification of each task step in the task step sequence through the visual interface, so as to obtain each target task step. The retrieval module is used to retrieve, from the GIS operation knowledge graph, the combination of multiple GIS tools and their corresponding execution order corresponding to each target task step using the large language model, and decompose the combination corresponding to each target task step into a GIS operator call chain. The execution module is used to call the corresponding GIS tools through the MCP protocol, and sequentially execute the spatial analysis operations in the GIS operator call chain corresponding to each target task step in the order of all target task steps, so as to generate the path planning results of the target transmission line.
[0022] The beneficial effects of the power transmission line path planning system based on natural language and knowledge graph of the present invention are as follows: The system of this invention parses natural language targets using a large language model and generates task step sequences based on business rule knowledge graph reasoning. It combines GIS operation knowledge graph and MCP protocol automatic scheduling tools to perform spatial analysis, solving the problems of traditional methods relying on manual labor, inability to understand complex constraints, and opaque decision-making processes. It achieves full automation, interpretable process, and human-computer interaction collaboration in transmission line route planning, thereby improving the efficiency of transmission line route planning.
[0023] Thirdly, the technical solution of an electronic device according to the present invention is as follows: It includes a memory, a processor, and a program stored in the memory and running on the processor, wherein the processor executes the program to implement the steps of the power transmission line path planning method based on natural language and knowledge graph of the present invention.
[0024] Fourthly, the technical solution of a computer-readable storage medium provided by the present invention is as follows: The computer-readable storage medium stores instructions that, when read, cause the computer-readable storage medium to perform the steps of the transmission line path planning method based on natural language and knowledge graph of the present invention.
[0025] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0026] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 This is a flowchart illustrating an embodiment of a power transmission line path planning method based on natural language and knowledge graphs according to the present invention. Figure 2 This is a schematic diagram of the overall process; Figure 3 This is a schematic diagram of an embodiment of a power transmission line path planning system based on natural language and knowledge graphs according to the present invention. Figure 4 This is a schematic diagram of an embodiment of an electronic device according to the present invention. Detailed Implementation
[0027] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be limited to the embodiments set forth herein.
[0028] Figure 1 This diagram illustrates a flowchart of an embodiment of a power transmission line path planning method based on natural language and knowledge graphs provided by the present invention. This method can be executed by electronic devices such as terminal devices or servers. The terminal device can be any fixed or mobile terminal, such as user equipment (UE), mobile device, user terminal, handheld device, computing device, vehicle-mounted device, or wearable device. The server can be a single server or a server cluster consisting of multiple servers. Any electronic device can implement the power transmission line path planning method based on natural language and knowledge graphs by having its processor call computer-readable instructions stored in its memory. Figure 1 As shown, it includes the following steps: S1. Receive the natural language path planning target input by the user for the target transmission line.
[0029] In this context, "user" refers to the operator using the transmission line route planning method, typically a power engineering planning and design professional; for example, planner A uses the method to plan the route of a certain transmission line. The target transmission line refers to the specific power transmission line whose spatial path needs to be planned; for example, a newly built transmission line from a 500 kV substation in City A to a 500 kV substation in County B. The natural language route planning objective refers to the route planning requirements and constraints expressed by the user in everyday language; for example, "From substation A to substation B, avoid residential areas and ecological protection zones, and try to run the route along highways."
[0030] S2. Analyze the natural language path planning objective using a large language model to obtain the intent classification result and at least one named entity; wherein, the at least one named entity includes at least one of: starting point, ending point, avoidance object, and preference object.
[0031] Here, "Large Language Model" refers to a large-scale pre-trained artificial intelligence model for language understanding based on deep learning; for example, using the Qwen series models to parse and understand natural language input. "Intent Classification Result" refers to the classification label obtained by the large language model after identifying the purpose of the user's natural language input; for example, classifying the user input as the task type "transmission line route planning". "Named Entities" refers to proper nouns and key elements with specific meanings identified from the user's natural language input; for example, identifying entities such as "Substation A", "Substation B", "Residential Area", "Ecological Protection Area", and "Highway" from the input. "Start Point" refers to the starting location of the transmission line route planning; for example, the location of the 500 kV substation in City A. "End Point" refers to the ending location of the transmission line route planning; for example, the location of the 500 kV substation in County B. "Avoidance Objects" refers to geographical areas or elements that need to be avoided during route planning; for example, residential areas, ecological protection areas, and military restricted areas. "Preference Objects" refers to geographical elements that are desired to be near or prioritized during route planning; for example, highways, existing power corridors, and major transportation routes.
[0032] S3. Map the intent classification result and the at least one named entity to the business rule knowledge graph for reasoning to generate a task step sequence.
[0033] The business rule knowledge graph refers to a structured knowledge base that stores transmission line planning and design specifications, expert experience, and business rules; for example, a knowledge base containing rules such as "ecological protection zones need to set up a 200-meter avoidance buffer zone" and "residential areas need to set up a 300-meter avoidance buffer zone". The task step sequence refers to an ordered list of operation steps generated based on reasoning from the business rule knowledge graph; for example, ["generate basic geographic cost raster", "perform avoidance analysis of ecological protection zones", "perform highway proximity optimization"].
[0034] S4. Display the task step sequence to the user through a visual interface, and receive the user's confirmation or modification of each task step in the task step sequence through the visual interface to obtain each target task step.
[0035] Here, a visual interface refers to a user interface that provides graphical information display and interactive functions; for example, a web page that displays map data and a list of task steps. A task step refers to a single operational step in the path planning process; for example, "perform slope analysis" or "conduct buffer zone analysis for the ecological protection zone." A target task step refers to the final task step after user confirmation or modification; for example, the buffer zone analysis step after the user adjusts the avoidance distance for the ecological protection zone from 200 meters to 300 meters.
[0036] S5. Using the large language model, retrieve the combination of multiple GIS tools and their corresponding execution order corresponding to each target task step from the GIS operation knowledge graph, and decompose the combination corresponding to each target task step into a GIS operator call chain.
[0037] In this context, a GIS operation knowledge graph refers to a structured knowledge base describing the functions, parameters, and calling relationships of geographic information system tools; for example, a knowledge base containing "input and output parameters of the slope analysis tool" and "execution conditions of the buffer analysis tool." A GIS tool refers to a software functional module used to process geospatial data; for example, the slope analysis tool in the ArcGIS platform and the buffer analysis tool in the QGIS platform. Execution order refers to the order in which multiple GIS tools are called; for example, first executing digital elevation model processing, then slope calculation, and finally aspect analysis. Combination refers to a group of GIS tools and their execution order organized to complete a specific task step; for example, to complete the "terrain analysis" task step, combining [slope analysis tool, elevation analysis tool, aspect analysis tool]. A GIS operator call chain refers to an ordered sequence of GIS tool calls; for example, a tool call chain of [elevation interpolation → slope calculation → aspect analysis].
[0038] S6. Call the corresponding GIS tool through the MCP protocol, and execute the spatial analysis operation in the GIS operator call chain corresponding to each target task step in the order of all target task steps to generate the path planning result of the target transmission line.
[0039] The MCP (Model Context Protocol) refers to a general context protocol used for calling tools from large models; for example, calling spatial analysis functions of different GIS platforms through standardized interfaces. Spatial analysis operations refer to the processing and analysis of geospatial data; for example, geoprocessing operations such as slope calculation, buffer generation, and overlay analysis. Route planning results refer to the final generated transmission line route plan data; for example, the route containing coordinate sequences and its related attribute information.
[0040] The technical solution of this embodiment parses natural language targets using a large language model and generates task step sequences based on business rule knowledge graph reasoning. It combines GIS operation knowledge graph and MCP protocol automatic scheduling tool to perform spatial analysis, solving the problems of traditional methods relying on manual labor, inability to understand complex constraints, and opaque decision-making processes. It achieves full automation of transmission line route planning, interpretable processes, and human-computer interaction and collaboration, thereby improving the efficiency of transmission line route planning.
[0041] In one alternative approach, S2 specifically includes: The natural language path planning objective is classified using the large language model, and the classification result of the natural language path planning objective in the path planning task of the target transmission line is output.
[0042] Intent classification processing refers to the process by which a large language model identifies the purpose of user input; for example, the model classifies user input into the "path planning" task category. A path planning task refers to a specific power transmission line route planning project; for example, planning a 500 kV power transmission line route from substation A to substation B.
[0043] The natural language path planning target is processed by the large language model to identify at least one named entity; wherein, the at least one named entity includes at least one of the following: starting point, ending point, avoidance object, and preference object.
[0044] Named entity recognition refers to the process of identifying specific types of entities from natural language text; for example, identifying “Substation A” as the starting entity and “Substation B” as the ending entity from user input.
[0045] Among the above-mentioned optional methods, the classification of execution intent and named entity recognition of large language models are further clarified, key information such as starting point, ending point, avoidance object and preference object are accurately extracted, the accuracy of natural language understanding is improved, a structured data foundation is provided for subsequent knowledge graph reasoning, and the parsing ability of path planning objectives is enhanced.
[0046] In one alternative approach, S3 specifically includes: The intent classification result and the at least one named entity are matched with nodes in the business rule knowledge graph to obtain matching nodes.
[0047] In this context, a matching node refers to a node in the business rule knowledge graph that corresponds to the input entity; for example, a rule node in the knowledge graph that corresponds to the entity "ecological protection zone".
[0048] Based on the logical relationships and reasoning rules represented by the edges defined in the business rule knowledge graph, reasoning is performed between the matching nodes to obtain the reasoning result.
[0049] In the business rules knowledge graph, edges refer to the relationships connecting different nodes; for example, the "trigger" relationship edge between the "Ecological Protection Zone" node and the "Avoidance Rule" node. Logical relationships refer to the logical connections between nodes in the knowledge graph; for example, the conditional relationship between the "Ecological Protection Zone" entity and the "Must Avoid" rule. Reasoning rules refer to rules for logical inference based on the knowledge graph; for example, if the "Ecological Protection Zone" entity exists, the "Execute Buffer Analysis" rule is triggered. Reasoning results refer to the conclusions obtained through reasoning based on the knowledge graph; for example, reasoning from input conditions that steps such as "Ecological Protection Zone Avoidance Analysis" and "Highway Proximity Analysis" need to be executed.
[0050] Based on the reasoning result, at least one task step is extracted from the business rule knowledge graph, and the task step sequence is generated according to the execution order of each task step.
[0051] In the above-mentioned optional methods, the parsing results are further matched with business rule knowledge graph nodes, and logical reasoning is performed based on edge relationships to automatically extract ordered task step sequences, thereby realizing the formal expression and automated application of complex business rules and improving the accuracy and interpretability of task decomposition.
[0052] In one alternative approach, S4 specifically includes: The user is shown each task step in the task step sequence through the visual interface.
[0053] For each task step in the sequence of task steps, receive a confirmation or modification command from the user through the visual interface.
[0054] In this context, a confirmation instruction refers to a user's approval of a task step; for example, a user clicking the "Confirm" button or typing "Confirm" in a dialog box to approve a task step. A modification instruction refers to a user's request to adjust a task step; for example, a user selecting a task step and clicking the "Modify" button or typing "Confirm" in a dialog box.
[0055] When a modification instruction for any task step is received, the modification content for that task step is received through the visual interface.
[0056] The modifications refer to the specific adjustments made by the user to the task steps; for example, the user changed the avoidance distance in the ecological protection zone from 200 meters to 300 meters.
[0057] Based on the confirmation or modification instructions for each task step and the corresponding modification content, a target task step sequence with the same number of task steps as the task step sequence is formed.
[0058] In the above-mentioned optional methods, the task step sequence can be further displayed through a visual interface, and users can confirm or modify each step to achieve human-computer interaction and collaboration, making the planning process transparent and controllable, allowing users to adjust the automatically generated steps according to their professional experience, thereby improving flexibility and user satisfaction.
[0059] In one alternative approach, the large language model is used to retrieve, from the GIS operation knowledge graph, a combination consisting of multiple GIS tools and their corresponding execution order corresponding to any target task step, and the combination corresponding to any target task step is decomposed into steps of a GIS operator call chain, including: Using the large language model, multiple GIS tools corresponding to any target task step are retrieved from the GIS operation knowledge graph.
[0060] Based on the execution order relationship between tools represented by the edges defined in the GIS operation knowledge graph, the execution order of multiple GIS tools corresponding to any target task step is determined.
[0061] In the GIS operation knowledge graph, edges refer to the data flow and dependencies between GIS tools; for example, the data flow edge between the output of the slope analysis tool and the input of the elevation analysis tool. Execution order relationships refer to the sequential execution dependencies between GIS tools; for example, digital elevation model processing must be completed before subsequent slope calculations can be performed.
[0062] Based on the execution order of any target task step, the multiple GIS tools corresponding to any target task step are decomposed into an ordered GIS operator call chain.
[0063] In the above-mentioned optional methods, multiple tools corresponding to the target task steps are further retrieved from the GIS operation knowledge graph and the execution order is determined. Complex GIS operations are decomposed into an ordered operator call chain, realizing the automated orchestration of the spatial analysis process and improving the accuracy and execution efficiency of GIS tool calls.
[0064] In one alternative approach, S6 specifically includes: Process each objective task step sequentially, following the order of all objective task steps.
[0065] For the current target task step, the corresponding GIS tool is invoked through the MCP protocol. Combining the spatial analysis results of the previous target task step, at least one spatial analysis operation is executed in the GIS operator call chain corresponding to the target task step, including slope analysis, cross detection, and buffer analysis. This generates the spatial analysis results of the current target task step and provides them as input data to the spatial analysis operation corresponding to the next target task step.
[0066] The currently processed target task step refers to the user-confirmed task step that is being executed; for example, the "300-meter buffer zone analysis for the ecological protection zone" step is currently being executed. Spatial analysis results refer to the data results generated after performing spatial analysis operations; for example, slope raster data generated after performing slope analysis. Slope analysis operations refer to spatial analysis that calculates terrain slope values; for example, calculating slope distribution based on digital elevation model data. Crossing detection operations refer to spatial analysis that detects intersections between routes and geographic features; for example, detecting intersections between routes and rivers or roads. Buffer zone analysis operations refer to spatial analysis that creates buffer zones for geographic features; for example, generating a 300-meter-wide buffer zone based on the boundary of an ecological protection zone.
[0067] It should be noted that spatial analysis operations include, but are not limited to, slope analysis operations, crossover detection operations, and buffer zone analysis operations, and no restrictions are set here.
[0068] After all the target task steps are completed, the path planning result of the target transmission line is generated based on the final obtained spatial analysis results through a path search algorithm.
[0069] The final spatial analysis result refers to the comprehensive data obtained after completing all spatial analysis operations; for example, a comprehensive cost grid that integrates factors such as slope, avoidance zone, and proximity. The path search algorithm refers to an algorithm that finds the optimal path based on the spatial analysis result; for example, running the A* algorithm on the cost grid to find the path with the minimum cost.
[0070] In the above-mentioned optional methods, the GIS tools are further invoked sequentially through the MCP protocol to perform spatial operations such as slope analysis, crossing detection and buffer analysis, and progressive calculations are performed in combination with the previous results to achieve refined spatial analysis under multiple constraints and generate path planning results that meet the requirements of complex engineering projects.
[0071] In one alternative approach, it also includes: The path planning results are stored in a database and then visualized.
[0072] In this context, "database" refers to a database management system that stores planning data and results; for example, using a PostgreSQL database to store spatial data and planning results. "Visualization rendering" refers to the process of presenting the route planning results graphically; for example, displaying the planned route on a map interface using specific symbols and colors.
[0073] In the above-mentioned optional methods, the path planning results are further stored in a database and visualized to achieve persistent management and graphical display of the planning results, which facilitates subsequent querying, analysis and decision support, and improves the usability and sharing of the results.
[0074] In this embodiment, it should be noted that, as Figure 2 As shown: 1) The user performs a plotting operation on the map interface, drawing two points; the user inputs the natural language path planning objective: "Plan a 110kV pre-feasibility study transmission line from A to B". After receiving this natural language path planning objective, the system uses a large language model to parse the input content, obtain the intent classification result, and identify named entities.
[0075] 2) Map the obtained intent classification results and named entities to the business rule knowledge graph for reasoning to generate a task step sequence. Display the task step sequence to the user through a visual interface, and receive the user's confirmation or modification of each task step to form the target task step sequence.
[0076] 3) Using a large language model, retrieve the combination of multiple GIS tools and their corresponding execution order from the GIS operation knowledge graph for each target task step, and decompose this combination into a GIS operator call chain. Invoke the corresponding GIS tools via the MCP protocol, and execute the spatial analysis operations in the GIS operator call chain corresponding to each target task step in the order of all target task steps.
[0077] 4) During execution, for the current target task step, the spatial analysis results from the previous target task step are combined with the corresponding spatial analysis operations to generate the spatial analysis results for the current step, which are then used as input data for the next target task step. After all target task steps are processed, the path planning results for the target transmission line are generated based on the final obtained spatial analysis results using a path search algorithm. Finally, the path planning results are stored in the database and visualized.
[0078] Figure 3 This diagram illustrates the structure of an embodiment of a power transmission line path planning system 200 based on natural language and knowledge graphs provided by the present invention. Figure 3 As shown, the power transmission line path planning system 200 based on natural language and knowledge graphs includes: The receiving module 201 is used to receive the natural language path planning target input by the user for the target transmission line; The parsing module 202 is used to parse the natural language path planning target using a large language model to obtain an intent classification result and at least one named entity; wherein, the at least one named entity includes at least one of: start point, end point, avoidance object, and preference object; Reasoning module 203 is used to map the intent classification result and the at least one named entity to a business rule knowledge graph for reasoning and to generate a task step sequence; The adjustment module 204 is used to display the task step sequence to the user through a visual interface, and receive the user's confirmation or modification of each task step in the task step sequence through the visual interface, so as to obtain each target task step. The retrieval module 205 is used to retrieve, from the GIS operation knowledge graph, the combination of multiple GIS tools and their corresponding execution order corresponding to each target task step using the large language model, and decompose the combination corresponding to each target task step into a GIS operator call chain. The execution module 206 is used to call the corresponding GIS tool through the MCP protocol, and sequentially execute the spatial analysis operations in the GIS operator call chain corresponding to each target task step in the order of all target task steps to generate the path planning result of the target transmission line.
[0079] In an alternative embodiment, the parsing module 202 is specifically used for: The natural language path planning target is subjected to intent classification processing by the large language model, and the intent classification result of the natural language path planning target in the path planning task of the target transmission line is output. The natural language path planning target is processed by the large language model to identify at least one named entity; wherein, the at least one named entity includes at least one of: starting point, ending point, avoidance object, and preference object.
[0080] In an alternative embodiment, the inference module 203 is specifically used for: The intent classification result and the at least one named entity are matched with nodes in the business rule knowledge graph to obtain matching nodes; Based on the logical relationships and reasoning rules represented by the edges defined in the business rule knowledge graph, reasoning is performed between the matching nodes to obtain the reasoning result; Based on the reasoning result, at least one task step is extracted from the business rule knowledge graph, and the task step sequence is generated according to the execution order of each task step.
[0081] In an alternative embodiment, the adjustment module 204 is specifically used for: The user is shown each task step in the task step sequence through the visual interface. For each task step in the task step sequence, receive a confirmation command or modification command issued by the user through the visual interface; When a modification instruction for any task step is received, the modification content for that task step is received through the visual interface; Based on the confirmation or modification instructions for each task step and the corresponding modification content, a target task step sequence with the same number of task steps as the task step sequence is formed.
[0082] In an alternative embodiment, the retrieval module 205 is specifically used for: Using the large language model, multiple GIS tools corresponding to any target task step are retrieved from the GIS operation knowledge graph; Based on the execution order relationship between tools represented by the edges defined in the GIS operation knowledge graph, the execution order of multiple GIS tools corresponding to any target task step is determined; Based on the execution order of any target task step, the multiple GIS tools corresponding to any target task step are decomposed into an ordered GIS operator call chain.
[0083] In an alternative embodiment, the execution module 206 is specifically used for: Process each target task step sequentially according to the order of all target task steps; For the current target task step, the corresponding GIS tool is called through the MCP protocol. Combined with the spatial analysis results of the previous target task step, at least one spatial analysis operation is executed in the GIS operator call chain corresponding to the target task step, including slope analysis, cross detection, and buffer analysis. The spatial analysis results of the current target task step are generated and provided as input data to the spatial analysis operation corresponding to the next target task step. After all the target task steps are completed, the path planning result of the target transmission line is generated based on the final obtained spatial analysis results through a path search algorithm.
[0084] In an alternative embodiment, it further includes: a rendering module; the rendering module is used for: The path planning results are stored in a database and then visualized.
[0085] It should be noted that the beneficial effects of the transmission line route planning system 200 based on natural language and knowledge graphs provided in the above embodiments are the same as those of the transmission line route planning method based on natural language and knowledge graphs, and will not be repeated here. Furthermore, the system provided in the above embodiments is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the system can be divided into different functional modules according to the actual situation to complete all or part of the functions described above. In addition, the system and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process is detailed in the method embodiments, and will not be repeated here.
[0086] The transmission line route planning system 200 based on natural language and knowledge graph of the present invention can be a computer program (including program code) running on a computer device. For example, the transmission line route planning system 200 based on natural language and knowledge graph of the present invention is an application software that can be used to execute the corresponding steps in the transmission line route planning method based on natural language and knowledge graph of the present invention.
[0087] In some embodiments, the power transmission line route planning system 200 based on natural language and knowledge graph of the present invention can be implemented in a combination of hardware and software. As an example, the power transmission line route planning system 200 based on natural language and knowledge graph of the present invention can be a processor in the form of a hardware decoding processor, which is programmed to execute the power transmission line route planning method based on natural language and knowledge graph of the present invention. For example, the processor in the form of a hardware decoding processor can be one or more application specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.
[0088] The modules described in the embodiments of this invention can be implemented in software or hardware. The names of the modules are not, in some cases, limiting the scope of the module itself.
[0089] An electronic device according to an embodiment of the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements any of the above-mentioned transmission line path planning methods based on natural language and knowledge graphs. That is, an electronic device according to an embodiment of the present invention may include, but is not limited to: a processor and a memory; the memory is used to store the computer program; the processor is used to execute the transmission line path planning method based on natural language and knowledge graphs shown in any embodiment of the present invention by calling the computer program.
[0090] In one alternative embodiment, an electronic device is provided, such as Figure 4 As shown, Figure 4 The illustrated electronic device 4000 includes a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, for example, via a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 4004 is not limited to one type, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present invention.
[0091] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this invention. Processor 4001 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0092] Bus 4002 may include a path for transmitting information between the aforementioned components. Bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 4002 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 4The bus 4002 is represented by only one thick line, but this does not mean that there is only one bus or one type of bus.
[0093] The memory 4003 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto.
[0094] The memory 4003 stores application code (computer program) for executing the present invention, and its execution is controlled by the processor 4001. The processor 4001 executes the application code stored in the memory 4003 to implement the content shown in the foregoing method embodiments.
[0095] Among them, electronic devices can also be terminal devices. A terminal device can be any terminal device that can install applications and access web pages through applications, including at least one of smartphones, tablets, laptops, desktop computers, smart speakers, smartwatches, smart TVs, and smart in-vehicle devices.
[0096] It should be noted that, Figure 4 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.
[0097] An embodiment of the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the above-mentioned transmission line path planning methods based on natural language and knowledge graphs.
[0098] Alternatively, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, a floppy disk, and an optical data storage device, etc.
[0099] In an exemplary embodiment, a computer program product or computer program is also provided, which includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the aforementioned power transmission line path planning method based on natural language and knowledge graphs.
[0100] Computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0101] It should be understood that the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0102] The computer-readable storage medium provided in this invention can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0103] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the method shown in the above embodiments.
[0104] The above description is merely a preferred embodiment of the present invention and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this invention is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-disclosed concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this invention.
[0105] It should be noted that the terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and represent a limitation on a specific order or sequence. Where appropriate, the order of use for similar objects can be interchanged so that the embodiments of this application described herein can be implemented in an order other than that shown or described.
[0106] Those skilled in the art will recognize that this invention can be implemented as a system, method, or computer program product. Therefore, this invention can be specifically implemented in the following forms: it can be entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software, generally referred to herein as a "circuit," "module," or "system." Furthermore, in some embodiments, this invention can also be implemented as a computer program product contained in one or more computer-readable media, which includes computer-readable program code.
[0107] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A transmission line path planning method based on natural language and knowledge graph, characterized in that, include: Receive the user's natural language path planning target for the target transmission line; The natural language path planning objective is analyzed using a large language model to obtain an intent classification result and at least one named entity; wherein, the at least one named entity includes at least one of: starting point, ending point, avoidance object, and preference object; The intent classification results and the at least one named entity are mapped to a business rule knowledge graph for reasoning to generate a task step sequence. The task step sequence is displayed to the user through a visual interface, and the user's confirmation or modification of each task step in the task step sequence is received through the visual interface to obtain each target task step. Using the large language model, the combination of multiple GIS tools and their corresponding execution order corresponding to each target task step is retrieved from the GIS operation knowledge graph, and the combination corresponding to each target task step is decomposed into a GIS operator call chain. By calling the corresponding GIS tools through the MCP protocol, the spatial analysis operations in the GIS operator call chain corresponding to each target task step are executed sequentially according to the order of all target task steps, thereby generating the path planning results of the target transmission line.
2. The transmission line path planning method based on natural language and knowledge graphs according to claim 1, characterized in that, The step of parsing the natural language path planning objective using a large language model to obtain the intent classification result and at least one named entity includes: The natural language path planning target is subjected to intent classification processing by the large language model, and the intent classification result of the natural language path planning target in the path planning task of the target transmission line is output. The natural language path planning target is processed by the large language model to identify at least one named entity; wherein, the at least one named entity includes at least one of the following: starting point, ending point, avoidance object, and preference object.
3. The transmission line path planning method based on natural language and knowledge graphs according to claim 1, characterized in that, The step of mapping the intent classification result and the at least one named entity to a business rule knowledge graph for reasoning and generating a task step sequence includes: The intent classification result and the at least one named entity are matched with nodes in the business rule knowledge graph to obtain matching nodes; Based on the logical relationships and reasoning rules represented by the edges defined in the business rule knowledge graph, reasoning is performed between the matching nodes to obtain the reasoning result; Based on the reasoning result, at least one task step is extracted from the business rule knowledge graph, and the task step sequence is generated according to the execution order of each task step.
4. The transmission line path planning method based on natural language and knowledge graphs according to claim 1, characterized in that, The steps of displaying the task step sequence to the user through a visual interface and receiving the user's confirmation or modification of each task step in the task step sequence through the visual interface to obtain each target task step include: The user is shown each task step in the task step sequence through the visual interface. For each task step in the task step sequence, receive a confirmation command or modification command issued by the user through the visual interface; When a modification instruction for any task step is received, the modification content for that task step is received through the visual interface; Based on the confirmation or modification instructions for each task step and the corresponding modification content, a target task step sequence with the same number of task steps as the task step sequence is formed.
5. The transmission line path planning method based on natural language and knowledge graphs according to claim 4, characterized in that, Using the large language model, the combination of multiple GIS tools and their corresponding execution order corresponding to any target task step is retrieved from the GIS operation knowledge graph. This combination is then broken down into steps of a GIS operator call chain, including: Using the large language model, multiple GIS tools corresponding to any target task step are retrieved from the GIS operation knowledge graph; Based on the execution order relationship between tools represented by the edges defined in the GIS operation knowledge graph, the execution order of multiple GIS tools corresponding to any target task step is determined; Based on the execution order of any target task step, the multiple GIS tools corresponding to any target task step are decomposed into an ordered GIS operator call chain.
6. The transmission line path planning method based on natural language and knowledge graphs according to claim 5, characterized in that, The step of calling the corresponding GIS tool via the MCP protocol, and sequentially executing the spatial analysis operations in the GIS operator call chain corresponding to each target task step according to the order of all target task steps, to generate the path planning result of the target transmission line, includes: Process each target task step sequentially according to the order of all target task steps; For the current target task step, the corresponding GIS tool is called through the MCP protocol. Combined with the spatial analysis results of the previous target task step, at least one spatial analysis operation is executed in the GIS operator call chain corresponding to the target task step, including slope analysis, cross detection, and buffer analysis. The spatial analysis results of the current target task step are generated and provided as input data to the spatial analysis operation corresponding to the next target task step. After all the target task steps are completed, the path planning result of the target transmission line is generated based on the final obtained spatial analysis results through a path search algorithm.
7. The transmission line path planning method based on natural language and knowledge graphs according to any one of claims 1 to 6, characterized in that, Also includes: The path planning results are stored in a database and then visualized.
8. A transmission line path planning system based on natural language and knowledge graph, characterized in that, include: The receiving module is used to receive the natural language path planning target input by the user for the target transmission line; The parsing module is used to parse the natural language path planning target using a large language model to obtain the intent classification result and at least one named entity; wherein, the at least one named entity includes at least one of: start point, end point, avoidance object, and preference object; The reasoning module is used to map the intent classification results and the at least one named entity to a business rule knowledge graph for reasoning, and generate a sequence of task steps; The adjustment module is used to display the task step sequence to the user through a visual interface, and to receive the user's confirmation or modification of each task step in the task step sequence through the visual interface, so as to obtain each target task step. The retrieval module is used to retrieve, from the GIS operation knowledge graph, the combination of multiple GIS tools and their corresponding execution order corresponding to each target task step using the large language model, and decompose the combination corresponding to each target task step into a GIS operator call chain. The execution module is used to call the corresponding GIS tools through the MCP protocol, and sequentially execute the spatial analysis operations in the GIS operator call chain corresponding to each target task step in the order of all target task steps, so as to generate the path planning results of the target transmission line.
9. An electronic device, characterized in that, The electronic device includes a processor coupled to a memory storing at least one computer program, which is loaded and executed by the processor to enable the electronic device to implement the power transmission line path planning method based on natural language and knowledge graph as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one computer program, which, when executed by a processor, implements the transmission line path planning method based on natural language and knowledge graph as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Geographic knowledge complex question and answer method based on space-time agent architecture
CN120745840A
Industrial agent decision-making method and device, electronic equipment and storage medium
CN120912131A