A method, device, electronic device and medium for generating an intelligent control task chain
By generating a decision tree-style knowledge graph through a large language model agent and knowledge graph, the problems of low power system dispatching efficiency and insufficient model updates are solved, and the efficient generation and execution of intelligent control task chains are achieved.
Patent Information
- Application Number
- CN202411233693.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2044-09-04
AI Technical Summary
The existing power system dispatching method is difficult to adapt to the real-time dispatching needs after the access of massive distributed equipment. The dispatcher's operation efficiency is low, and the large language model relies on fixed pre-training data, which is difficult to update in real time, generates inaccurate information, lacks transparency and insufficient multi-step logical reasoning capabilities.
An intelligent control task chain generation method based on a large language model agent and knowledge graph is adopted. The control operation sequence is extracted in the form of triple text, and a decision tree knowledge graph is generated to realize the autonomous generation and execution of the intelligent control task chain.
It improves the accuracy and efficiency of the generation of regulatory task chains, lowers the operational threshold, enhances the transparency and real-time update capabilities of the model, and supports dynamic adjustment and multi-step logical reasoning.
Smart Images

Figure CN119398364B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent generation of large language model agents, and in particular to a method, device, electronic equipment and medium for generating an intelligent control task chain. Background Art
[0002] With the construction of new power grids and the integration of large-scale renewable energy generation equipment, traditional manual dispatching methods in power systems are struggling to adapt to the real-time fluctuations and operational handling associated with the integration of massive distributed devices (such as distributed power sources, new energy storage, and electric vehicles). Furthermore, the rapid growth of the power grid is placing immense pressure on the operational efficiency of existing dispatchers. The ever-expanding scale of the grid is leading to an exponential increase in the number of dispatchable entities, and the volume of real-time dispatching workloads is also exploding. However, existing dispatcher operational efficiency is no longer sufficient to meet this rapid growth in demand. While programmed automation can improve the situation to some extent, core issues remain, such as ensuring the security of dispatching decisions and understanding the underlying decision-making logic. Therefore, given the relatively complete and mature nature of existing control operations and decision-making processes, large language models are becoming increasingly popular due to their high generalization, low operational barriers, and comprehensive interfaces for accessing relevant specialized modules. However, existing large language models rely on fixed pre-training data, making them difficult to update or integrate new knowledge in real time. They can generate inaccurate information or "hallucinations," and may perform poorly when handling complex queries requiring multi-entity associations and multi-step logical reasoning. Furthermore, as "black box" models, their decision-making and reasoning processes often lack transparency and easily understandable explanations. Therefore, although intelligent control research has made certain progress based on large language models, existing technical solutions are limited to the manual construction of knowledge graphs and the construction of fixed control task chains, and there are deficiencies in the dynamic generation and real-time adjustment of control task chains. Summary of the Invention
[0003] In order to solve at least one of the technical problems existing in the prior art to a certain extent, the purpose of the present invention is to provide a method, device, electronic device and medium for generating an intelligent control task chain based on a large language model intelligent agent and a knowledge graph.
[0004] The first technical solution adopted by the present invention is:
[0005] A method for generating an intelligent control task chain includes the following steps:
[0006] Obtain the content text of various types of regulatory safety regulations and regulatory operations;
[0007] The content text is input into a pre-trained large language model agent (Agent), which autonomously extracts the content to extract the control operation sequence and call content in various situations in the form of triple text;
[0008] The extracted control operation sequence and call content in various situations are used by the large language model agent to intelligently generate a knowledge graph in the form of a decision tree in the preset knowledge graph, providing a data foundation for the generation of intelligent control task chains;
[0009] The large language model agent obtains the text instructions input by the user, recognizes the intention, and then autonomously generates a task chain for regulating the operation logic in the generated knowledge graph after autonomously understanding it, and autonomously generates a thought chain for task execution;
[0010] Based on the generated thought chain, the large language model agent intelligently calls relevant modules through the API interface for regulation to achieve intelligent regulation.
[0011] Furthermore, the control operation sequence and call content in various situations are extracted in the form of triple text, including:
[0012] After building the large language model agent framework, we use small sample text to prompt examples and instructions for the project, enabling the agent to extract knowledge triples from the text using templates. The knowledge triples are in the form of:
[0013]
[0014] Where E represents the entity set, R represents the relationship set, T represents the triple set in the knowledge graph, A represents the attribute set, and X represents the attribute value set; × represents the Cartesian product; (E×R×E) represents the set of triples connected by entities through relationships, (E×A×X) represents the combination of entities, attributes, and attribute values, and T, as a subset of (E×R×E) and (E×A×X), means that each triple is composed of an entity, a relationship / attribute, and an entity / attribute value;
[0015] Therefore, a specific triple t is represented as:
[0016] t=(e1,r,e2)∈T
[0017] e1,e2∈E,r∈R
[0018] or:
[0019] t=(e,a,x)∈T
[0020] e∈E,a∈A,x∈X
[0021] Where e1 and e2 represent two consecutive tasks in the control procedure, r represents the connection between the two tasks, that is, the order in which the two tasks are executed, e represents a single task in the control procedure, a represents the attribute of the task, which is generally the final output or auxiliary decision-making task in the procedure, and x represents the attribute value of the task, that is, the output result.
[0022] This enables the large model agent to correctly analyze and understand the text content based on the above form of knowledge triples.
[0023] Furthermore, the content of the small sample text prompt project includes:
[0024] Part 1: Scenario setting, task description, and precise definition of triples;
[0025] Part 2: Small sample examples are presented for autonomous learning of large language model agents.
[0026] Furthermore, the control operation sequence and call content in various situations extracted from the control procedures are intelligently generated into a knowledge graph in the form of a decision tree in a preset knowledge graph through a large language model agent, including:
[0027] Based on the knowledge triples obtained, the large language model agent distinguishes different modules in the control program into different types of nodes and determines the relationship and sequence structure between the modules;
[0028] The intelligent agent calls the relevant modules of neo4j to generate the knowledge graph, and automatically generates a directed knowledge graph in the form of a decision tree based on the knowledge triple content and the structure between modules.
[0029] Furthermore, the text instructions input by the user are obtained, the large language model agent performs intent recognition, and after autonomous understanding, intelligently generates a task chain for regulating the operation logic in the generated knowledge graph, and autonomously generates a thought chain for task execution, including:
[0030] Obtain the text instructions input by the user and input the text instructions into the large prediction model agent. The large prediction model agent performs semantic understanding and intent recognition based on the large language model kernel;
[0031] The knowledge graph is read according to the recognition results, and the key nodes that need to be called in the knowledge graph are determined based on the keywords, so as to read the directed decision chain to which the key nodes belong and form a task thinking chain.
[0032] The second technical solution adopted by the present invention is:
[0033] An intelligent control task chain generation device, comprising:
[0034] A text acquisition module is used to obtain the content text of various types of regulatory safety regulations and regulatory operations;
[0035] A knowledge extraction module is used to input the content text into a pre-trained large language model agent (Agent), which autonomously extracts the content to extract the control operation sequence and call content in various situations in the form of triple text;
[0036] The graph generation module is used to intelligently generate a knowledge graph in the form of a decision tree in the preset knowledge graph using the large language model agent to extract the control operation sequence and call content in various situations, providing a data foundation for the generation of intelligent control task chains;
[0037] The thought generation module is used to obtain text instructions input by the user, and the large language model agent performs intent recognition. After autonomous understanding, it intelligently generates a task chain for regulating operation logic in the generated knowledge graph and autonomously generates a thought chain for task execution;
[0038] The automatic control module is used to intelligently call relevant modules through the API interface based on the generated thought chain to achieve intelligent control.
[0039] Furthermore, the control operation sequence and call content in various situations are extracted in the form of triple text, including:
[0040] After building the large language model agent framework, we use small sample text to prompt examples and instructions for the project, enabling the agent to extract knowledge triples from the text using templates. The knowledge triples are in the form of:
[0041]
[0042] Where E represents the entity set, R represents the relationship set, T represents the triple set in the knowledge graph, A represents the attribute set, and X represents the attribute value set; × represents the Cartesian product; (E×R×E) represents the set of triples connected by entities through relationships, (E×A×X) represents the combination of entities, attributes, and attribute values, and T, as a subset of (E×R×E) and (E×A×X), means that each triple is composed of an entity, a relationship / attribute, and an entity / attribute value;
[0043] Therefore, a specific triple t is represented as:
[0044] t=(e1,r,e2)∈T
[0045] e1,e2∈E,r∈R
[0046] or:
[0047] t=(e,a,x)∈T
[0048] e∈E,a∈A,x∈X
[0049] Where e1 and e2 represent two consecutive tasks in the control procedure, r represents the connection between the two tasks, that is, the order in which the two tasks are executed, e represents a single task in the control procedure, a represents the attribute of the task, which is generally the final output or auxiliary decision-making task in the procedure, and x represents the attribute value of the task, that is, the output result.
[0050] This enables the large model agent to correctly analyze and understand the text content based on the above form of knowledge triples.
[0051] Furthermore, the content of the small sample text prompt project includes:
[0052] Part 1: Scenario setting, task description, and precise definition of triples;
[0053] Part 2: Small sample examples are presented for autonomous learning of large language model agents.
[0054] The third technical solution adopted by the present invention is:
[0055] An electronic device, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, at least one program, the code set or the instruction set is loaded and executed by the processor to implement an intelligent control task chain generation method as described above.
[0056] The fourth technical solution adopted by the present invention is:
[0057] A computer-readable storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement an intelligent control task chain generation method as described above.
[0058] The fifth technical solution adopted by the present invention is:
[0059] A computer program product or computer program includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, so that the computer device performs the above method.
[0060] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0061] (1) The present invention designs a knowledge graph intelligent generation mechanism based on a large language model agent, which can effectively realize the key information identification and intent recognition of the text, and can intelligently generate a knowledge graph based on the above analysis.
[0062] (2) The present invention designs a decision tree knowledge graph mechanism to strengthen the logical architecture of the control thinking chain based on the knowledge graph, thereby improving the retrieval accuracy and the accuracy of the thinking chain generation.
[0063] (3) The present invention is based on a large language model intelligent agent and thinking chain, and intelligently executes control tasks through user text instructions. While ensuring the realization of specific call requirements such as the expected operating effect and the security of scheduling decisions, it lowers the user's usage threshold and effectively improves the operational efficiency of scheduling personnel through the intelligent generation of scheduling thinking chains and intelligent module scheduling, thereby meeting the demand for scheduling business.
[0064] In general, the present invention can improve the quality and efficiency of obtaining text information by using an intelligent generation mechanism of knowledge graphs based on a large language model intelligent agent, and intelligently generate knowledge graphs. In addition, it uses a decision tree-style knowledge graph to establish a logical framework for regulating thinking chains to improve accuracy. At the same time, based on the large language model intelligent agent and thinking chain, it lowers the usage threshold of user regulation operations and effectively realizes intelligent regulation. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following introduction is made to the drawings of the embodiments of the present invention or the related technical solutions in the prior art. It should be understood that the drawings introduced below are only for the convenience of clearly describing some embodiments of the technical solutions of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative work.
[0066] Figure 1 This is a framework diagram of a method for generating an intelligent control task chain based on a large language model agent and a knowledge graph in an embodiment of the present invention.
[0067] Figure 2 Schematic diagram of the day-ahead and intraday control task execution mechanism in an embodiment of the present invention.
[0068] Figure 3 This is a schematic diagram of a scheduling knowledge graph in the form of a decision tree generated in an embodiment of the present invention.
[0069] Figure 4 This is a flowchart of the steps of a method for generating an intelligent control task chain in an embodiment of the present invention. DETAILED DESCRIPTION
[0070] The embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention and are not to be construed as limiting the present invention. The step numbers in the following embodiments are provided for ease of explanation only and do not limit the order of the steps. The order of execution of the steps in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.
[0071] In the description of the present invention, it should be understood that descriptions involving orientations, such as up, down, front, back, left, right, etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, they cannot be understood as limitations on the present invention.
[0072] In the description of the present invention, "several" means one or more, "many" means more than two, "greater than," "less than," and "exceed" are understood to exclude the number itself, while "above," "below," and "within" are understood to include the number itself. The use of "first" and "second" in the description is solely for the purpose of distinguishing technical features and should not be construed as indicating or implying relative importance, implicitly specifying the number of the indicated technical features, or implicitly specifying the order of the indicated technical features.
[0073] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, and connecting should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.
[0074] In response to existing technical problems, the present invention proposes an intelligent control task chain generation scheme based on a large language model agent and knowledge graph, which can effectively realize the intelligent extraction of control information and the intelligent generation and execution of task chains, improve the quality of information feature extraction, and improve the efficiency of control task chain generation and intelligent execution of control tasks. At the same time, it also supports post-generation updates and adjustments, lowering the operational threshold.
[0075] Specifically, to address the problem that existing large language models rely on fixed pre-training data and are difficult to update or integrate new knowledge in real time, knowledge graphs can dynamically access large language models to update and introduce new, structured knowledge in real time. This improves the timeliness and relevance of large models, reduces the generation of erroneous information, increases the reliability of output, and significantly improves the transparency of the model, making the reasoning process traceable and easy to understand. Therefore, the intelligent generation of regulatory task chains can be achieved based on large language model agents and knowledge graphs.
[0076] The intelligent control task chain generation method based on a large language model agent and knowledge graph uses large language model agent and knowledge graph technology to achieve intelligent processing and task chain generation for multiple types of control safety regulations and operations. The processing process generally includes feature representation of multiple types of control safety regulations and operation content; establishing a linkage mechanism between the large language model agent and the knowledge graph; generating a knowledge graph in the form of a decision tree based on the extracted features, and then generating an intelligent control task chain based on this knowledge graph.
[0077] Based on the differences in feature representation, intelligent control task chain generation methods can be divided into large language model agent-based methods and knowledge graph-based methods. Large language model agent-based methods leverage the natural language processing capabilities of large language models to perform semantic analysis and feature extraction on text information, generating knowledge triples for control operations. Knowledge graph-based methods leverage the structured data storage and association capabilities of knowledge graphs to convert knowledge triples into knowledge graphs in the form of decision trees, providing a data foundation for the generation of intelligent control task chains.
[0078] The intelligent regulation task chain generation method is based on small sample learning, that is, model training is carried out through pre-annotated text data to extract semantic information, improve the accuracy of regulation task chain generation, and perform deep feature learning through a large language model intelligent agent to convert multi-type regulation content into knowledge triples and generate a knowledge graph.
[0079] Example 1
[0080] like Figure 4 As shown, this embodiment provides a method for generating an intelligent control task chain, comprising the following steps:
[0081] S1. Obtain the content text of multiple types of regulatory safety regulations and regulatory operations.
[0082] S2. Input the content text into a pre-trained large language model agent, which autonomously extracts the content to extract the control operation sequence and call content in various situations in the form of triple text.
[0083] As an optional implementation, step S2 specifically includes:
[0084] After building the large language model agent framework, the agent is prompted with examples and instructions for small sample text projects, enabling it to extract knowledge triples from text using templates. The knowledge triples are in the form of:
[0085]
[0086] In the formula, E represents the set of entities, R represents the set of relationships, T represents the set of triples in the knowledge graph, A represents the set of attributes, and X represents the set of attribute values. The "×" in the formula represents the Cartesian product, which is the combination of all possible ordered pairs. Therefore, (E × R × E) represents the set of triplets between entities connected by relationships, (E × A × X) represents the combination of entities, attributes, and attribute values, and T, as a subset of (E × R × E) and (E × A × X), means that each triple is composed of an entity, a relationship / attribute, and an entity / attribute value.
[0087] Therefore, a specific triple t can be expressed as:
[0088] t=(e1,r,e2)∈T
[0089] e1,e2∈E,r∈R
[0090] or:
[0091] t=(e,a,x)∈T
[0092] e∈E,a∈A,x∈X
[0093] This enables the large model agent to correctly analyze and understand the text content based on the above form of knowledge triples.
[0094] As an optional implementation method, the specific contents of the small and medium sample text prompt project include:
[0095] Part 1 sets the scene, describes the task, and defines a precise triple: You are a network agent, helping to track and analyze all relevant knowledge triples about all relevant people, things, concepts, and so on, and integrating them with the knowledge stored in your weights and the knowledge graph. A knowledge triple is a clause consisting of a subject, a predicate, and an object. The subject is the entity being described, the predicate describes the subject's attributes, and the object is the value of the attribute.
[0096] In the second part, small sample examples are presented for autonomous learning of large language model agents:
[0097] The following is an example:
[0098] Example 1: Nevada is a state in the United States. It is also the largest gold-producing state in the United States. Output: (Nevada, located in, United States) {KG_TRIPLE_DELIMITER} (Nevada, is the largest gold-producing state in the United States)
[0099] End of example
[0100] Example 2: The Northern Zhou Dynasty belonged to the Five Dynasties and Ten Kingdoms period, and the dynasty after the Northern Zhou Dynasty was the Song Dynasty.
[0101] Output: (Northern Zhou, belongs to, Five Dynasties and Ten Kingdoms period) {KG_TRIPLE_DELIMITER} (Northern Zhou, subsequent dynasty, Song Dynasty)
[0102] End of example
[0103] The existing regulatory safety regulations and regulatory operations are provided as input to the large prediction model agent. The agent understands the sequential logic in the text content and extracts it as knowledge triples.
[0104] S3. The extracted control operation sequence and call content in various situations are used by the large language model agent to intelligently generate a knowledge graph in the form of a decision tree in the preset knowledge graph, providing a data basis for the generation of intelligent control task chains.
[0105] As an optional implementation, step S3 specifically includes the following steps:
[0106] S31: Based on the knowledge triples generated in step S2, the large language model agent divides different modules into different types of nodes and determines the ownership relationship and sequence structure between the modules;
[0107] S32: The large language model agent calls neo4j to generate relevant modules of the knowledge graph, and automatically generates a directed knowledge graph in the form of a decision tree based on the knowledge triple content in step S31 and the structure between each module.
[0108] S4. Obtain the input text instructions, the large language model intelligent agent performs intent recognition, and after autonomous understanding, intelligently generates a task chain for regulating the operation logic in the generated knowledge graph, and autonomously generates a thinking chain for task execution.
[0109] As an optional implementation, step S4 specifically includes the following steps:
[0110] S41: The user inputs text into the Big Prediction Model agent, and the Big Language Model agent performs semantic understanding and intent recognition based on the Big Language Model kernel.
[0111] S42: Read the knowledge graph based on the recognition results, and determine the key nodes that need to be called in the knowledge graph based on the keywords, thereby reading the directed decision chain to which it belongs and forming a task thinking chain;
[0112] S43: Based on the task thinking chain, the large language model intelligent agent automatically calls relevant professional modules to meet user needs.
[0113] S5. Based on the generated thought chain, the large language model agent intelligently calls relevant modules through the API interface for regulation to achieve intelligent regulation.
[0114] Specifically, according to the thought chain generated in step S4, the large language model agent intelligently calls relevant modules through the API interface to perform calculation, analysis, evaluation and operation steps to achieve intelligent control.
[0115] The above method is explained in detail below with reference to the accompanying drawings and specific embodiments.
[0116] like Figure 1 As shown, this embodiment provides a method for generating an intelligent control task chain based on a large language model agent and a knowledge graph. The large language model agent is used to analyze the control data content and user control instructions in sequence, and a decision tree knowledge graph and a control execution thinking chain are established in sequence. The method includes the following steps:
[0117] 1) Intelligent generation of decision trees:
[0118] The control data content is input into the large language model agent that has been adjusted through small sample learning. The agent intelligently recognizes and understands the input content and intelligently extracts key information. It also calls the knowledge graph and converts the extracted information into the form of knowledge graph triples and inputs it into the knowledge graph. It intelligently generates a knowledge graph in the form of a decision tree for control, such as Figure 3 shown.
[0119] 2) Intelligent execution of task chains:
[0120] like Figure 2 As shown, the power system control content is mainly divided into two parts: day-ahead dispatch plan and intraday real-time control. The relationship and order between the various parts are relatively fixed, and the main focus is on improving execution efficiency and reducing the operational threshold. This embodiment designs a control task thinking chain intelligent generation and execution mechanism based on a decision tree knowledge graph and a large language model agent for the intelligent execution of control tasks, which includes the following steps:
[0121] 2.1) The large language model agent performs intent recognition and data analysis on input user commands and real-time control data monitored by the SCADA system, and intelligently forms a chain of thought for executing relevant control modules based on the generated control decision tree knowledge graph.
[0122] 2.2) Based on the generated control task thinking chain, the large language model agent automatically calls the relevant control modules to intelligently execute according to the thinking chain, and finally intelligently outputs the execution results.
[0123] Experimental conclusion: In response to the problems of insufficient intelligence and low efficiency caused by the heavy reliance on manual labor in existing control methods, the present invention proposes an intelligent control task chain generation method based on a large language model agent and a knowledge graph. In the instructions for use of the existing control day-ahead scheduling plan and intraday real-time scheduling, the use of the method of the present invention introduces a large language model agent, which enables the control tasks in different control scenarios to intelligently generate thought chains and intelligently call related professional modules, effectively improving the efficiency and accuracy of control, and effectively lowering the threshold for control operations. In the following research, we will explore how the large language model agent can achieve intelligent planning based on the control situation in the context of integrated control and planning, as well as the issue of how the decision tree knowledge graph participates in the formation of thought chains in planning. It has good application prospects and is worthy of promotion.
[0124] Example 2
[0125] This embodiment provides an intelligent control task chain generation device, including:
[0126] A text acquisition module is used to obtain the content text of various types of regulatory safety regulations and regulatory operations;
[0127] A knowledge extraction module is used to input the content text into a pre-trained large language model agent (Agent), which autonomously extracts the content to extract the control operation sequence and call content in various situations in the form of triple text;
[0128] The graph generation module is used to intelligently generate a knowledge graph in the form of a decision tree in the preset knowledge graph using the large language model agent to extract the control operation sequence and call content in various situations, providing a data foundation for the generation of intelligent control task chains;
[0129] The thought generation module is used to obtain text instructions input by the user, and the large language model agent performs intent recognition. After autonomous understanding, it intelligently generates a task chain for regulating operation logic in the generated knowledge graph and autonomously generates a thought chain for task execution;
[0130] The automatic control module is used to intelligently call relevant modules through the API interface based on the generated thought chain to achieve intelligent control.
[0131] Since the device is an intelligent control task chain generation device of an embodiment of the present invention, and the principle of solving the problem of the device is similar to that of the method, the implementation of the device can refer to the implementation process of the above-mentioned method embodiment, and the repeated parts will not be repeated.
[0132] Example 3
[0133] An embodiment of the present invention further provides an electronic device, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the following Figure 4 A method for generating an intelligent control task chain is shown.
[0134] It is understood that the memory may include random access memory (RAM) or read-only memory (ROM). Optionally, the memory includes a non-transitory computer-readable storage medium. The memory may be used to store instructions, programs, codes, code sets, or instruction sets. The memory may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function, instructions for implementing the various method embodiments described above, etc.; the data storage area may store data created based on the use of the server, etc.
[0135] The processor may include one or more processing cores. The processor utilizes various interfaces and circuits to connect various components within the server. It executes various server functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in memory, as well as accessing data stored in memory. Optionally, the processor may be implemented using at least one of the following hardware forms: digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor may integrate one or a combination of a central processing unit (CPU) and a modem. The CPU primarily processes the operating system and application programs, while the modem handles wireless communications. It is understood that the modem may not be integrated into the processor and may be implemented separately via a single chip.
[0136] Since the electronic device is an electronic device corresponding to an intelligent control task chain generation method of an embodiment of the present invention, and the principle of solving the problem by the electronic device is similar to that of the method, the implementation of the electronic device can refer to the implementation process of the above-mentioned method embodiment, and the repeated parts will not be repeated.
[0137] Example 4
[0138] An embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, the at least one program, the code set or instruction set is loaded and executed by a processor to implement the following Figure 4 A method for generating an intelligent control task chain is shown.
[0139] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program. The program can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium capable of carrying or storing data.
[0140] Since the storage medium is the storage medium corresponding to an intelligent control task chain generation method of an embodiment of the present invention, and the principle of solving the problem by the storage medium is similar to that of the method, the implementation of the storage medium can refer to the implementation process of the above-mentioned method embodiment, and the repeated parts will not be repeated.
[0141] Example 5
[0142] In some possible implementations, various aspects of the method of the embodiments of the present invention may also be implemented in the form of a program product, which includes program code. When the program product is run on a computer device, the program code is used to cause the computer device to perform the steps of the method for generating an intelligent control task chain according to various exemplary embodiments of the present application described above in this specification. The executable computer program code or "code" for executing each embodiment may be written in a high-level programming language such as C, C++, C#, Smalltalk, Java, JavaScript, Visual Basic, Structured Query Language (e.g., Transact-SQL), Perl, or in various other programming languages.
[0143] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0144] In the description of this specification, the reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" mean that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification and features of different embodiments or examples without contradiction.
[0145] The above embodiments are intended only to illustrate the technical concepts and features of the present invention. Their purpose is to enable those skilled in the art to understand the contents of the present invention and implement them accordingly. They are not intended to limit the scope of protection of the present invention. Any equivalent changes or modifications made based on the essence of the present invention are intended to be covered by the scope of protection of the present invention.
Claims
1. A method for generating an intelligent control task chain, characterized in that: The following steps are involved: Obtain the content text of various types of regulatory safety regulations and regulatory operations; Input the content text into a pre-trained large language model agent, which autonomously extracts the content to extract the control operation sequence and call content in various situations in the form of triple text; The extracted control operation sequence and call content in various situations are used by the large language model agent to intelligently generate a knowledge graph in the form of a decision tree in the preset knowledge graph, providing a data foundation for the generation of intelligent control task chains; After receiving the input text instructions, the large language model agent recognizes the intent and, after autonomous understanding, intelligently generates a task chain for regulating the operation logic in the generated knowledge graph, and autonomously generates a thought chain for task execution; Based on the generated thought chain, the large language model agent intelligently calls relevant modules through the API interface to achieve intelligent regulation; The control operation sequence and call content in various situations are extracted in the form of triple text, including: After building the large language model agent framework, we use small sample text to prompt examples and instructions for the project, enabling the agent to extract knowledge triples from the text using templates. The knowledge triples are in the form of: Where E represents the entity set, R represents the relationship set, T represents the triple set in the knowledge graph, A represents the attribute set, and X represents the attribute value set; × represents the Cartesian product; (E×R×E) represents the set of triples connected by relationships between entities, (E×A×X) represents the combination of entities, attributes, and attribute values, and T, as a subset of (E×R×E) and (E×A×X), means that each triple consists of entity-relationship-entity, or entity-attribute-attribute value; Therefore, a specific triplet t is represented as: t=(e1,r,e2)∈T e1,e2∈E,r∈R or: t=(e,a,x)∈T e∈E,a∈A,x∈X In the formula, e1 and e2 represent two consecutive tasks in the control procedure, r represents the connection between the two tasks, that is, the order in which the two tasks are executed, e represents a single task in the control procedure, a represents the attribute of the task, and x represents the attribute value of the task, that is, the output result; The content of the small sample text prompt project includes: Part 1: Scenario setting, task description, and precise definition of triples; Part 2: Small sample examples are presented for autonomous learning of large language model agents.
2. The method for generating an intelligent control task chain according to claim 1, characterized in that: The extracted control operation sequence and call content in various situations are used to intelligently generate a knowledge graph in the form of a decision tree in the preset knowledge graph through the large language model agent, including: Based on the knowledge triples obtained, the large language model agent distinguishes different modules in the control program into different types of nodes and determines the relationship and sequence structure between the modules; The intelligent agent calls the relevant modules of neo4j to generate the knowledge graph, and automatically generates a directed knowledge graph in the form of a decision tree based on the knowledge triple content and the structure between modules.
3. The method for generating an intelligent control task chain according to claim 1, wherein: The input text instruction is obtained, the large language model agent performs intent recognition, and after autonomous understanding, intelligently generates a task chain for regulating the operation logic in the generated knowledge graph, and autonomously generates a thought chain for task execution, including: Get the input text instructions and input them into the big prediction model agent. The big prediction model agent performs semantic understanding and intent recognition based on the big language model kernel. The knowledge graph is read according to the recognition results, and the key nodes that need to be called in the knowledge graph are determined based on the keywords, so as to read the directed decision chain to which the key nodes belong and form a thinking chain for task execution.
4. An intelligent control task chain generation device, characterized in that: include: A text acquisition module is used to obtain the content text of various types of regulatory safety regulations and regulatory operations; A knowledge extraction module is used to input the content text into a pre-trained large language model agent, and the large language model agent autonomously extracts the content to extract the control operation sequence and call content in various situations in the form of triple text; The graph generation module is used to intelligently generate a knowledge graph in the form of a decision tree in the preset knowledge graph using the large language model agent to extract the control operation sequence and call content in various situations, providing a data foundation for the generation of intelligent control task chains; The thought generation module is used to obtain input text instructions, and the large language model agent performs intent recognition. After autonomous understanding, it intelligently generates a task chain for regulating operation logic in the generated knowledge graph, and autonomously generates a thought chain for task execution; The automatic control module is used to control the large language model agent by intelligently calling relevant modules through the API interface based on the generated thought chain to achieve intelligent control; The control operation sequence and call content in various situations are extracted in the form of triple text, including: After building the large language model agent framework, we use small sample text to prompt examples and instructions for the project, enabling the agent to extract knowledge triples from the text using templates. The knowledge triples are in the form of: Where E represents the entity set, R represents the relationship set, T represents the triple set in the knowledge graph, A represents the attribute set, and X represents the attribute value set; × represents the Cartesian product; (E×R×E) represents the set of triples connected by relationships between entities, (E×A×X) represents the combination of entities, attributes, and attribute values, and T, as a subset of (E×R×E) and (E×A×X), means that each triple consists of entity-relationship-entity, or entity-attribute-attribute value; Therefore, a specific triplet t is represented as: t=(e1,r,e2)∈T e1,e2∈E,r∈R or: t=(e,a,x)∈T e∈E,a∈A,x∈X In the formula, e1 and e2 represent two consecutive tasks in the control procedure, r represents the connection between the two tasks, that is, the order in which the two tasks are executed, e represents a single task in the control procedure, a represents the attribute of the task, and x represents the attribute value of the task, that is, the output result; The content of the small sample text prompt project includes: Part 1: Scenario setting, task description, and precise definition of triples; Part 2: Small sample examples are presented for autonomous learning of large language model agents.
5. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the method according to any one of claims 1 to 3.
6. A computer-readable storage medium, characterized in that The storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Power dispatching system and method based on knowledge graph
CN112632288A
Intelligent task generation method and device for power system simulation calculation and analysis machine
CN117689012A