Method and system for constructing intelligent substation fault simulation agent

By combining the pre-trained fault simulation model with the large language model interface, a fault simulation agent is formed, which solves the problems of complex operation of existing circuit fault simulation and low parameter adjustment efficiency, and realizes efficient substation fault simulation and parameter adjustment.

CN119989616APending Publication Date: 2025-05-13TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411842742.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

The existing circuit fault simulation operation is complex, the parameter adjustment efficiency is low, and it is difficult to accurately establish a model of the relay protection system, and its performance and reliability are evaluated through simulation.

Method used

By configuring a preset large language model interface, the pre-trained fault simulation model calling tool is packaged in the form of a large language model interface to form a fault simulation agent, substation fault simulation is performed based on natural language, and simulation results are output.

Benefits of technology

It lowers the threshold for use, improves the efficiency of simulation parameter adjustment, realizes simulation of different combination scenarios, and reduces the confusion and trial and error costs of researchers in model selection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119989616A_ABST
    Figure CN119989616A_ABST
Patent Text Reader

Abstract

The invention provides a method and a system for constructing a fault simulation agent of an intelligent substation. The method comprises the following steps: configuring a preset large language model interface; packaging a calling tool of the pre-trained fault simulation model in a large language model interface mode to form a fault simulation agent; transformer substation fault simulation is carried out by inputting a natural language based on the fault simulation agent, and a simulation result is output; wherein cue word configuration is carried out on the fault simulation agent, and output of the fault simulation agent is constrained through cue words. According to the invention, the problems of complex circuit fault simulation operation and low parameter adjustment efficiency in the prior art are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of circuit fault simulation, and in particular to a method and system for constructing an intelligent substation fault simulation intelligent body. Background Art

[0002] The secondary relay protection system of a substation is a vital part of ensuring the safe and stable operation of the substation. Its main task is to quickly and accurately cut off the fault area when a fault occurs. In actual operation, the substation relay protection system faces many problems and challenges, such as system failure rate, protection action accuracy, fault diagnosis capability, etc. Therefore, how to accurately establish a model of the relay protection system and evaluate its performance and reliability through simulation has become an important topic of current research.

[0003] As an important node in the power system, the operation stability and safety of the substation are crucial to the operation of the entire power system. When a fault occurs, the operation and maintenance personnel need to quickly diagnose the fault according to the system response, and promptly repair and eliminate the hidden dangers of the system. This requires the operation and maintenance personnel to have sufficient professional knowledge accumulation and rich practical experience. Moreover, with the continuous expansion of the system scale and the increasing complexity of the structure, the operation and maintenance personnel are unable to handle a large amount of alarm information, and misjudgment and missed judgment often occur. This has prompted the emergence of many technologies and methods for power system fault diagnosis, such as expert systems, artificial neural networks, Petri networks, etc. These methods require a large amount of data for training and verification. In fact, the real data of substation failures is relatively scarce, and the failure of substations in reality is usually unpredictable and difficult to reproduce. In order to comprehensively evaluate the response and stability of substations under various possible fault conditions, it is necessary to use simulation methods for analysis.

[0004] The current substation simulation mainly relies on professionals to build simulation models in simulation software, adjust parameters, and execute simulation analysis results. On the one hand, the learning cost is high and the threshold for use is high; on the other hand, the efficiency of building models and adjusting parameters is low. Summary of the invention

[0005] The present invention provides a method and system for constructing an intelligent substation fault simulation intelligent body, which are used to solve the problems of complex operation and low parameter adjustment efficiency of existing circuit fault simulation.

[0006] The present invention provides a method for constructing an intelligent substation fault simulation intelligent agent, comprising: Configure the preset large language model interface; The calling tool of the pre-trained fault simulation model is encapsulated in the form of a large language model interface to form a fault simulation intelligent agent; Based on the fault simulation agent, a substation fault simulation is performed by inputting a natural language, and a simulation result is output; Wherein, prompt words are configured for the fault simulation intelligent agent, and the output of the fault simulation intelligent agent is constrained by the prompt words.

[0007] According to a method for constructing a smart substation fault simulation agent provided by the present invention, the configuration presets a large language model interface and specifically includes: Get the key and credentials of the preset large language model interface; Request information sent to the large language model based on the key and credential configuration; The large language model generates response information according to the request information, and outputs the response information externally through the large language model interface, thereby completing the configuration of the large language model interface.

[0008] According to a method for constructing a smart substation fault simulation agent provided by the present invention, the pre-trained fault simulation model construction process is: Obtaining information on each component in the substation relay protection system, establishing a relay protection element model through a simulation platform based on the component information, connecting the relay protection element model to the substation primary system after testing, and constructing an electromagnetic transient simulation model; The simulation parameters and calculation scheme of the electromagnetic transient simulation model are configured to generate a fault simulation model.

[0009] According to a method for constructing a fault simulation intelligent agent of an intelligent substation provided by the present invention, the method includes obtaining information of each component in the relay protection system of the substation, establishing a relay protection element model through a simulation platform based on the component information, connecting the relay protection element model to the primary system of the substation after testing, and constructing an electromagnetic transient simulation model, which specifically includes: Based on the component information, a principle model and an external characteristic model are established through a simulation platform; The relay protection element model is composed of the principle model and the external characteristic model; Based on the relay protection element model and the set protection configuration, it is connected to the substation primary system; In the primary system of the substation, an electromagnetic transient simulation model is constructed based on the simulation platform according to the main electrical wiring diagram and protection configuration; Among them, the principle model is a functional model that performs logical calculations based on the corresponding relay protection principle and the measured values ​​and the set values, and the external characteristic model is a functional model that can realize information interaction with the outside.

[0010] According to a method for constructing a fault simulation agent for a smart substation provided by the present invention, the calling tool of the pre-trained fault simulation model is encapsulated in the form of a large language model interface to form a fault simulation agent, which specifically includes: Obtain a calling tool for the fault simulation model, and match the calling tool with the large language model interface; After the match is successful, the calling tool and the large language model interface are encapsulated, and the setting instructions are output through the large language model interface to directly invoke the calling tool to form a fault simulation intelligent agent.

[0011] According to a method for constructing a fault simulation agent of an intelligent substation provided by the present invention, the prompt words are configured for the fault simulation agent, and the output of the fault simulation agent is constrained by the prompt words, specifically including: The fault simulation agent performs fault simulation based on the natural language input by the user and outputs the simulation result; Based on the simulation results, the simulation results are constrained by the configured prompt words to obtain the final simulation results in natural language form or in the form of a highlighted fault spectrum diagram.

[0012] The present invention also provides a system for constructing an intelligent substation fault simulation intelligent agent, the system comprising: An interface configuration module, used to configure a preset large language model interface; The encapsulation module is used to encapsulate the calling tool of the pre-trained fault simulation model in the form of a large language model interface to form a fault simulation intelligent agent; A simulation module, used to perform substation fault simulation based on the fault simulation agent by inputting natural language and outputting simulation results; Wherein, prompt words are configured for the fault simulation intelligent agent, and the output of the fault simulation intelligent agent is constrained by the prompt words.

[0013] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for constructing a smart substation fault simulation intelligent agent as described in any one of the above methods is implemented.

[0014] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method for constructing a smart substation fault simulation intelligent agent as described in any of the above methods is implemented.

[0015] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method for constructing a smart substation fault simulation intelligent agent as described in any one of the above methods is implemented.

[0016] The present invention provides a method and system for constructing an intelligent substation fault simulation agent, which lowers the usage threshold by controlling simulation through natural language. Moreover, simulation parameter schemes and calculation schemes can be adjusted through natural language to achieve simulation of scenarios with different combinations. Moreover, the large language model can automatically recommend appropriate parameter settings according to simulation requirements, reducing the confusion and trial-and-error costs of researchers in model selection. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 It is a flow chart of the method for constructing a smart substation fault simulation intelligent agent provided by the present invention.

[0019] Figure 2 This is a workflow diagram of the electromagnetic transient simulation model provided by the present invention.

[0020] Figure 3 It is a schematic diagram of module connection of a system for constructing an intelligent substation fault simulation intelligent body provided by the present invention.

[0021] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention.

[0022] Reference numerals: 110: interface configuration module; 120: encapsulation module; 130: simulation module; 410: processor; 420: communication interface; 430: memory; 440: communication bus. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. 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.

[0024] Combine the following Figure 1 The method for constructing a smart substation fault simulation agent of the present invention includes: step 100, configuring a preset large language model interface.

[0025] Specifically, obtain the key and credential of the preset large language model interface; Request information sent to the large language model based on the key and credential configuration; The large language model generates response information according to the request information, and outputs the response information externally through the large language model interface, thereby completing the configuration of the large language model interface.

[0026] Since OpenAI launched the ChatGPT API service, almost all large model services and open source projects currently support OpenAI's interface, which has naturally become a standard in the industry. There are many benefits to using the OpenAI interface for large model reasoning.

[0027] Universality: A set of codes adapted to OpenAI can be used to call various other large models.

[0028] Widely supported: Almost all model services and open source projects support this interface.

[0029] Flexibility: API-based large models can be switched flexibly, effectively reducing GPU resource usage.

[0030] Easy to configure: Existing open source tools can easily convert any model service into a service that follows the OpenAI interface specification.

[0031] In the present invention, it is necessary to select a large language model that is suitable for the application requirements. There are currently multiple options on the market, some of which are provided by OpenAI. Ensure that the selected model is suitable for the application scenario, taking into account the performance, cost and applicable field of the model.

[0032] Register on the relevant platform and obtain an API key and credentials. This usually involves creating a developer account and following the provided documentation to obtain the authentication information required to access the API. Before integration, carefully read the relevant API documentation to understand the model's capabilities, supported languages, and available endpoints. This will help you better understand how to construct requests and how to interpret the returned results. Using the obtained API key and credentials, configure your application to send requests to the big language model. Typically, you need to construct an HTTP request, including text data and other possible parameters, to obtain the output of the model. Once the request is sent, you will receive a response from the big language model. Parse and process this response to extract the required information, and then integrate it into your application. Make sure your application can handle a variety of possible responses, including error conditions. After completing the initial integration, it is critical to optimize and test. Adjust request parameters, optimize code for performance, and ensure that the integrated model works properly in different scenarios.

[0033] Step 200: encapsulate the calling tool of the pre-trained fault simulation model in the form of a large language model interface to form a fault simulation intelligent agent.

[0034] Wherein, prompt words are configured for the fault simulation intelligent agent, and the output of the fault simulation intelligent agent is constrained by the prompt words.

[0035] Specifically, the pre-trained fault simulation model construction process is: Obtaining information on each component in the substation relay protection system, establishing a relay protection element model through a simulation platform based on the component information, connecting the relay protection element model to the substation primary system after testing, and constructing an electromagnetic transient simulation model; The simulation parameters and calculation scheme of the electromagnetic transient simulation model are configured to generate a fault simulation model.

[0036] Based on the component information, a principle model and an external characteristic model are established through a simulation platform; The relay protection element model is composed of the principle model and the external characteristic model; Based on the relay protection element model and the set protection configuration, it is connected to the substation primary system; In the primary system of the substation, an electromagnetic transient simulation model is constructed based on the simulation platform according to the main electrical wiring diagram and protection configuration; Among them, the principle model is a functional model that performs logical calculations based on the corresponding relay protection principle and the measured values ​​and the set values, and the external characteristic model is a functional model that can realize information interaction with the outside.

[0037] In the present invention, according to the basic relay protection principle, a series of relay protection element models are built in the CloudPSS simulation platform. CloudPSS is a digital twin application construction platform for the energy Internet. It adopts a completely independently developed electromagnetic transient simulation kernel and uses heterogeneous parallel computing resources in the cloud to provide users with modeling, simulation, and analysis functions for a variety of energy networks. Among them, SimStudio can organize and manage the simulation model of the digital twin model of the energy power system. Based on this platform, it is easy to establish a joint simulation model of the primary and secondary systems of the substation, providing high-quality data for other studies. It can be combined with emerging technologies such as artificial intelligence and big data in the future, and applied to the reliability assessment of the secondary system of the substation, the optimization of the configuration parameters of the relay protection system, and the intelligent fault diagnosis and auxiliary strategies, so as to realize the intelligence and adaptability of the relay protection system of the substation.

[0038] Specifically, CloudPSS is a new generation of energy Internet cloud simulation platform, which aims to combine high-precision simulation, high-performance computing and artificial intelligence technology to provide users with powerful energy system simulation and analysis capabilities. With the gradual improvement of its functions, its simulation platform CloudPSS SimStudio has been widely used in the fields of full electromagnetic transient simulation of large-scale AC and DC power grids, simulation of multi-energy coupled integrated energy systems and simulation of power information physical systems, to explore the more complex system characteristics of the operation mechanism of the energy Internet. CloudPSS SimStudio uses cloud-based heterogeneous parallel computing resources to ensure the modeling experience and computing efficiency of complex examples, and can help users realize the simulation analysis of massive operation scenarios of energy systems. These simulation results can not only be used to optimize planning and design and system control solutions, but also can be further used to train energy Internet-specific artificial intelligence entities to improve the intelligence level of the system. The CloudPSS SimStudio platform also has the ability to build and manage digital twin models. The platform also opens the simulation kernel API interface, has a heterogeneous computing platform suitable for large-scale power grid real-time simulation and artificial intelligence decision-making, and a digital twin visualization application integration tool to fully support highly scalable and customizable digital twin display and application system development. These functions can provide strong support and technical guarantee for the digital transformation of energy and power systems.

[0039] By using the module encapsulation and module calling functions in the simulation platform, users can build custom components by themselves. In this paper, the modeling of relay protection components can be easily realized based on this platform. And by using its open simulation kernel API interface, fast batch simulation can also be realized.

[0040] In order to establish a complete substation relay protection system, it is first necessary to establish component models of various protection logics based on various relay protection principles. Based on the module encapsulation function in CloudPSS SimStudio, this paper constructs component models including overcurrent protection, zero-sequence overcurrent protection, differential protection, distance protection, reclosing and backup automatic switching equipment. Figure 2 The figure shows a schematic diagram of various protection element models constructed, which mainly include two parts: principle model and external characteristic model. The principle model is a functional model that performs logical calculations according to the measured values ​​and set values ​​based on the corresponding relay protection principles; the external characteristic model is a functional model that can realize information interaction with the outside, including functions such as function configuration, protection setting value setting and report output. In order to realize these functions, five types of interfaces are set on the outside of the component, which are used for the interaction of operation signals, equipment status signals, electrical quantity measurement signals, protection action alarm information, and equipment parameter setting information, thereby realizing the monitoring, control and protection functions of the relay protection system for the primary system.

[0041] In a specific example, taking the differential protection element as an example, the modeling process of the relay protection simulation element is briefly introduced. The differential protection device compares the current on both sides of the device and detects the current difference on both sides to determine whether there is an internal fault. Therefore, the differential protection has absolute selectivity and is often used as the main protection of the main transformer, high-voltage line, and high-voltage bus in the substation.

[0042] The braking method used in the differential protection element of the present invention is to use the current vector difference on both sides as the braking amount, and its expression is: (1).

[0043] Where: is the braking coefficient, ; is the current setting value of the protection. If the currents at both ends are equal in magnitude and phase when there is an internal fault, the braking amount is zero. In general, the magnitudes are not equal but the phases are close to the same. This braking method can minimize the braking amount when there is an internal fault.

[0044] First, establish the external interface pins of the component and define the parameters. Five interface pins are set up outside the differential protection component model: Im and In are the input pins of the current measurement signal at both ends of the protected component; the trigger signal pin is used to send a control signal to control the circuit breaker at both ends of the protected component; the circuit breaker status pin is used to monitor the closed state of the circuit breaker at both ends of the protected component; the locking signal pin controls whether the component is put into operation, and can also be used to simulate the fault situation of the protection component refusing to operate. The parameter definition includes the device name, system operating frequency, braking coefficient, current setting value and action delay. These parameters are encapsulated outside the component model and can be adjusted as needed when used.

[0045] Then, the internal principle model is designed to realize the function of the differential protection element according to the action characteristics of formula (1). Make full use of a series of computing elements and logic elements built into the platform to realize the action characteristics in formula (1) and realize the function of differential protection.

[0046] In the present invention, when the CloudPSS SimStudio model type is selected as a common model or component, the SimStudio workbench provides a parameter scheme configuration function. Users can add multiple sets of parameter schemes to the same SimStudio model by configuring global parameters to achieve applications such as multi-scenario simulation.

[0047] The parameter scheme configuration process is as follows: Prepare the simulation case. In SimStudio Workbench - Overview tab, check and make sure that the Model Type of Current Project is selected as Normal Model or Component.

[0048] In the SimStudio Workbench - Interface tab, configure the Global Parameters / Interface Parameters list.

[0049] Use global parameters / interface parameters to assign values ​​to the internal parameters of the model, ensuring that the corresponding parameter changes within the model can be controlled by changing the global parameters; In SimStudio workbench-Run tab-Parameter scheme column, configure different parameter schemes for simulation.

[0050] Specifically, the fault scenario types include: ["No fault", "Single-phase short circuit and grounding of incoming line I", "Two-phase short circuit of 110kV incoming line I", "Two-phase short circuit and grounding of 110kV incoming line I", "Three-phase short circuit of 110kV incoming line I", "Single-phase grounding of 110kV bus section I", "Two-phase short circuit of 110kV bus section I", "Two-phase short circuit and grounding of 110kV bus section I", "Three-phase short circuit of 110kV bus section I" "#1 main transformer high voltage side single-phase grounding", "#1 main transformer high voltage side two-phase short circuit", "#1 main transformer high voltage side two-phase short circuit grounding", "#1 main transformer high voltage side three-phase short circuit", "#1 main transformer low voltage side single-phase short circuit grounding", "#1 main transformer low voltage side two-phase short circuit", "#1 main transformer low voltage side two-phase short circuit grounding", "#1 main transformer low voltage side three-phase short circuit", "#10kV line F01 single-phase grounding", "#10kV line F 01 two-phase short circuit","#10kV line F01 two-phase short circuit grounding","#10kV line F01 three-phase short circuit","10kV section 532 switch fault","110kV incoming line Ⅰ line two-phase short circuit fault, 110kV incoming line Ⅰ line protection failure","double-circuit 110kV line cross-line fault","10kV line F01-F02 cross-line fault","10kV line F01 phase-to-phase fault, F01 Protection refused to operate","10kV line F01 single-phase grounding fault, F01 protection refused to operate","#1 main transformer lower CT grounded at two points, 10kV line F01 phase-to-phase fault","10kV ⅠM fault, #1 main transformer refused to operate","110kV lines run in parallel, 110kV incoming line Ⅰ line CT grounded at two points, 110kV incoming line Ⅱ fault","110kV incoming line Ⅰ line CT grounded at two points, #1 main transformer fault"].

[0051] Each fault type requires configuration of corresponding parameters in the simulation model, so that the corresponding phenomena produced during the simulation process can be controlled.

[0052] To configure the calculation scheme, in the SimStudio Run tab, create a new one or select any calculation scheme under the Electromagnetic Transient Simulation Scheme column to configure the selected electromagnetic transient simulation scheme.

[0053] The electromagnetic transient simulation solution configuration bar contains three general modules: basic settings, advanced settings and operation settings.

[0054] Users can configure the basic settings and run settings modules to complete the configuration of basic simulation time, integration step, output channel, section startup and computing resources.

[0055] For detailed information on how to configure measurement and output channels, see the Measurement and Output System Help page.

[0056] For detailed information on section saving and section startup setting methods, please refer to the section parameter setting help page.

[0057] If you need to use parallel acceleration, real-time simulation, or event-driven related functions, you need to configure the advanced settings module additionally.

[0058] The calling tool of the pre-trained fault simulation model is encapsulated in the form of a large language model interface to form a fault simulation agent, which specifically includes: Obtain a calling tool for the fault simulation model, and match the calling tool with the large language model interface; After the match is successful, the calling tool and the large language model interface are encapsulated, and the setting instructions are output through the large language model interface to directly invoke the calling tool to form a fault simulation intelligent agent.

[0059] In the present invention, the simulation model calling method is encapsulated in an interface manner, and the encapsulation content includes: Input simulation parameter scheme detailed parameters and calculation scheme detailed parameters; Definition of all simulation parameter schemes and all parameter lists of simulation; Enter the simulation parameter scheme name and the returned simulation parameter scheme detailed information; Get all computing plan names, the input computing plan name, and the returned computing plan details.

[0060] Prompt words are configured for the fault simulation agent, and the output of the fault simulation agent is constrained by the prompt words, specifically including: The fault simulation agent performs fault simulation based on the natural language input by the user and outputs the simulation result; Based on the simulation results, the simulation results are constrained by the configured prompt words to obtain the final simulation results in natural language form or in the form of a highlighted fault spectrum diagram.

[0061] In the present invention, Prompt refers to all input content given to the big model. For example, if you ask it a question, this question is the prompt, and the answer of the big model is called completion. Temperature is a parameter that controls the randomness and creativity of the results generated by LLM. The smaller this parameter is, the more conservative the result is. The larger it is, the more random the generated result is, and unexpected results can be obtained, but sometimes there will be some side effects. System Prompt can be understood as the initialization setting of the model. For example, if you want to enable a big model as an assistant to arrange your schedule, you can tell the big model: "You are a conscientious personal assistant who helps users arrange their schedules." Prompt words are used to make a series of instructions and constraints on the AI's responses. Form variables can be inserted, such as {{input}}. This prompt word will not be seen by the end user.

[0062] In a specific example, the substation fault scenario simulation assistant prompts: You are an electric power simulation assistant, you can achieve the following functions.

[0063] Query all parameter schemes of the current simulation model: Get the names of all simulation schemes by calling the getallconfig tool.

[0064] Query the parameter list definition of the current simulation model: call the tool getconfiglist to obtain the simulation parameter list.

[0065] Query detailed information of a specific simulation parameter scheme: Enter the simulation parameter scheme {{errorname}}, call the tool getconfigparameters, obtain detailed information of the scheme and return the result in json.

[0066] Query all calculation schemes of the simulation model: Get the names of all calculation schemes by calling the tool getalljob.

[0067] Query detailed information of a specific calculation scheme of a simulation model: Enter the simulation calculation scheme {{jobname}}, call getjob to obtain the calculation scheme information and return the result in json.

[0068] Execute simulation: When executing simulation, enter the simulation parameter scheme {{errorname}}, call the simulation tool to execute the simulation, and return the simulation results.

[0069] In the specific application and demonstration process, dialogue is conducted with the simulation assistant through text. The simulation assistant generates dialogue information and determines the user's intention. If the process involves calling a simulation tool, the simulation tool interface call is executed. After the simulation tool is called, the simulation result is returned to interact with the front end, and the front-end topology diagram returns the result accordingly to highlight the components affected by the fault scenario.

[0070] Step 300: Perform substation fault simulation based on the fault simulation agent by inputting natural language, and output simulation results.

[0071] Specifically, refer to Figure 2 , the construction adopts OpenAI3.0+ interface specification, which helps LLM understand the role of the tool and how to call it. The specification stipulates that the tool is called using the http protocol, and the interface is called using the get, put, post, and delete methods. Therefore, it is necessary to make various tools and functions API-based.

[0072] Use httpserver method to publish the tool as an interface, and call it with large language model. And execute the program through funcstudio, introduce the ID of the current job, and introduce the function in APPStudio, so that the output of job.log and other methods can be sent to the APPStudio interface for display.

[0073] By encapsulating different algorithms, tools, and databases into API interfaces according to specific protocols and inputting the calling methods into LLM, LLM will have the ability to use the interfaces to solve complex problems.

[0074] Publish the agent through Dify, integrate the published link into the web component of APPStudio, and control the simulation execution through dialogue. Support natural language interaction, so that non-professionals can understand and use simulation tools more easily. Users can set simulation parameters, query simulation results, etc. through simple language instructions. And mature tools can be used as one of the capabilities of the large language model to expand the boundaries of the tasks that the large language model can achieve.

[0075] Taking the 110kV substation fault scenario simulation as an example, a simulation function for different scenarios was developed through text dialogue with LLM.

[0076] In this case, 8 tools are implemented, including obtaining simulation parameter solutions, querying parameter list definitions, querying simulation parameter solution details, obtaining all calculation solutions, querying calculation solution details, and executing simulation. When executing simulation, it is necessary to combine with CloudPSS SDK, bind funcstudio output through cloudpss.currentJob(), and then control the display of APPStudio.

[0077] Configure prompt words in the Agent built on LLM, use React mode, and configure parameters such as top-k, top-p, temperature, etc. It will be published in the form of a chat box and integrated into CloudPSS.

[0078] A method for constructing an intelligent substation fault simulation agent provided by the present invention controls the simulation through natural language, which lowers the usage threshold; at the same time, the fault impact range under different fault scenarios is directly displayed through the interface, which improves the efficiency of fault result data analysis; and the simulation parameter scheme and calculation scheme can be adjusted through natural language to achieve different combinations of scenario simulations; and the large language model can automatically recommend appropriate parameter settings according to simulation requirements, reducing researchers' confusion and trial and error costs in model selection.

[0079] In addition, the large language model supports natural language interaction, making it easier for non-professionals to understand and use simulation tools. Users can set simulation parameters and query simulation results through simple language instructions.

[0080] The simulation tools enabled by the big language model form richer digital twin applications, and by combining different tools and knowledge bases, they form functions with higher degrees of freedom. The big language model can provide intelligent decision support for digital twin applications based on simulation results and data analysis. Through natural language generation technology, the big language model can convert complex decision information into easy-to-understand language expressions, helping decision makers better understand problems and make decisions.

[0081] The large language model can automatically recommend appropriate parameter settings based on simulation requirements, reducing researchers’ confusion and trial-and-error costs in model selection. refer to Figure 3 The present invention also discloses a system for constructing an intelligent substation fault simulation agent, the system comprising: An interface configuration module 110, used to configure a preset large language model interface; The encapsulation module 120 is used to encapsulate the calling tool of the pre-trained fault simulation model in the form of a large language model interface to form a fault simulation intelligent agent; A simulation module 130, configured to perform substation fault simulation based on the fault simulation agent by inputting natural language and output simulation results; Wherein, prompt words are configured for the fault simulation intelligent agent, and the output of the fault simulation intelligent agent is constrained by the prompt words.

[0082] The configuration presets a large language model interface, specifically including: Get the key and credentials of the preset large language model interface; Request information sent to the large language model based on the key and credential configuration; The large language model generates response information according to the request information, and outputs the response information externally through the large language model interface, thereby completing the configuration of the large language model interface.

[0083] The pre-trained fault simulation model construction process is: Obtaining information on each component in the substation relay protection system, establishing a relay protection element model through a simulation platform based on the component information, connecting the relay protection element model to the substation primary system after testing, and constructing an electromagnetic transient simulation model; The simulation parameters and calculation scheme of the electromagnetic transient simulation model are configured to generate a fault simulation model.

[0084] Obtain the information of each component in the substation relay protection system, establish a relay protection element model through a simulation platform based on the component information, connect the relay protection element model to the substation primary system after testing, and build an electromagnetic transient simulation model, which specifically includes: Based on the component information, a principle model and an external characteristic model are established through a simulation platform; The relay protection element model is composed of the principle model and the external characteristic model; Based on the relay protection element model and the set protection configuration, it is connected to the substation primary system; In the primary system of the substation, an electromagnetic transient simulation model is constructed based on the simulation platform according to the electrical main wiring diagram and protection configuration; Among them, the principle model is a functional model that performs logical calculations based on the corresponding relay protection principle and the measured values ​​and the set values, and the external characteristic model is a functional model that can realize information interaction with the outside.

[0085] The calling tool of the pre-trained fault simulation model is encapsulated in the form of a large language model interface to form a fault simulation agent, which specifically includes: Obtain a calling tool for the fault simulation model, and match the calling tool with the large language model interface; After the match is successful, the calling tool and the large language model interface are encapsulated, and the setting instructions are output through the large language model interface to directly invoke the calling tool to form a fault simulation intelligent agent.

[0086] Prompt words are configured for the fault simulation agent, and the output of the fault simulation agent is constrained by the prompt words, specifically including: The fault simulation agent performs fault simulation based on the natural language input by the user and outputs the simulation result; Based on the simulation results, the simulation results are constrained by the configured prompt words to obtain the final simulation results in natural language form or in the form of a highlighted fault spectrum diagram.

[0087] A system for constructing an intelligent substation fault simulation agent provided by the present invention controls simulation through natural language, which lowers the usage threshold; at the same time, the fault impact range under different fault scenarios is directly displayed through the interface, which improves the efficiency of fault result data analysis; and the simulation parameter scheme and calculation scheme can be adjusted through natural language to achieve different combinations of scenario simulations; and the large language model can automatically recommend appropriate parameter settings according to simulation requirements, reducing researchers' confusion and trial and error costs in model selection.

[0088] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute a method for constructing a smart substation fault simulation agent, the method comprising: configuring a preset large language model interface; encapsulating the calling tool of the pre-trained fault simulation model in the form of a large language model interface to form a fault simulation agent; performing substation fault simulation based on the fault simulation agent by inputting natural language and outputting the simulation result; wherein the fault simulation agent is configured with prompt words, and the output of the fault simulation agent is constrained by the prompt words.

[0089] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0090] On the other hand, the present invention also provides a computer program product, which includes a computer program, and the computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute a method for constructing an intelligent substation fault simulation agent provided by the above methods, the method including: configuring a preset large language model interface; encapsulating a calling tool of a pre-trained fault simulation model in the form of a large language model interface to form a fault simulation agent; based on the fault simulation agent, performing substation fault simulation by inputting natural language and outputting simulation results; wherein, prompt words are configured for the fault simulation agent, and the output of the fault simulation agent is constrained by the prompt words.

[0091] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute a method for constructing an intelligent substation fault simulation agent provided by the above methods, the method comprising: configuring a preset large language model interface; encapsulating a calling tool of a pre-trained fault simulation model in the form of a large language model interface to form a fault simulation agent; performing substation fault simulation based on the fault simulation agent by inputting natural language and outputting simulation results; wherein, prompt words are configured for the fault simulation agent, and the output of the fault simulation agent is constrained by the prompt words.

[0092] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0093] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0094] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for constructing a smart substation fault simulation agent, characterized in that: include: Configure the preset large language model interface; The calling tool of the pre-trained fault simulation model is encapsulated in the form of a large language model interface to form a fault simulation intelligent agent; Based on the fault simulation agent, a substation fault simulation is performed by inputting a natural language, and a simulation result is output; Wherein, prompt words are configured for the fault simulation intelligent agent, and the output of the fault simulation intelligent agent is constrained by the prompt words.

2. The method for constructing a smart substation fault simulation agent according to claim 1, characterized in that: The configuration presets a large language model interface, specifically including: Get the key and credentials of the preset large language model interface; Request information sent to the large language model based on the key and credential configuration; The large language model generates response information according to the request information, and outputs the response information externally through the large language model interface, thereby completing the configuration of the large language model interface.

3. The method for constructing a smart substation fault simulation agent according to claim 1, characterized in that: The process of building a pre-trained fault simulation model is as follows: Obtaining information on each component in the substation relay protection system, establishing a relay protection element model through a simulation platform based on the component information, connecting the relay protection element model to the substation primary system after testing, and constructing an electromagnetic transient simulation model; The simulation parameters and calculation scheme of the electromagnetic transient simulation model are configured to generate a fault simulation model.

4. The method for constructing a smart substation fault simulation agent according to claim 3 is characterized in that: The step of obtaining information of each component in the relay protection system of the substation, establishing a relay protection element model through a simulation platform based on the component information, connecting the relay protection element model to the primary system of the substation after testing, and constructing an electromagnetic transient simulation model specifically includes: Based on the component information, a principle model and an external characteristic model are established through a simulation platform; The relay protection element model is composed of the principle model and the external characteristic model; Based on the relay protection element model and the set protection configuration, it is connected to the substation primary system; In the primary system of the substation, an electromagnetic transient simulation model is constructed based on the simulation platform according to the electrical main wiring diagram and protection configuration; Among them, the principle model is a functional model that performs logical calculations based on the corresponding relay protection principle and the measured values ​​and the set values, and the external characteristic model is a functional model that can realize information interaction with the outside.

5. The method for constructing a smart substation fault simulation agent according to claim 3, characterized in that: The calling tool of the pre-trained fault simulation model is encapsulated in the form of a large language model interface to form a fault simulation agent, which specifically includes: Obtain a calling tool for the fault simulation model, and match the calling tool with the large language model interface; After the match is successful, the calling tool and the large language model interface are encapsulated, and the setting instructions are output through the large language model interface to directly invoke the calling tool to form a fault simulation intelligent agent.

6. The method for constructing a smart substation fault simulation agent according to claim 1, characterized in that: The configuring of prompt words for the fault simulation intelligent agent and constraining the output of the fault simulation intelligent agent through the prompt words specifically includes: The fault simulation agent performs fault simulation based on the natural language input by the user and outputs the simulation result; Based on the simulation results, the simulation results are constrained by the configured prompt words to obtain the final simulation results in natural language form or in the form of a highlighted fault spectrum diagram.

7. A system for constructing an intelligent substation fault simulation agent, characterized in that: The system comprises: An interface configuration module, used to configure a preset large language model interface; The encapsulation module is used to encapsulate the calling tool of the pre-trained fault simulation model in the form of a large language model interface to form a fault simulation intelligent agent; A simulation module is used to perform substation fault simulation based on the fault simulation agent by inputting natural language and outputting simulation results Wherein, prompt words are configured for the fault simulation intelligent agent, and the output of the fault simulation intelligent agent is constrained by the prompt words.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the method for constructing a smart substation fault simulation agent as described in any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for constructing a smart substation fault simulation agent as claimed in any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for constructing a smart substation fault simulation agent as described in any one of claims 1 to 6 is implemented.