Method and device for generating distribution network planning report based on interactive large model Agent
By introducing an interactive large-scale model Agent in the generation of distribution network planning reports, using natural language processing and intelligent data processing, the problems of low efficiency and poor accuracy in the existing technology are solved, and efficient and accurate distribution network planning reports are achieved to meet the needs of complex power grid planning.
Patent Information
- Application Number
- CN202411905059.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2044-12-23
AI Technical Summary
The existing distribution network planning report generation methods are inefficient and have poor accuracy, and cannot dynamically update based on real-time data, making it difficult to achieve efficient and accurate report generation in complex power grid planning.
Using an interactive big model Agent method, high-quality distribution network planning reports are generated through natural language processing and intelligent data processing. This method includes data source setting, data cleaning and preprocessing, construction of total planning task agents and data processing agents, toolbox support and full-process planning task processing strategies, realizing natural language interaction between users and systems and generation of dynamic planning reports.
It significantly improves the work efficiency and accuracy of distribution network planning reports, can dynamically update based on real-time data, adapt to complex grid planning needs, and reduce manual intervention and error occurrence.
Smart Images

Figure CN119829606B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power grid planning, and particularly to a method and device for generating a distribution network planning report based on an interactive large model Agent. Background Art
[0002] An interactive large model Agent (Interactive Large Model Agent) is an intelligent agent system based on a large language model and belongs to the technical field of large language models. This system has the characteristics of being able to conduct dynamic and multi-round conversations with users, understand and process complex tasks. Through massive data training, the large language model can understand and generate natural language. The large language model has the advantages of strong natural language understanding and generation capabilities, wide applications, strong adaptive capabilities and flexibility, and the ability to handle complex reasoning tasks. The large language model technology is currently profoundly changing the power system field. The outstanding performance of the large model language technology in aspects such as real-time monitoring of the operating state of the power system, operation optimization, load fluctuation prediction, and abnormal detection of the power grid maintenance plan has improved the operation efficiency of power grid companies, reduced costs, and increased the reliability of the power system. With the continuous progress of technology, the large language model will play a more important role in the power industry in the future, providing new development opportunities for the optimal operation of the power system. A distribution network planning report is a comprehensive analysis and design of the entire process of the distribution system from planning, construction to operation. Through scientific load forecasting, systematic power grid evaluation, reasonable scheme design and optimization, strict economic analysis, and detailed implementation plans, the stability, economy, and security of power supply are ensured. Against the background of the intelligent upgrade and digital transformation of the power grid, it is innovatively proposed to introduce an interactive large language model Agent in the generation of distribution network planning reports, utilize its powerful natural language processing and reasoning capabilities to automatically generate high-quality distribution network planning reports, significantly improve work efficiency and accuracy, and enable users to interact with the model in real time in a dynamic environment and complex power grid planning for information query, customization requirement adjustment, modification of analysis assumptions, adjustment of output content, etc.
[0003] At present, the generation of distribution network planning reports usually involves the integration of multiple disciplines, including aspects such as power system engineering, data analysis, economic evaluation, and policies and regulations. Moreover, the generation of distribution network planning reports involves multiple links, including data collection, load forecasting, power grid evaluation, technical scheme design, economic analysis, safety evaluation, etc. Each of the above links requires careful analysis and design in combination with the actual situation to strictly ensure the scientificity, economy, and operability of the final planning scheme. There are generally two methods for generating existing distribution network planning reports. One is to draw the planning report manually, and the other is to generate the report in a pure standardized and automated manner. The method of manual drawing usually requires multiple links such as long-term research, data collection, load forecasting, equipment selection, and economic analysis. Each link requires a large amount of manual analysis and verification, relying on manual input and traditional data processing methods, with problems and disadvantages such as low efficiency, poor accuracy, and inability to perform dynamic updates based on real-time data. The pure standardized and automated generation of distribution network planning reports refers to generating reports related to distribution network planning through automation technologies, computer algorithms, and predefined templates. Usually, software tools and algorithms are used to automate the entire report generation process, from data collection, analysis to the writing of the report content, which is carried out based on preset templates and rules. Being carried out based on preset templates and rules will lead to the problem of templatization and standardization of distribution network planning reports. In addition, the distribution network planning report needs to be completed through human-machine collaboration, but the existing pure standardized and automated report generation method has a difficult and cumbersome interaction mode.
[0004] Therefore, how to invent a method for generating a distribution network planning report based on an interactive large model Agent to improve the efficiency and accuracy of power grid planning has become an urgent problem to be solved. Summary of the Invention
[0005] For this reason, the present invention provides a method and device for generating a distribution network planning report based on an interactive large model Agent, which improves the efficiency and accuracy of power grid planning through natural language processing and intelligent data processing.
[0006] In order to achieve the above object, the present invention provides the following technical solutions: A method for generating a distribution network planning report based on an interactive large model Agent, including:
[0007] By setting data sources, obtaining the basic data required for power grid planning; cleaning and preprocessing the basic data to obtain processed basic data; storing the processed basic data in a database;
[0008] Constructing a total planning task Agent, and based on the total planning task Agent, designing a human-machine interaction and visualization interface based on a natural language dialogue system; understanding and analyzing the natural language in which the user describes the planning requirements through the total planning task Agent to generate a scheduling instruction;
[0009] Construct data processing Agents, and convert the natural language for describing the planning requirements by the user into operation instructions for the database through the data processing Agents, and extract and modify the processed basic data.
[0010] Construct a toolbox, and provide data processing support for the whole-process planning task processing Agents through the toolbox.
[0011] Construct the whole-process planning task processing Agents and task processing strategies; according to the scheduling instructions, analyze the processed basic data through the whole-process planning task processing Agents according to the task processing strategies, and generate a power grid planning report.
[0012] As a preferred solution of the power distribution network planning report generation method based on the interactive large model Agent, the basic data includes: power grid operation data, historical load data, meteorological data, and economic data.
[0013] As a preferred solution of the power distribution network planning report generation method based on the interactive large model Agent, in the process of understanding and analyzing the natural language for describing the planning requirements by the user through the general planning task Agent to generate scheduling instructions, a natural language understanding model is used to identify the user's requirements; the expression of the natural language understanding model is:
[0014] I task = f NLU (I user )
[0015] In the formula, I user is the natural language instruction input by the user; f NLU is the natural language processing function.
[0016] As a preferred solution of the power distribution network planning report generation method based on the interactive large model Agent, the data processing Agents include: a data modification Agent and a data extraction Agent;
[0017] The data modification Agent is used to modify the extracted data according to the user's requirements; the process of modifying the data according to the user's instructions includes:
[0018] (a) Obtain the i instructions and return result cases with the highest similarity to the current user instruction:
[0019] C [0…i-1] = Sim(I user , V, i), V ∈ R N×d
[0020] In the formula, Iuser is the embedding vector of the query instruction for the current user; V is the vector library storing historical query results, with the dimension V ∈ R N×d , where N is the number of historical queries and d is the feature dimension of each query; i is the number of cases specified by the user to be returned; Sim(I user , V, i) is the similarity calculation function; C [0…i-1] is the top i most similar historical query cases returned;
[0021] (b) Process the user's query content, relevant cases, and database table structure through a natural language model to return the relevant query statement SQL and database table name:
[0022] D SQL , D table = f NLU (I user , D DDL , C [0…i-1] )
[0023] In the formula, D DDL defines the database table structure, including the structure of the table, the relationships between tables, views, indexes, and constraints; D SQL is the SQL statement returned, and D table is the table name related to the query returned;
[0024] (c) Code executor for data modification:
[0025] S = adjust(D table , D ddl )
[0026] In the formula, adjust(D table , D ddl ) is the function for adjusting data; S is the function return status indicating whether the modification is successful;
[0027] The data extraction Agent is used to extract specified grid data, and the expression of the final code executor is:
[0028] D target , S = f extract (D table , D ddl )
[0029] In the formula, f extract (D table , D ddl ) is the function for data extraction; D target is the finally obtained data.
[0030] As an optimal solution for the method of generating a distribution network planning report based on an interactive large model Agent, the full-process planning task processing Agents include: a basic information analysis Agent, a plan comparison and analysis Agent, and a report generation Agent;
[0031] In the process where the full-process planning task processing Agents analyze the processed basic data according to the task processing strategy to generate a power grid planning report, the Agents execute tasks in a set order; after the current Agent task is completed, the execution result is output, and the execution result is input into the subsequent Agent for the next task execution until the full-process planning task is completed.
[0032] The present invention also provides a device for generating a distribution network planning report based on an interactive large model Agent. Based on the above method for generating a distribution network planning report based on an interactive large model Agent, it includes:
[0033] A basic data acquisition and processing module, configured to acquire the basic data required for power grid planning through a set data source; clean and preprocess the basic data to obtain processed basic data; store the processed basic data in a database;
[0034] A total planning task Agent construction and processing module, configured to construct a total planning task Agent, and based on the total planning task Agent, design a human-computer interaction and visualization interface based on a natural language dialogue system; understand and analyze the natural language of the user's described planning requirements through the total planning task Agent to generate a scheduling instruction;
[0035] A data processing Agents construction and processing module, configured to construct data processing Agents, and convert the natural language of the user's described planning requirements into operation instructions for the database through the data processing Agents, and extract and modify the processed basic data;
[0036] A toolbox construction module, configured to construct a toolbox, and provide data processing support for the full-process planning task processing Agents through the toolbox;
[0037] A full-process planning task processing Agents construction and processing module, configured to construct the full-process planning task processing Agents and a task processing strategy; according to the scheduling instruction, analyze the processed basic data through the full-process planning task processing Agents according to the task processing strategy to generate a power grid planning report.
[0038] As a preferred solution of the distribution network planning report generation device based on the interactive large model Agent, in the basic data acquisition and processing module, the basic data includes: power grid operation data, historical load data, meteorological data, and economic data.
[0039] As a preferred solution of the distribution network planning report generation device based on the interactive large model Agent, in the overall planning task Agent construction and processing module, during the process of using the overall planning task Agent to understand and analyze the natural language of the user's described planning requirements and generate scheduling instructions, a natural language understanding model is used to identify the user's requirements; the expression of the natural language understanding model is:
[0040] I task =f NLU (I user )
[0041] In the formula, I user is the natural language instruction input by the user; f NLU is the natural language processing function.
[0042] As a preferred solution of the distribution network planning report generation device based on the interactive large model Agent, in the data processing Agents construction and processing module, the data processing Agents include: data modification Agent and data extraction Agent;
[0043] The data modification Agent is used to modify the extracted data according to the user's needs; the process of modifying data according to the user's instructions includes:
[0044] Obtain the i instructions with the highest similarity to the current user instruction and the return result cases:
[0045] C [0…i-1] =Sim(I user ,V,i), V∈R N×d
[0046] In the formula, I user is the embedding vector of the current user's query instruction; V is the vector library storing historical query results, with a dimension of V∈R N×d , where N is the number of historical queries and d is the feature dimension of each query; i is the number of return result cases specified by the user; Sim(I user ,V,i) is the similarity calculation function; C [0…i-1] is the top i most similar historical query cases returned;
[0047] Process the user's query content, relevant cases, and database table structure through the natural language model, and return the relevant query statement SQL and database table name:
[0048] D SQL , D table = f NLU (I user , D DDL , C [0…i-1] )
[0049] Where D DDL defines the database table structure, including the structure of the table, the relationships between tables, views, indexes, and constraints; D SQL is the returned SQL statement, D table is the table name related to the query returned;
[0050] Code executor for data modification:
[0051] S = adjust(D table , D ddl )
[0052] Where adjust(D table , D ddl ) is a function for adjusting data; S is the function return status, indicating whether the modification is successful;
[0053] The data extraction Agent is used to extract specified grid data, and the expression of the final code executor is:
[0054] D target , S = f extract (D table , D ddl )
[0055] Where f extract (D table , D ddl ) is a function for data extraction; D target is the finally obtained data.
[0056] As an optimal solution for the distribution network planning report generation device based on the interactive large model Agent, in the all - process planning task processing Agents construction and processing module, the all - process planning task processing Agents include: basic information analysis Agent, plan comparison and analysis Agent, and report generation Agent;
[0057] In the process of the all - process planning task processing Agents analyzing the processed basic data according to the task processing strategy to generate a power grid planning report, the Agents execute tasks in a set order; after the current Agent task is completed, the execution result is output, and the execution result is input to the subsequent Agent for the next task execution until the all - process planning task is completed.
[0058] The present invention has the following advantages: By setting a data source, the basic data required for power grid planning is obtained; the basic data is cleaned and preprocessed to obtain the processed basic data; the processed basic data is stored in a database; a general planning task Agent is constructed, and based on the general planning task Agent and a natural language dialogue system, a human-computer interaction and visualization interface is designed; through the general planning task Agent, the natural language describing the planning requirements of the user is understood and analyzed to generate a scheduling instruction; data processing Agents are constructed, and through the data processing Agents, the natural language describing the planning requirements of the user is converted into an operation instruction for the database, and the processed basic data is extracted and modified; a toolbox is constructed, and through the toolbox, data processing support is provided for the full-process planning task processing Agents; the full-process planning task processing Agents and task processing strategies are constructed; according to the scheduling instruction, through the full-process planning task processing Agents, the processed basic data is analyzed according to the task processing strategy to generate a power grid planning report. The task execution of the present invention is more efficient, and multiple Agents coordinate and cooperate with each other to ensure the efficient execution of complex tasks. Each Agent is responsible for processing specific tasks, can quickly adjust the plan according to user needs, and jointly achieve the full-process planning goal through cooperation. The present invention can be intelligent and self-learning. The Agent model can continuously improve its performance through feedback learning and self-optimization. Through technologies such as deep learning and reinforcement learning, the Agent model can not only process existing data, but also perform reasoning, prediction, and problem-solving in complex situations. The present invention can perform natural language interaction: The large language Agent model can understand and generate natural language, which makes the interaction between the user and the system more convenient and intuitive. The user can ask questions and give instructions in natural language, and the model can understand its intention and provide corresponding feedback or execute tasks. The present invention can improve work efficiency and reduce costs: The Agent model can automatically generate reports, analysis results, and suggestions, reducing the workload of manually writing and checking reports, thus saving a large amount of time and human resources. The Agent model automatically executes tasks and reduces manual intervention, which can reduce the occurrence of human errors. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings described below are only exemplary, and for those of ordinary skill in the art, without creative efforts, other implementation drawings can also be obtained according to the provided drawings.
[0060] The structures, proportions, sizes, etc. illustrated in this specification are only used to cooperate with the content disclosed in the specification for those skilled in this technology to understand and read, and are not used to limit the limiting conditions for the implementation of the present invention. Therefore, they do not have substantial technical significance. Any modification of the structure, change in the proportional relationship, or adjustment of the size, without affecting the effects that the present invention can produce and the purposes that can be achieved, should still fall within the scope covered by the technical content disclosed in the present invention.
[0061] Figure 1 It is a schematic flow chart of the method for generating a distribution network planning report based on an interactive large model Agent provided in Embodiment 1 of the present invention;
[0062] Figure 2 It is a schematic flow chart of the implementation process of the total planning task Agent in the method for generating a distribution network planning report based on an interactive large model Agent provided in Embodiment 1 of the present invention;
[0063] Figure 3 It is a schematic flow chart of the implementation process of the data processing Agents in the method for generating a distribution network planning report based on an interactive large model Agent provided in Embodiment 1 of the present invention;
[0064] Figure 4 It is a schematic flow chart of the implementation process of the full-process planning task processing Agents in the method for generating a distribution network planning report based on an interactive large model Agent provided in Embodiment 1 of the present invention;
[0065] Figure 5 It is a schematic flow chart of the process for generating a distribution network planning report in a possible embodiment provided in Embodiment 1 of the present invention;
[0066] Figure 6 It is a schematic diagram of the architecture of the device for generating a distribution network planning report based on an interactive large model Agent provided in Embodiment 2 of the present invention. Detailed implementation manners
[0067] The following specific embodiments illustrate the implementation manners of the present invention. Those skilled in this technology can easily understand other advantages and effects of the present invention from the content disclosed in this specification. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention.
[0068] Embodiment 1
[0069] See Figure 1 , Embodiment 1 of the present invention provides a method for generating a distribution network planning report based on an interactive large model Agent, including the following steps:
[0070] S1. Set the data source to obtain the basic data required for power grid planning; clean and preprocess the basic data to obtain the preprocessed basic data; store the preprocessed basic data in a database.
[0071] S2. Construct the overall planning task Agent, and based on the overall planning task Agent, design a human-computer interaction and visualization interface based on a natural language dialogue system; analyze and understand the natural language in which the user describes the planning requirements through the overall planning task Agent to generate a scheduling instruction.
[0072] S3. Construct data processing Agents, and through the data processing Agents, convert the natural language in which the user describes the planning requirements into operation instructions for the database, and extract and modify the preprocessed basic data.
[0073] S4. Construct a toolbox, and through the toolbox, provide data processing support for the overall process planning task processing Agents.
[0074] S5. Construct the overall process planning task processing Agents and task processing strategies; according to the scheduling instruction, analyze the preprocessed basic data through the overall process planning task processing Agents according to the task processing strategy to generate a power grid planning report.
[0075] In this embodiment, in step S1, set the data source to obtain the basic data required for power grid planning; clean and preprocess the basic data to obtain the preprocessed basic data; store the preprocessed basic data in a database.
[0076] Specifically, obtain the basic data required for power grid planning and preprocess it by setting the data source, collect basic data such as power grid operation data, historical load data, meteorological data, and economic data from multiple data sources, clean and preprocess the data after collection, and the preprocessed data needs to be stored in a data warehouse or database, and use an efficient database management system to ensure the high availability and query efficiency of the data.
[0077] In this embodiment, in step S2, construct the overall planning task Agent, and based on the overall planning task Agent, design a human-computer interaction and visualization interface based on a natural language dialogue system; analyze and understand the natural language in which the user describes the planning requirements through the overall planning task Agent to generate a scheduling instruction.
[0078] Specifically, as Figure 2As shown in the figure, the function of the overall planning task Agent is to be responsible for interacting with the user, understanding the user's needs, and coordinating other Agents to complete specific tasks. The user describes the power grid planning requirements in natural language, and the overall Agent will parse the user's intention and dispatch the corresponding sub-Agents to execute the tasks.
[0079] Among them, user intention recognition is to use a natural language understanding model (NLU) to recognize the user's needs; the expression of the natural language understanding model is:
[0080] I task = f NLU (I user )
[0081] In the formula, I user is the natural language instruction input by the user; f NLU is a natural language processing function used to extract the task intention.
[0082] Among them, planning task execution is to execute the corresponding tasks according to the recognized user needs; the expression of the task execution model is:
[0083]
[0084] In the formula, g task is a function to execute the user's task, which adjusts the planning scheme according to the user's needs.
[0085] Among them, the interface design and the user interface are used for the user to input modification requirements through natural language, and the system will parse and feedback the results. The interface also provides visual operations for modifying content such as planning layout points.
[0086] Among them, the visual planning interface allows the user to adjust the power grid layout by clicking or dragging the graphical interface, and the system will feedback the modified results in real time.
[0087] In this embodiment, g task performs task planning based on a large model, and uses Prompt generation methods including but not limited to Chain of Thought (CoT), self-consistency strategy, self-reflection, selection inference prompt, etc. to achieve task planning, which can decompose at one time and execute in sequence, plan step by step and execute, plan multiple paths and select the optimal path, etc., and can reflect and evaluate its advantages and disadvantages after formulating a plan.
[0088] In this embodiment, in step S3, data processing Agents are constructed, and the natural language in which the user describes the planning requirements is converted into operation instructions for the database through the data processing Agents, and the processed basic data is extracted and modified;
[0089] Specifically, such as Figure 3As shown in the figure, the constructed data processing Agents mainly consist of an LLM (Large Language Model) that shares memory and has the ability to accept natural language instructions and convert them into database operation instructions through model training data such as database table structure DDL, and then the corresponding function code executor performs verification and actual operations.
[0090] The data processing Agents mainly include a data modification Agent and a data extraction Agent; the data modification Agent is used to modify the extracted data according to user needs; the process of data modification according to user instructions includes:
[0091] First, obtain the i instructions and return result cases with the highest similarity to the current user instruction:
[0092] C [0…i-1] = Sim(I user , V, i), V ∈ R N×d
[0093] In the formula, I user is the embedding vector of the current user's query instruction; V is the vector library where historical query results are stored, with a dimension of V ∈ R N×d , where N is the number of historical queries and d is the feature dimension of each query; i is the number of return case quantities specified by the user; Sim(I user , V, i) is a similarity calculation function, including but not limited to common cosine similarity, etc.; C [0…i-1] is the top i most similar historical query cases returned.
[0094] Secondly, process the user's query content, relevant cases, and database table structure through a natural language model, and return the relevant query statement SQL and database table name:
[0095] D SQL , D table = f NLU (I user , D DDL , C [0…i-1] )
[0096] In the formula, D DDL defines the database table structure, including the structure of the table, the relationships between tables, views, indexes, and constraints. D SQL is the returned SQL statement, and D table is the returned table name related to the query.
[0097] Finally, there is the code executor for data modification:
[0098] S = adjust(D table , D ddl )
[0099] Wherein, adjust(D table , D ddl ) is a function for adjusting data, including but not limited to functions such as database connection and SQL submission. S is the function return status, indicating whether the modification is successful.
[0100] The described data extraction Agent is used to extract specified power grid data; it is similar to the above-mentioned data modification Agent, and the expression of its final code executor is:
[0101] D target , S = f extract (D table , D ddl )
[0102] Wherein, f extract (D table , D ddl ) is a function for data extraction. D target is the finally obtained data.
[0103] In this embodiment, in step S4, a toolbox is constructed, and data processing support is provided for the Agents of the full-process planning task through the toolbox;
[0104] Specifically, a toolbox that can be called by the Agents for full-process processing planning tasks is constructed, relevant tool module support is provided for each Agent, and process data (such as analysis results, modification records, calculation logs, etc.) should be stored in a dedicated database or data warehouse for subsequent retrieval, modification, or report generation. The toolbox contains multiple analysis modules, and the Agent can call relevant modules according to needs, and its expression is:
[0105]
[0106] Wherein, T i is the task executed by the i-th Agent; is the i-th tool module; T box toolbox; D processed is the corresponding execution instruction.
[0107] The result returned by each tool call can be used for subsequent task execution, and its expression is:
[0108]
[0109] Wherein, analyze represents the execution of analysis tasks (such as power grid status analysis, demand forecasting, etc.).
[0110] In this embodiment, the tool call chain processes complex tasks by calling multiple tools, and its expression is:
[0111]
[0112] The tool call chain can perform in-depth analysis by calling different tools multiple times.
[0113] In this embodiment, in step S5, the full-process planning task processing Agents and task processing strategies are constructed; according to the scheduling instruction, through the full-process planning task processing Agents, the processed basic data is analyzed according to the task processing strategy to generate a power grid planning report.
[0114] Specifically, as Figure 4 shown, Agents for constructing the full-process processing planning task and their task flows are constructed. This process divides the full-process task into multiple stages, each stage is completed by a different Agent, and there is a clear execution order between each Agent. Its expression is:
[0115]
[0116] In the formula, T i is the task executed by the i-th Agent; n is the number of Agents, and the tasks flow in sequence; the task execution logic is that after each Agent executes, the result is passed to the next Agent. Its expression is:
[0117] T i+1 = g i (T i )
[0118] In the formula, g i is the task processing function of the i-th Agent, and the input is the result of the previous Agent.
[0119] During the task execution process, an interaction mechanism for each Agent to interact with people is constructed, and dynamic adjustment and confirmation of the task are carried out through the mechanism of natural language interaction. In the power grid planning task, it mainly includes but is not limited to the basic information analysis Agent, the scheme comparison and analysis Agent, and the report generation Agent.
[0120] Among them, the basic information analysis Agent is responsible for analyzing the current state of the power grid and the basic information of the planning task, providing basic data support, and can analyze information such as the load distribution of the power grid, power demand, and the status of existing facilities.
[0121] Scheme comparison and analysis Agent: This Agent is responsible for comparing and analyzing multiple power grid planning schemes, evaluating the advantages and disadvantages of each scheme, and analyzing the impact of different schemes on power grid operation efficiency, cost, environmental impact, etc. through multi-objective optimization algorithms, economic analysis and other methods.
[0122] Report Generation Agent: Automatically generates complete power grid planning reports. It extracts data from various analysis modules and generates compliant and easy-to-understand report documents. The report can include power grid analysis results, reasons for scheme selection, risk assessment, etc.
[0123] In a possible embodiment, a specific example of generating a distribution network planning report is provided as follows:
[0124] like Figure 5 As shown, the specific generation steps are as follows:
[0125] T1. Obtain the basic power data and national economic data required in the power grid planning business scenario, and perform operations such as data cleaning, preprocessing, and storage;
[0126] T2. Build a planning task general agent. This agent is mainly responsible for interacting with users. The basic method is to locate the specific links and contents of user modifications through natural language description. When it comes to planning point modification tasks, it uses visualization pages to complete human-computer interaction and obtain accurate user intentions.
[0127] T3. Build data processing agents, mainly including data modification agents and data extraction agents, to achieve the ability to extract and modify data using natural language;
[0128] T4. Build a toolbox that can be called by the agent to process the whole process planning tasks. For example, the basic information analysis agent can call tools such as power grid status analysis, power demand forecast analysis, and power balance analysis modules to quickly realize the global modification of related content. The process data is placed in the report database to facilitate subsequent data modification.
[0129] T5. Build an agent for the whole process of processing planning tasks, including basic information analysis agent, solution comparison and analysis agent and report generation agent. This level of agent has the ability to call data processing agent, and there is a linear one-way task planning path between agents.
[0130] The above-mentioned agents are intelligent entities supported by a large model, which have the capabilities of task decomposition, adaptation to external specifications, reflection and optimization, memory, etc. At the same time, they have the ability to interact and confirm with planners throughout the process.
[0131] In summary, the present invention sets a data source to obtain the basic data required for power grid planning; cleans and preprocesses the basic data to obtain processed basic data; stores the processed basic data in a database; constructs a total planning task Agent, and designs a human-computer interaction and visualization interface based on the natural language dialogue system according to the total planning task Agent; understands and analyzes the natural language in which the user describes the planning requirements through the total planning task Agent to generate a scheduling instruction; constructs data processing Agents, and converts the natural language in which the user describes the planning requirements into an operation instruction of the database through the data processing Agents to extract and modify the processed basic data; constructs a toolbox, and provides data processing support for the full-process planning task processing Agents through the toolbox; constructs the full-process planning task processing Agents and task processing strategies; analyzes the processed basic data according to the scheduling instruction through the full-process planning task processing Agents according to the task processing strategy to generate a power grid planning report. The task execution of the present invention is more efficient, and multiple Agents coordinate and cooperate with each other to ensure the efficient execution of complex tasks. Each Agent is responsible for processing a specific task, can quickly adjust the plan according to user requirements, and jointly achieve the full-process planning goal through cooperation. The present invention can be intelligent and self-learning. The Agent model can continuously improve its performance through feedback learning and self-optimization. Through technologies such as deep learning and reinforcement learning, the Agent model can not only process existing data, but also perform reasoning, prediction, and problem-solving in complex situations. The present invention can perform natural language interaction: the large language Agent model can understand and generate natural language, which makes the interaction between the user and the system more convenient and intuitive. The user can ask questions and give instructions in natural language, and the model can understand its intention and provide corresponding feedback or execute tasks. The present invention can improve work efficiency and reduce costs: the Agent model can automatically generate reports, analysis results, and suggestions, reducing the workload of manually writing and checking reports, thereby saving a large amount of time and human resources. The Agent model automatically executes tasks and reduces manual intervention, which can prevent human errors from occurring.
[0132] It should be noted that the method of the embodiment of the present disclosure can be executed by a single device, such as a computer or a server. The method of this embodiment can also be applied to a distributed scenario, and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only execute one or more steps of the method of the embodiment of the present disclosure, and these multiple devices will interact with each other to complete the described method.
[0133] It should be noted that some embodiments of the present disclosure have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the above embodiments and still achieve the desired results. Additionally, the processes depicted in the figures do not necessarily require the specific order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0134] Embodiment 2
[0135] See Figure 6 , Embodiment 2 of the present invention also provides a device for generating a distribution network planning report based on an interactive large model Agent, including:
[0136] The basic data acquisition and processing module 001 is used to acquire the basic data required for power grid planning by setting a data source; clean and preprocess the basic data to obtain processed basic data; and store the processed basic data in a database.
[0137] The overall planning task Agent construction and processing module 002 is used to construct an overall planning task Agent, and based on the overall planning task Agent, design a human-computer interaction and visualization interface based on a natural language dialogue system; understand and analyze the natural language in which the user describes the planning requirements through the overall planning task Agent, and generate a scheduling instruction.
[0138] The data processing Agents construction and processing module 003 is used to construct data processing Agents, and convert the natural language in which the user describes the planning requirements into operation instructions for the database through the data processing Agents, and extract and modify the processed basic data.
[0139] The toolbox construction module 004 is used to construct a toolbox, and provide data processing support for the full-process planning task processing Agents through the toolbox.
[0140] The full-process planning task processing Agents construction and processing module 005 is used to construct the full-process planning task processing Agents and task processing strategies; according to the scheduling instruction, analyze the processed basic data through the full-process planning task processing Agents according to the task processing strategy, and generate a power grid planning report.
[0141] In this embodiment, in the basic data acquisition and processing module 001, the basic data includes: power grid operation data, historical load data, meteorological data, and economic data.
[0142] In this embodiment, in the planning task general Agent construction and processing module 002, when the planning task general Agent analyzes and understands the natural language of the user's described planning requirements to generate a scheduling instruction, a natural language understanding model is used to identify the user's requirements; the expression of the natural language understanding model is:
[0143] I task=fNLU(Iuser)
[0144] In the formula, I user is the natural language instruction input by the user; f NLU is the natural language processing function.
[0145] In this embodiment, in the data processing Agents construction and processing module 003, the data processing Agents include: a data modification Agent and a data extraction Agent;
[0146] The data modification Agent is used to modify the extracted data according to the user's requirements; the process of modifying the data according to the user's instruction includes:
[0147] Obtain the i instructions and return result cases with the highest similarity to the current user instruction:
[0148] C [0…i-1] = Sim(I user , V, i), V ∈ R N×d
[0149] In the formula, I user is the embedding vector of the current user's query instruction; V is the vector library storing historical query results, with a dimension of V ∈ R N×d , where N is the number of historical queries and d is the feature dimension of each query; i is the number of return case quantities specified by the user; Sim(I user , V, i) is the similarity calculation function; C [0…i-1] is the top i most similar historical query cases returned;
[0150] Process the user's query content, relevant cases, and database table structure through the natural language model, and return the relevant query statement SQL and database table name:
[0151] D SQL , D table = f NLU (I user , D DDL , C [0…i-1] )
[0152] In the formula, D DDL defines the database table structure, including the structure of the table, the relationships between tables, views, indexes, and constraints; DSQL For the returned SQL statement, D table is the table name related to the query returned;
[0153] Code executor for data modification:
[0154] S = adjust(D table , D ddl )
[0155] where adjust(D table , D ddl ) is the function for adjusting data; S is the function return status, indicating whether the modification is successful;
[0156] The data extraction Agent is used to extract specified grid data, and the expression of the final code executor is:
[0157] D target , S = f extract (D table , D ddl )
[0158] where f extract (D table , D ddl ) is the function for data extraction; D target is the finally obtained data.
[0159] In this embodiment, in the all - process planning task processing Agents construction and processing module 005, the all - process planning task processing Agents include: basic information analysis Agent, plan comparison and analysis Agent, and report generation Agent;
[0160] In the process that the all - process planning task processing Agents analyze the processed basic data according to the task processing strategy to generate a grid planning report, the Agents execute tasks in a set order; after the current Agent task is completed, the execution result is output, and the execution result is input to the subsequent Agent for the next task execution until the all - process planning task is completed.
[0161] It should be noted that for the information interaction, execution process, etc. between the above - mentioned system modules, since they are based on the same concept as the method embodiment in Embodiment 1 of the present application, the technical effects brought are the same as those of the method embodiment of the present application. For the specific content, reference can be made to the description in the method embodiment shown above in the present application, and details will not be repeated here.
[0162] Embodiment 3
[0163] Embodiment 3 of the present invention provides a non-transitory computer-readable storage medium, in which program codes for a method for generating a distribution network planning report based on an interactive large model Agent are stored. The program codes include instructions for executing the method for generating a distribution network planning report based on an interactive large model Agent according to Embodiment 1 or any possible implementation thereof.
[0164] The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that integrates one or more available media. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid-state disk (SSD)), etc.
[0165] Embodiment 4
[0166] Embodiment 4 of the present invention provides an electronic device, including: a memory and a processor;
[0167] The processor and the memory communicate with each other through a bus; the memory stores program instructions executable by the processor, and the processor can execute the method for generating a distribution network planning report based on an interactive large model Agent according to Embodiment 1 or any possible implementation thereof by calling the program instructions.
[0168] Specifically, the processor can be implemented by hardware or by software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc.; when implemented by software, the processor can be a general-purpose processor, which is implemented by reading software codes stored in the memory. The memory can be integrated in the processor or can exist independently outside the processor.
[0169] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present invention are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable systems. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from a website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wirelessly (such as infrared, wireless, microwave, etc.).
[0170] Obviously, those skilled in the art should understand that the above-mentioned modules or steps of the present invention can be implemented by a general-purpose computing system. They can be concentrated on a single computing system or distributed on a network composed of multiple computing systems. Optionally, they can be implemented with program codes executable by the computing system. Thus, they can be stored in a storage system and executed by the computing system. And in some cases, the steps shown or described can be executed in a different order than here, or they can be separately fabricated into individual integrated circuit modules, or multiple modules or steps among them can be fabricated into a single integrated circuit module to be implemented. In this way, the present invention is not limited to any specific combination of hardware and software.
[0171] Although the present invention has been described in detail above with general descriptions and specific embodiments, based on the present invention, some modifications or improvements can be made, which are obvious to those skilled in the art. Therefore, these modifications or improvements made without departing from the spirit of the present invention all fall within the scope of protection required by the present invention.
Claims
1. A distribution network planning report generation method based on an interactive large model Agent is characterized in that: include: By setting the data source, the basic data required for power grid planning can be obtained; Cleaning and preprocessing the basic data to obtain processed basic data; storing the processed basic data in a database; Construct a planning task master agent, and design a human-computer interaction and visualization interface based on the planning task master agent and a natural language dialogue system; The planning task general agent understands and analyzes the natural language used by the user to describe the planning requirements and generates a scheduling instruction; Constructing data processing agents, and converting the natural language of the user describing the planning requirements into the operation instructions of the database through the data processing agents, and extracting and modifying the processed basic data; Build a toolbox and use it to support data processing for agents that process the whole process planning tasks; Construct the full-process planning task processing Agents and task processing strategies; According to the dispatching instruction, through the full-process planning task processing Agents, the processed basic data is analyzed according to the task processing strategy to generate a power grid planning report; The data processing agents include: data modification agents and data extraction agents; The data modification agent is used to modify the extracted data according to user requirements; the process of modifying the data according to user instructions includes: (a) Obtain the i instructions with the highest similarity to the current user's instructions and the returned result cases; (b) Process the user query content, related cases, and database table structure through a natural language model, and return the relevant query statement SQL and database table name; (c) a code executor for data modification; The data extraction agent is used to extract specified power grid data; The full-process planning task processing agents include: basic information analysis agent, solution comparison analysis agent and report generation agent; In the process of the full-process planning task processing Agents analyzing the processed basic data according to the task processing strategy to generate a power grid planning report, the Agents execute tasks in a set order; after the current Agent task is executed, the execution result is output, and the execution result is input into the subsequent Agent for the next task execution until the full-process planning task is completed.
2. The distribution network planning report generation method based on interactive large model Agent according to claim 1 is characterized in that: The basic data include: power grid operation data, historical load data, meteorological data and economic data.
3. The distribution network planning report generation method based on interactive large model Agent according to claim 2 is characterized in that: In the process of understanding and analyzing the natural language of the user describing the planning requirements through the planning task general agent and generating scheduling instructions, the natural language understanding model is used to identify the user's requirements; the expression of the natural language understanding model is: In the formula, I user The natural language instructions input by the user; NLU It is a natural language processing function.
4. The distribution network planning report generation method based on interactive large model Agent according to claim 3 is characterized in that: (a) Get the i commands with the highest similarity to the current user's command and return the result example: C [0…i-1] =Sim(I user ,V,i),V∈R N×d In the formula, I user is the embedding vector of the current user's query instruction; V is the vector library storing historical query results, with a dimension of V∈R N×d , where N is the number of historical queries, d is the feature dimension of each query; i is the number of cases returned specified by the user; Sim(I user ,V,i) is the similarity calculation function; C [0…i-1] Return the first i most similar historical query cases; (b) The user query content, related cases, and database table structure are processed through the natural language model, and the relevant query SQL and database table name are returned: D SQL ,D table =f NLU (I user ,D ddl ,C [0…i-1] ) Where D ddl Defines the database table structure, including the table structure, relationships between tables, views, indexes, and constraints; SQL D is the returned SQL statement. table The name of the table associated with the query returned; (c) Data modification code executor: S=adjust(D table ,D ddl ) In the formula, adjust(D table ,D ddl ) is a function for adjusting data; S is the function return status, indicating whether the modification is successful; The final code executor expression is: D target ,S=f extract (D table ,D ddl ) In the formula, f extract (D table ,D ddl ) is the function for extracting data; D target The final data obtained.
5. A distribution network planning report generating device based on an interactive large model Agent, adopting a distribution network planning report generating method based on an interactive large model Agent according to any one of claims 1 to 4, characterized in that: include: The basic data acquisition and processing module is used to obtain the basic data required for power grid planning by setting the data source; Cleaning and preprocessing the basic data to obtain processed basic data; storing the processed basic data in a database; The planning task general agent construction and processing module is used to construct the planning task general agent, and design the human-computer interaction and visualization interface based on the planning task general agent and the natural language dialogue system; the planning task general agent understands and analyzes the natural language of the user describing the planning requirements, and generates scheduling instructions; A data processing agent construction and processing module is used to construct data processing agents, and convert the natural language of the user's description of planning requirements into the operation instructions of the database through the data processing agents, and extract and modify the processed basic data; A toolbox construction module is used to construct a toolbox and provide data processing support to the full-process planning task processing Agents through the toolbox; The full-process planning task processing Agents construction and processing module is used to construct the full-process planning task processing Agents and task processing strategies; According to the dispatching instruction, through the full-process planning task processing Agents, the processed basic data is analyzed according to the task processing strategy to generate a power grid planning report; In the data processing Agents construction and processing module, the data processing Agents include: data modification Agent and data extraction Agent; The data modification agent is used to modify the extracted data according to user requirements; the process of modifying the data according to user instructions includes: Get the i instructions with the highest similarity to the current user's instructions and the returned result cases; Process the user query content, related cases and database table structure through the natural language model, and return the relevant query SQL and database table name; Code executor for data modification; The data extraction agent is used to extract specified power grid data; In the full-process planning task processing Agents construction and processing module, the full-process planning task processing Agents include: basic information analysis Agent, solution comparison analysis Agent and report generation Agent; In the process of the full-process planning task processing Agents analyzing the processed basic data according to the task processing strategy to generate a power grid planning report, the Agents execute tasks in a set order; after the current Agent task is executed, the execution result is output, and the execution result is input into the subsequent Agent for the next task execution until the full-process planning task is completed.
6. The distribution network planning report generating device based on interactive large model Agent according to claim 5 is characterized in that: In the basic data acquisition and processing module, the basic data includes: power grid operation data, historical load data, meteorological data and economic data.
7. The distribution network planning report generating device based on interactive large model Agent according to claim 6 is characterized in that: In the planning task general agent construction and processing module, in the process of understanding and analyzing the natural language of the user describing the planning requirements and generating scheduling instructions through the planning task general agent, the natural language understanding model is used to identify the user's requirements; the expression of the natural language understanding model is: I task =f NLU (I user ) In the formula, I user The natural language instructions input by the user; NLU It is a natural language processing function.
8. The distribution network planning report generating device based on interactive large model Agent according to claim 7 is characterized in that: In the data processing Agents construction and processing module: Get the i commands with the highest similarity to the current user's command and return the result example: C [0…i-1] =Sim(I user ,V,i),V∈R N×d In the formula, I user is the embedding vector of the current user's query instruction; V is the vector library storing historical query results, with a dimension of V∈R N×d , where N is the number of historical queries, d is the feature dimension of each query; i is the number of cases returned specified by the user; Sim(I user ,V,i) is the similarity calculation function; C [0…i-1] Return the first i most similar historical query cases; The user query content, related cases and database table structure are processed through the natural language model, and the related query SQL and database table name are returned: D SQL ,D table =f NLU (I user ,D ddl ,C [0…i-1] ) Where D ddl Defines the database table structure, including the table structure, relationships between tables, views, indexes, and constraints; SQL D is the returned SQL statement. table The name of the table associated with the query returned; Data modification code executor: S=adjust(D table ,D ddl ) In the formula, adjust(D table ,D ddl ) is a function for adjusting data; S is the function return status, indicating whether the modification is successful; The final code executor expression is: D target ,S=f extract (D table ,D ddl ) In the formula, f extract (D table ,D ddl ) is the function for extracting data; D target The final data obtained.
Citation Information
Patent Citations
Personalized complex report generation method based on multi-agent system
CN118569237A
Systems and methods for training an autonomous machine to perform an operation
US20240419977A1