Power distribution network planning report generation method and device based on interactive large model Agent
By introducing an interactive big 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 of existing methods are solved, efficient and accurate distribution network planning reports are achieved, and user interaction and dynamic updates are supported.
Patent Information
- Application Number
- CN202411905059.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2044-12-23
AI Technical Summary
The existing distribution network planning report generation methods are inefficient, poorly accurate, and difficult to perform dynamic updates and user interaction.
Using an interactive big model Agent method, high-quality distribution network planning reports are generated through natural language processing and intelligent data processing. The method includes data source setting, data cleaning and preprocessing, construction of total planning task agents, construction of data processing agents, construction of toolboxes, and construction of full-process planning task processing agents.
It significantly improves the generation efficiency and accuracy of distribution network planning reports, supports the natural language interaction between users and the system, can dynamically update based on real-time data, and reduces manual intervention and errors.
Smart Images

Figure CN119829606A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power grid planning, and in particular to a method and device for generating a distribution network planning report based on an interactive large model Agent. Background Art
[0002] Interactive Large Model Agent is an intelligent agent system based on large language model, which belongs to the field of large language model technology. The system has the characteristics of being able to conduct dynamic and multi-round dialogues with users, understand and handle complex tasks. Large language models can understand and generate natural language through massive data training. Large language models have the advantages of strong natural language understanding and generation capabilities; wide application; strong adaptability and flexibility; and handling complex reasoning tasks. Large language model technology is currently profoundly changing the field of power systems. The outstanding performance of large model language technology in real-time monitoring of power system operation status, operation optimization, load fluctuation prediction, and abnormal detection of power grid maintenance plans has improved the operating efficiency of power grid companies, reduced costs, and improved the reliability of power systems. With the continuous advancement of technology, large language models will play a more important role in the power industry in the future, providing new development opportunities for the optimized operation of power systems. The distribution network planning report is a comprehensive analysis and design of the entire process of 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 safety of power supply are ensured. Against the backdrop of intelligent power grid upgrades and digital transformation, an innovative proposal is made to introduce an interactive large language model Agent in the generation of distribution network planning reports. By leveraging its powerful natural language processing and reasoning capabilities, high-quality distribution network planning reports can be automatically generated, significantly improving work efficiency and accuracy. In dynamic environments and complex power grid planning, users can interact with the model in real time to query information, customize demand adjustments, modify analysis assumptions, adjust output content, etc.
[0003] At present, the generation of distribution network planning reports usually involves the integration of multiple disciplines, including power system engineering, data analysis, economic evaluation, policies and regulations, and the generation of distribution network planning reports involves multiple links, including data collection, load forecasting, power grid evaluation, technical solution design, economic analysis, safety evaluation, etc. Each of the above links needs to be carefully analyzed and designed in combination with the actual situation to strictly ensure the scientificity, economy and operability of the final planning scheme. The existing distribution network planning report generation generally adopts two methods, one is pure manual drawing of planning reports, and the other is pure standard automatic generation of reports. The pure manual drawing method usually requires a long period of investigation, data collection, load forecasting, equipment selection, economic analysis and other links. Each link requires a lot of manual analysis and verification, relying on manual input and traditional data processing methods, and has the disadvantages of low efficiency, poor accuracy and inability to dynamically update according to real-time data. Pure standard automated generation of distribution network planning reports refers to the generation of distribution network planning-related reports through automation technology, computer algorithms and predefined templates. Software tools and algorithms are usually used to automate the entire report generation process, from data collection and analysis to report content writing, all based on preset templates and rules. Based on preset templates and rules, the distribution network planning report will be templated and standardized. In addition, the distribution network planning report requires human-computer collaboration, but the existing pure standard automated report generation method has a difficult and cumbersome interactive mode.
[0004] Therefore, how to invent a distribution network planning report generation method for 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] To this end, the present invention provides a distribution network planning report generation method and device 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 solution: a distribution network planning report generation method based on an interactive large model Agent, comprising:
[0007] By setting a data source, basic data required for power grid planning is obtained; the basic data is cleaned and preprocessed to obtain processed basic data; and the processed basic data is stored in a database;
[0008] Construct a planning task general agent, and design a human-computer interaction and visualization interface based on the planning task general agent and a natural language dialogue system; understand and analyze the natural language of the user describing the planning requirements through the planning task general agent, and generate scheduling instructions;
[0009] 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;
[0010] Build a toolbox and use it to support data processing for agents that process the whole process planning tasks;
[0011] Construct the full-process planning task processing Agents and task processing strategies; according to the dispatching instructions, through 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.
[0012] As a preferred solution of the 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 distribution network planning report generation method based on the interactive large model agent, 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 the dispatching instructions, the natural language understanding model is used to identify the user's needs; the expression of the natural language understanding model is:
[0014] I task =f NLU (I user )
[0015] In the formula, I user The natural language instructions input by the user; NLU It is a natural language processing function.
[0016] As a preferred solution of the 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 user requirements; the process of modifying the data according to user instructions includes:
[0018] (a) Get the i commands with the highest similarity to the current user's command and return the result example:
[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 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;
[0021] (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:
[0022] D SQL ,D table =f NLU (I user ,D DDL ,C [0…i-1] )
[0023] 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;
[0024] (c) Data modification code executor:
[0025] S=adjust(D table ,D ddl )
[0026] 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;
[0027] The data extraction agent is used to extract the specified power grid data. The final expression of the 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 extracting data; D target The final data obtained.
[0030] As a preferred solution of the distribution network planning report generation method based on the interactive large model agent, the full-process planning task processing agents include: basic information analysis agent, scheme comparison analysis agent and report generation agent;
[0031] 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.
[0032] The present invention also provides a distribution network planning report generation device based on an interactive large model Agent, and the distribution network planning report generation method based on the interactive large model Agent includes:
[0033] A basic data acquisition and processing module is used to acquire the basic data required for power grid planning by setting a data source; clean and pre-process the basic data to obtain processed basic data; and store the processed basic data in a database;
[0034] 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;
[0035] 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;
[0036] 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;
[0037] 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 scheduling instructions, through the full-process planning task processing Agents, according to the task processing strategy, the processed basic data is analyzed to generate a power grid planning report.
[0038] As a preferred solution of the distribution network planning report generating 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 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 needs; the expression of the natural language understanding model is:
[0040] I task =f NLU (I user )
[0041] In the formula, I user The natural language instructions input by the user; NLU It is a natural language processing function.
[0042] As a preferred solution of the distribution network planning report generating device based on the interactive large model agent, in the data processing agents construction and processing module, the data processing agents include: data modification agents and data extraction agents;
[0043] 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:
[0044] Get the i commands with the highest similarity to the current user's command and return the result example:
[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, 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;
[0047] 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:
[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 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;
[0050] Data modification code executor:
[0051] S=adjust(D table ,D ddl )
[0052] 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;
[0053] The data extraction agent is used to extract the specified power grid data. The final expression of the code executor is:
[0054] D target ,S=f extract (D table ,D ddl )
[0055] In the formula, f extract (D table ,D ddl ) is the function for extracting data; D target The final data obtained.
[0056] As a preferred solution of the distribution network planning report generation device based on the interactive large model agent, in the full-process planning task processing Agents construction and processing module, the full-process planning task processing Agents include: basic information analysis Agent, scheme comparison analysis Agent and report generation Agent;
[0057] 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.
[0058] The present invention has the following advantages: the present invention obtains the basic data required for power grid planning by setting the data source; cleans and preprocesses the basic data to obtain the processed basic data; stores the processed basic data in a database; constructs a planning task general agent, and designs a human-computer interaction and visualization interface based on the natural language dialogue system according to the planning task general agent; understands and analyzes the natural language of the user describing the planning requirements through the planning task general agent, and generates a scheduling instruction; constructs data processing agents, and converts the natural language of the user describing the planning requirements into the operation instructions of the database through the data processing agents, and extracts and modifies the processed basic data; constructs a toolbox, and supports the data processing of the full-process planning task processing agents through the toolbox; constructs the full-process planning task processing agents and task processing strategies; according to the scheduling instructions, 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 present invention has more efficient task execution, and multiple agents coordinate and cooperate with each other to ensure efficient execution of complex tasks. Each Agent is responsible for processing a specific task, and can quickly adjust the plan according to user needs and achieve the full process planning goal through collaboration. The present invention can be intelligent and self-learning. The Agent model can continuously improve its performance through feedback learning and self-optimization. Through deep learning, reinforcement learning and other technologies, 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. Users can ask questions and give instructions in natural language, and the model can understand their intentions and provide corresponding feedback or perform 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 manual writing and checking reports, thereby saving a lot of time and human resources. The Agent model automatically performs 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 implementation methods of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the implementation methods or the description of the prior art. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived from the provided drawings without creative work.
[0060] The structures, proportions, sizes, etc. illustrated in this specification are only used to match the contents disclosed in the specification so as to facilitate understanding and reading by persons familiar with the technology. They are not used to limit the conditions under which the present invention can be implemented, and therefore have no substantial technical significance. Any structural modification, change in proportion or adjustment of size shall still fall within the scope of the technical contents disclosed in the present invention without affecting the effects and purposes that can be achieved by the present invention.
[0061] Figure 1 A schematic flow chart of a distribution network planning report generation method based on an interactive large model Agent provided in Example 1 of the present invention;
[0062] Figure 2 It is a schematic diagram of the overall Agent implementation process of the planning task in the distribution network planning report generation method based on the interactive large model Agent provided in Example 1 of the present invention;
[0063] Figure 3 A schematic diagram of the implementation process of data processing Agents in the distribution network planning report generation method based on the interactive large model Agent provided in Example 1 of the present invention;
[0064] Figure 4 It is a schematic diagram of the implementation process of Agents for the whole process planning task processing in the distribution network planning report generation method based on the interactive large model Agent provided in Example 1 of the present invention;
[0065] Figure 5 A schematic diagram of a distribution network planning report generation process in a possible embodiment provided in Embodiment 1 of the present invention;
[0066] Figure 6 This is a schematic diagram of the architecture of a distribution network planning report generating device based on an interactive large model Agent provided in Example 2 of the present invention. DETAILED DESCRIPTION
[0067] The following is a description of the implementation of the present invention by specific embodiments. People familiar with the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0068] Example 1
[0069] See also Figure 1 Embodiment 1 of the present invention provides a distribution network planning report generation method based on an interactive large model Agent, comprising the following steps:
[0070] S1. By setting a data source, basic data required for power grid planning is obtained; the basic data is cleaned and preprocessed to obtain processed basic data; and the processed basic data is stored in a database;
[0071] S2. Construct a planning task general agent, and design a human-computer interaction and visualization interface based on the planning task general agent and a natural language dialogue system; the planning task general agent understands and analyzes the natural language of the user describing the planning requirements and generates a scheduling instruction;
[0072] S3, 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;
[0073] S4, building a toolbox, and using the toolbox to support data processing for the full-process planning task processing Agents;
[0074] S5. Construct the full-process planning task processing Agents and task processing strategies; according to the dispatching instructions, through 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.
[0075] In this embodiment, in step S1, by setting a data source, basic data required for power grid planning is obtained; the basic data is cleaned and preprocessed to obtain processed basic data; the processed basic data is stored in a database;
[0076] Specifically, by setting the data source to obtain the basic data and preprocessing required for power grid planning, basic data such as power grid operation data, historical load data, meteorological data, economic data, etc. are collected from multiple data sources. After collecting the data, the data is cleaned and preprocessed. The preprocessed data needs to be stored in a data warehouse or database, and an efficient database management system is used to ensure high data availability and query efficiency.
[0077] In this embodiment, in step S2, a planning task general agent is constructed, and according to the planning task general agent, a human-computer interaction and visualization interface is designed based on a natural language dialogue system; the planning task general agent understands and analyzes the natural language of the user describing the planning requirements, and generates a scheduling instruction;
[0078] Specifically, Figure 2As shown in Figure 1, the function of the planning task master agent is to interact with users, understand user needs, and coordinate other agents to complete specific tasks. Users describe power grid planning needs through natural language, and the master agent will analyze user intentions and schedule corresponding sub-agents to perform tasks.
[0079] Among them, user intent recognition is to use the natural language understanding model (NLU) to identify user needs; the expression of the natural language understanding model is:
[0080] I task =f NLU (I user )
[0081] In the formula, I user The natural language instructions input by the user; NLU It is a natural language processing function used to extract task intent.
[0082] Among them, planning task execution is to execute corresponding tasks according to the identified user needs; the task execution model expression is:
[0083]
[0084] In the formula, g task It is a function that executes user tasks and adjusts the planning scheme according to user needs.
[0085] The interface design and user interaction interface are used for users to input modification requirements through natural language, and the system will parse and feedback the results. The interface also provides visual operations for modifying planning and layout and other content.
[0086] Among them, the visual planning interface allows users to adjust the grid layout by clicking or dragging the graphical interface, and the system will provide real-time feedback on the modification results.
[0087] In this embodiment, g task It is based on a large model for task planning, and uses prompt generation methods including but not limited to chain of thought (CoT), self-consistent strategy, self-reflection, and selection of reasoning prompts to achieve task planning. It can decompose at one time and then execute in sequence, plan and execute step by step, plan multiple paths and select the optimal path, etc. After making a plan, you can reflect on it and evaluate its pros and cons.
[0088] In this embodiment, in step S3, data processing Agents are constructed, and the natural language describing the planning requirements by the user is converted into operation instructions of the database through the data processing Agents, and the processed basic data is extracted and modified;
[0089] Specifically, Figure 3As shown, building data processing Agents is mainly done by LLM (Large Language Model) through shared memory, and through model training data such as database table structure DDL, it has the ability to accept natural language instructions and convert them into database operation instructions, and then the corresponding function code executor performs verification and actual operation.
[0090] Data processing agents mainly include data modification agents and data extraction agents; the data modification agent is used to modify the extracted data according to user needs; the process of modifying data according to user instructions includes:
[0091] First, get the i instructions with the highest similarity to the current user's instructions and return result examples:
[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 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, including but not limited to the common cosine similarity, etc.; C [0…i-1] Returns the first i most similar historical query cases.
[0094] Secondly, 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:
[0095] D SQL ,D table =f NLU (I user ,D DDL ,C [0…i-1] )
[0096] 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 that is returned.
[0097] Finally, the code executor for data modification:
[0098] S=adjust(D table ,D ddl )
[0099] In the formula, adjust(D table ,D ddl ) is a function for adjusting data, including but not limited to database connection, SQL submission and other functions. S is the function return status, indicating whether the modification is successful.
[0100] The data extraction agent is used to extract the specified power grid data; it is similar to the above data modification agent, and the expression of its final code executor is:
[0101] D target ,S=f extract (D table ,D ddl )
[0102] In the formula, f extract (D table ,D ddl ) is the function for extracting data. target The final data obtained.
[0103] In this embodiment, in step S4, a toolbox is constructed, and the toolbox is used to support data processing for the full-process planning task processing Agents;
[0104] Specifically, a toolbox is constructed that can be called by the agent for the whole process of planning tasks, and relevant tool module support is provided for each agent. The 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 related modules according to needs. The expression is:
[0105]
[0106] Where, T i The task performed by the ith Agent; is the i-th tool module; T box Toolbox; D processed To execute the instructions accordingly.
[0107] The result returned by each tool call can be used for subsequent task execution, and its expression is:
[0108]
[0109] In the formula, analyze means executing analysis tasks (such as power grid status analysis, demand forecasting, etc.).
[0110] In this embodiment, the tool call chain performs complex task processing by calling multiple tools, and its expression is:
[0111]
[0112] Tool call chaining allows for 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 instructions, the processed basic data is analyzed according to the task processing strategy through the full-process planning task processing Agents to generate a power grid planning report.
[0114] Specifically, Figure 4 As shown in the figure, we construct the Agents and their task flow for the whole process planning task. The whole process task is divided into multiple stages. Each stage is completed by a different Agent, and there is a clear execution order between the Agents. The expression is:
[0115]
[0116] Where, T i is the task executed by the ith agent; n is the number of agents, and tasks flow in sequence; the task execution logic is that each agent passes the result to the next agent after execution, and its expression is:
[0117] T i+1 =g i (T i )
[0118] In the formula, g i It is the task processing function of the ith Agent, and its input is the result of the previous Agent.
[0119] During the task execution process, an interaction mechanism between each agent and human is constructed, and the task is dynamically adjusted and confirmed through the natural language interaction mechanism. In the power grid planning task, it mainly includes but is not limited to the basic information analysis agent, the scheme comparison analysis agent and the report generation agent.
[0120] Among them, the basic information analysis agent is responsible for analyzing the basic information of the current status of the power grid and the planning tasks, providing basic data support, and can analyze the load distribution, power demand, existing facilities status and other information of the power grid.
[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 obtains the basic data required for power grid planning by setting the data source; cleans and preprocesses the basic data to obtain the processed basic data; stores the processed basic data in the database; constructs a planning task general agent, and designs a human-computer interaction and visualization interface based on the natural language dialogue system according to the planning task general agent; understands and analyzes the natural language of the user describing the planning requirements through the planning task general agent, and generates scheduling instructions; constructs data processing agents, and converts the natural language of the user describing the planning requirements into the operation instructions of the database through the data processing agents, and extracts and modifies the processed basic data; constructs a toolbox, and supports the data processing of the full-process planning task processing agents through the toolbox; constructs the full-process planning task processing agents and task processing strategies; according to the scheduling instructions, 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 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, and can quickly adjust the plan according to user needs and achieve the full process planning goal through collaboration. The present invention can be intelligent and self-learning. The agent model can continuously improve its performance through feedback learning and self-optimization. Through deep learning, reinforcement learning and other technologies, 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 users and the system more convenient and intuitive. Users can ask questions and give instructions in natural language, and the model can understand their intentions and provide corresponding feedback or perform 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 manual writing and checking reports, thereby saving a lot of time and human resources. The agent model automatically performs tasks and reduces manual intervention, which can prevent the occurrence of human errors.
[0132] It should be noted that the method of the embodiment of the present disclosure can be performed by a single device, such as a computer or a server. The method of the present embodiment can also be applied in 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 perform one or more steps in the method of the embodiment of the present disclosure, and the multiple devices will interact with each other to complete the described method.
[0133] It should be noted that the above describes some embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0134] Example 2
[0135] See also Figure 6 Embodiment 2 of the present invention also provides a distribution network planning report generation device based on an interactive large model Agent, comprising:
[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 pre-process the basic data to obtain processed basic data; and store the processed basic data in a database;
[0137] The planning task general agent construction and processing module 002 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;
[0138] Data processing Agents construction and processing module 003, 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;
[0139] Toolbox construction module 004, used to construct a toolbox and use the toolbox to support data processing for the full-process planning task processing Agents;
[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 instructions, through the full-process planning task processing Agents, according to the task processing strategy, the processed basic data is analyzed to 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, 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 needs; the expression of the natural language understanding model is:
[0143] I task=fNLU(Iuser)
[0144] In the formula, I user The natural language instructions input by the user; NLU It is a natural language processing function.
[0145] In this embodiment, in the data processing Agents construction and processing module 003, the data processing Agents include: data modification Agent and data extraction Agent;
[0146] 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:
[0147] Get the i commands with the highest similarity to the current user's command and return the result example:
[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, 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;
[0150] 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:
[0151] D SQL ,D table =f NLU (I user ,D DDL ,C [0…i-1] )
[0152] Where D DDL Defines the database table structure, including the table structure, relationships between tables, views, indexes, and constraints;SQL is the SQL statement returned, D table The name of the table associated with the query returned;
[0153] Data modification code executor:
[0154] S=adjust(D table ,D ddl )
[0155] 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;
[0156] The data extraction agent is used to extract the specified power grid data. The final expression of the code executor is:
[0157] D target ,S=f extract (D table ,D ddl )
[0158] In the formula, f extract (D table ,D ddl ) is a function for extracting data; D target The final data obtained.
[0159] In this embodiment, in the full-process planning task processing Agents construction and processing module 005, the full-process planning task processing Agents include: basic information analysis Agent, solution comparison analysis Agent and report generation Agent;
[0160] 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.
[0161] It should be noted that the information interaction, execution process and other contents between the modules of the above-mentioned system are based on the same concept as the method embodiment in Example 1 of the present application, and the technical effects they bring are the same as those of the method embodiment of the present application. For specific contents, please refer to the description in the method embodiment shown above in the present application, and will not be repeated here.
[0162] Example 3
[0163] Embodiment 3 of the present invention provides a non-transitory computer-readable storage medium, in which a program code of a distribution network planning report generation method based on an interactive large model Agent is stored, and the program code includes instructions for executing embodiment 1 or any possible implementation method of the distribution network planning report generation method based on an interactive large model Agent.
[0164] The computer-readable storage medium may 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 includes one or more available media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
[0165] Example 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 via a bus; the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the distribution network planning report generation method based on an interactive large model Agent in Example 1 or any possible implementation thereof.
[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 implemented by reading software codes stored in a memory. The memory can be integrated in the processor or can be located outside the processor and exist independently.
[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 process or function described in the embodiment of the present invention is 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 a computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center.
[0170] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing system, they can be concentrated on a single computing system, or distributed on a network composed of multiple computing systems, and optionally, they can be implemented by a program code executable by a computing system, so that 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 made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, 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 by general description and specific embodiments, it is obvious to those skilled in the art that some modifications or improvements can be made to the present invention. Therefore, these modifications or improvements made without departing from the spirit of the present invention all belong to the scope of protection claimed 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.
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: 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) 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 data extraction agent is used to extract the specified power grid data. The final expression of the code executor 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. The distribution network planning report generation method based on interactive large model Agent according to claim 4 is characterized in that: 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. 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 5, 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.
7. The distribution network planning report generating device based on interactive large model Agent according to claim 6 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.
8. The distribution network planning report generating device based on interactive large model Agent according to claim 7 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=fNLU(Iuser) In the formula, I user The natural language instructions input by the user; NLU It is a natural language processing function.
9. The distribution network planning report generating device based on interactive large model Agent according to claim 8 is characterized in that: 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 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 data extraction agent is used to extract the specified power grid data. The final expression of the code executor 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.
10. The distribution network planning report generating device based on interactive large model Agent according to claim 9 is characterized in that: 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.
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
Cited By
Power distribution network planning scheme generation method and device based on large model, terminal and medium
CN120258485A