Intelligent Recommendation Method, Intelligent Control Method and Device for Distribution Network Load Transfer Strategy
Through large-scale model analysis and dynamic call of mechanism model combined with RAG and thinking chain technology, the accuracy and real-time problems of load transfer strategy generation in complex large-scale power distribution systems are solved, and efficient and reliable intelligent strategy recommendation is achieved.
Patent Information
- Application Number
- CN202510443159.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2045-04-10
AI Technical Summary
The prior art is difficult to quickly and accurately generate distribution network load transfer strategies in complex large-scale distribution systems, and traditional methods are difficult to meet the real-time and accuracy requirements.
A large model is used to analyze user input requests, identify the intent scenarios and grid device entity names, generate candidate supply strategies through dynamic calls through mechanism models, and use RAG and thinking chain technology to conduct strategy evaluation to finally determine the optimal supply strategy.
It realizes the rapid and accurate generation of distribution network load transfer strategies in complex large-scale distribution systems, and improves the accuracy, reliability and automation of strategy generation.
Smart Images

Figure CN119961288B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of smart grids, and particularly to an intelligent recommendation method, an intelligent control method and a device for a distribution network load transfer strategy. Background Art
[0002] Under the current distribution network management business model of the power system, dispatchers usually need to comprehensively consider topology, measurement, and source-load prediction results, rely on expert experience to arrange daily plans, analyze the trend of operating status, and then compile load transfer strategy plans for events such as planned maintenance, overload, and fault anomalies. This often requires a process of multiple rounds of verification and evaluation summary, which has many problems such as cumbersome collection of multi-source information, the need for strategies to rely on experience, long time-consuming for ticket writing, and difficulty in knowledge induction and refinement, resulting in low intelligence and execution efficiency. With the rapid increase in the scale of diversified loads in the new distribution network and its gradual development towards an active direction, the complexity problems faced by the distribution network dispatching operation, such as the uncertainty of both source and load sides and the complex and changeable topology, will be further exacerbated. The traditional manual compilation of load transfer strategy plans is difficult to meet the current requirements of real-time and accuracy.
[0003] To achieve the intelligence of load transfer, some practitioners have proposed using methods such as traditional optimization algorithms, deep reinforcement learning, or large language models (LLMs) to assist in the intelligent generation of distribution network load transfer strategy plans. However, the above methods are only applicable to simple scenarios, and their accuracy and reliability are not high in the operation mode of complex large-scale distribution systems, which cannot meet the actual needs and have many limitations in actual applications. For example, traditional optimization algorithms perform well in small-scale power systems, but are prone to the problem of dimensional explosion growth in large-scale complex power systems, resulting in non-convergence; deep reinforcement learning algorithms are prone to a huge solution space, excessive calculation times, and are easily trapped in local optima or non-convergence. And the existing large language model in the prior art is a general model, lacking professional knowledge in the power field, so its ability to understand and analyze complex power scenarios is limited. Even if using the working data of the power system and a large amount of text data such as dispatching regulations in the power system, the load transfer strategy plans generated only relying on the knowledge base and context logic reasoning of the large model are often unreliable. Summary of the Invention
[0004] The technical problem to be solved by the present invention is: aiming at the technical problems existing in the prior art, the present invention provides an intelligent recommendation method, an intelligent control method and a device for a distribution network load transfer strategy with a simple implementation method, low cost, high accuracy and reliability, which can be applicable to complex large-scale distribution system operation modes to quickly and accurately generate distribution network load transfer strategies and realize intelligent recommendation of load transfer strategies.
[0005] To solve the above technical problems, the technical solution proposed by the present invention is:
[0006] An intelligent recommendation method for the load transfer strategy of a distribution network, the steps include:
[0007] Request input: The large model receives the input request from the user, and the input request includes the distribution network load transfer scenario information required by the user, the power grid equipment entity information, and the parameter information of the transfer constraints and transfer objectives;
[0008] Intention scenario recognition: The large model recognizes the distribution network load transfer scenario required by the received input request, and extracts the user's intention scenario;
[0009] Power grid entity recognition: The large model performs entity recognition on the received input request, and extracts the power grid equipment entity name;
[0010] Mechanism model dynamic call: The large model extracts the parameter information of the transfer constraints and transfer objectives from the input request, and obtains the complete parameter information of the transfer constraints and transfer objectives through multiple rounds of dialogue. It converts the extracted intention scenario, power grid equipment entity name, and the obtained parameter information into mechanism model request parameters and sends a request to the mechanism model to call the mechanism model to calculate the transfer strategy, and receives multiple candidate transfer strategies returned by the mechanism model and the evaluation index data of each candidate transfer strategy;
[0011] Evaluation of candidate transfer strategies: Read the historical transfer strategies and strategy constraint standards through RAG to determine a set of evaluation rules, and evaluate each candidate transfer strategy under each evaluation rule in a chain-of-thought manner, screen out the candidate transfer strategies that meet the preset conditions and sort them according to the evaluation results, and determine the optimal transfer strategy based on the sorting results and output it.
[0012] Further, the intention scenario includes any one or more of the main transformer heavy overload scenario, feeder heavy overload scenario, fault or maintenance scenario, reading power protection task scenario, power protection transfer plan scenario, and power protection task optimization scenario.
[0013] Further, the recognition of the distribution network load transfer scenario required by the received input request and the extraction of the user's intention scenario include:
[0014] Train the intention recognition model: Pre-train the intention recognition model using the intention recognition data set, and the intention recognition data set includes various types of conversations corresponding to different distribution network load transfer scenarios;
[0015] Candidate intention recognition: Input the current input request into the trained intention recognition model for reasoning, and infer multiple candidate intention scenarios;
[0016] Retrieval enhancement: Use the recognized candidate intention scenarios as examples in the prompt words and provide them to the LLM;
[0017] Model inference: Embed retrieval enhancement in the prompt template to obtain a prompt, input a request to construct a complete prompt, and input the complete prompt into a large model for inference to obtain the final intended scenario.
[0018] Furthermore, perform entity recognition on the received input request, and extract the names of power grid equipment entities including:
[0019] Construct a power grid equipment entity knowledge base: Use a database containing entity information of various types of distribution network equipment to construct a power grid entity SQL vector knowledge base and a RAG vector database in the large model. The RAG vector database is a power grid entity text knowledge base;
[0020] Entity name query: Extract the input entity name from the input request, generate an SQL statement according to the power grid entity SQL vector knowledge base, and query the entity information containing the input entity name according to the generated SQL statement. If no matching item is found, recall the results with a vector similarity exceeding the preset threshold in the RAG vector database as context, and use the large model to judge the matching entity name, and output the queried entity name.
[0021] Furthermore, it also includes regularly learning entity name rewriting rules from the sample library. When the entity name is queried, rewrite the entity name according to the learned entity name rewriting rules and output it as the finally queried entity name; when no matching item is found and the large model fails to judge the matching entity name, prompt retrieval failure through the large model and guide to re-verify the input entity name.
[0022] Furthermore, adopt the chain-of-thought method to evaluate each candidate transfer supply strategy under each evaluation rule, screen out the candidate transfer supply strategies that meet the preset conditions and sort them according to the evaluation results, and determine the optimal transfer supply strategy based on the sorting results and output, including:
[0023] Evaluation rule determination and adjustment: Read historical transfer supply strategies and strategy constraint standards through RAG to determine a set of evaluation rules, and adjust the order and weight of each evaluation rule according to the indicators to be concerned about to form an evaluation rule list;
[0024] Traverse the evaluation rule screening scheme: The large model uses the prompt to define the thinking process based on the chain-of-thought method, sequentially remove each evaluation rule from the evaluation rule list, use the removed evaluation rule to evaluate each candidate transfer supply strategy until the evaluation results of all candidate transfer supply strategies under all evaluation rules are obtained, screen out the candidate transfer supply strategies that meet the preset conditions and sort them according to the evaluation results;
[0025] Intelligent recommendation result output: The large model outputs the transfer supply strategy recommendation result according to the prompt template, and the recommendation result includes the optimal transfer supply strategy and the thinking process.
[0026] Furthermore, it also includes a prompt optimization step, and the prompt optimization step includes:
[0027] Dialogue history analysis: Collect the historical dialogues of interacting with the large model using the current prompt in the distribution network load transfer supply scenario, and analyze the collected historical dialogues to identify the direction for prompt optimization;
[0028] Optimization plan generation: Generate multiple optimization plans according to the analysis results of the historical dialogues. The optimization plans include one or more of adding new instructions, modifying the current instructions, and adjusting the instruction order, and select the final optimization plan from each optimization plan;
[0029] Optimization plan integration: Integrate the selected final optimization plan into the original prompt to form an integrated optimization plan;
[0030] Continuously execute the dialogue history analysis, the optimization plan generation, and the optimization plan integration until the preset iteration condition is reached to obtain the optimized prompt.
[0031] An intelligent control method for the distribution network load transfer supply strategy, the steps include:
[0032] Determine the optimal transfer supply strategy according to the above method;
[0033] Generate multiple potential task scheduling plans according to the tasks required in the optimal transfer supply strategy, and construct an action tree according to each potential task scheduling plan. Decide the final task scheduling plan according to the action tree to control the execution of tasks according to the decided task scheduling plan. If two task scheduling plans in the action tree have the same task, they are aggregated into one branch, and different tasks form different branches.
[0034] Furthermore, the step of generating multiple potential task scheduling plans according to the tasks required in the optimal transfer supply strategy, constructing an action tree according to each potential task scheduling plan, and deciding the final task scheduling plan according to the action tree to control the execution of tasks according to the decided task scheduling plan includes:
[0035] Task scheduling sampling: Obtain various types of tasks to form a preliminary task scheduling execution plan, and use the large model to generate multiple potential task scheduling plans according to the global information of the tasks and the preliminary task scheduling execution plan;
[0036] Action tree construction: Use the entry task of load transfer as the root node of the tree. Starting from the first task, compare the potential task scheduling plans in sequence. When two task scheduling plans have the same task, aggregate them into one branch, and different tasks form different branches until all task scheduling plans are constructed on the tree to form a complete action tree.
[0037] Tree-based decision-making: Select and execute a node on any branch of the tree in sequence. If the execution result of the executed node is valid, proceed to the next node in sequence. If the task execution of the executed node fails, mark it as an invalid node and backtrack upward to the nearest valid node, then select other branches for execution until all tasks on the target branch are successfully executed, and determine the task scheduling plan of the target branch as the final decision.
[0038] A smart agent device for load transfer in a distribution network includes a processor and a memory. The memory is used to store a computer program, and the processor is used to execute the computer program to perform the above method.
[0039] Compared with the prior art, the advantages of the present invention are as follows:
[0040] 1. The present invention analyzes the user's input request using a large model, identifies the intended scenario, the names of power grid equipment entities, and the parameter information of transfer constraints and transfer targets, converts them into mechanism model request parameters to dynamically call the mechanism model, and then evaluates each candidate transfer strategy fed back by the mechanism model. It can determine the optimal transfer strategy by combining the mechanism model and the large model, realize the intelligent generation of load transfer strategies in complex scenarios in the distribution network, improve the automation and intelligence of the load transfer process in the distribution network, and at the same time improve the accuracy and reliability of the generation of load transfer strategies.
[0041] 2. After determining the optimal transfer strategy, the present invention further adopts a task dynamic programming method based on Tree-Planner. By first generating multiple potential task scheduling plans according to the tasks required in the optimal transfer strategy, and then constructing an action tree, and making a decision on the task scheduling plan in the action tree to control the execution of tasks, it can effectively improve the automation and intelligence of the load transfer process in the distribution network, and at the same time improve the flexibility and execution efficiency of task execution. Description of the Drawings
[0042] Figure 1 It is a schematic diagram of the implementation process of the intelligent recommendation method for load transfer strategies in Embodiment 1 of the present invention.
[0043] Figure 2 It is a schematic diagram of the implementation process of intention scenario recognition in Embodiment 1 of the present invention.
[0044] Figure 3It is a schematic diagram of the implementation process for identifying power grid equipment entities in Embodiment 1 of the present invention.
[0045] Figure 4 It is a schematic diagram of the implementation process for dynamically invoking mechanism models in Embodiment 1 of the present invention.
[0046] Figure 5 It is a schematic diagram of the implementation process for evaluating candidate power transfer strategy indicators in Embodiment 1 of the present invention.
[0047] Figure 6 It is a schematic diagram of the implementation process for optimizing prompt words in Embodiment 1 of the present invention.
[0048] Figure 7 It is a schematic diagram of the implementation process for the intelligent control method of distribution network load transfer in Embodiment 2 of the present invention.
[0049] Figure 8 It is a schematic diagram of the implementation process for task dynamic planning in Embodiment 2 of the present invention. Detailed implementation manners
[0050] The present invention will be further described below in conjunction with the accompanying drawings of the specification and specific preferred embodiments, but the protection scope of the present invention is not limited thereby.
[0051] For ease of understanding, first, the relevant technical background involved in this embodiment will be introduced exemplarily.
[0052] Large model: A large model refers to a professional large model (L1) in the power field obtained by adding power prediction training and reinforcement to the open-source large model (L0) based on the use of Transformer technology. By introducing professional corpora in the power field on the basis of the open-source large language model, the understanding ability of the model for power-specific scenarios can be improved, providing support for intelligent load transfer decision-making.
[0053] Prompt word: A prompt word is to wrap the user input into a fixed context and send it to the large model, which can improve the expression ability of the large model in the professional field knowledge, reduce ambiguity and misunderstanding, and can even be used to specify the large model to achieve specific tasks.
[0054] RAG: The RAG (Retrieval-Augmented Generation) technology is an artificial intelligence method that combines information retrieval and text generation. It retrieves relevant information from a large amount of data and then uses the information to assist in generating more accurate and rich answers. The core of the RAG technology lies in three steps: retrieval, utilization, and generation. First, the model retrieves relevant documents or information fragments according to the given question or task; then, analyzes and extracts the key information in the retrieval results; finally, generates a smooth and relevant text output by combining the information and context.
[0055] Chain of Thought (CoT): The Chain of Thought CoT technique is a prompting strategy used to enhance the performance of large models in complex reasoning tasks. By showing intermediate reasoning steps and mimicking the human thinking process, this technique allows the model to break down complex problems into multiple sub-problems and reason step by step to finally arrive at a solution. The core of the Chain of Thought CoT technique lies in providing visibility into the reasoning process, improving the interpretability of model decisions, and helping the model perform complex logical reasoning. In the application development stage, based on the Chain of Thought technique, the thinking process can be set through prompting words, enabling the large model to think in the set way.
[0056] Agent: A task process implemented by technologies such as large models, RAG, prompting words, and Chain of Thought. One agent process can nest another agent, and the agent used for nesting is called a sub-process or sub-agent to build multiple agents.
[0057] Task Orchestration: The process of arranging and scheduling multiple interrelated or dependent tasks in an orderly manner to ensure that they are completed in a predetermined order.
[0058] Load Transfer: Load transfer is an electricity supply strategy. In the power system, when a certain area or user cannot be normally powered due to faults, maintenance, or other reasons, the electricity is transferred to other areas or users through the power grid system for power supply to ensure the stability and continuity of the overall power supply. Load transfer includes two situations: one is to temporarily switch the users originally powered by a certain power grid to other power sources for power supply; the other is to transfer part of the load to other transmission lines or substations to relieve the original power supply pressure.
[0059] Tasks in the load transfer scenario usually involve multi-level decision-making and analysis processes, such as topology identification, overload warning, load transfer plan generation, etc. Such tasks have complex logical chains, and the Chain of Thought technique can decompose complex tasks into executable logical steps, helping the load transfer agent gradually complete the task objectives, improve the execution efficiency and decision-making quality. Combined with intention recognition, entity recognition, dynamic invocation of mechanism models, and evaluation of transfer plan indicators, it can greatly enhance the application ability of the agent in complex power dispatching scenarios, quickly generate accurate and reliable optimal load transfer strategies, and improve the reliability of load transfer strategy generation.
[0060] The present invention introduces a large model (L1) in the power field obtained by training an open-source large language model (L0) with power corpus. Based on multi-agent and chain-of-thought technologies, combined with the characteristics of load transfer scenarios such as planned maintenance, overload, and fault handling in the distribution network, by using the large model to analyze the input request of the user, identify the intended scenario, the entity name of the power grid equipment, and the parameter information of the transfer constraints and transfer objectives, convert the above information into the request parameters of the mechanism model to dynamically call the mechanism model, and then evaluate each candidate transfer strategy fed back by the mechanism model, and can determine the optimal transfer strategy by combining the mechanism model and the large model, realizing the intelligent generation of the distribution network load transfer strategy in complex scenarios, improving the automation and intelligence level of the distribution network load transfer process, and at the same time improving the accuracy and reliability of the load transfer strategy generation.
[0061] The present invention will be further described below in conjunction with specific embodiments.
[0062] Embodiment 1:
[0063] As Figure 1 shown, the steps of the intelligent recommendation method for the distribution network load transfer strategy in this embodiment include:
[0064] Step S101. Request input: The large model receives the input request of the user, and the input request includes the distribution network load transfer scenario information, the power grid equipment entity information, and the parameter information of the transfer constraints and transfer objectives required by the user.
[0065] The user can send an input request to the large model through a program or external input. The input request includes distribution network load transfer scenario information, power grid equipment entity information, and parameter information of transfer constraints and transfer objectives, etc., and other types of information can also be added according to actual needs. The distribution network load transfer scenario is the scenario that needs to perform load transfer, including various scenarios such as the main transformer overload scenario process, feeder overload scenario, fault or maintenance scenario, reading the power protection task scenario, power protection transfer plan scenario, power protection task optimization scenario, opening the drawing task, etc. The power grid equipment entity information is the information of the equipment entity involved in the required application scenario. For example, if it is the main transformer overload scenario, the equipment entity is the main transformer entity; if it is the feeder overload scenario, the equipment entity is the target feeder and the fault feeder; if it is the fault or maintenance scenario, the equipment entity is the target feeder. The parameter information of the transfer constraints and transfer objectives is the parameters involved in the constraints that the transfer strategy needs to meet and the objectives that the transfer strategy needs to achieve. For example, the transfer constraints include information such as the current load rate, the upper limit of the load rate, and the number of transfers, and the transfer target parameters include the parameters corresponding to objectives such as the minimum switch action, the minimum transferred load, line load balance, and main transformer load balance.
[0066] Taking the input request as an example: "There is a severe overload on Feeder High I. Please provide a transfer supply plan." Subsequently, the large model first identifies the intention of feeder severe overload and the need for transfer supply, and determines it as a feeder severe overload scenario. Further, the large model starts to identify the target feeder and the faulty feeder (the faulty feeder cannot be used to receive the transferred load) among them. It is identified that the target feeder is Feeder High I and there is no faulty feeder. Further, the large model starts to identify the transfer supply target and transfer supply constraints. Since the above information is not included in this input request, the large model uses the preset scenario parameters given by the prompt words as default values. This process supports multi-round conversations. When the user supplements the input: "The maximum load rate is 83%. Please regenerate the transfer supply plan.", the large model will analyze it in combination with the historical input "There is a severe overload on Feeder High I. Please provide a transfer supply plan." In the link of identifying the transfer supply target and transfer supply constraints, the identified parameter is 83%, and other parameters remain default unchanged.
[0067] Step S102. Intention scenario recognition: The large model recognizes the distribution network load transfer supply scenario required for the received input request and extracts the user's intention scenario.
[0068] Intention recognition is to analyze the user input using the large model, identify the user's interaction intention, and output it after formatting, so as to facilitate the intelligent agent to call the corresponding sub-intelligent agent to respond to the user's needs. In this embodiment, the large model is used to analyze the user's input request to infer the category of the distribution network load transfer supply scenario required by the user. Among all the intention recognition scenarios of the distribution network load transfer supply, it includes but is not limited to the main transformer severe overload scenario process, feeder severe overload scenario, fault or maintenance scenario, reading power protection task scenario, power protection transfer supply plan scenario, power protection task optimization scenario, opening map task, etc. It is also possible to configure a general dialogue task process for reply when none of the above scenarios match.
[0069] There are many intention scenarios and the similarity between scenarios is relatively high. Using traditional intention recognition methods based on keyword matching and the like, the recognition accuracy of the intention recognition method is relatively low. In this embodiment, the intention scenario is recognized by using a two-level intention recognition structure method combining a fine-tuned small model and a retrieval enhancement mechanism. First, a single-round intention recognition small model is trained using a single-round dataset, and then the retrieval enhancement mechanism is used to construct a prompt by retrieving single-round examples semantically similar to the multi-round test samples, so as to promote context learning. Finally, the prompt is used to guide the LLM to reason to identify the intention in the dialogue, which can effectively improve the accuracy of the intelligent agent's intention recognition. In this embodiment, the intention scenario is recognized by combining a fine-tuned small model and a retrieval enhancement mechanism, which can deeply understand the power industry terms and tasks, enable the system to autonomously identify various tasks, thereby reducing manual intervention and improving the degree of automation.
[0070] As an alternative implementation, such as Figure 2As shown in the figure, the large model performs intention scenario recognition on the distribution network load transfer scenario required by the received input request. Specifically, the following steps can be adopted:
[0071] Step S121. Train the intention recognition model: Pre-train the intention recognition model using the intention recognition dataset, which contains various types of conversations corresponding to different distribution network load transfer scenarios.
[0072] Specifically, the intention recognition model can be constructed by combining a simple label attention model and a HiTiN model. The HiTiN model is a hierarchical text classification model trained on the intention recognition dataset. The label attention model only considers the semantic information of the user's utterance and the label-query attention information, ignoring the hierarchical tree structure in intention recognition. Integrate the tree isomorphism network classification structure in HiTiN into the label attention model to improve the performance of the model. The intention recognition dataset contains all possible conversations in the distribution network load transfer scenario and has been manually annotated to cover various types of interaction behaviors of daily dispatchers.
[0073] Step S122. Candidate intention recognition: Input the current input request into the trained intention recognition model for inference, and infer multiple candidate intention scenarios.
[0074] Specifically, the most recent user input and the historical conversation record can be combined and inferred through the single-round intention recognition model in step S121. The inferred vector is probabilized using the softmax function to obtain the probability vector of the intention , and finally, the top three intentions with the highest score p are obtained as candidate intentions according to the scoring situation.
[0075] Step S123. Retrieval enhancement: Provide the identified candidate intention scenarios as examples in the prompt.
[0076] Specifically, the candidate intentions identified in step S122 can be used as examples in the prompt to provide a decision-making basis for the LLM and define a standardized output format. Among them, the prompt is used to guide and constrain the output of the large model, and the standardized output format converts natural language into intention labels.
[0077] Step S124. Model inference: Embed the retrieval-enhanced prompt and the input request in the prompt template to construct a complete prompt, and input the complete prompt into the large model for inference to obtain the final intention scenario.
[0078] Specifically, a complete prompt can be constructed first based on the prompt of step S123, the historical conversation record, and the most recent user input. Then, the complete prompt is input into the professional large model (L1) in the power field for reasoning to identify the intention of the user input and obtain the final user intention.
[0079] Through the above steps, this embodiment can identify the intended scenario for the distribution network load transfer scenario required by the input request based on the secondary intention recognition structure. First, the intention recognition model is used to initially identify candidate intentions, and then the large model RAG technology is used to accurately identify the intentions. Combining the interactive multi-round confirmation process to ensure the accuracy of entity names can effectively improve the accuracy and efficiency of intention recognition, thereby enhancing the ability to understand the intentions of natural language questions in the retrieval-based interaction system for distribution network load transfer.
[0080] It can be understood that the specific input data of the large model in the above steps can also be configured according to actual needs. For example, more types of data other than historical conversations can be added as input data to further improve the accuracy of intention recognition, or some input data can be streamlined to further improve the recognition efficiency.
[0081] Step S103. Power grid entity recognition: The large model performs entity recognition on the received input request and extracts the power grid equipment entity name.
[0082] Power grid entity recognition is to identify the power grid equipment entity name. In the power grid entity recognition task, the power grid entity naming is not only long, users tend to use abbreviations, and users may input non-standard names (nicknames, etc.), which makes it difficult to fully match the actual name, thus affecting the recognition efficiency and accuracy. In this embodiment, by adopting the method of combining SQL knowledge base recall and text knowledge base recall, the accuracy of entity recognition can be effectively improved.
[0083] As an alternative implementation, to perform entity recognition on the received input request by combining SQL knowledge base recall and text knowledge base recall to obtain the power grid equipment entity name, the following steps can be adopted:
[0084] Step S131. Construct a power grid equipment entity knowledge base: Use a database containing entity information of various types of distribution network equipment to construct a power grid entity SQL vector knowledge base and a RAG vector database in the large model. The RAG vector database is the power grid entity text knowledge base.
[0085] Specifically, such as Figure 3As shown in the figure, a power grid entity ledger database can be constructed first and connected to the large model platform. By using the vector database Milvus, the data table is transformed into points in a high-dimensional vector space so that the subsequent SQL generation model can be efficiently called. In addition, the database content is exported and a vector knowledge base is constructed on the large model platform to form a power grid entity SQL vector knowledge base and a power grid entity text knowledge base (RAG vector database). The power grid entity SQL vector knowledge base is a vector database formed by transforming the information of the power grid equipment entity database into a mathematical vector form. Specifically, in this step, the table names, field names in the table, and the corresponding annotation information in the power grid equipment entity database are encoded using a pre-trained encoder and added to the vector database. In the execution link, the large model extracts keywords according to the user output, encodes the keywords and queries them in the vector database, recalls k pieces of data with high vector similarity, and then the large model generates an sql statement for querying the power grid entity based on the recalled data, combined with the dependency relationship of the table names and field names and the user input. After generating the sql statement, the statement is executed in the database and the returned database query result is obtained. Finally, the summary large model polishes and outputs the queried entity information; the power grid entity text knowledge base is a knowledge base containing texts such as the names of power grid entities. Specifically, in this step, the names and ids of all entities in the database are sorted out and exported as a pdf document, then the pdf document is segmented using a text segmentation tool, and then the entity names and ids are encoded using an encoder and added to the vector database. In the execution link, the large model extracts keywords according to the user input, encodes the keywords and the user input and queries them in the vector database, recalls k pieces of data with high similarity, and then the summary large model polishes and outputs the queried entity information based on the recalled data.
[0086] Step S132. Entity name query: Extract the input entity name from the input request, generate an SQL statement according to the power grid entity SQL vector knowledge base, and query the entity information containing the input entity name according to the generated SQL statement. If no matching item is found, recall the results with vector similarity exceeding the preset threshold in the RAG vector database as the context, and use the large model to judge the matching entity name and output the queried entity name.
[0087] Specifically, as Figure 3 shown, when the user inputs a task, the large model can first extract the entity name input by the user, then generate an SQL statement according to the SQL vector knowledge base, and query the entity information containing the user input; if no match is found in the query, recall the results with high vector similarity in the RAG vector database as the context, and the large model judges the truly fully matching entity name based on the prompt words, and finally returns the queried entity name and the attribute information related to the entity.
[0088] In this embodiment, entity recognition by combining the above-mentioned SQL knowledge base recall method and text knowledge base recall method can effectively improve the recognition accuracy of entities such as equipment names in the power system. By adopting a streaming task process to asynchronously execute task blocks, the response speed can also be increased and the system resource utilization efficiency can be improved.
[0089] When all matching methods fail, such as Figure 3 As shown, this embodiment also configures a fallback answer process: when all matching methods fail, the large model will prompt the user that the retrieval fails and guide the user to re-verify the input entity name. In addition, a feedback mechanism can be integrated to allow users to report recognition errors. When the user corrects the entity to the large model, the user input and context data are saved, and this data can be used for process error location and the improvement process of the subsequent entity name rewriting module, etc.
[0090] As an optional implementation manner, in order to further improve the recall success rate, it also includes regularly learning entity name rewriting rules from the sample library, such as Figure 3 As shown, when an entity name is queried, the entity name is rewritten according to the learned entity name rewriting rules and output as the finally queried entity name; when no matching item is queried and the large model judges that the matching entity name fails, the large model prompts that the retrieval fails and guides to re-verify the input entity name.
[0091] Specifically, an entity name rewriting module can be configured. This module uses the natural language processing technology to use the Bert sequence prediction model, regularly learns and applies the rewriting rules from the sample library by using a timed task, rewrites the abbreviations or aliases input by the user into formal entity names, and then accurately identifies the power grid entity names through the above steps. By making full use of the sequence transcribing ability of the Bert model and the summarization ability of the large model, the pre-trained Bert model is used to realize the conversion ability from entity aliases and entity abbreviations to formal names. At the same time, the large model is used to summarize the entity objects queried based on the formal names, and combined with the user input to achieve accurate recognition of entities, which can further improve the accuracy of entity recognition and realize the fuzzy search ability for entity aliases and entity abbreviations.
[0092] Step S104. Mechanism model dynamic call: The large model extracts the parameter information of the transfer constraint and transfer target from the input request, and obtains the complete parameter information of the transfer constraint and transfer target through multiple rounds of dialogue. It converts the extracted intention scenario, power grid equipment entity name, and the obtained parameter information into mechanism model request parameters and sends a request to the mechanism model to call the mechanism model to calculate the transfer strategy, and receives multiple candidate transfer strategies returned by the mechanism model and the evaluation index data of each candidate transfer strategy.
[0093] The dynamic invocation mechanism model can give the big model the ability to flexibly call related mechanism models according to the user's execution intention, accurately extract key parameters to construct the request body, and finally calculate the distribution network's transfer plan. The dynamic invocation mechanism model combines multiple rounds of dialogue to allow the big model to continuously deepen its understanding during the interaction with the user, thereby more accurately grasping the user's intentions and needs.
[0094] As an optional implementation, the dynamic invocation of the mechanism model may be performed in the following steps:
[0095] Step S141: scene recognition and entity extraction.
[0096] Specifically, Figure 4 As shown in the figure, the big model first conducts an in-depth analysis of the user's input, extracts the transfer constraints and transfer target parameters, and identifies the transfer scenario to determine the scenario category to which it belongs. The transfer constraints include information such as the current load rate, the upper limit of the load rate, and the number of transfers. The transfer target parameters include parameters corresponding to the minimum switch action, the minimum transfer load, the line load balance, and the main transformer load balance. The transfer scenarios include main transformer heavy overload, feeder heavy overload, or fault maintenance. In the process of scene recognition, by designing the big model prompt words, the big model can extract and recognize the power grid equipment entities, parameter entity information, and scene categories in the business scenarios and dialogues from the user input. When it is identified as a main transformer heavy overload scenario, the target main transformer name in the input request is extracted, and then the target main transformer entity information is recalled. If it is a feeder heavy overload scenario, the target feeder name and the faulty feeder name in the input request are extracted, and then the target feeder entity and the faulty feeder entity information are recalled. If it is a fault or maintenance scenario, the target feeder name in the input request is extracted, and then the target feeder entity information is recalled. The recalled entity information is combined with the transfer constraints and transfer target parameters and converted into parameters of the mechanism model, which are sent to the mechanism model.
[0097] It can also be configured that when the user's intention is unclear and causes the scene recognition failure or entity extraction failure, the actual error message can be embedded through a prompt word template containing error examples, so that the large model can ask questions about the intention and feedback the error message, and clarify the user's intention after the user updates the input, ensuring the correct identification and extraction of the main transformer or feeder entity that needs to be transferred.
[0098] Step S142: Parameter extraction and context understanding.
[0099] Specifically, in user input, the parameters of the transfer constraints and transfer targets are often not given all at once. The large model can implement multiple rounds of dialogue by introducing historical dialogue information into prompt words, gradually guiding users to provide more information, or using contextual information and default values to infer missing parameters when users fail to provide complete information.
[0100] Step S143: Request body combination and sending.
[0101] Specifically, after successfully extracting all necessary parameters, the large model can output a description text of the parameters required by the summary output mechanism model, and then convert the description text output by the large model into mechanism model request parameters through a text parsing tool or the like, and then initiate a request to the mechanism model through a request tool to calculate a specific transfer supply plan, and finally obtain a list of transfer supply plans returned by the mechanism model, and the plan list contains evaluation index data of the transfer supply plan, etc.
[0102] Through the above method in this embodiment, it is possible to make full use of the mechanism model to dynamically call and accurately obtain a variety of candidate transfer supply strategies and the evaluation index data of each candidate transfer supply strategy.
[0103] Step S105. Evaluation of candidate transfer supply strategies: Read historical transfer supply strategies and strategy constraint criteria through RAG to determine a set of evaluation rules, and evaluate each candidate transfer supply strategy under each evaluation rule in a chain-of-thought manner, screen out candidate transfer supply strategies that meet the preset conditions and sort them according to the evaluation results, and determine the optimal transfer supply strategy based on the sorting results and output it.
[0104] Based on the prompt word technology of L1 and transfer supply plan evaluation, it is possible to improve the ability of the load transfer supply agent to evaluate the plan, realize the optimal sorting of candidate transfer supply plans, and provide an interpretable explanation in combination with input data, mechanism model parameters, and evaluation index system. At the same time, using RAG technology to refer to historical plans and regulation and system standards can provide corresponding optimization strategy guidance.
[0105] The core of transfer supply plan index evaluation is to receive the list of strategy plans output by the mechanism model (including the detailed evaluation indexes of each strategy plan), and then comprehensively consider key data sources such as plan indexes, user inputs, historical plans, and strategy constraint criteria (such as regulation and system standards, etc.), analyze and determine the best plan through the intelligent processing of the large model, and finally generate a summary document including the best plan, evaluation reasons, relevant optimization strategies, and displays.
[0106] As an alternative implementation, as Figure 5 shown, the following steps can be used to sort the performance of each candidate transfer supply strategy according to each candidate transfer supply strategy and the preset evaluation rules:
[0107] Step S151. Evaluation rule determination and adjustment: Read historical transfer supply strategies and strategy constraint criteria through RAG to determine a set of evaluation rules, and adjust the order and weight of each evaluation rule according to the indexes that need to be concerned to form an evaluation rule list.
[0108] Specifically, the historical transfer supply strategy and strategy constraint criteria (such as regulations and standards) can be read through the RAG technology to determine a set of evaluation rules. Then, according to the evaluation requirements input by the user and the indicators of key concern, the order and weight of the evaluation rules are adjusted. Finally, the large model summarizes and outputs a list object composed of evaluation rules. The above historical transfer supply strategy can be relevant documents retrieved by RAG for evaluating transfer supply plans, historical transfer supply plans retrieved by SQL for circuits, etc.
[0109] Step S152. Traverse the evaluation rule screening scheme: The large model uses prompt words to define the thinking process based on the chain-of-thought method. It sequentially removes each evaluation rule from the evaluation rule list, and uses the removed evaluation rule to evaluate each candidate transfer supply strategy until the evaluation results of all candidate transfer supply strategies under all evaluation rules are obtained. The candidate transfer supply strategies that meet the preset conditions are screened out and sorted according to the evaluation results.
[0110] Specifically, the large model can evaluate each plan by combining the prompt word technology with the adjusted evaluation rules. First, the large model sequentially takes out the rules from the rule list in step S151, and then the large model screens out the plans that meet the conditions according to the rules. The large model uses the chain-of-thought technology to define the thinking process through prompt words to improve the thinking ability of the large model, so as to output the thinking process while outputting the plan that meets the conditions, ensuring the accurate understanding and execution of the rules. After the process of taking rules - thinking is executed in a loop until all rules are taken out or the optimal plan has been selected, the optimal plan or set of optimal plans is finally screened out. The optimal plan can be the plan with the highest score as the best plan.
[0111] Step S1531. Output of intelligent recommendation results: The large model outputs the transfer supply strategy recommendation results according to the prompt word template. The recommendation results include the optimal transfer supply strategy and the thinking process.
[0112] Specifically, after the screening of the plan is completed, through the design of the prompt word template, the best plan id, the thinking process of each step, and the relevant regulations and system texts retrieved by the RAG tool are embedded in the prompt word template. Finally, the large model generates a logically coherent summary text based on the filled prompt word template. The above summary text includes the optimal plan, the thinking process, the content of the reference regulations, the information of the reference historical plan, etc. The specific output information can be configured according to actual needs.
[0113] In this embodiment, by combining the historical transfer supply strategy plan with the user input, the large model forms a set of evaluation rules, and then uses the chain-of-thought technology to implement plan evaluation, which can realize the evaluation of the dynamically generated transfer supply strategy plan based on the evaluation indicators, so as to provide personalized transfer supply strategy plan recommendation and evaluation services.
[0114] Prompt engineering can help large models understand human intentions, guide large models to generate expected responses, and ensure the relevance, coherence, and accuracy of responses without fine-tuning model parameters by providing a set of input integration instruction sets. In the scenario of distribution network load transfer, optimizing prompts can help large models more accurately identify task objectives, optimize decision-making schemes, and improve the ability of scheme optimization. As an alternative implementation method, it also includes a prompt optimization step S106 to optimize the prompts. As Figure 6 shown, this prompt optimization step S106 can adopt the following steps:
[0115] Step S161. Dialogue history analysis: Collect the historical dialogues of the interaction between the current prompt and the large model in the distribution network load transfer scenario, and analyze the collected historical dialogues to identify the direction for prompt optimization.
[0116] Specifically, the dialogue history of the interaction between the current prompt and the large model in the power field (L1) in the distribution network load transfer scenario can be collected first. This dialogue history records the performance of the large model in the power field (L1), such as successful and failed performances. Then, use the prompt optimization and fine-tuning model to analyze the historical dialogues, identify the main reasons for the poor performance in the historical dialogues, find out the ideas for optimization, and obtain the direction for optimizing the current prompt.
[0117] Step S162. Optimization scheme generation: Generate multiple optimization schemes according to the analysis results of the historical dialogues, and select the final optimization scheme from the various optimization schemes.
[0118] Specifically, multiple possible optimization schemes can be generated based on the analysis results of step S161. The optimization schemes include adding new instructions, modifying existing instructions, adjusting the order of instructions, etc. Then, the system evaluates each optimization scheme and selects the one that is most likely to solve the current problem as the final optimization method. Specifically, the Chain of Thought (COT) technology can be used to gradually solve the optimization scheme, including: analyzing each step of the original prompt, determining where the new instruction should be added to the original prompt, or whether an existing instruction needs to be replaced; analyzing the relationship between the existing instructions and the new instructions to ensure the coherence of the prompt after the update; and retaining key elements to ensure that the meaning of the prompt remains unchanged.
[0119] Step S163. Optimization scheme integration: Integrate the selected final optimization scheme into the original prompt to form an integrated optimization scheme.
[0120] Specifically, the most effective optimization plan selected in step S162 can be incorporated into the original prompt, such as modifying the content of the original prompt, adding steps to the original prompt, adjusting the order of steps in the original prompt, etc. The original prompt can include instructions such as large model identity definition, user input introduction, dialogue context introduction (optional), other information introduction (optional), rule definition, thinking process (optional), output example (optional), output format definition (optional), etc. Furthermore, key elements in the original prompt can be retained in the consideration of new instructions to ensure that the optimized prompt still meets the basic requirements of the task.
[0121] Step S164. Continuously execute step S161 dialogue history analysis, step S162 optimization plan generation, and step S163 optimization plan integration until a preset iteration condition is reached, obtaining an optimized prompt.
[0122] Specifically, continuously repeat the process of steps S161 to S163. The quality of the prompt can be improved in each iteration. During the iteration process, monitor the performance improvement after each iteration. Stop the iteration when the performance improvement is no longer significant or when the iteration requirements are met. In the initial stage of iteration, it is inclined to adopt the method of adding new instructions, but as the iteration progresses, more attention can be paid to the refinement of the prompt. As the number of iterations increases, the quality of the prompt will gradually improve until it reaches a stable state.
[0123] Preferably, RePrompt can be used to implement the above-mentioned prompt optimization to help the large model (L1) in the power field improve and optimize the existing prompt according to the existing prompt while following the principle of minimal modification and ensuring that the structure and content of the original prompt are retained as much as possible. RePrompt is a prompt optimization method based on interactive action generation. RePrompt combines elements of interactive generation and feedback loop, and continuously refines and optimizes the prompt through interaction ReAct with the feedback provider. When adopting RePrompt in this embodiment, it includes analyzing the historical dialogue, generating an optimization plan, integrating instructions, and performing iterative optimization to gradually improve the quality of the prompt, that is, collecting the chat history through RePrompt, then analyzing the user feedback, identifying the focus and common problems related to specific tasks for optimizing the subsequent generated prompt, and then avoiding overfitting of the prompt caused by improper data through batch summarization.
[0124] By adopting the above method in this embodiment, it is possible to combine the large model analysis and historical dialogue records to achieve semi-automatic prompt optimization.
[0125] In this embodiment, by constructing the above-mentioned intelligent agent and using the large model in the power field, the load transfer task scheduling tool, the load transfer mechanism model, intention recognition, entity recognition, and index evaluation, the intelligent decision-making of the distribution network load transfer and the recommendation of optimization solutions can be realized, thereby improving the load transfer response efficiency and accuracy of the power system in scenarios such as maintenance, heavy overload, and faults.
[0126] The intelligent recommendation device for the distribution network load transfer strategy in this embodiment includes:
[0127] The request input module is used to receive the input request from the user by the large model, and the input request includes the distribution network load transfer scenario information required by the user, the power grid equipment entity information, and the parameter information of the transfer constraints and transfer objectives.
[0128] The intention scenario recognition module is used to recognize the distribution network load transfer scenario required by the input request received by the large model and extract the user's intention scenario.
[0129] The power grid entity recognition module is used to perform entity recognition on the input request received by the large model and extract the power grid equipment entity name.
[0130] The mechanism model dynamic call module is used to extract the parameter information of the transfer constraints and transfer objectives from the input request by the large model, obtain the complete parameter information of the transfer constraints and transfer objectives through multiple rounds of dialogue, convert the extracted intention scenario, power grid equipment entity name, and the obtained parameter information into the mechanism model request parameters, send a request to the mechanism model to call the mechanism model to calculate the transfer strategy, and receive multiple candidate transfer strategies returned by the mechanism model and the evaluation index data of each candidate transfer strategy.
[0131] The candidate transfer strategy evaluation module is used to determine a set of evaluation rules by reading the historical transfer strategies and strategy constraint standards through RAG, evaluate each candidate transfer strategy under each evaluation rule in a chain-of-thought manner, screen out the candidate transfer strategies that meet the preset conditions and sort them according to the evaluation results, and determine the optimal transfer strategy based on the sorting results and output it.
[0132] The intelligent recommendation device for the distribution network load transfer strategy in this embodiment corresponds one-to-one with the above-mentioned intelligent recommendation method for the distribution network load transfer strategy, and will not be elaborated here one by one.
[0133] Embodiment 2:
[0134] As Figure 7 shown, the steps of the intelligent control method for the distribution network load transfer strategy in this embodiment include:
[0135] Step S201. Determine the optimal power transfer strategy according to the method in Embodiment 1, that is, determine the optimal power transfer strategy after sequentially going through intention recognition, entity recognition, dynamic invocation of the mechanism model, evaluation of power transfer plan indicators, and semi-automatic optimization of prompt words (which can be configured according to actual needs);
[0136] Step S202. Task dynamic programming: Generate multiple potential task scheduling plans according to the tasks required in the optimal power transfer strategy, and construct an action tree based on each potential task scheduling plan. Decide the final task scheduling plan according to the action tree to control the execution of tasks. If two task scheduling plans in the action tree have the same tasks, they are aggregated into one branch, and different tasks form different branches.
[0137] Through prior task planning, the task process is pre-planned, and tasks are executed according to the results of intention recognition according to the planned process. However, the power distribution network load transfer scenario is complex and ever-changing, and prior task planning is difficult to meet the actual application scenario. In this embodiment, after determining the optimal power transfer strategy, a task dynamic programming method based on Tree-Planner (tree planner) is adopted. By first generating multiple potential task scheduling plans according to the tasks required in the optimal power transfer strategy, and then constructing an action tree, and deciding the task scheduling plan in the action tree to control the execution of tasks, it can effectively improve the automation and intelligence of the power distribution network load transfer process, and at the same time improve the flexibility and execution efficiency of task execution.
[0138] As an alternative implementation, as Figure 8 shown, the task dynamic method based on Tree-Planner in Step S202 can adopt the following steps:
[0139] Step S221. Task scheduling sampling: Obtain various types of tasks and compile them into a preliminary task scheduling execution plan, and use the large model to generate multiple potential task scheduling plans according to the global information of the tasks and the preliminary task scheduling execution plan.
[0140] Specifically, first compile all possible types of task execution plans involved to form a preliminary task scheduling execution plan, and then use the large model of the power industry to generate a series of potential task scheduling plans according to the global information of the tasks and the preliminary task scheduling plan. The potential task scheduling plans are generated by the large model based on prompts according to common sense and logical reasoning.
[0141] Step S222. Action tree construction: Take the inlet task of load transfer as the root node of the tree. Starting from the first task, compare potential task scheduling plans in sequence. When two task scheduling plans have the same task, aggregate them onto one branch, and different tasks form different branches until all task scheduling plans are constructed onto the tree, forming a complete action tree.
[0142] Specifically, first, the inlet task of load transfer can be taken as the root node of the tree. Then, starting from the first task, compare all potential task scheduling plans generated in step S221 in sequence. When two task scheduling plans have the same task, aggregate them onto one branch, while different task parts form different branches until all task scheduling plans are constructed onto a complete tree. Since some of the potential task scheduling plans are repetitive and invalid and cannot be directly used, they need to be further screened in subsequent steps. By the above steps, repetitive execution of the same task can be avoided, improving the efficiency of task execution.
[0143] Step S223. Decision-making based on the tree: Select a node on any branch of the tree in sequence for execution. If the execution result of the executed node is valid, proceed to the next node in sequence. If the task execution of the executed node fails, mark it as an invalid node and trace back upward to the nearest valid node, then select another branch for execution until all tasks on the target branch are successfully executed, and determine the task scheduling plan of the target branch as the final decision.
[0144] Specifically, based on the constructed action tree, when executing an instruction, first select the first node on any branch of the tree for execution; if the execution result of this node is valid, proceed to execute subsequent nodes in sequence; if the task execution of a certain node fails, mark this node as an invalid node and trace back upward to the nearest valid node, then select another branch for execution. Continue in the above process until all tasks on a certain branch are successfully executed, and the final decision will be determined as the task scheduling plan of this branch, that is, the final task scheduling plan is decided.
[0145] The above method of this embodiment can flexibly implement the dynamic call of the task process by adopting three stages: task scheduling sampling, task tree construction, and task tree execution. While improving the automation and intelligence of the distribution network load transfer process, it also improves the flexibility and execution efficiency of task execution.
[0146] In a specific application embodiment, by configuring a task scheduling tool built for a load transfer intelligent agent, actions such as model call, tool call, task identification, and execution of mechanism models such as topology identification, overload warning, and load transfer can be automatically completed, and full-process automatic control of the distribution network load transfer can be achieved, greatly improving the control efficiency.
[0147] The present invention realizes intelligent recommendation of distribution network load transfer strategies by integrating intention recognition, entity recognition, dynamic invocation of mechanism models, and index evaluation. It can intelligently identify the user's intention scenarios and the names of power grid equipment entities, and then dynamically adjust the parameters based on the results of intention recognition and entity recognition to achieve the dynamic invocation of mechanism models. It can autonomously invoke the corresponding mechanism models, ensuring the flexibility and real-time performance of the system. Then, based on the prompt words of L1 and the evaluation of the transfer strategy plan, it improves the ability of the load transfer agent to evaluate the plan, realizes the optimal sorting of candidate transfer plans, and finally can effectively reduce the decision-making time for distribution network fault handling (by more than 70%) and improve the availability rate of the overall transfer strategy (by more than 90%), significantly enhancing the efficiency of distribution network load transfer.
[0148] This embodiment further provides a distribution network load transfer intelligent agent device, including a processor and a memory. The memory is used to store computer programs, and the processor is used to execute the computer programs to execute the methods in the above-mentioned Embodiments 1 and 2.
[0149] It can be understood that the above method of this embodiment can be executed by a single device, such as a computer or a server, etc., or can also be applied to a distributed scenario where multiple devices cooperate with each other to complete. In the case of a distributed scenario, one of the multiple devices can only execute one or more steps of the above method of this embodiment, and the multiple devices interact with each other to complete the above method. The processor can be implemented in the form of a general-purpose CPU, a microprocessor, an application-specific integrated circuit, or one or more integrated circuits, etc., and is used to execute relevant programs to implement the above method of this embodiment. The memory can be implemented in the forms of a read-only memory ROM, a random access memory RAM, a static storage device, and a dynamic storage device, etc. The memory can store an operating system and other application programs. When implementing the above method of this embodiment through software or firmware, the relevant program codes are stored in the memory and are called and executed by the processor.
[0150] This embodiment further provides a computer-readable storage medium storing a computer program, and the computer program realizes the above method when executed by a processor.
[0151] Those skilled in the art should understand that the above embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) that contain computer-usable program code. The present invention is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, and the combination of the flows and / or blocks in the flowchart and / or block diagram can also be implemented. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the functions specified in the process Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks. These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the functions specified in the process Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks. These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Therefore, the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in the process Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0152] The above are only the preferred embodiments of the present invention, and do not impose any form of limitation on the present invention. Although the present invention has been disclosed above with the preferred embodiments, it is not intended to limit the present invention. Therefore, any simple modification, equivalent change, and modification made to the above embodiments based on the technical essence of the present invention without departing from the technical solution of the present invention shall fall within the scope of the protection of the technical solution of the present invention.
Claims
1. A method for intelligently recommending load transfer strategies in a distribution network, characterized in that the steps include: Request input: The large model receives the user's input request, which includes the distribution network load transfer scenario information, power grid equipment entity information, and transfer constraint and transfer target parameter information required by the user; Intention scenario recognition: The large model recognizes the distribution network load transfer scenario required by the received input request and extracts the user's intention scenario; Power grid entity recognition: The large model performs entity recognition on the received input request and extracts the entity name of the power grid equipment; Dynamic call of mechanism model: The big model extracts the parameter information of the transfer constraints and transfer targets from the input request, and obtains the complete parameter information of the transfer constraints and transfer targets through multiple rounds of dialogue. The extracted intention scenario, grid equipment entity name and obtained parameter information are converted into mechanism model request parameters and a request is sent to the mechanism model to call the mechanism model to calculate the transfer strategy. The big model receives multiple candidate transfer strategies and evaluation index data of each candidate transfer strategy returned by the mechanism model. Evaluation of candidate power transfer strategies: RAG is used to read historical power transfer strategies and strategy constraint standards to determine a set of evaluation rules. A chain of thought approach is used to evaluate each candidate power transfer strategy under each evaluation rule. The candidate power transfer strategies that meet the preset conditions are screened out and ranked according to the evaluation results. The optimal power transfer strategy is determined based on the ranking results and output.
2. The method for intelligently recommending load transfer strategies for distribution network according to claim 1, characterized in that: The intended scenarios include any one or more of a main transformer heavy overload scenario, a feeder heavy overload scenario, a fault or maintenance scenario, a power supply task reading scenario, a power supply transfer plan scenario, and a power supply task optimization scenario.
3. The method for intelligently recommending load transfer strategies for distribution network according to claim 1, characterized in that: The step of identifying the load transfer scenario of the distribution network required for the received input request and extracting the user's intended scenario includes: Training the intent recognition model: pre-training the intent recognition model using an intent recognition data set, wherein the intent recognition data set includes multiple types of conversations corresponding to different distribution network load transfer scenarios; Candidate intent recognition: input the current input request into the trained intent recognition model for inference, and derive multiple candidate intent scenarios; Retrieval enhancement: providing the identified candidate intent scenarios as examples in the prompt words to the LLM; Model reasoning: embed retrieval enhancement into the prompt word template to obtain the prompt word, input the request to construct a complete prompt word, input the complete prompt word into the large model for reasoning, and obtain the final intention scenario.
4. The method for intelligently recommending load transfer strategies for distribution network according to claim 1, characterized in that: The performing entity recognition on the received input request and extracting the entity name of the power grid equipment includes: Constructing a knowledge base of power grid equipment entities: using a database containing information on various types of equipment entities in the distribution network to construct a power grid entity SQL vector knowledge base and a RAG vector database in the large model, wherein the RAG vector database is a textual knowledge base of power grid entities; Entity name query: extract the input entity name from the input request, generate an SQL statement based on the power grid entity SQL vector knowledge base, and query the entity information containing the input entity name based on the generated SQL statement. If no matching item is found, recall the results whose vector similarity exceeds the preset threshold in the RAG vector database as context, use the large model to determine the matching entity name, and output the queried entity name.
5. The method for intelligently recommending load transfer strategies for distribution network according to claim 4, characterized in that: It also includes regularly learning entity name rewriting rules from the sample library. When an entity name is queried, the entity name is rewritten according to the learned entity name rewriting rules to be output as the final queried entity name; when no match is found and the large model fails to match the entity name, the large model prompts the retrieval failure and guides the re-verification of the input entity name.
6. The method for intelligently recommending load transfer strategies for distribution network according to any one of claims 1 to 5, characterized in that: The method of adopting the thinking chain method is to evaluate each candidate power transfer strategy under each evaluation rule, screen out the candidate power transfer strategies that meet the preset conditions and sort them according to the evaluation results, determine the optimal power transfer strategy based on the sorting results and output the following: Determination and adjustment of evaluation rules: Read historical transfer strategies and strategy constraint standards through RAG to determine a set of evaluation rules, and adjust the order and weight of each evaluation rule according to the indicators to be concerned, to form an evaluation rule list; Traversing the evaluation rule screening scheme: The large model uses prompt words to define the thinking process based on the thinking chain method, removes each evaluation rule from the evaluation rule list in turn, and uses the removed evaluation rules to evaluate each candidate power transfer strategy until the evaluation results of all candidate power transfer strategies under all evaluation rules are obtained, and the candidate power transfer strategies that meet the preset conditions are screened out and sorted according to the evaluation results; Intelligent recommendation result output: The large model outputs the recommended results of the power transfer strategy based on the prompt word template. The recommended results include the optimal power transfer strategy and the thinking process.
7. The method for intelligently recommending load transfer strategies in a distribution network according to any one of claims 1 to 5, characterized in that: The method further includes a prompt word optimization step, wherein the prompt word optimization step includes: Conversation history analysis: Collect historical conversations in which current prompts interact with the big model in the distribution network load transfer scenario, and analyze the collected historical conversations to identify the directions in which prompts need to be optimized; Optimization plan generation: Generate multiple optimization plans based on the analysis results of historical conversations. The optimization plans include one or more of adding new instructions, modifying current instructions, and adjusting the order of instructions. The final optimization plan is selected from various optimization plans. Optimization plan integration: The final selected optimization plan is integrated into the original prompt to form an integrated optimization plan; The conversation history analysis, the optimization solution generation and the optimization solution integration are continuously performed until a preset iteration condition is reached to obtain an optimized prompt word.
8. A method for intelligent control of load transfer strategy in a distribution network, characterized in that the steps include: Determine the optimal transfer strategy according to the method described in any one of claims 1 to 7; A plurality of potential task scheduling plans are generated according to the tasks to be executed in the optimal transfer strategy, and an action tree is constructed according to each potential task scheduling plan. The final task scheduling plan is decided according to the action tree to control the execution of tasks according to the decided task scheduling plan. If two task scheduling plans in the action tree have the same tasks, they are aggregated into one branch, and different tasks form different branches.
9. The intelligent control method for load transfer strategy of distribution network according to claim 8 is characterized in that: The steps of generating a plurality of potential task scheduling plans according to the tasks to be executed in the optimal transfer strategy, constructing an action tree according to each potential task scheduling plan, and determining the final task scheduling plan according to the action tree to control the execution of tasks according to the determined task scheduling plan include: Task scheduling sampling: Obtain various types of task scheduling to form a preliminary task scheduling execution plan, and use the big model to generate multiple potential task scheduling plans based on the global information of the task and the preliminary task scheduling execution plan; Action tree construction: Take the load transfer entry task as the root node of the tree, and compare the potential task scheduling plans in sequence starting from the first task. When two task scheduling plans have the same tasks, they are aggregated into one branch, and different tasks form different branches, until all task scheduling plans are built into the tree to form a complete action tree; Tree-based decision: select a node from any branch in the tree for execution in turn. If the execution result of the executed node is valid, proceed to the next node in turn. If the task of the executed node fails, it is marked as an invalid node and traced back to the nearest valid node. Then select other branches for execution until the tasks of all nodes on the target branch are successfully executed. The task scheduling plan of the target branch is determined as the final decision.
10. A load transfer intelligent device for a distribution network, comprising a processor and a memory, wherein the memory is used to store a computer program, characterized in that: The processor is configured to execute the computer program to perform the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Power distribution network contact effectiveness evaluation method
CN110298056A
Power distribution system power supply capability evaluation method considering influence of multiple times of transfer on reliability
CN112434905A
Cited By
Power distribution transfer strategy intelligent evaluation method and system oriented to power supply reliability
CN121602386A